Abstract base-class for Time/database function objects. More...
#include <functionObject.H>


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. | |
| autoPtr< functionObject > | clone () const |
| Return clone. | |
| virtual | ~functionObject ()=default |
| Destructor. | |
| virtual const word & | type () const =0 |
| Runtime type information. | |
| const word & | name () const noexcept |
| Return the name of this functionObject. | |
| bool | useNamePrefix () const noexcept |
| Return the flag for adding a scoping name prefix. | |
| bool | useNamePrefix (bool on) noexcept |
| Modify the flag for adding a scoping name prefix. | |
| virtual bool | read (const dictionary &dict) |
| Read and set the function object if its data have changed. | |
| virtual bool | execute ()=0 |
| Called at each ++ or += of the time-loop. | |
| virtual bool | execute (const label subIndex) |
| Execute using the specified subIndex. | |
| virtual bool | write ()=0 |
| Called at each ++ or += of the time-loop. | |
| virtual bool | end () |
| Called when Time::run() determines that the time-loop exits. | |
| virtual bool | adjustTimeStep () |
| Called at the end of Time::adjustDeltaT() if adjustTime is true. | |
| virtual bool | filesModified () const |
| Did any file get changed during execution? | |
| virtual void | updateMesh (const mapPolyMesh &mpm) |
| Update for changes of mesh. | |
| virtual void | movePoints (const polyMesh &mesh) |
| Update for changes of mesh. | |
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. | |
Public Attributes | |
| bool | log |
| Flag to write log into Info. | |
Static Public Attributes | |
| static int | debug |
| Flag to execute debug content. | |
| static bool | postProcess |
| Global post-processing mode switch. | |
| static bool | defaultUseNamePrefix |
| Global default for useNamePrefix. | |
| static word | outputPrefix |
| Directory prefix. | |
Protected Member Functions | |
| word | scopedName (const word &name) const |
| Return a scoped (prefixed) name. | |
Abstract base-class for Time/database function objects.
Definition at line 363 of file functionObject.H.
|
explicit |
Construct from components.
Definition at line 57 of file functionObject.C.
References log, name(), and postProcess.
Referenced by declareRunTimeSelectionTable(), parProfiling::parProfiling(), pointHistory::pointHistory(), syncObjects::syncObjects(), systemCall::systemCall(), timeControl::timeControl(), timeFunctionObject::timeFunctionObject(), timeControl::TypeName(), functionObject::unavailableFunctionObject::unavailableFunctionObject(), writeObjects::writeObjects(), and codedFunctionObject::~codedFunctionObject().


|
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 name(), and IOobject::scopedName().
Referenced by momentumError::calcMomentError(), DESModelRegions::DESModelRegions(), electricPotential::electricPotential(), Curle::execute(), proudmanAcousticPower::execute(), wallShearStress::execute(), yPlus::execute(), fvExpressionField::fieldName(), filmFlux::filmFlux(), forces::force(), forceCoeffs::forceCoeff(), forces::moment(), forceCoeffs::momentCoeff(), momentumError::momentumError(), momentum::newField(), proudmanAcousticPower::proudmanAcousticPower(), fieldAverage::read(), zeroGradient::read(), fieldExpression::setResultName(), stabilityBlendingFactor::stabilityBlendingFactor(), wallShearStress::wallShearStress(), momentum::write(), momentumError::write(), particleDistribution::write(), proudmanAcousticPower::write(), wallShearStress::write(), XiReactionRate::write(), yPlus::write(), and yPlus::yPlus().


| declareRunTimeSelectionTable | ( | autoPtr | , |
| functionObject | , | ||
| dictionary | , | ||
| (const word &name, const Time &runTime, const dictionary &dict) | , | ||
| (name, runTime, dict) | ) |
References defaultUseNamePrefix, dict, functionObject(), name(), and runTime.

|
inline |
|
static |
Select from dictionary, based on its "type" entry.
Definition at line 71 of file functionObject.C.
References DebugInfo, dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FatalErrorInLookup, name(), Foam::nl, and runTime.
Referenced by functionObjectList::read(), multiFieldValue::read(), multiRegion::read(), codedFunctionObject::redirectFunctionObject(), and timeControl::timeControl().


