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...
 
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 write log to Info. 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/2]

functionObject ( const word name,
const Time runTime 
)

Construct from components.

Definition at line 44 of file functionObject.C.

◆ functionObject() [2/2]

functionObject ( const functionObject )
delete

Disallow default bitwise copy construction.

◆ ~functionObject()

~functionObject ( )
virtual

Destructor.

Definition at line 122 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 296 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 59 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, adjustTimeStepToChemistry, sampledSurfaces, sampledSets, probes, patchProbes, sixDoFRigidBodyState, sixDoFRigidBodyControl, rigidBodyState, rigidBodyPoints, rigidBodyForces, timeControl, regionFunctionObject, particles, dsmcFields, cloudInfo, meshToMeshAdjustTimeStepFunctionObject, multiValveEngineState, writeObjects, writeDictionary, userTimeStep, timeStep, timeActivatedFileUpdate, time, systemCall, stopAtTimeStep, stopAtFile, stopAtClockTime, stopAt, setWriteIntervalFunctionObject, setTimeStepFunctionObject, residuals, removeRegisteredObject, codedFunctionObject, checkMesh, scalarTransport, phaseScalarTransport, movingForces, forcesBase, forces, forceCoeffs, yPlus, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, uniform, turbulenceIntensity, turbulenceFields, totalEnthalpy, streamlines, shearStress, scale, regionSizeDistribution, readFields, randomise, processorField, pressure, patchCutLayerAverage, nearWallFields, log, layerAverage, interfaceHeight, histogram, volFieldValue, surfaceFieldValue, fieldValueDelta, fieldsExpression, fieldCoordinateSystemTransform, fieldAverage, CourantNo, comfort, blendingFactor, age, Qdot, adjustTimeStepToCombustion, writeVTK, wallBoilingProperties, populationBalanceSizeDistribution, populationBalanceMoments, and fluidMaxDeltaT.

Definition at line 134 of file functionObject.C.

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

Referenced by checkMesh::read(), codedFunctionObject::read(), time::read(), timeStep::read(), userTimeStep::read(), writeObjects::read(), and regionFunctionObject::read().

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

◆ fields()

◆ executeAtStart()

bool executeAtStart ( ) const
virtual

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

Reimplemented in timeControl, dsmcFields, and fieldAverage.

Definition at line 148 of file functionObject.C.

◆ execute()

◆ write()

◆ 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 154 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 meshToMeshAdjustTimeStepFunctionObject.

Definition at line 160 of file functionObject.C.

◆ maxDeltaT()

Foam::scalar maxDeltaT ( ) const
virtual

Return the maximum time-step for stable operation.

Reimplemented in adjustTimeStepToChemistry, fvModel, adjustTimeStepToCombustion, and fluidMaxDeltaT.

Definition at line 166 of file functionObject.C.

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

Update topology using the given map.

Reimplemented in timeControl, sampledSurfaces, sampledSets, probes, streamlines, patchCutLayerAverage, layerAverage, and surfaceFieldValue.

Definition at line 172 of file functionObject.C.

◆ topoChange()

void topoChange ( const polyTopoChangeMap map)
virtual

Update topology using the given map.

Reimplemented in timeControl, sampledSurfaces, sampledSets, probes, streamlines, patchCutLayerAverage, layerAverage, and surfaceFieldValue.

Definition at line 176 of file functionObject.C.

◆ mapMesh()

void mapMesh ( const polyMeshMap )
virtual

Update from another mesh using the given map.

Reimplemented in sampledSurfaces, sampledSets, probes, timeControl, streamlines, patchCutLayerAverage, layerAverage, and surfaceFieldValue.

Definition at line 180 of file functionObject.C.

◆ distribute()

void distribute ( const polyDistributionMap )
virtual

Redistribute or update using the given distribution map.

Reimplemented in sampledSurfaces, sampledSets, timeControl, streamlines, patchCutLayerAverage, layerAverage, and surfaceFieldValue.

Definition at line 184 of file functionObject.C.

◆ operator=()

void operator= ( const functionObject )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ time_

◆ postProcess

bool postProcess
static

Global post-processing mode switch.

Definition at line 269 of file functionObject.H.

Referenced by CloudFunctionObjectList< CloudType >::CloudFunctionObjectList(), fieldAverage::execute(), and functions::functions().

◆ log

Switch log

Switch write log to Info.

Definition at line 272 of file functionObject.H.

◆ executeAtStart_

Switch executeAtStart_

Switch write log to Info.

Definition at line 275 of file functionObject.H.

Referenced by fvModel::fvModel().


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