Added additional weighted Ops for faceSource
This commit is contained in:
parent
67ab0b5abd
commit
34d4a30be7
3 changed files with 17 additions and 3 deletions
|
@ -48,11 +48,13 @@ namespace Foam
|
|||
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::faceSource::operationType, 15>::names[] =
|
||||
const char* NamedEnum<fieldValues::faceSource::operationType, 17>::names[] =
|
||||
{
|
||||
"none",
|
||||
"sum",
|
||||
"weightedSum",
|
||||
"sumMag",
|
||||
"weightedSumMag",
|
||||
"sumDirection",
|
||||
"sumDirectionBalance",
|
||||
"average",
|
||||
|
@ -78,7 +80,7 @@ namespace Foam
|
|||
const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3>
|
||||
Foam::fieldValues::faceSource::sourceTypeNames_;
|
||||
|
||||
const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 15>
|
||||
const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 17>
|
||||
Foam::fieldValues::faceSource::operationTypeNames_;
|
||||
|
||||
|
||||
|
|
|
@ -185,7 +185,9 @@ public:
|
|||
{
|
||||
opNone,
|
||||
opSum,
|
||||
opWeightedSum,
|
||||
opSumMag,
|
||||
opWeightedSumMag,
|
||||
opSumDirection,
|
||||
opSumDirectionBalance,
|
||||
opAverage,
|
||||
|
@ -201,7 +203,7 @@ public:
|
|||
};
|
||||
|
||||
//- Operation type names
|
||||
static const NamedEnum<operationType, 15> operationTypeNames_;
|
||||
static const NamedEnum<operationType, 17> operationTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
@ -143,11 +143,21 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
|||
result = sum(values);
|
||||
break;
|
||||
}
|
||||
case opWeightedSum:
|
||||
{
|
||||
result = sum(weightField*values);
|
||||
break;
|
||||
}
|
||||
case opSumMag:
|
||||
{
|
||||
result = sum(cmptMag(values));
|
||||
break;
|
||||
}
|
||||
case opWeightedSumMag:
|
||||
{
|
||||
result = sum(weightField*cmptMag(values));
|
||||
break;
|
||||
}
|
||||
case opSumDirection:
|
||||
{
|
||||
FatalErrorIn
|
||||
|
|
Reference in a new issue