33 namespace functionObjects
71 const wordList& fields1 = region1Ptr_->fields();
72 const wordList& fields2 = region2Ptr_->fields();
80 commonFields.append(fields1[i]);
86 writeHeaderValue(os,
"Source1", region1Ptr_->
name());
87 writeHeaderValue(os,
"Source2", region2Ptr_->
name());
88 writeHeaderValue(os,
"Operation", operationTypeNames_[operation_]);
89 writeCommented(os,
"Time");
93 os <<
tab << commonFields[i];
110 operation_(opSubtract),
114 if (!isA<fvMesh>(obr_))
161 operation_ = operationTypeNames_.read(dict.
lookup(
"operation"));
171 region1Ptr_->write();
172 region2Ptr_->write();
182 processFields<scalar>(
found);
183 processFields<vector>(
found);
184 processFields<sphericalTensor>(
found);
185 processFields<symmTensor>(
found);
186 processFields<tensor>(
found);
virtual void writeFileHeader(const label i)
Output file header information.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
addToRunTimeSelectionTable(functionObject, fieldValueDelta, dictionary)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool read(const dictionary &)
Read from dictionary.
functionObject base class for writing files
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
operationType
Operation type enumeration.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
static const NamedEnum< operationType, 5 > operationTypeNames_
Operation type names.
Abstract base-class for Time/database function objects.
This function object provides a differencing option between two 'field value' function objects...
Initialise the NamedEnum HashTable from the static list of names.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual ~fieldValueDelta()
Destructor.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
virtual bool execute()
Do nothing.
A class for handling words, derived from string.
defineTypeNameAndDebug(fieldValueDelta, 0)
static autoPtr< fieldValue > New(const word &name, const objectRegistry &obr, const dictionary &dict, const bool output=true)
Return a reference to the selected fieldValue.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual const fileName & name() const
Return the name of the stream.
fieldValueDelta(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
virtual bool write()
Write function.
#define Log
Report write to Foam::Info if the local log switch is true.
virtual bool write()
Calculate and write.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.