33 bool Foam::functionObjects::reference::calcType()
35 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
37 const VolFieldType* vfPtr = findObject<VolFieldType>(
fieldName_);
41 const VolFieldType& vf = *vfPtr;
44 dimensioned<Type> offset(
"offset", vf.dimensions(),
Zero, localDict_);
46 dimensioned<Type> refValue(
"refValue", vf.dimensions(),
Zero);
48 autoPtr<Function1<Type>> valuePtr
50 Function1<Type>::New(
"refValue", localDict_, &this->
mesh_)
53 refValue.value() = valuePtr->value(this->
time().value());
55 Info<<
" Reference value: " << refValue.value() <<
endl;
60 scale_*(vf - refValue + offset)
word resultName_
Name of result field.
word fieldName_
Name of field to process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const Time & time() const
Return time database.
const fvMesh & mesh_
Reference to the fvMesh.
static constexpr const zero Zero
Global zero (0)