33 namespace functionObjects
71 const wordList fields1 = region1Ptr_->fields();
72 const wordList fields2 = region2Ptr_->fields();
80 commonFields.append(fields1[fieldi]);
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];
112 region1Ptr_(
nullptr),
155 operation_ = operationTypeNames_.read(dict.
lookup(
"operation"));
166 return region1Ptr_->fields();
174 region1Ptr_->write();
175 region2Ptr_->write();
185 processFields<scalar>(
found);
186 processFields<vector>(
found);
187 processFields<sphericalTensor>(
found);
188 processFields<symmTensor>(
found);
189 processFields<tensor>(
found);
Specialisation of Foam::functionObject for a region and providing a reference to the region Foam::obj...
virtual void writeFileHeader(const label i)
Output file header information.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
A list of keyword definitions, which are a keyword followed by any number of values (e...
addToRunTimeSelectionTable(functionObject, fieldValueDelta, dictionary)
virtual bool read(const dictionary &)
Read from dictionary.
void size(const label)
Override size to be inconsistent with allocated storage.
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 functionObjects.
Provides a differencing option between two 'field value' function objects.
Initialise the NamedEnum HashTable from the static list of names.
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
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.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
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.
virtual const fileName & name() const
Return the name of the stream.
defineTypeNameAndDebug(fieldValueDelta, 0)
virtual wordList fields() const
Return the list of fields required.
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...
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 occurrence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
#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.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...