functionObject Class Referenceabstract

Abstract base-class for Time/database functionObjects. More...

Inheritance diagram for functionObject:
Collaboration diagram for functionObject:

Public Member Functions

 ClassName ("functionObject")
 
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, const Time &runTime)
 Construct from components. More...
 
 functionObject (const word &name, const Time &runTime, const dictionary &dict)
 Construct from dictionary. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
 functionObject (const functionObject &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. More...
 
virtual bool read (const dictionary &)
 Read and set the functionObject if its data have changed. More...
 
virtual wordList fields () const =0
 Return the list of fields required. More...
 
virtual bool executeAtStart () const
 Return true if the functionObject should be executed at the start. More...
 
virtual bool execute ()=0
 Called at each ++ or += of the time-loop. 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 scalar timeToNextAction ()
 Called by Time::adjustTimeStep(). Allows the functionObject to. More...
 
virtual scalar maxDeltaT () const
 Return the maximum time-step for stable operation. More...
 
virtual void movePoints (const polyMesh &mesh)
 Update topology using the given map. More...
 
virtual void topoChange (const polyTopoChangeMap &map)
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
void operator= (const functionObject &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< functionObjectNew (const word &name, const Time &, const dictionary &)
 Select from dictionary, based on its "type" entry. More...
 

Public Attributes

Switch log
 Switch write log to Info. More...
 
Switch executeAtStart_
 Switch execute at start time. More...
 

Static Public Attributes

static bool postProcess
 Global post-processing mode switch. More...
 

Protected Attributes

const Timetime_
 Reference to time. More...
 

Detailed Description

Abstract base-class for Time/database functionObjects.

See also
Foam::functionObjectList Foam::functionObjects::timeControl
Source files

Definition at line 247 of file functionObject.H.

Constructor & Destructor Documentation

◆ functionObject() [1/3]

functionObject ( const word name,
const Time runTime 
)

Construct from components.

Definition at line 44 of file functionObject.C.

◆ functionObject() [2/3]

functionObject ( const word name,
const Time runTime,
const dictionary dict 
)

Construct from dictionary.

Definition at line 57 of file functionObject.C.

References dict, and functionObject::read().

Here is the call graph for this function:

◆ functionObject() [3/3]

functionObject ( const functionObject )
delete

Disallow default bitwise copy construction.

◆ ~functionObject()

~functionObject ( )
virtual

Destructor.

Definition at line 135 of file functionObject.C.

Member Function Documentation

◆ ClassName()

ClassName ( "functionObject"  )

◆ type()

◆ 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 304 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 72 of file functionObject.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, Foam::libs, dictionary::lookup(), Foam::name(), Foam::nl, dlLibraryTable::open(), and string::remove().

Here is the call graph for this function:

◆ name()

◆ read()

bool read ( const dictionary dict)
virtual

Read and set the functionObject if its data have changed.

Reimplemented in fieldValue, phaseForces, moleFractions, massFractions, specieReactionRates, reactionRates, adjustTimeStepToChemistry, sampledSurfaces, sampledSets, probes, patchProbes, sixDoFRigidBodyState, sixDoFRigidBodyControl, rigidBodyState, rigidBodyPoints, rigidBodyForces, timeControl, objectRegistryFunctionObject, LagrangianFieldValue, LagrangianDistribution, particles, dsmcFields, cloudInfo, cloudSurfaceDistribution, meshToMeshAdjustTimeStep, multiValveEngineState, writeObjects, writeDictionary, userTimeStep, timeStep, timeActivatedFileUpdate, time, systemCall, stopAtTimeStep, stopAtFile, stopAtClockTime, stopAt, setWriteIntervalFunctionObject, setTimeStepFunctionObject, residuals, removeObjects, codedFunctionObject, checkMesh, scalarTransport, phaseScalarTransport, movingForces, forcesBase, forces, forceCoeffs, yPlus, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, uniform, turbulenceIntensity, turbulenceFields, totalEnthalpy, streamlines, shearStress, scale, regionSizeDistribution, readFields, randomise, processorField, pressure, power, patchCutLayerAverage, nearWallFields, log, layerAverage, interfaceHeight, histogram, volFieldValue, surfaceFieldValue, fieldValueDelta, fieldsExpression, fieldCoordinateSystemTransform, fieldAverage, cutLayerAverage, CourantNo, comfort, bXiProgress, blendingFactor, age, Qdot, adjustTimeStepToCombustion, writeVTK, wallBoilingProperty, populationBalanceSizeDistribution, populationBalanceMoments, adjustTimeStepToNucleation, and fluidMaxDeltaT.

Definition at line 147 of file functionObject.C.

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

Referenced by functionObject::functionObject(), bXiProgress::read(), checkMesh::read(), codedFunctionObject::read(), time::read(), timeStep::read(), userTimeStep::read(), writeObjects::read(), and objectRegistryFunctionObject::read().

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

◆ fields()

virtual wordList fields ( ) const
pure virtual

Return the list of fields required.

Implemented in moleFractions, massFractions, specieReactionRates, reactionRates, adjustTimeStepToChemistry, sampledSurfaces, sampledSets, probes, sixDoFRigidBodyState, rigidBodyState, rigidBodyPoints, timeControl, LagrangianFieldValue, LagrangianDistribution, particles, dsmcFields, cloudInfo, cloudVolumeFraction, cloudVolume, cloudSurfaceDistribution, cloudSurfaceAreaPerUnitVolume, cloudSurfaceArea, cloudMass, cloudLagrangianVolumeFraction, cloudKineticEnergy, cloudGravitationalPotentialEnergy, cloudFlux, cloudBoundaryCollisionFlux, cloudAge, cloud, meshToMeshAdjustTimeStep, multiValveEngineState, writeObjects, writeDictionary, userTimeStep, timeStep, timeActivatedFileUpdate, time, systemCall, stopAt, setWriteIntervalFunctionObject, setTimeStepFunctionObject, residuals, removeObjects, codedFunctionObject, checkMesh, scalarTransport, phaseScalarTransport, forcesBase, yPlus, XiReactionRate, writeCellVolumes, writeCellCentres, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, uniform, turbulenceIntensity, turbulenceFields, totalEnthalpy, streamlines, shearStress, regionSizeDistribution, readFields, processorField, power, patchCutLayerAverage, nearWallFields, layerAverage, interfaceHeight, histogram, fieldValueDelta, fieldValue, fieldsExpression, fieldExpression, fieldCoordinateSystemTransform, fieldAverage, cutLayerAverage, comfort, bXiProgress, age, fvModel, Qdot, adjustTimeStepToCombustion, writeVTK, wallBoilingProperty, populationBalanceSizeDistribution, populationBalanceSetSizeDistribution, populationBalanceMoments, phaseMap, phaseForces, adjustTimeStepToNucleation, and fluidMaxDeltaT.

◆ executeAtStart()

bool executeAtStart ( ) const
virtual

Return true if the functionObject should be executed at the start.

Reimplemented in timeControl, dsmcFields, cloudSurfaceDistribution, cloudFlux, cloudBoundaryCollisionFlux, cloud, scalarTransport, phaseScalarTransport, and fieldAverage.

Definition at line 161 of file functionObject.C.

◆ execute()

virtual bool execute ( )
pure virtual

Called at each ++ or += of the time-loop.

foamPostProcess overrides the usual executeControl behaviour and forces execution (used in post-processing mode)

Implemented in moleFractions, massFractions, specieReactionRates, reactionRates, adjustTimeStepToChemistry, sampledSurfaces, sampledSets, probes, sixDoFRigidBodyState, sixDoFRigidBodyControl, rigidBodyState, rigidBodyPoints, timeControl, LagrangianFieldValue, LagrangianDistribution, particles, dsmcFields, cloudInfo, cloudVolumeFraction, cloudVolume, cloudSurfaceDistribution, cloudSurfaceAreaPerUnitVolume, cloudSurfaceArea, cloudMass, cloudLagrangianVolumeFraction, cloudKineticEnergy, cloudGravitationalPotentialEnergy, cloudFlux, cloudBoundaryCollisionFlux, cloudAge, cloud, meshToMeshAdjustTimeStep, multiValveEngineState, writeObjects, writeDictionary, userTimeStep, timeStep, timeActivatedFileUpdate, time, systemCall, stopAt, setWriteIntervalFunctionObject, setTimeStepFunctionObject, residuals, removeObjects, codedFunctionObject, checkMesh, scalarTransport, phaseScalarTransport, forcesBase, forceCoeffs, yPlus, XiReactionRate, writeCellVolumes, writeCellCentres, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, uniform, turbulenceIntensity, turbulenceFields, totalEnthalpy, streamlines, shearStress, regionSizeDistribution, readFields, processorField, power, patchCutLayerAverage, nearWallFields, layerAverage, interfaceHeight, histogram, fieldValueDelta, fieldValue, fieldsExpression, fieldExpression, fieldCoordinateSystemTransform, fieldAverage, cutLayerAverage, comfort, bXiProgress, age, fvModel, Qdot, adjustTimeStepToCombustion, writeVTK, wallBoilingProperty, populationBalanceSizeDistribution, populationBalanceSetSizeDistribution, populationBalanceMoments, phaseMap, phaseForces, adjustTimeStepToNucleation, and fluidMaxDeltaT.

◆ write()

virtual bool write ( )
pure virtual

Called at each ++ or += of the time-loop.

foamPostProcess overrides the usual writeControl behaviour and forces writing always (used in post-processing mode)

Implemented in moleFractions, massFractions, specieReactionRates, reactionRates, adjustTimeStepToChemistry, sampledSurfaces, sampledSets, probes, patchProbes, sixDoFRigidBodyState, rigidBodyState, rigidBodyPoints, timeControl, LagrangianFieldValue, LagrangianDistribution, particles, dsmcFields, cloudInfo, cloudVolumeFraction, cloudVolume, cloudSurfaceDistribution, cloudSurfaceAreaPerUnitVolume, cloudSurfaceArea, cloudMass, cloudLagrangianVolumeFraction, cloudKineticEnergy, cloudGravitationalPotentialEnergy, cloudFlux, cloudBoundaryCollisionFlux, cloudAge, cloud, meshToMeshAdjustTimeStep, multiValveEngineState, writeObjects, writeDictionary, userTimeStep, timeStep, timeActivatedFileUpdate, time, systemCall, stopAt, setWriteIntervalFunctionObject, setTimeStepFunctionObject, residuals, removeObjects, codedFunctionObject, checkMesh, scalarTransport, phaseScalarTransport, forcesBase, forceCoeffs, yPlus, XiReactionRate, writeCellVolumes, writeCellCentres, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, uniform, turbulenceIntensity, turbulenceFields, totalEnthalpy, streamlines, shearStress, regionSizeDistribution, readFields, processorField, power, patchCutLayerAverage, nearWallFields, layerAverage, interfaceHeight, histogram, volFieldValue, surfaceFieldValue, fieldValueDelta, fieldValue, fieldsExpression, fieldExpression, fieldCoordinateSystemTransform, fieldAverage, cutLayerAverage, components, comfort, bXiProgress, age, fvModel, Qdot, adjustTimeStepToCombustion, writeVTK, wallBoilingProperty, populationBalanceSizeDistribution, populationBalanceSetSizeDistribution, populationBalanceMoments, phaseMap, phaseForces, adjustTimeStepToNucleation, and fluidMaxDeltaT.

◆ end()

bool end ( )
virtual

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

Reimplemented in timeControl, systemCall, stopAtFile, stopAt, codedFunctionObject, and interfaceHeight.

Definition at line 167 of file functionObject.C.

◆ timeToNextAction()

Foam::scalar timeToNextAction ( )
virtual

Called by Time::adjustTimeStep(). Allows the functionObject to.

insert a write time earlier than that already in use by the run time. Returns the write time, or vGreat.

Reimplemented in timeControl, and meshToMeshAdjustTimeStep.

Definition at line 173 of file functionObject.C.

◆ maxDeltaT()

Foam::scalar maxDeltaT ( ) const
virtual

Return the maximum time-step for stable operation.

Reimplemented in adjustTimeStepToChemistry, fvModel, adjustTimeStepToCombustion, adjustTimeStepToNucleation, and fluidMaxDeltaT.

Definition at line 179 of file functionObject.C.

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

◆ topoChange()

void topoChange ( const polyTopoChangeMap map)
virtual

◆ mapMesh()

void mapMesh ( const polyMeshMap )
virtual

◆ distribute()

void distribute ( const polyDistributionMap )
virtual

Redistribute or update using the given distribution map.

Reimplemented in specieReactionRates, reactionRates, sampledSurfaces, sampledSets, timeControl, cloudSurfaceDistribution, cloud, streamlines, patchCutLayerAverage, layerAverage, volFieldValue, surfaceFieldValue, cutLayerAverage, and populationBalanceSizeDistribution.

Definition at line 197 of file functionObject.C.

Referenced by surfaceFieldValue::distribute(), and volFieldValue::distribute().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const functionObject )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ time_

◆ postProcess

bool postProcess
static

◆ log

Switch log

Switch write log to Info.

Definition at line 272 of file functionObject.H.

◆ executeAtStart_

Switch executeAtStart_

Switch execute at start time.

Definition at line 275 of file functionObject.H.

Referenced by fvModel::fvModel().


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