mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: functionObjects improvements.
- readFields works seamlessly on-the-fly and as postprocessor - new surfaceInterpolateFields to create interpolated field - writeRegisteredObject only check upon writing, not upon startup - add min,max to faceSource
This commit is contained in:
@ -49,13 +49,14 @@ namespace Foam
|
||||
fieldValues::faceSource::sourceTypeNames_;
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::faceSource::operationType, 5>::
|
||||
const char* NamedEnum<fieldValues::faceSource::operationType, 7>::
|
||||
names[] =
|
||||
{
|
||||
"none", "sum", "areaAverage", "areaIntegrate", "weightedAverage"
|
||||
"none", "sum", "areaAverage",
|
||||
"areaIntegrate", "weightedAverage", "min", "max"
|
||||
};
|
||||
|
||||
const NamedEnum<fieldValues::faceSource::operationType, 5>
|
||||
const NamedEnum<fieldValues::faceSource::operationType, 7>
|
||||
fieldValues::faceSource::operationTypeNames_;
|
||||
|
||||
}
|
||||
|
||||
@ -106,11 +106,13 @@ public:
|
||||
opSum,
|
||||
opAreaAverage,
|
||||
opAreaIntegrate,
|
||||
opWeightedAverage
|
||||
opWeightedAverage,
|
||||
opMin,
|
||||
opMax
|
||||
};
|
||||
|
||||
//- Operation type names
|
||||
static const NamedEnum<operationType, 5> operationTypeNames_;
|
||||
static const NamedEnum<operationType, 7> operationTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -103,6 +103,16 @@ Type Foam::fieldValues::faceSource::processValues
|
||||
result = sum(values*weightField)/sum(weightField);
|
||||
break;
|
||||
}
|
||||
case opMin:
|
||||
{
|
||||
result = min(values);
|
||||
break;
|
||||
}
|
||||
case opMax:
|
||||
{
|
||||
result = max(values);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// Do nothing
|
||||
|
||||
Reference in New Issue
Block a user