|
pure virtual |
Runtime type information.
References dict, Foam::noexcept, read(), and useNamePrefix().
Referenced by functionObject::unavailableFunctionObject::carp(), extractEulerianParticles::checkFaceZone(), fieldsExpression::fieldsExpression(), fieldExpression::foundObject(), sizeDistribution::initialise(), and fieldAverage::initialize().


|
noexcept |
Return the name of this functionObject.
Definition at line 136 of file functionObject.C.
References Foam::noexcept.
Referenced by abort::abort(), extractEulerianParticles::checkFaceZone(), cloudInfo::cloudInfo(), codedFunctionObject::codedFunctionObject(), declareRunTimeSelectionTable(), externalCoupled::externalCoupled(), filmFlux::filmFlux(), foamReport::foamReport(), fieldExpression::foundObject(), functionObject(), fvMeshFunctionObject::fvMeshFunctionObject(), fvMeshFunctionObject::fvMeshFunctionObject(), graphFunctionObject::graphFunctionObject(), sizeDistribution::initialise(), fieldAverage::initialize(), multiFieldValue::multiFieldValue(), multiRegion::multiRegion(), New(), stateFunctionObject::operator=(), timeFunctionObject::operator=(), parProfiling::parProfiling(), pointHistory::pointHistory(), regionFunctionObject::regionFunctionObject(), regionFunctionObject::regionFunctionObject(), removeRegisteredObject::removeRegisteredObject(), runTimeControl::runTimeControl(), scopedName(), setTimeStepFaRegionsFunctionObject::setTimeStepFaRegionsFunctionObject(), setTimeStepFunctionObject::setTimeStepFunctionObject(), stateFunctionObject::stateFunctionObject(), syncObjects::syncObjects(), systemCall::systemCall(), timeActivatedFileUpdate::timeActivatedFileUpdate(), timeControl::timeControl(), timeFunctionObject::timeFunctionObject(), timeInfo::timeInfo(), abort::TypeName(), cloudInfo::TypeName(), codedFunctionObject::TypeName(), multiFieldValue::TypeName(), volFieldValue::TypeName(), filmFlux::TypeName(), foamReport::TypeName(), fvMeshFunctionObject::TypeName(), graphFunctionObject::TypeName(), multiRegion::TypeName(), parProfiling::TypeName(), regionFunctionObject::TypeName(), removeRegisteredObject::TypeName(), runTimeControl::TypeName(), setTimeStepFaRegionsFunctionObject::TypeName(), setTimeStepFunctionObject::TypeName(), syncObjects::TypeName(), systemCall::TypeName(), timeActivatedFileUpdate::TypeName(), timeControl::TypeName(), timeInfo::TypeName(), valueAverage::TypeName(), writeDictionary::TypeName(), writeObjects::TypeName(), pointHistory::TypeName(), functionObject::unavailableFunctionObject::unavailableFunctionObject(), valueAverage::valueAverage(), volFieldValue::volFieldValue(), volFieldValue::volFieldValue(), vtkWrite::vtkWrite(), caseInfo::write(), writeDictionary::writeDictionary(), writeFreeSurface::writeFreeSurface(), and writeObjects::writeObjects().
|
noexcept |
Return the flag for adding a scoping name prefix.
Definition at line 142 of file functionObject.C.
References Foam::noexcept.
Referenced by type().

