functionObject Class Referenceabstract

Abstract base-class for Time/database function objects. More...

Inheritance diagram for functionObject:
[legend]
Collaboration diagram for functionObject:
[legend]

Classes

class  unavailableFunctionObject
 Abstract functionObject to report when a real version is unavailable. More...
 

Public Member Functions

virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name)
 Construct from components. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()=default
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. 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< functionObjectNew (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 word outputPrefix
 Directory prefix. More...
 

Protected Member Functions

word scopedName (const word &name) const
 Return a scoped name, e.g. used to construct local field names. More...
 

Detailed Description

Abstract base-class for Time/database function objects.

See also
Source files

Definition at line 321 of file functionObject.H.

Constructor & Destructor Documentation

◆ functionObject()

functionObject ( const word name)

Construct from components.

Definition at line 57 of file functionObject.C.

◆ ~functionObject()

virtual ~functionObject ( )
virtualdefault

Destructor.

Member Function Documentation

◆ scopedName()

Foam::word scopedName ( const word name) const
protected

Return a scoped name, e.g. used to construct local field names.

Definition at line 49 of file functionObject.C.

References functionObject::name().

Here is the call graph for this function:

◆ type()

virtual const word& type ( ) const
pure virtual

Runtime type information.

Referenced by extractEulerianParticles::checkFaceZone(), runTimeControl::execute(), surfaceInterpolate::execute(), surfaceDistance::execute(), fieldAverage::initialize(), abort::read(), derivedFields::read(), particleDistribution::read(), limitFields::read(), syncObjects::sync(), wallBoundedStreamLine::track(), and fieldValueDelta::write().

Here is the caller graph for this function:

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
functionObject  ,
dictionary  ,
(const word &name, const Time &runTime, const dictionary &dict ,
(name, runTime, dict  
)

◆ clone()

autoPtr<functionObject> clone ( ) const
inline

Return clone.

Definition at line 376 of file functionObject.H.

References NotImplemented.

◆ New()

Foam::autoPtr< Foam::functionObject > New ( const word name,
const Time runTime,
const dictionary dict 
)
static

Select from dictionary, based on its "type" entry.

Definition at line 67 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(), functionObjectList::read(), and codedFunctionObject::redirectFunctionObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

const Foam::word & name ( ) const

◆ read()

bool read ( const dictionary dict)
virtual

Read and set the function object if its data have changed.

Reimplemented in surfaceFieldValue, volFieldValue, sampledSurfaces, vtkWrite, externalCoupled, fluxSummary, ObukhovLength, setFlow, ensightWrite, vtkCloud, sizeDistribution, heatTransferCoeff, reference, dataCloud, nearWallFields, limitFields, areaWrite, derivedFields, zeroGradient, fieldValue, columnAverage, wallHeatFlux, regionFunctionObject, hydrostaticPressure, readFields, moleFractions< ThermoType >, systemCall, fieldsExpression, abort, setTimeStepFunctionObject, fieldExpression, timeInfo, phaseForces, cloudInfo, removeRegisteredObject, pointHistory, specieReactionRates< ChemistryModelType >, reactingEulerHtcModel, writeFreeSurface, STDMD, stabilityBlendingFactor, pressure, regionSizeDistribution, forces, fieldAverage, extractEulerianParticles, forceCoeffs, momentum, energyTransport, BilgerMixtureFraction, wallBoundedStreamLine, scalarTransport, Curle, streamLine, turbulenceFields, mapFields, sampledSets, probes, log, fieldMinMax, interfaceHeight, pow, fieldValueDelta, fieldExtents, blendingFactor, particleDistribution, timeControl, ddt2, streamLineBase, histogram, proudmanAcousticPower, valueAverage, reactionsSensitivityAnalysis< chemistryType >, continuityError, codedFunctionObject, wallShearStress, AMIWeights, momentumError, thermoCoupleProbes, surfaceDistance, randomise, writeObjects, DESModelRegions, surfaceInterpolate, CourantNo, PecletNo, filmFlux, solverInfo, patchProbes, icoUncoupledKinematicCloud, yPlus, energySpectrum, syncObjects, writeCellCentres, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, sixDoFRigidBodyState, runTimeControl, dsmcFields, and writeDictionary.

Definition at line 137 of file functionObject.C.

References dict, dictionary::getOrDefault(), and Foam::log().

Referenced by timeInfo::read(), timeActivatedFileUpdate::read(), abort::read(), setTimeStepFunctionObject::read(), syncObjects::read(), filmFlux::read(), systemCall::read(), writeObjects::read(), regionFunctionObject::read(), codedFunctionObject::read(), functionObjectList::read(), externalCoupled::read(), and vtkWrite::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute() [1/2]

virtual bool execute ( )
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 STDMD, forces, regionSizeDistribution, functionObject::unavailableFunctionObject, sampledSurfaces, vtkWrite, fieldAverage, extractEulerianParticles, externalCoupled, forceCoeffs, momentum, energyTransport, fluxSummary, ObukhovLength, setFlow, ensightWrite, BilgerMixtureFraction, scalarTransport, vtkCloud, Curle, sizeDistribution, turbulenceFields, mapFields, sampledSets, probes, fieldMinMax, interfaceHeight, dataCloud, nearWallFields, fieldValueDelta, fieldExtents, limitFields, particleDistribution, areaWrite, ddt2, streamLineBase, histogram, proudmanAcousticPower, valueAverage, reactionsSensitivityAnalysis< chemistryType >, derivedFields, zeroGradient, continuityError, wallShearStress, timeControl, fieldValue, columnAverage, wallHeatFlux, AMIWeights, codedFunctionObject, hydrostaticPressure, readFields, momentumError, surfaceDistance, thermoCoupleProbes, writeObjects, moleFractions< ThermoType >, DESModelRegions, surfaceInterpolate, systemCall, filmFlux, solverInfo, icoUncoupledKinematicCloud, yPlus, fieldsExpression, energySpectrum, syncObjects, writeCellCentres, abort, setTimeStepFunctionObject, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, fieldExpression, timeInfo, phaseForces, cloudInfo, sixDoFRigidBodyState, runTimeControl, removeRegisteredObject, dsmcFields, writeDictionary, specieReactionRates< ChemistryModelType >, pointHistory, parProfiling, and writeFreeSurface.

◆ execute() [2/2]

bool execute ( const label  subIndex)
virtual

Execute using the specified subIndex.

The base implementation is a no-op.

Parameters
subIndexan execution sub-index corresponding to a sub-cycle or something similar.

Reimplemented in externalCoupled, and timeControl.

Definition at line 148 of file functionObject.C.

◆ write()

virtual bool write ( )
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, STDMD, stabilityBlendingFactor, forces, regionSizeDistribution, functionObject::unavailableFunctionObject, volFieldValue, sampledSurfaces, vtkWrite, fieldAverage, extractEulerianParticles, externalCoupled, forceCoeffs, momentum, energyTransport, fluxSummary, ObukhovLength, setFlow, BilgerMixtureFraction, ensightWrite, scalarTransport, vtkCloud, Curle, sizeDistribution, turbulenceFields, mapFields, sampledSets, probes, interfaceHeight, fieldMinMax, dataCloud, nearWallFields, fieldValueDelta, fieldExtents, limitFields, blendingFactor, particleDistribution, areaWrite, histogram, ddt2, streamLineBase, proudmanAcousticPower, valueAverage, reactionsSensitivityAnalysis< chemistryType >, derivedFields, components, zeroGradient, continuityError, timeControl, wallShearStress, fieldValue, columnAverage, wallHeatFlux, codedFunctionObject, AMIWeights, hydrostaticPressure, readFields, momentumError, surfaceDistance, writeObjects, moleFractions< ThermoType >, DESModelRegions, surfaceInterpolate, thermoCoupleProbes, systemCall, filmFlux, solverInfo, icoUncoupledKinematicCloud, yPlus, patchProbes, fieldsExpression, energySpectrum, syncObjects, writeCellCentres, abort, setTimeStepFunctionObject, timeActivatedFileUpdate, processorField, writeCellVolumes, XiReactionRate, fieldExpression, timeInfo, phaseForces, cloudInfo, sixDoFRigidBodyState, runTimeControl, removeRegisteredObject, dsmcFields, writeDictionary, pointHistory, specieReactionRates< ChemistryModelType >, parProfiling, and writeFreeSurface.

◆ end()

bool end ( )
virtual

Called when Time::run() determines that the time-loop exits.

The base implementation is a no-op.

Reimplemented in vtkWrite, externalCoupled, ensightWrite, interfaceHeight, timeControl, codedFunctionObject, systemCall, abort, and parProfiling.

Definition at line 154 of file functionObject.C.

Referenced by nearWallFields::calcAddressing(), and externalCoupled::end().

Here is the caller graph for this function:

◆ adjustTimeStep()

bool adjustTimeStep ( )
virtual

Called at the end of Time::adjustDeltaT() if adjustTime is true.

Reimplemented in timeControl, and setTimeStepFunctionObject.

Definition at line 160 of file functionObject.C.

◆ filesModified()

bool filesModified ( ) const
virtual

Did any file get changed during execution?

Reimplemented in timeControl, and timeActivatedFileUpdate.

Definition at line 166 of file functionObject.C.

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

Update for changes of mesh.

The base implementation is a no-op.

Reimplemented in surfaceFieldValue, sampledSurfaces, vtkWrite, ObukhovLength, ensightWrite, areaWrite, timeControl, derivedFields, momentum, sampledSets, probes, and streamLineBase.

Definition at line 172 of file functionObject.C.

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

Update for changes of mesh.

The base implementation is a no-op.

Reimplemented in ensightWrite, surfaceFieldValue, sampledSurfaces, vtkWrite, areaWrite, timeControl, ObukhovLength, derivedFields, momentum, sampledSets, probes, and streamLineBase.

Definition at line 176 of file functionObject.C.

Member Data Documentation

◆ debug

int debug
static

Flag to execute debug content.

Definition at line 346 of file functionObject.H.

Referenced by nearWallFields::calcAddressing(), patchProbes::findElements(), probes::findElements(), and syncObjects::sync().

◆ postProcess

bool postProcess
static

Global post-processing mode switch.

Definition at line 349 of file functionObject.H.

◆ outputPrefix

◆ log

bool log

Flag to write log into Info.

Definition at line 355 of file functionObject.H.


The documentation for this class was generated from the following files: