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 329 of file functionObject.H.
|
explicit |
Construct from components.
Definition at line 58 of file functionObject.C.
|
virtualdefault |
Destructor.
|
protected |
Return a scoped (prefixed) name.
Used to construct local field names, controlled by useNamePrefix_
Definition at line 44 of file functionObject.C.
References functionObject::name(), and IOobject::scopedName().
Referenced by forces::force().
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 72 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 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(), histogram::read(), derivedFields::read(), particleDistribution::read(), limitFields::read(), binField::read(), syncObjects::sync(), wallBoundedStreamLine::track(), and multiFieldValue::write().
|
noexcept |
Return the name of this functionObject.
Definition at line 136 of file functionObject.C.
Referenced by extractEulerianParticles::checkFaceZone(), runTimeControl::execute(), surfaceInterpolate::execute(), fieldAverage::initialize(), multiRegion::read(), abort::read(), histogram::read(), particleDistribution::read(), limitFields::read(), binField::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 142 of file functionObject.C.
|
noexcept |
Modify the flag for adding a scoping name prefix.
Definition at line 148 of file functionObject.C.
|
virtual |
Read and set the function object if its data have changed.
Reimplemented in surfaceFieldValue, forceCoeffs, stabilityBlendingFactor, forces, propellerInfo, pressure, regionSizeDistribution, vtkWrite, volFieldValue, sampledSurfaces, fieldAverage, extractEulerianParticles, sampledSets, externalCoupled, ensightWrite, probes, fluxSummary, electricPotential, energyTransport, momentum, setFlow, BilgerMixtureFraction, ObukhovLength, DMD, comfort, turbulenceFields, norm, sizeDistribution, scalarTransport, ensightCloudWriteObject, fvExpressionField, vtkCloud, wallBoundedStreamLine, Curle, caseInfo, mapFields, streamLine, timeControl, multiFieldValue, proudmanAcousticPower, streamLineBase, interfaceHeight, log, fieldMinMax, heatTransferCoeff, binField, nearWallFields, dataCloud, areaWrite, pow, fieldExtents, reactionsSensitivityAnalysis< chemistryType >, codedFunctionObject, cellDecomposer, limitFields, reference, regionFunctionObject, particleDistribution, ddt2, solverInfo, derivedFields, wallShearStress, blendingFactor, fieldValue, age, zeroGradient, continuityError, randomise, columnAverage, hydrostaticPressure, momentumError, AMIWeights, thermoCoupleProbes, wallHeatFlux, yPlus, readFields, surfaceDistance, writeObjects, resolutionIndex, moleFractions< ThermoType >, multiphaseInterHtcModel, reactingEulerHtcModel, cloudInfo, systemCall, DESModelRegions, valueAverage, surfaceInterpolate, CourantNo, histogram, PecletNo, filmFlux, icoUncoupledKinematicCloud, fieldExpression, energySpectrum, viewFactorHeatFlux, fieldsExpression, patchProbes, syncObjects, timeActivatedFileUpdate, abort, writeCellCentres, setTimeStepFunctionObject, multiRegion, runTimeControl, timeInfo, processorField, writeCellVolumes, phaseForces, XiReactionRate, sixDoFRigidBodyState, setTimeStepFaRegionsFunctionObject, removeRegisteredObject, pointHistory, dsmcFields, writeDictionary, and specieReactionRates< ChemistryModelType >.
Definition at line 156 of file functionObject.C.
References dict, dictionary::getOrDefault(), keyType::LITERAL, and Foam::log().
Referenced by setTimeStepFaRegionsFunctionObject::read(), timeInfo::read(), multiRegion::read(), setTimeStepFunctionObject::read(), abort::read(), timeActivatedFileUpdate::read(), syncObjects::read(), filmFlux::read(), systemCall::read(), writeObjects::read(), regionFunctionObject::read(), codedFunctionObject::read(), caseInfo::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 forceCoeffs, forces, propellerInfo, functionObject::unavailableFunctionObject, regionSizeDistribution, vtkWrite, sampledSurfaces, fieldAverage, extractEulerianParticles, sampledSets, ensightWrite, probes, fluxSummary, electricPotential, energyTransport, externalCoupled, momentum, setFlow, BilgerMixtureFraction, ObukhovLength, DMD, comfort, turbulenceFields, sizeDistribution, scalarTransport, ensightCloudWriteObject, fvExpressionField, vtkCloud, caseInfo, Curle, mapFields, multiFieldValue, proudmanAcousticPower, streamLineBase, interfaceHeight, fieldMinMax, binField, nearWallFields, dataCloud, areaWrite, fieldExtents, reactionsSensitivityAnalysis< chemistryType >, timeControl, cellDecomposer, limitFields, particleDistribution, ddt2, solverInfo, derivedFields, wallShearStress, codedFunctionObject, fieldValue, age, zeroGradient, continuityError, columnAverage, hydrostaticPressure, momentumError, AMIWeights, thermoCoupleProbes, wallHeatFlux, yPlus, readFields, surfaceDistance, writeObjects, resolutionIndex, moleFractions< ThermoType >, cloudInfo, systemCall, DESModelRegions, valueAverage, surfaceInterpolate, histogram, filmFlux, icoUncoupledKinematicCloud, fieldExpression, energySpectrum, viewFactorHeatFlux, fieldsExpression, syncObjects, timeActivatedFileUpdate, abort, writeCellCentres, setTimeStepFunctionObject, multiRegion, runTimeControl, timeInfo, processorField, writeCellVolumes, phaseForces, patchProbes, XiReactionRate, sixDoFRigidBodyState, setTimeStepFaRegionsFunctionObject, removeRegisteredObject, dsmcFields, writeDictionary, pointHistory, parProfiling, specieReactionRates< ChemistryModelType >, 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 179 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, forceCoeffs, stabilityBlendingFactor, forces, propellerInfo, functionObject::unavailableFunctionObject, regionSizeDistribution, vtkWrite, sampledSurfaces, volFieldValue, fieldAverage, extractEulerianParticles, sampledSets, ensightWrite, probes, externalCoupled, fluxSummary, electricPotential, energyTransport, momentum, BilgerMixtureFraction, setFlow, ObukhovLength, DMD, comfort, turbulenceFields, sizeDistribution, scalarTransport, ensightCloudWriteObject, fvExpressionField, vtkCloud, caseInfo, Curle, mapFields, multiFieldValue, proudmanAcousticPower, streamLineBase, interfaceHeight, fieldMinMax, binField, nearWallFields, dataCloud, areaWrite, timeControl, fieldExtents, reactionsSensitivityAnalysis< chemistryType >, cellDecomposer, limitFields, particleDistribution, ddt2, solverInfo, wallShearStress, derivedFields, codedFunctionObject, blendingFactor, fieldValue, age, zeroGradient, components, continuityError, columnAverage, hydrostaticPressure, momentumError, AMIWeights, thermoCoupleProbes, wallHeatFlux, yPlus, readFields, surfaceDistance, writeObjects, resolutionIndex, moleFractions< ThermoType >, cloudInfo, systemCall, DESModelRegions, valueAverage, surfaceInterpolate, histogram, filmFlux, icoUncoupledKinematicCloud, div, fieldExpression, energySpectrum, viewFactorHeatFlux, fieldsExpression, syncObjects, timeActivatedFileUpdate, abort, writeCellCentres, setTimeStepFunctionObject, multiRegion, runTimeControl, timeInfo, processorField, writeCellVolumes, phaseForces, patchProbes, XiReactionRate, sixDoFRigidBodyState, setTimeStepFaRegionsFunctionObject, removeRegisteredObject, dsmcFields, writeDictionary, pointHistory, parProfiling, specieReactionRates< ChemistryModelType >, and writeFreeSurface.
|
virtual |
Called when Time::run() determines that the time-loop exits.
The base implementation is a no-op.
Reimplemented in vtkWrite, ensightWrite, externalCoupled, DMD, interfaceHeight, timeControl, codedFunctionObject, systemCall, abort, and parProfiling.
Definition at line 185 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 191 of file functionObject.C.
|
virtual |
Did any file get changed during execution?
Reimplemented in timeControl, and timeActivatedFileUpdate.
Definition at line 197 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in surfaceFieldValue, vtkWrite, sampledSurfaces, sampledSets, ensightWrite, probes, momentum, ObukhovLength, streamLineBase, timeControl, binField, areaWrite, derivedFields, viewFactorHeatFlux, and processorField.
Definition at line 203 of file functionObject.C.
|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in surfaceFieldValue, propellerInfo, vtkWrite, sampledSurfaces, sampledSets, ensightWrite, probes, momentum, ObukhovLength, streamLineBase, timeControl, binField, areaWrite, derivedFields, and viewFactorHeatFlux.
Definition at line 207 of file functionObject.C.
bool log |
Flag to write log into Info.
Definition at line 359 of file functionObject.H.
|
static |
Flag to execute debug content.
Definition at line 375 of file functionObject.H.
Referenced by nearWallFields::calcAddressing(), patchProbes::findElements(), and syncObjects::sync().
|
static |
Global post-processing mode switch.
Definition at line 380 of file functionObject.H.
Referenced by readFields::execute().
|
static |
Global default for useNamePrefix.
Definition at line 385 of file functionObject.H.
Referenced by functionObjectList::read().
|
static |
Directory prefix.
Definition at line 390 of file functionObject.H.
Referenced by writeFile::baseFileDir(), CloudFunctionObject< CloudType >::CloudFunctionObject(), if(), averageNeighbourFvGeometryScheme::movePoints(), dynamicFvMesh::New(), dataCloud::read(), vtkCloud::read(), ensightWrite::read(), vtkWrite::read(), shortestPathSet::shortestPathSet(), and streamLineBase::writeToFile().