|
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 areaWrite, abort, age, AMIWeights, BilgerMixtureFraction, binField, bladeForces, blendingFactor, caseInfo, cellDecomposer, cloudInfo, codedFunctionObject, columnAverage, comfort, continuityError, CourantNo, Curle, dataCloud, ddt2, derivedFields, DESModelRegions, DMD, dsmcFields, electricPotential, energySpectrum, energyTransport, ensightCloudWriteObject, ensightWrite, externalCoupled, extractEulerianParticles, fieldAverage, fieldExpression, fieldExtents, fieldMinMax, fieldsExpression, fieldStatistics, fieldValue, multiFieldValue, volFieldValue, filmFlux, fluxSummary, foamReport, forceCoeffs, forces, fvExpressionField, heatTransferCoeff, histogram, hydrostaticPressure, icoUncoupledKinematicCloud, interfaceHeight, limitFields, log, mapFields, momentum, momentumError, multiphaseInterHtcModel, multiRegion, nearWallFields, norm, ObukhovLength, particleDistribution, PecletNo, pow, pressure, processorField, propellerInfo, proudmanAcousticPower, radiometerProbes, randomise, reactingEulerHtcModel, reactionsSensitivityAnalysis< chemistryType >, reactionsSensitivityAnalysis< BasicChemistryModel< psiReactionThermo > >, reactionsSensitivityAnalysis< BasicChemistryModel< rhoReactionThermo > >, readFields, reference, regionFunctionObject, regionSizeDistribution, removeRegisteredObject, resolutionIndex, runTimeControl, scalarTransport, setFlow, setTimeStepFaRegionsFunctionObject, setTimeStepFunctionObject, sixDoFRigidBodyState, sizeDistribution, solverInfo, specieReactionRates< ChemistryModelType >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, specieReactionRates< BasicChemistryModel< rhoReactionThermo > >, stabilityBlendingFactor, streamLine, streamLineBase, surfaceCourantNumber, surfaceDistance, surfaceInterpolate, syncObjects, systemCall, thermoCoupleProbes, timeActivatedFileUpdate, timeControl, timeInfo, turbulenceFields, valueAverage, viewFactorHeatFlux, vtkCloud, vtkWrite, wallBoundedStreamLine, wallHeatFlux, wallShearStress, writeCellCentres, writeCellVolumes, writeDictionary, writeObjects, XiReactionRate, yPlus, zeroGradient, moleFractions< ThermoType >, moleFractions< psiReactionThermo >, moleFractions< rhoReactionThermo >, patchProbes, pointHistory, Probes< ProbeType >, probes, Probes< internalFieldProbe >, Probes< patchFieldProbe >, sampledSets, and sampledSurfaces.
Definition at line 156 of file functionObject.C.
References defaultUseNamePrefix, dict, keyType::LITERAL, log, and postProcess.
Referenced by abort::read(), age::read(), AMIWeights::read(), BilgerMixtureFraction::read(), binField::read(), caseInfo::read(), cellDecomposer::read(), codedFunctionObject::read(), columnAverage::read(), comfort::read(), continuityError::read(), Curle::read(), dataCloud::read(), ddt2::read(), derivedFields::read(), DESModelRegions::read(), DMD::read(), dsmcFields::read(), electricPotential::read(), energySpectrum::read(), energyTransport::read(), externalCoupled::read(), extractEulerianParticles::read(), fieldAverage::read(), fieldExpression::read(), fieldExtents::read(), fieldMinMax::read(), fieldsExpression::read(), fieldValue::read(), multiFieldValue::read(), filmFlux::read(), fluxSummary::read(), foamReport::read(), forces::read(), fvExpressionField::read(), histogram::read(), hydrostaticPressure::read(), icoUncoupledKinematicCloud::read(), limitFields::read(), log::read(), mapFields::read(), momentum::read(), momentumError::read(), multiRegion::read(), nearWallFields::read(), ObukhovLength::read(), particleDistribution::read(), pow::read(), processorField::read(), proudmanAcousticPower::read(), reactionsSensitivityAnalysis< chemistryType >::read(), readFields::read(), regionFunctionObject::read(), regionSizeDistribution::read(), resolutionIndex::read(), runTimeControl::read(), scalarTransport::read(), setFlow::read(), setTimeStepFaRegionsFunctionObject::read(), setTimeStepFunctionObject::read(), sixDoFRigidBodyState::read(), sizeDistribution::read(), solverInfo::read(), streamLineBase::read(), surfaceCourantNumber::read(), surfaceDistance::read(), surfaceInterpolate::read(), syncObjects::read(), systemCall::read(), timeActivatedFileUpdate::read(), timeInfo::read(), turbulenceFields::read(), viewFactorHeatFlux::read(), wallShearStress::read(), writeCellCentres::read(), writeCellVolumes::read(), writeObjects::read(), XiReactionRate::read(), yPlus::read(), zeroGradient::read(), moleFractions< ThermoType >::read(), and type().
|
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 areaWrite, functionObject::unavailableFunctionObject, abort, age, AMIWeights, BilgerMixtureFraction, binField, bladeForces, caseInfo, cellDecomposer, cloudInfo, codedFunctionObject, columnAverage, comfort, continuityError, Curle, dataCloud, ddt2, derivedFields, DESModelRegions, DMD, dsmcFields, electricPotential, energySpectrum, energyTransport, ensightCloudWriteObject, ensightWrite, externalCoupled, extractEulerianParticles, fieldAverage, fieldExpression, fieldExtents, fieldMinMax, fieldsExpression, fieldStatistics, fieldValue, multiFieldValue, filmFlux, fluxSummary, foamReport, forceCoeffs, forces, fvExpressionField, graphFunctionObject, histogram, hydrostaticPressure, icoUncoupledKinematicCloud, interfaceHeight, limitFields, mapFields, momentum, momentumError, multiRegion, nearWallFields, ObukhovLength, parProfiling, particleDistribution, processorField, propellerInfo, proudmanAcousticPower, radiometerProbes, reactionsSensitivityAnalysis< chemistryType >, reactionsSensitivityAnalysis< BasicChemistryModel< psiReactionThermo > >, reactionsSensitivityAnalysis< BasicChemistryModel< rhoReactionThermo > >, readFields, regionSizeDistribution, removeRegisteredObject, resolutionIndex, runTimeControl, scalarTransport, setFlow, setTimeStepFaRegionsFunctionObject, setTimeStepFunctionObject, sixDoFRigidBodyState, sizeDistribution, solverInfo, specieReactionRates< ChemistryModelType >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, specieReactionRates< BasicChemistryModel< rhoReactionThermo > >, streamLineBase, surfaceCourantNumber, surfaceDistance, surfaceInterpolate, syncObjects, systemCall, thermoCoupleProbes, timeActivatedFileUpdate, timeControl, timeInfo, turbulenceFields, valueAverage, viewFactorHeatFlux, vtkCloud, vtkWrite, wallHeatFlux, wallShearStress, writeCellCentres, writeCellVolumes, writeDictionary, writeFreeSurface, writeObjects, XiReactionRate, yPlus, zeroGradient, moleFractions< ThermoType >, moleFractions< psiReactionThermo >, moleFractions< rhoReactionThermo >, pointHistory, Probes< ProbeType >, Probes< internalFieldProbe >, Probes< patchFieldProbe >, sampledSets, and sampledSurfaces.
References execute().
Referenced by execute().


