45 Foam::functionObjects::norm::normType
47Foam::functionObjects::norm::normTypeNames
49 { normType::L1 ,
"L1" },
50 { normType::L2 ,
"L2" },
51 { normType::LP ,
"Lp" },
52 { normType::MAX ,
"max" },
53 { normType::COMPOSITE ,
"composite" },
54 { normType::FIELD ,
"divisorField" }
72 || calcNorm<sphericalTensor>()
73 || calcNorm<symmTensor>()
107 norm_ = normTypeNames.get(
"norm",
dict);
109 if (norm_ == normType::LP)
114 if (norm_ == normType::COMPOSITE)
116 divisorPtr_ = Function1<scalar>::New(
"divisor",
dict, &mesh_);
121 <<
"The norm 'composite' needs the input entry 'divisor'."
126 if (norm_ == normType::FIELD)
128 divisorFieldName_ =
dict.get<word>(
"divisorField");
130 if (divisorFieldName_.empty())
133 <<
"The norm 'field' needs the input entry 'divisorField'."
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
static MinMax< scalar > ge(const scalar &minVal)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
fieldExpression(const word &name, const Time &runTime, const dictionary &dict, const word &fieldName=word::null, const word &resultName=word::null)
Construct from name, Time and dictionary.
virtual bool calc()=0
Calculate the components of the field and return true if successful.
const fvMesh & mesh_
Reference to the fvMesh.
Normalises an input field with a chosen norm, and outputs a new normalised field.
norm(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
bool read(const char *buf, int32_t &val)
Same as readInt32.
errorManip< error > abort(error &err)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.