adds/subtracts a field or value to/from a base field. More...
Public Types | |
enum | calcTypes { FIELD, VALUE } |
enum | calcModes { ADD, SUBTRACT } |
Public Member Functions | |
TypeName ("addSubtract") | |
Runtime type information. More... | |
addSubtract () | |
Construct null. More... | |
virtual | ~addSubtract () |
Destructor. More... | |
![]() | |
TypeName ("calcType") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, calcType, dictionary,(),()) | |
calcType () | |
Construct null. More... | |
virtual | ~calcType () |
Destructor. More... | |
void | tryInit () |
Initialise - typically setting static variables,. More... | |
void | tryPreCalc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Pre-time loop calculations. More... | |
void | tryCalc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Time loop calculations. More... | |
void | tryPostCalc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Post-time loop calculations. More... | |
Protected Member Functions | |
virtual void | init () |
Initialise - typically setting static variables,. More... | |
virtual void | preCalc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Pre-time loop calculations. More... | |
virtual void | calc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Time loop calculations. More... | |
template<class Type > | |
void | writeAddSubtractField (const IOobject &baseHeader, const IOobject &addSubtractHeader, const fvMesh &mesh, bool &processed) |
Write addSubtract field. More... | |
template<class Type > | |
void | writeAddSubtractValue (const IOobject &baseHeader, const string &valueStr, const fvMesh &mesh, bool &processed) |
Write addSubtract value. More... | |
![]() | |
virtual void | postCalc (const argList &args, const Time &runTime, const fvMesh &mesh) |
Post-time loop calculations. More... | |
Private Member Functions | |
void | writeAddSubtractFields (const Time &runTime, const fvMesh &mesh, const IOobject &baseFieldHeader) |
Calc and output field addSubtractitions. More... | |
void | writeAddSubtractValues (const Time &runTime, const fvMesh &mesh, const IOobject &baseFieldHeader) |
Calc and output field and value addSubtractitions. More... | |
addSubtract (const addSubtract &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const addSubtract &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
word | baseFieldName_ |
Name of base field (to addSubtract to) More... | |
calcTypes | calcType_ |
Calc type as given by enumerations above. More... | |
word | addSubtractFieldName_ |
Name of field to add/subtract. More... | |
string | addSubtractValueStr_ |
String representation of value to add/subtract. More... | |
word | resultName_ |
Name of result field. More... | |
calcModes | calcMode_ |
Mode - addSubtract/subtract. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< calcType > | New (const word &calcTypeName) |
adds/subtracts a field or value to/from a base field.
New field name specified by -resultName option, or automatically as: <baseFieldName>_add_<addSubtractFieldName> <baseFieldName>_add_value <baseFieldName>_subtract_<addSubtractFieldName> <baseFieldName>_subtract_value
Example usage: addSubtract p add -value 100000 -resultName pAbs addSubtract U subtract -field U0
Definition at line 63 of file addSubtract.H.
enum calcTypes |
Enumerator | |
---|---|
FIELD | |
VALUE |
Definition at line 69 of file addSubtract.H.
enum calcModes |
Enumerator | |
---|---|
ADD | |
SUBTRACT |
Definition at line 75 of file addSubtract.H.
|
private |
Disallow default bitwise copy construct.
addSubtract | ( | ) |
Construct null.
Definition at line 177 of file addSubtract.C.
|
virtual |
Destructor.
Definition at line 191 of file addSubtract.C.
|
private |
Calc and output field addSubtractitions.
Definition at line 44 of file addSubtract.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::headerClassName(), IOobject::headerOk(), mesh, Foam::nl, and Time::timeName().
|
private |
Calc and output field and value addSubtractitions.
Definition at line 119 of file addSubtract.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::headerClassName(), mesh, and Foam::nl.
|
private |
Disallow default bitwise assignment.
|
protectedvirtual |
Initialise - typically setting static variables,.
e.g. command line arguments
Reimplemented from calcType.
Definition at line 197 of file addSubtract.C.
References argList::validArgs, and argList::validOptions.
Pre-time loop calculations.
Reimplemented from calcType.
Definition at line 209 of file addSubtract.C.
References args, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and argList::optionReadIfPresent().
Time loop calculations.
Reimplemented from calcType.
Definition at line 254 of file addSubtract.C.
References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::headerOk(), mesh, IOobject::MUST_READ, Foam::nl, and Time::timeName().
|
protected |
Write addSubtract field.
Definition at line 28 of file writeAddSubtractField.C.
References Foam::endl(), IOobject::headerClassName(), Foam::Info, mesh, IOobject::name(), and Foam::nl.
|
protected |
Write addSubtract value.
Definition at line 28 of file writeAddSubtractValue.C.
References Foam::endl(), IOobject::headerClassName(), Foam::Info, mesh, and IOobject::name().
TypeName | ( | "addSubtract" | ) |
Runtime type information.
|
private |
Name of base field (to addSubtract to)
Definition at line 87 of file addSubtract.H.
|
private |
Calc type as given by enumerations above.
Definition at line 90 of file addSubtract.H.
|
private |
Name of field to add/subtract.
Definition at line 93 of file addSubtract.H.
|
private |
String representation of value to add/subtract.
Definition at line 96 of file addSubtract.H.
|
private |
Name of result field.
Definition at line 99 of file addSubtract.H.
|
private |
Mode - addSubtract/subtract.
Definition at line 102 of file addSubtract.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.