|
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 areaWrite, functionObject::unavailableFunctionObject, abort, age, AMIWeights, BilgerMixtureFraction, binField, bladeForces, blendingFactor, caseInfo, cellDecomposer, cloudInfo, codedFunctionObject, columnAverage, comfort, components, continuityError, Curle, dataCloud, ddt2, derivedFields, DESModelRegions, div, DMD, dsmcFields, electricPotential, energySpectrum, energyTransport, ensightCloudWriteObject, ensightWrite, externalCoupled, extractEulerianParticles, fieldAverage, fieldExpression, fieldExtents, fieldMinMax, fieldsExpression, fieldStatistics, fieldValue, multiFieldValue, volFieldValue, filmFlux, fluxSummary, foamReport, forceCoeffs, forces, fvExpressionField, graphFunctionObject, histogram, hydrostaticPressure, icoUncoupledKinematicCloud, interfaceHeight, limitFields, mapFields, momentum, momentumError, multiRegion, nearWallFields, ObukhovLength, parProfiling, particleDistribution, processorField, propellerInfo, proudmanAcousticPower, radiometerProbes, reactionsSensitivityAnalysis< chemistryType >, reactionsSensitivityAnalysis< BasicChemistryModel< psiReactionThermo > >, reactionsSensitivityAnalysis< BasicChemistryModel< rhoReactionThermo > >, readFields, regionSizeDistribution, removeRegisteredObject, resolutionIndex, runTimeControl, scalarTransport, setFlow, setTimeStepFaRegionsFunctionObject, setTimeStepFunctionObject, sixDoFRigidBodyState, sizeDistribution, solverInfo, specieReactionRates< ChemistryModelType >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, specieReactionRates< BasicChemistryModel< rhoReactionThermo > >, stabilityBlendingFactor, streamLineBase, surfaceCourantNumber, surfaceDistance, surfaceInterpolate, syncObjects, systemCall, thermoCoupleProbes, timeActivatedFileUpdate, timeControl, timeInfo, turbulenceFields, valueAverage, viewFactorHeatFlux, vtkCloud, vtkWrite, wallHeatFlux, wallShearStress, writeCellCentres, writeCellVolumes, writeDictionary, writeFreeSurface, writeObjects, XiReactionRate, yPlus, zeroGradient, moleFractions< ThermoType >, moleFractions< psiReactionThermo >, moleFractions< rhoReactionThermo >, pointHistory, Probes< ProbeType >, Probes< internalFieldProbe >, Probes< patchFieldProbe >, sampledSets, and sampledSurfaces.
References adjustTimeStep(), end(), filesModified(), mesh, movePoints(), updateMesh(), and write().
Referenced by write().


