Abstract base-class for Time/database function objects. More...
Classes | |
class | unavailableFunctionObject |
Abstract functionObject to report when a real version is unavailable. More... | |
Public Member Functions | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject ()=default |
Destructor. More... | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
const word & | name () const noexcept |
Return the name of this functionObject. More... | |
bool | useNamePrefix () const noexcept |
Return the flag for adding a scoping name prefix. More... | |
bool | useNamePrefix (bool on) noexcept |
Modify the flag for adding a scoping name prefix. More... | |
virtual bool | read (const dictionary &dict) |
Read and set the function object if its data have changed. More... | |
virtual bool | execute ()=0 |
Called at each ++ or += of the time-loop. More... | |
virtual bool | execute (const label subIndex) |
Execute using the specified subIndex. More... | |
virtual bool | write ()=0 |
Called at each ++ or += of the time-loop. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
virtual bool | filesModified () const |
Did any file get changed during execution? More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
Static Public Member Functions | |
static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
Select from dictionary, based on its "type" entry. More... | |
Public Attributes | |
bool | log |
Flag to write log into Info. More... | |
Static Public Attributes | |
static int | debug |
Flag to execute debug content. More... | |
static bool | postProcess |
Global post-processing mode switch. More... | |
static bool | defaultUseNamePrefix |
Global default for useNamePrefix. More... | |
static word | outputPrefix |
Directory prefix. More... | |
Protected Member Functions | |
word | scopedName (const word &name) const |
Return a scoped (prefixed) name. More... | |
Abstract base-class for Time/database function objects.
Definition at line 332 of file functionObject.H.
|
explicit |
Construct from components.
Definition at line 64 of file functionObject.C.
|
virtualdefault |
Destructor.
|
protected |
Return a scoped (prefixed) name.
Used to construct local field names, controlled by useNamePrefix_
Definition at line 51 of file functionObject.C.
References functionObject::name(), and IOobject::scopedName().
Referenced by momentumError::momentumError(), proudmanAcousticPower::proudmanAcousticPower(), fieldExpression::setResultName(), wallHeatFlux::wallHeatFlux(), wallShearStress::wallShearStress(), and yPlus::yPlus().
declareRunTimeSelectionTable | ( | autoPtr | , |
functionObject | , | ||
dictionary | , | ||
(const word &name, const Time &runTime, const dictionary &dict) | , | ||
(name, runTime, dict) | |||
) |
|
inline |
|
static |
Select from dictionary, based on its "type" entry.
Definition at line 78 of file functionObject.C.
References dictionary::csearchCompat(), DebugInfo, dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FatalErrorInLookup, dictionary::get(), Time::libs(), Foam::name(), Foam::nl, dlLibraryTable::open(), and runTime.
|
pure virtual |
Runtime type information.
Referenced by functionObject::unavailableFunctionObject::carp(), extractEulerianParticles::checkFaceZone(), fieldsExpression::fieldsExpression(), fieldExpression::foundObject(), sizeDistribution::initialise(), and fieldAverage::initialize().
|
noexcept |
Return the name of this functionObject.
Definition at line 143 of file functionObject.C.
Referenced by extractEulerianParticles::checkFaceZone(), extractEulerianParticles::extractEulerianParticles(), fieldsExpression::fieldsExpression(), fieldExpression::foundObject(), sizeDistribution::initialise(), fieldAverage::initialize(), moleFractions< ThermoType >::moleFractions(), fieldValue::New(), pointHistory::pointHistory(), functionObject::scopedName(), sizeDistribution::sizeDistribution(), DESModelRegions::write(), wallHeatFlux::write(), wallShearStress::write(), yPlus::write(), and writeFreeSurface::writeFreeSurface().
|
noexcept |
Return the flag for adding a scoping name prefix.
Definition at line 149 of file functionObject.C.
Modify the flag for adding a scoping name prefix.
Definition at line 155 of file functionObject.C.
|
virtual |
Read and set the function object if its data have changed.
Reimplemented in age, AMIWeights, blendingFactor, comfort, continuityError, CourantNo, Curle, ddt2, DESModelRegions, extractEulerianParticles, fieldAverage, fieldExtents, fieldMinMax, histogram, interfaceHeight, log, mapFields, momentum, momentumError, norm, particleDistribution, PecletNo, pow, pressure, processorField, proudmanAcousticPower, reactionsSensitivityAnalysis< chemistryType >, regionSizeDistribution, stabilityBlendingFactor, streamLine, streamLineBase, surfaceDistance, surfaceInterpolate, turbulenceFields, valueAverage, wallBoundedStreamLine, wallShearStress, writeCellCentres, writeCellVolumes, XiReactionRate, yPlus, propellerInfo, dsmcFields, icoUncoupledKinematicCloud, energySpectrum, energyTransport, scalarTransport, codedFunctionObject, runTimeControl, solverInfo, syncObjects, thermoCoupleProbes, timeActivatedFileUpdate, writeDictionary, writeObjects, timeControl, filmFlux, patchProbes, probes, sampledSets, sixDoFRigidBodyState, BilgerMixtureFraction, ObukhovLength, pointHistory, writeFreeSurface, binField, columnAverage, derivedFields, DMD, fvExpressionField, externalCoupled, fieldExpression, fieldsExpression, fieldValue, surfaceFieldValue, volFieldValue, fluxSummary, heatTransferCoeff, multiphaseInterHtcModel, reactingEulerHtcModel, limitFields, multiFieldValue, nearWallFields, randomise, readFields, reference, setFlow, wallHeatFlux, zeroGradient, forceCoeffs, forces, hydrostaticPressure, cloudInfo, dataCloud, vtkCloud, phaseForces, sizeDistribution, electricPotential, abort, areaWrite, ensightWrite, multiRegion, removeRegisteredObject, setTimeStepFunctionObject, systemCall, timeInfo, vtkWrite, regionFunctionObject, setTimeStepFaRegionsFunctionObject, sampledSurfaces, specieReactionRates< ChemistryModelType >, and moleFractions< ThermoType >.
Definition at line 163 of file functionObject.C.
References dict, dictionary::getOrDefault(), keyType::LITERAL, and Foam::log().
|
pure virtual |
Called at each ++ or += of the time-loop.
postProcess overrides the usual executeControl behaviour and forces execution (used in post-processing mode)
Implemented in ObukhovLength, pointHistory, writeFreeSurface, age, AMIWeights, binField, columnAverage, comfort, continuityError, Curle, ddt2, derivedFields, DESModelRegions, DMD, fvExpressionField, externalCoupled, extractEulerianParticles, fieldAverage, fieldExpression, fieldExtents, fieldMinMax, fieldsExpression, fieldValue, fluxSummary, histogram, interfaceHeight, limitFields, mapFields, momentum, momentumError, multiFieldValue, nearWallFields, particleDistribution, processorField, proudmanAcousticPower, reactionsSensitivityAnalysis< chemistryType >, readFields, regionSizeDistribution, setFlow, streamLineBase, surfaceDistance, surfaceInterpolate, turbulenceFields, valueAverage, wallHeatFlux, wallShearStress, writeCellCentres, writeCellVolumes, XiReactionRate, yPlus, zeroGradient, forceCoeffs, forces, propellerInfo, hydrostaticPressure, cloudInfo, dataCloud, dsmcFields, icoUncoupledKinematicCloud, vtkCloud, phaseForces, sizeDistribution, energySpectrum, electricPotential, energyTransport, scalarTransport, abort, areaWrite, codedFunctionObject, ensightWrite, multiRegion, parProfiling, removeRegisteredObject, runTimeControl, setTimeStepFunctionObject, solverInfo, syncObjects, systemCall, thermoCoupleProbes, timeActivatedFileUpdate, timeInfo, vtkWrite, writeDictionary, writeObjects, functionObject::unavailableFunctionObject, timeControl, setTimeStepFaRegionsFunctionObject, filmFlux, patchProbes, probes, sampledSets, sampledSurfaces, sixDoFRigidBodyState, BilgerMixtureFraction, specieReactionRates< ChemistryModelType >, and moleFractions< ThermoType >.
|
virtual |
Execute using the specified subIndex.
The base implementation is a no-op.
subIndex | an execution sub-index corresponding to a sub-cycle or something similar. |
Reimplemented in externalCoupled, and timeControl.
Definition at line 186 of file functionObject.C.
|
pure virtual |
Called at each ++ or += of the time-loop.
postProcess overrides the usual writeControl behaviour and forces writing always (used in post-processing mode)
Implemented in ObukhovLength, pointHistory, writeFreeSurface, age, AMIWeights, binField, blendingFactor, columnAverage, comfort, components, continuityError, Curle, ddt2, derivedFields, DESModelRegions, div, DMD, fvExpressionField, externalCoupled, extractEulerianParticles, fieldAverage, fieldExpression, fieldExtents, fieldMinMax, fieldsExpression, fieldValue, surfaceFieldValue, volFieldValue, fluxSummary, histogram, interfaceHeight, limitFields, mapFields, momentum, momentumError, multiFieldValue, nearWallFields, particleDistribution, processorField, proudmanAcousticPower, reactionsSensitivityAnalysis< chemistryType >, readFields, regionSizeDistribution, setFlow, stabilityBlendingFactor, streamLineBase, surfaceDistance, surfaceInterpolate, turbulenceFields, valueAverage, wallHeatFlux, wallShearStress, writeCellCentres, writeCellVolumes, XiReactionRate, yPlus, zeroGradient, forceCoeffs, forces, propellerInfo, hydrostaticPressure, cloudInfo, dataCloud, dsmcFields, icoUncoupledKinematicCloud, vtkCloud, phaseForces, sizeDistribution, energySpectrum, electricPotential, energyTransport, scalarTransport, abort, areaWrite, codedFunctionObject, ensightWrite, multiRegion, parProfiling, removeRegisteredObject, runTimeControl, setTimeStepFunctionObject, solverInfo, syncObjects, systemCall, thermoCoupleProbes, timeActivatedFileUpdate, timeInfo, vtkWrite, writeDictionary, writeObjects, functionObject::unavailableFunctionObject, timeControl, setTimeStepFaRegionsFunctionObject, filmFlux, patchProbes, probes, sampledSets, sampledSurfaces, sixDoFRigidBodyState, BilgerMixtureFraction, specieReactionRates< ChemistryModelType >, and moleFractions< ThermoType >.
|
virtual |
Called when Time::run() determines that the time-loop exits.
The base implementation is a no-op.
Reimplemented in DMD, externalCoupled, interfaceHeight, abort, codedFunctionObject, ensightWrite, parProfiling, systemCall, vtkWrite, and timeControl.
Definition at line 192 of file functionObject.C.
Referenced by nearWallFields::calcAddressing(), and externalCoupled::end().
|
virtual |
Called at the end of Time::adjustDeltaT() if adjustTime is true.
Reimplemented in setTimeStepFunctionObject, timeControl, and setTimeStepFaRegionsFunctionObject.
Definition at line 198 of file functionObject.C.
|
virtual |
Did any file get changed during execution?
Reimplemented in timeActivatedFileUpdate, and timeControl.
Definition at line 204 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in momentum, streamLineBase, probes, sampledSets, ObukhovLength, binField, derivedFields, surfaceFieldValue, processorField, areaWrite, ensightWrite, vtkWrite, timeControl, and sampledSurfaces.
Definition at line 210 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in momentum, streamLineBase, probes, sampledSets, ObukhovLength, derivedFields, binField, surfaceFieldValue, propellerInfo, areaWrite, vtkWrite, timeControl, sampledSurfaces, and ensightWrite.
Definition at line 214 of file functionObject.C.
bool log |
Flag to write log into Info.
Definition at line 361 of file functionObject.H.
|
static |
Flag to execute debug content.
Definition at line 367 of file functionObject.H.
Referenced by nearWallFields::calcAddressing(), patchProbes::findElements(), and fieldExpression::foundObject().
|
static |
Global post-processing mode switch.
Definition at line 370 of file functionObject.H.
Referenced by runTimeControl::read().
|
static |
Global default for useNamePrefix.
Definition at line 373 of file functionObject.H.
Referenced by functionObjectList::read().
|
static |
Directory prefix.
Definition at line 376 of file functionObject.H.
Referenced by writeFile::baseFileDir(), noiseModel::baseFileDir(), CloudFunctionObject< CloudType >::CloudFunctionObject(), if(), averageNeighbourFvGeometryScheme::movePoints(), dynamicFvMesh::New(), dataCloud::read(), vtkCloud::read(), ensightWrite::read(), vtkWrite::read(), shortestPathSet::shortestPathSet(), and streamLineBase::writeToFile().