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 65 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().
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 79 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.
Referenced by reactingEulerHtcModel::q(), multiRegion::read(), functionObjectList::read(), and codedFunctionObject::redirectFunctionObject().
|
pure virtual |
Runtime type information.
Referenced by extractEulerianParticles::checkFaceZone(), runTimeControl::execute(), surfaceInterpolate::execute(), surfaceDistance::execute(), fieldAverage::initialize(), multiRegion::read(), abort::read(), derivedFields::read(), particleDistribution::read(), limitFields::read(), syncObjects::sync(), wallBoundedStreamLine::track(), and multiFieldValue::write().
|
noexcept |
Return the name of this functionObject.
Definition at line 143 of file functionObject.C.
Referenced by extractEulerianParticles::checkFaceZone(), runTimeControl::execute(), surfaceInterpolate::execute(), fieldAverage::initialize(), multiRegion::read(), abort::read(), particleDistribution::read(), limitFields::read(), functionObjectList::read(), functionObject::scopedName(), DESModelRegions::write(), yPlus::write(), wallHeatFlux::write(), wallShearStress::write(), and multiFieldValue::write().
|
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 surfaceFieldValue, volFieldValue, sampledSurfaces, vtkWrite, externalCoupled, fluxSummary, ObukhovLength, setFlow, ensightWrite, electricPotential, DMD, vtkCloud, fvExpressionField, sizeDistribution, heatTransferCoeff, dataCloud, multiFieldValue, nearWallFields, reference, limitFields, areaWrite, derivedFields, zeroGradient, randomise, regionFunctionObject, columnAverage, fieldValue, wallHeatFlux, hydrostaticPressure, readFields, moleFractions< ThermoType >, systemCall, fieldExpression, fieldsExpression, abort, setTimeStepFunctionObject, multiRegion, timeInfo, phaseForces, cloudInfo, setTimeStepFaRegionsFunctionObject, removeRegisteredObject, pointHistory, specieReactionRates< ChemistryModelType >, reactingEulerHtcModel, writeFreeSurface, stabilityBlendingFactor, propellerInfo, pressure, regionSizeDistribution, forces, fieldAverage, extractEulerianParticles, forceCoeffs, energyTransport, momentum, BilgerMixtureFraction, comfort, turbulenceFields, wallBoundedStreamLine, scalarTransport, Curle, streamLine, probes, mapFields, proudmanAcousticPower, log, sampledSets, fieldMinMax, interfaceHeight, pow, fieldExtents, blendingFactor, particleDistribution, timeControl, ddt2, streamLineBase, histogram, valueAverage, codedFunctionObject, solverInfo, reactionsSensitivityAnalysis< chemistryType >, age, continuityError, wallShearStress, momentumError, AMIWeights, thermoCoupleProbes, surfaceDistance, writeObjects, yPlus, DESModelRegions, surfaceInterpolate, CourantNo, PecletNo, filmFlux, patchProbes, icoUncoupledKinematicCloud, energySpectrum, syncObjects, writeCellCentres, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, sixDoFRigidBodyState, runTimeControl, dsmcFields, and writeDictionary.
Definition at line 163 of file functionObject.C.
References dict, dictionary::getOrDefault(), keyType::LITERAL, and Foam::log().
Referenced by setTimeStepFaRegionsFunctionObject::read(), timeInfo::read(), timeActivatedFileUpdate::read(), multiRegion::read(), abort::read(), setTimeStepFunctionObject::read(), syncObjects::read(), filmFlux::read(), systemCall::read(), writeObjects::read(), regionFunctionObject::read(), codedFunctionObject::read(), functionObjectList::read(), externalCoupled::read(), and vtkWrite::read().
|
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 propellerInfo, functionObject::unavailableFunctionObject, forces, regionSizeDistribution, sampledSurfaces, vtkWrite, fieldAverage, extractEulerianParticles, externalCoupled, forceCoeffs, energyTransport, fluxSummary, momentum, ObukhovLength, setFlow, ensightWrite, BilgerMixtureFraction, electricPotential, comfort, turbulenceFields, scalarTransport, DMD, vtkCloud, Curle, fvExpressionField, sizeDistribution, probes, mapFields, proudmanAcousticPower, sampledSets, fieldMinMax, interfaceHeight, dataCloud, multiFieldValue, nearWallFields, fieldExtents, limitFields, areaWrite, particleDistribution, ddt2, streamLineBase, histogram, valueAverage, solverInfo, reactionsSensitivityAnalysis< chemistryType >, age, derivedFields, zeroGradient, continuityError, wallShearStress, codedFunctionObject, timeControl, columnAverage, fieldValue, momentumError, wallHeatFlux, AMIWeights, hydrostaticPressure, readFields, surfaceDistance, thermoCoupleProbes, writeObjects, moleFractions< ThermoType >, yPlus, DESModelRegions, surfaceInterpolate, systemCall, filmFlux, fieldExpression, icoUncoupledKinematicCloud, fieldsExpression, energySpectrum, syncObjects, writeCellCentres, abort, setTimeStepFunctionObject, multiRegion, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, timeInfo, phaseForces, cloudInfo, sixDoFRigidBodyState, setTimeStepFaRegionsFunctionObject, runTimeControl, removeRegisteredObject, dsmcFields, writeDictionary, specieReactionRates< ChemistryModelType >, pointHistory, parProfiling, and writeFreeSurface.
|
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 surfaceFieldValue, stabilityBlendingFactor, propellerInfo, functionObject::unavailableFunctionObject, forces, regionSizeDistribution, volFieldValue, sampledSurfaces, vtkWrite, fieldAverage, extractEulerianParticles, externalCoupled, forceCoeffs, energyTransport, fluxSummary, momentum, ObukhovLength, setFlow, BilgerMixtureFraction, ensightWrite, electricPotential, comfort, turbulenceFields, scalarTransport, DMD, vtkCloud, Curle, fvExpressionField, sizeDistribution, probes, mapFields, proudmanAcousticPower, sampledSets, interfaceHeight, fieldMinMax, dataCloud, multiFieldValue, nearWallFields, fieldExtents, limitFields, areaWrite, blendingFactor, particleDistribution, histogram, ddt2, streamLineBase, valueAverage, solverInfo, reactionsSensitivityAnalysis< chemistryType >, age, derivedFields, components, zeroGradient, continuityError, timeControl, codedFunctionObject, wallShearStress, columnAverage, fieldValue, momentumError, wallHeatFlux, AMIWeights, hydrostaticPressure, readFields, surfaceDistance, writeObjects, moleFractions< ThermoType >, yPlus, DESModelRegions, surfaceInterpolate, thermoCoupleProbes, systemCall, div, filmFlux, fieldExpression, icoUncoupledKinematicCloud, patchProbes, fieldsExpression, energySpectrum, syncObjects, writeCellCentres, abort, setTimeStepFunctionObject, multiRegion, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, timeInfo, phaseForces, cloudInfo, sixDoFRigidBodyState, setTimeStepFaRegionsFunctionObject, runTimeControl, removeRegisteredObject, dsmcFields, writeDictionary, pointHistory, specieReactionRates< ChemistryModelType >, parProfiling, and writeFreeSurface.
|
virtual |
Called when Time::run() determines that the time-loop exits.
The base implementation is a no-op.
Reimplemented in vtkWrite, externalCoupled, ensightWrite, DMD, interfaceHeight, codedFunctionObject, timeControl, systemCall, abort, and parProfiling.
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 timeControl, setTimeStepFunctionObject, and setTimeStepFaRegionsFunctionObject.
Definition at line 198 of file functionObject.C.
|
virtual |
Did any file get changed during execution?
Reimplemented in timeControl, and timeActivatedFileUpdate.
Definition at line 204 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in surfaceFieldValue, sampledSurfaces, vtkWrite, ObukhovLength, ensightWrite, areaWrite, timeControl, derivedFields, momentum, probes, sampledSets, and streamLineBase.
Definition at line 210 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in ensightWrite, surfaceFieldValue, propellerInfo, sampledSurfaces, vtkWrite, areaWrite, timeControl, ObukhovLength, derivedFields, momentum, probes, sampledSets, and streamLineBase.
Definition at line 214 of file functionObject.C.
bool log |
Flag to write log into Info.
Definition at line 355 of file functionObject.H.
|
static |
Flag to execute debug content.
Definition at line 367 of file functionObject.H.
Referenced by nearWallFields::calcAddressing(), patchProbes::findElements(), probes::findElements(), and syncObjects::sync().
|
static |
Global post-processing mode switch.
Definition at line 370 of file functionObject.H.
|
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(), meshRefinement::findRegions(), if(), averageNeighbourFvGeometryScheme::movePoints(), dynamicFvMesh::New(), probes::prepare(), dataCloud::read(), vtkCloud::read(), ensightWrite::read(), vtkWrite::read(), sampledSets::sampledSets(), shortestPathSet::shortestPathSet(), and streamLineBase::writeToFile().