ENH: postOperation for surfaceFieldValue

- currently only 'none' or 'sqrt', which can be useful in combination
  with integrate or averaging functions.
This commit is contained in:
Mark Olesen
2016-12-15 09:46:00 +01:00
parent 001a2e4a37
commit b073c0a104
3 changed files with 64 additions and 4 deletions

View File

@ -85,6 +85,18 @@ const char* Foam::NamedEnum
"areaNormalIntegrate"
};
template<>
const char* Foam::NamedEnum
<
Foam::functionObjects::fieldValues::surfaceFieldValue::postOperationType,
2
>::names[] =
{
"none",
"sqrt"
};
const Foam::NamedEnum
<
Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes,
@ -97,6 +109,13 @@ const Foam::NamedEnum
16
> Foam::functionObjects::fieldValues::surfaceFieldValue::operationTypeNames_;
const Foam::NamedEnum
<
Foam::functionObjects::fieldValues::surfaceFieldValue::postOperationType,
2
>
Foam::functionObjects::fieldValues::surfaceFieldValue::postOperationTypeNames_;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
@ -649,6 +668,11 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
surfaceWriterPtr_(nullptr),
regionType_(regionTypeNames_.read(dict.lookup("regionType"))),
operation_(operationTypeNames_.read(dict.lookup("operation"))),
postOperation_
(
postOperationTypeNames_
[dict.lookupOrDefault<word>("postOperation", "none")]
),
weightFieldName_("none"),
orientWeightField_(false),
orientedFieldsStart_(labelMax),
@ -674,6 +698,11 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
surfaceWriterPtr_(nullptr),
regionType_(regionTypeNames_.read(dict.lookup("regionType"))),
operation_(operationTypeNames_.read(dict.lookup("operation"))),
postOperation_
(
postOperationTypeNames_
[dict.lookupOrDefault<word>("postOperation", "none")]
),
weightFieldName_("none"),
orientWeightField_(false),
orientedFieldsStart_(labelMax),