|
virtual |
Called when Time::run() determines that the time-loop exits.
The base implementation is a no-op.
Reimplemented in abort, codedFunctionObject, DMD, ensightWrite, externalCoupled, interfaceHeight, parProfiling, systemCall, timeControl, and vtkWrite.
Definition at line 185 of file functionObject.C.
Referenced by nearWallFields::calcAddressing(), externalCoupled::end(), and write().

|
virtual |
Called at the end of Time::adjustDeltaT() if adjustTime is true.
Reimplemented in setTimeStepFaRegionsFunctionObject, setTimeStepFunctionObject, and timeControl.
Definition at line 191 of file functionObject.C.
Referenced by write().

|
virtual |
Did any file get changed during execution?
Reimplemented in timeActivatedFileUpdate, and timeControl.
Definition at line 197 of file functionObject.C.
Referenced by write().

|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in areaWrite, binField, derivedFields, ensightWrite, momentum, ObukhovLength, processorField, streamLineBase, timeControl, viewFactorHeatFlux, vtkWrite, sampledSets, and sampledSurfaces.
Definition at line 203 of file functionObject.C.
Referenced by write().

|
virtual |
Update for changes of mesh.
The base implementation is a no-op.
Reimplemented in areaWrite, binField, derivedFields, ensightWrite, momentum, ObukhovLength, propellerInfo, streamLineBase, timeControl, viewFactorHeatFlux, vtkWrite, sampledSets, and sampledSurfaces.
Definition at line 207 of file functionObject.C.
Referenced by write().

| bool log |
Flag to write log into Info.
Definition at line 401 of file functionObject.H.
Referenced by functionObject(), and read().
|
static |
Flag to execute debug content.
Definition at line 409 of file functionObject.H.
Referenced by timeControl::adjustTimeStep(), syncObjects::execute(), syncObjects::read(), syncObjects::sync(), and syncObjects::write().
|
static |
Global post-processing mode switch.
Definition at line 414 of file functionObject.H.
Referenced by readFields::execute(), timeControl::execute(), yPlus::execute(), functionObject(), read(), runTimeControl::read(), DMD::write(), and timeControl::write().
|
static |
Global default for useNamePrefix.
Definition at line 419 of file functionObject.H.
Referenced by declareRunTimeSelectionTable(), read(), and functionObjectList::read().
|
static |
Directory prefix.
Definition at line 424 of file functionObject.H.
Referenced by writeFile::baseFileDir(), CloudFunctionObject< CloudType >::CloudFunctionObject(), if(), averageNeighbourFvGeometryScheme::movePoints(), dynamicFvMesh::New(), dataCloud::read(), sampledSets::sampledSets(), sampledSets::sampledSets(), sampledSurfaces::sampledSurfaces(), sampledSurfaces::sampledSurfaces(), shortestPathSet::shortestPathSet(), and streamLineBase::writeToFile().