functionObjects: Simplified the handling of the post-processing mode

Replaced the 'postProcess' argument to the 'write' and 'execute'
functions with the single static member 'postProcess' in the
functionObject base-class.
This commit is contained in:
Henry Weller 2016-06-13 08:36:03 +01:00
parent 18b632e71d
commit ae1a6dd12d
102 changed files with 190 additions and 254 deletions

View File

@ -74,13 +74,13 @@ bool Foam::functionObjects::writeVTK::read(const dictionary& dict)
}
bool Foam::functionObjects::writeVTK::execute(const bool postProcess)
bool Foam::functionObjects::writeVTK::execute()
{
return true;
}
bool Foam::functionObjects::writeVTK::write(const bool postProcess)
bool Foam::functionObjects::writeVTK::write()
{
Info<< type() << " " << name() << " output:" << nl;

View File

@ -129,10 +129,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the writeVTK
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -113,7 +113,7 @@ void executeFunctionObjects
Info<< nl << "Executing functionObjects" << endl;
// Execute the functionObjects in post-processing mode
functions.execute(true);
functions.execute();
while (!storedObjects.empty())
{

View File

@ -26,8 +26,8 @@ Solution:
- copy the flowRatePatch file into the case system directory (not
flowRatePatch.cfg)
- edit system/flowRatePatch to set the patch name
replace "patch <patchName>;"
with "patch outlet;"
replace "name <patchName>;"
with "name outlet;"
- activate the function object by including the flowRatePatch file in functions
sub-dictionary in the case controlDict file, e.g.
functions

View File

@ -14,7 +14,7 @@ Description
flowRatePatch
{
patch <patchName>;
name <patchName>;
#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
}

View File

@ -9,6 +9,5 @@
#includeEtc "caseDicts/postProcessing/surfaceRegion/surfaceRegion.cfg"
regionType patch;
name $patch;
// ************************************************************************* //

View File

@ -12,8 +12,8 @@ Description
patchAverage
{
patch <patchName>;
fields (<field names>);
name <patchName>;
fields (<field names>);
operation average;
#includeEtc "caseDicts/postProcessing/surfaceRegion/patch.cfg"

View File

@ -12,7 +12,7 @@ Description
patchIntegrate
{
patch <patchName>;
name <patchName>;
fields (<field names>);
operation areaIntegrate;

View File

@ -121,7 +121,7 @@ bool ${typeName}FunctionObject::read(const dictionary& dict)
}
bool ${typeName}FunctionObject::execute(const bool postProcess)
bool ${typeName}FunctionObject::execute()
{
if (${verbose:-false})
{
@ -136,7 +136,7 @@ bool ${typeName}FunctionObject::execute(const bool postProcess)
}
bool ${typeName}FunctionObject::write(const bool postProcess)
bool ${typeName}FunctionObject::write()
{
if (${verbose:-false})
{

View File

@ -100,13 +100,13 @@ public:
virtual bool read(const dictionary&);
//- Execute the "executeCalls" at each time-step
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Execute the "endCalls" at the final time-loop
virtual bool end();
//- Write, execute the "writeCalls"
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -76,7 +76,7 @@ bool Foam::functionObjects::FUNCTIONOBJECT::read(const dictionary& dict)
}
bool Foam::functionObjects::FUNCTIONOBJECT::execute(const bool postProcess)
bool Foam::functionObjects::FUNCTIONOBJECT::execute()
{
return true;
}
@ -88,7 +88,7 @@ bool Foam::functionObjects::FUNCTIONOBJECT::end()
}
bool Foam::functionObjects::FUNCTIONOBJECT::write(const bool postProcess)
bool Foam::functionObjects::FUNCTIONOBJECT::write()
{
return true;
}

View File

@ -125,13 +125,13 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Execute at the final time-loop, currently does nothing
virtual bool end();
//- Write the FUNCTIONOBJECT
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -122,9 +122,9 @@ bool Foam::IOOutputFilter<OutputFilter>::read()
template<class OutputFilter>
bool Foam::IOOutputFilter<OutputFilter>::write(const bool postProcess)
bool Foam::IOOutputFilter<OutputFilter>::write()
{
return OutputFilter::write(postProcess);
return OutputFilter::write();
}

View File

@ -126,7 +126,7 @@ public:
using regIOobject::write;
//- Sample and write
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh& mpm);

View File

@ -211,12 +211,12 @@ public:
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
virtual bool execute(const bool postProcess = false) = 0;
virtual bool execute() = 0;
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual writeControl behaviour and
// forces writing always (used in post-processing mode)
virtual bool write(const bool postProcess = false) = 0;
virtual bool write() = 0;
//- Called when Time::run() determines that the time-loop exits.
// By default it simply calls execute().

View File

@ -145,7 +145,7 @@ bool Foam::functionObjectList::readFunctionObject
// 'patchAverage(patch=inlet, p)' -> funcName = patchAverage;
// args = (patch=inlet, p); field = p
word funcName;
word funcName(funcNameArgs);
int argLevel = 0;
wordList args;
@ -436,7 +436,7 @@ bool Foam::functionObjectList::start()
}
bool Foam::functionObjectList::execute(const bool postProcess)
bool Foam::functionObjectList::execute()
{
bool ok = true;
@ -449,8 +449,8 @@ bool Foam::functionObjectList::execute(const bool postProcess)
forAll(*this, objectI)
{
ok = operator[](objectI).execute(postProcess) && ok;
ok = operator[](objectI).write(postProcess) && ok;
ok = operator[](objectI).execute() && ok;
ok = operator[](objectI).write() && ok;
}
}

View File

@ -235,7 +235,7 @@ public:
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
bool execute(const bool postProcess = false);
bool execute();
//- Called when Time::run() determines that the time-loop exits
bool end();

View File

@ -136,7 +136,7 @@ if (argList::postProcess(argc, argv))
#include INCLUDE_FILE(CREATE_FIELDS_3)
#endif
functionsPtr->execute(true);
functionsPtr->execute();
}
catch (IOerror& err)
{

View File

@ -85,7 +85,7 @@ Foam::functionObjects::timeControl::timeControl
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::timeControl::execute(const bool postProcess)
bool Foam::functionObjects::timeControl::execute()
{
if (active() && (postProcess || executeControl_.execute()))
{
@ -96,7 +96,7 @@ bool Foam::functionObjects::timeControl::execute(const bool postProcess)
}
bool Foam::functionObjects::timeControl::write(const bool postProcess)
bool Foam::functionObjects::timeControl::write()
{
if (active() && (postProcess || writeControl_.execute()))
{

View File

@ -151,12 +151,12 @@ public:
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual writeControl behaviour and
// forces writing (used in post-processing mode)
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();

View File

@ -194,7 +194,7 @@ Foam::OFstream& Foam::functionObjects::writeFiles::file(const label i)
}
bool Foam::functionObjects::writeFiles::write(const bool postProcess)
bool Foam::functionObjects::writeFiles::write()
{
createFiles();

View File

@ -129,7 +129,7 @@ public:
OFstream& file(const label i);
//- Write function
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -76,7 +76,7 @@ Foam::functionObjects::components::~components()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::components::write(const bool postProcess)
bool Foam::functionObjects::components::write()
{
bool written = true;

View File

@ -107,7 +107,7 @@ public:
// Member Functions
//- Write the component fields
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Clear the component fields from the objectRegistry
virtual bool clear();

View File

@ -322,7 +322,7 @@ bool Foam::functionObjects::fieldAverage::read(const dictionary& dict)
}
bool Foam::functionObjects::fieldAverage::execute(const bool postProcess)
bool Foam::functionObjects::fieldAverage::execute()
{
calcAverages();
@ -330,7 +330,7 @@ bool Foam::functionObjects::fieldAverage::execute(const bool postProcess)
}
bool Foam::functionObjects::fieldAverage::write(const bool postProcess)
bool Foam::functionObjects::fieldAverage::write()
{
writeAverages();
writeAveragingProperties();

View File

@ -296,10 +296,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the field averages
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the field averages
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -98,10 +98,7 @@ bool Foam::functionObjects::fieldCoordinateSystemTransform::read
}
bool Foam::functionObjects::fieldCoordinateSystemTransform::execute
(
const bool postProcess
)
bool Foam::functionObjects::fieldCoordinateSystemTransform::execute()
{
forAll(fieldSet_, fieldi)
{
@ -116,10 +113,7 @@ bool Foam::functionObjects::fieldCoordinateSystemTransform::execute
}
bool Foam::functionObjects::fieldCoordinateSystemTransform::write
(
const bool postProcess
)
bool Foam::functionObjects::fieldCoordinateSystemTransform::write()
{
forAll(fieldSet_, fieldi)
{

View File

@ -145,10 +145,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the transformed fields
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the transformed fields
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -116,7 +116,7 @@ bool Foam::functionObjects::fieldExpression::read(const dictionary& dict)
}
bool Foam::functionObjects::fieldExpression::execute(const bool postProcess)
bool Foam::functionObjects::fieldExpression::execute()
{
if (!calc())
{
@ -136,7 +136,7 @@ bool Foam::functionObjects::fieldExpression::execute(const bool postProcess)
}
bool Foam::functionObjects::fieldExpression::write(const bool postProcess)
bool Foam::functionObjects::fieldExpression::write()
{
return writeObject(resultName_);
}

View File

@ -116,10 +116,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the result field
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the result field
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Clear the result field from the objectRegistry
virtual bool clear();

View File

@ -140,13 +140,13 @@ bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
}
bool Foam::functionObjects::fieldMinMax::execute(const bool postProcess)
bool Foam::functionObjects::fieldMinMax::execute()
{
return true;
}
bool Foam::functionObjects::fieldMinMax::write(const bool postProcess)
bool Foam::functionObjects::fieldMinMax::write()
{
writeFiles::write();

View File

@ -181,10 +181,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the fieldMinMax
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -97,13 +97,13 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
}
bool Foam::functionObjects::fieldValue::execute(const bool postProcess)
bool Foam::functionObjects::fieldValue::execute()
{
return true;
}
bool Foam::functionObjects::fieldValue::write(const bool postProcess)
bool Foam::functionObjects::fieldValue::write()
{
writeFiles::write();

View File

@ -172,10 +172,10 @@ public:
virtual bool read(const dictionary& dict);
//- Execute
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write to screen/file
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -164,10 +164,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
}
bool Foam::functionObjects::fieldValues::fieldValueDelta::write
(
const bool postProcess
)
bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
{
writeFiles::write();
@ -206,10 +203,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write
}
bool Foam::functionObjects::fieldValues::fieldValueDelta::execute
(
const bool postProcess
)
bool Foam::functionObjects::fieldValues::fieldValueDelta::execute()
{
return true;
}

View File

@ -171,10 +171,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate and write
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -721,10 +721,7 @@ bool Foam::functionObjects::fieldValues::surfaceRegion::read
}
bool Foam::functionObjects::fieldValues::surfaceRegion::write
(
const bool postProcess
)
bool Foam::functionObjects::fieldValues::surfaceRegion::write()
{
fieldValue::write();

View File

@ -402,7 +402,7 @@ public:
virtual bool read(const dictionary&);
//- Calculate and write
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -275,10 +275,7 @@ bool Foam::functionObjects::fieldValues::volRegion::read
}
bool Foam::functionObjects::fieldValues::volRegion::write
(
const bool postProcess
)
bool Foam::functionObjects::fieldValues::volRegion::write()
{
fieldValue::write();

View File

@ -279,7 +279,7 @@ public:
virtual bool read(const dictionary&);
//- Calculate and write
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -109,13 +109,13 @@ bool Foam::functionObjects::histogram::read(const dictionary& dict)
}
bool Foam::functionObjects::histogram::execute(const bool postProcess)
bool Foam::functionObjects::histogram::execute()
{
return true;
}
bool Foam::functionObjects::histogram::write(const bool postProcess)
bool Foam::functionObjects::histogram::write()
{
Log << type() << " " << name() << " write:" << nl;

View File

@ -148,12 +148,12 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate the histogram and write.
// postProcess overrides the usual writeControl behaviour and
// forces writing always (used in post-processing mode)
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -286,7 +286,7 @@ bool Foam::functionObjects::nearWallFields::read(const dictionary& dict)
}
bool Foam::functionObjects::nearWallFields::execute(const bool postProcess)
bool Foam::functionObjects::nearWallFields::execute()
{
DebugInFunction << endl;
@ -327,7 +327,7 @@ bool Foam::functionObjects::nearWallFields::execute(const bool postProcess)
}
bool Foam::functionObjects::nearWallFields::write(const bool postProcess)
bool Foam::functionObjects::nearWallFields::write()
{
DebugInFunction << endl;

View File

@ -196,10 +196,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the near-wall fields
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the near-wall fields
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -89,7 +89,7 @@ bool Foam::functionObjects::processorField::read(const dictionary& dict)
}
bool Foam::functionObjects::processorField::execute(const bool postProcess)
bool Foam::functionObjects::processorField::execute()
{
const volScalarField& procField =
mesh_.lookupObject<volScalarField>("processorID");
@ -101,7 +101,7 @@ bool Foam::functionObjects::processorField::execute(const bool postProcess)
}
bool Foam::functionObjects::processorField::write(const bool postProcess)
bool Foam::functionObjects::processorField::write()
{
const volScalarField& procField =
mesh_.lookupObject<volScalarField>("processorID");

View File

@ -111,10 +111,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the processorID field
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the processorID field
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -74,7 +74,7 @@ bool Foam::functionObjects::readFields::read(const dictionary& dict)
}
bool Foam::functionObjects::readFields::execute(const bool postProcess)
bool Foam::functionObjects::readFields::execute()
{
// Clear out any previously loaded fields
vsf_.clear();
@ -105,7 +105,7 @@ bool Foam::functionObjects::readFields::execute(const bool postProcess)
}
bool Foam::functionObjects::readFields::write(const bool postProcess)
bool Foam::functionObjects::readFields::write()
{
return true;
}

View File

@ -154,10 +154,10 @@ public:
virtual bool read(const dictionary&);
//- Read the fields
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Do nothing
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -378,19 +378,13 @@ bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict)
}
bool Foam::functionObjects::regionSizeDistribution::execute
(
const bool postProcess
)
bool Foam::functionObjects::regionSizeDistribution::execute()
{
return true;
}
bool Foam::functionObjects::regionSizeDistribution::write
(
const bool postProcess
)
bool Foam::functionObjects::regionSizeDistribution::write()
{
Info<< type() << " " << name() << " write:" << nl;

View File

@ -256,10 +256,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate the regionSizeDistribution and write
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -423,13 +423,13 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict)
}
bool Foam::functionObjects::streamLine::execute(const bool postProcess)
bool Foam::functionObjects::streamLine::execute()
{
return true;
}
bool Foam::functionObjects::streamLine::write(const bool postProcess)
bool Foam::functionObjects::streamLine::write()
{
Info<< type() << " " << name() << " write:" << nl;

View File

@ -243,10 +243,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate and write the steamlines
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&);

View File

@ -80,10 +80,7 @@ bool Foam::functionObjects::surfaceInterpolate::read
}
bool Foam::functionObjects::surfaceInterpolate::execute
(
const bool postProcess
)
bool Foam::functionObjects::surfaceInterpolate::execute()
{
Info<< type() << " " << name() << " write:" << nl;
@ -106,10 +103,7 @@ bool Foam::functionObjects::surfaceInterpolate::execute
}
bool Foam::functionObjects::surfaceInterpolate::write
(
const bool postProcess
)
bool Foam::functionObjects::surfaceInterpolate::write()
{
Info<< type() << " " << name() << " write:" << nl;

View File

@ -157,10 +157,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the interpolated fields
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the interpolated fields
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -174,7 +174,7 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
}
bool Foam::functionObjects::turbulenceFields::execute(const bool postProcess)
bool Foam::functionObjects::turbulenceFields::execute()
{
bool comp = compressible();
@ -299,7 +299,7 @@ bool Foam::functionObjects::turbulenceFields::execute(const bool postProcess)
}
bool Foam::functionObjects::turbulenceFields::write(const bool postProcess)
bool Foam::functionObjects::turbulenceFields::write()
{
forAllConstIter(wordHashSet, fieldSet_, iter)
{

View File

@ -203,11 +203,11 @@ public:
virtual bool read(const dictionary&);
//- Calculate turbulence fields
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Do nothing.
// The turbulence fields are registered and written automatically
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -588,16 +588,13 @@ bool Foam::functionObjects::wallBoundedStreamLine::read(const dictionary& dict)
}
bool Foam::functionObjects::wallBoundedStreamLine::execute
(
const bool postProcess
)
bool Foam::functionObjects::wallBoundedStreamLine::execute()
{
return true;
}
bool Foam::functionObjects::wallBoundedStreamLine::write(const bool postProcess)
bool Foam::functionObjects::wallBoundedStreamLine::write()
{
const Time& runTime = obr_.time();
const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);

View File

@ -249,10 +249,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate and write the wall-bounded streamlines
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&);

View File

@ -191,7 +191,7 @@ bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
}
bool Foam::functionObjects::wallShearStress::execute(const bool postProcess)
bool Foam::functionObjects::wallShearStress::execute()
{
typedef compressible::turbulenceModel cmpModel;
typedef incompressible::turbulenceModel icoModel;
@ -232,7 +232,7 @@ bool Foam::functionObjects::wallShearStress::execute(const bool postProcess)
}
bool Foam::functionObjects::wallShearStress::write(const bool postProcess)
bool Foam::functionObjects::wallShearStress::write()
{
writeFiles::write();

View File

@ -161,10 +161,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the wall shear-stress
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the wall shear-stress
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -170,7 +170,7 @@ bool Foam::functionObjects::yPlus::read(const dictionary& dict)
}
bool Foam::functionObjects::yPlus::execute(const bool postProcess)
bool Foam::functionObjects::yPlus::execute()
{
const fvMesh& mesh = refCast<const fvMesh>(obr_);
@ -198,7 +198,7 @@ bool Foam::functionObjects::yPlus::execute(const bool postProcess)
}
bool Foam::functionObjects::yPlus::write(const bool postProcess)
bool Foam::functionObjects::yPlus::write()
{
const volScalarField& yPlus =
obr_.lookupObject<volScalarField>(type());

View File

@ -114,10 +114,10 @@ public:
virtual bool read(const dictionary&);
//- Calculate the yPlus field
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the yPlus field
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -167,13 +167,13 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
}
bool Foam::functionObjects::forceCoeffs::execute(const bool postProcess)
bool Foam::functionObjects::forceCoeffs::execute()
{
return true;
}
bool Foam::functionObjects::forceCoeffs::write(const bool postProcess)
bool Foam::functionObjects::forceCoeffs::write()
{
forces::calcForcesMoment();

View File

@ -180,10 +180,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the forces
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -892,13 +892,13 @@ Foam::vector Foam::functionObjects::forces::momentEff() const
}
bool Foam::functionObjects::forces::execute(const bool postProcess)
bool Foam::functionObjects::forces::execute()
{
return true;
}
bool Foam::functionObjects::forces::write(const bool postProcess)
bool Foam::functionObjects::forces::write()
{
calcForcesMoment();

View File

@ -296,10 +296,10 @@ public:
virtual vector momentEff() const;
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the forces
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -103,13 +103,13 @@ bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
}
bool Foam::functionObjects::cloudInfo::execute(const bool postProcess)
bool Foam::functionObjects::cloudInfo::execute()
{
return true;
}
bool Foam::functionObjects::cloudInfo::write(const bool postProcess)
bool Foam::functionObjects::cloudInfo::write()
{
writeFiles::write();

View File

@ -134,10 +134,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -92,13 +92,13 @@ bool Foam::functionObjects::dsmcFields::read(const dictionary& dict)
}
bool Foam::functionObjects::dsmcFields::execute(const bool postProcess)
bool Foam::functionObjects::dsmcFields::execute()
{
return true;
}
bool Foam::functionObjects::dsmcFields::write(const bool postProcess)
bool Foam::functionObjects::dsmcFields::write()
{
word rhoNMeanName = "rhoNMean";
word rhoMMeanName = "rhoMMean";

View File

@ -105,10 +105,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Calculate and write the DSMC fields
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -126,10 +126,7 @@ bool Foam::functionObjects::icoUncoupledKinematicCloud::read
}
bool Foam::functionObjects::icoUncoupledKinematicCloud::execute
(
const bool postProcess
)
bool Foam::functionObjects::icoUncoupledKinematicCloud::execute()
{
mu_ = rhoValue_*laminarTransport_.nu();
kinematicCloud_.evolve();
@ -138,10 +135,7 @@ bool Foam::functionObjects::icoUncoupledKinematicCloud::execute
}
bool Foam::functionObjects::icoUncoupledKinematicCloud::write
(
const bool postProcess
)
bool Foam::functionObjects::icoUncoupledKinematicCloud::write()
{
return true;
}

View File

@ -158,10 +158,10 @@ public:
virtual bool read(const dictionary&);
//- Track the cloud
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the cloud
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -186,7 +186,7 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict)
}
bool Foam::functionObjects::scalarTransport::execute(const bool postProcess)
bool Foam::functionObjects::scalarTransport::execute()
{
Info<< type() << " write:" << endl;
@ -263,7 +263,7 @@ bool Foam::functionObjects::scalarTransport::execute(const bool postProcess)
}
bool Foam::functionObjects::scalarTransport::write(const bool postProcess)
bool Foam::functionObjects::scalarTransport::write()
{
return true;
}

View File

@ -135,11 +135,11 @@ public:
virtual bool read(const dictionary&);
//- Calculate the scalarTransport
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Do nothing.
// The volScalarField is registered and written automatically
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -132,7 +132,7 @@ bool Foam::functionObjects::abort::read(const dictionary& dict)
}
bool Foam::functionObjects::abort::execute(const bool postProcess)
bool Foam::functionObjects::abort::execute()
{
bool hasAbort = isFile(abortFile_);
reduce(hasAbort, orOp<bool>());
@ -183,7 +183,7 @@ bool Foam::functionObjects::abort::execute(const bool postProcess)
}
bool Foam::functionObjects::abort::write(const bool postProcess)
bool Foam::functionObjects::abort::write()
{
return true;
}

View File

@ -130,10 +130,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, check existence of abort file and take action
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Execute, check existence of abort file and take action
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Execute at the final time-loop, used for cleanup
virtual bool end();

View File

@ -161,17 +161,17 @@ Foam::functionObject& Foam::codedFunctionObject::redirectFunctionObject() const
}
bool Foam::codedFunctionObject::execute(const bool postProcess)
bool Foam::codedFunctionObject::execute()
{
updateLibrary(name_);
return redirectFunctionObject().execute(postProcess);
return redirectFunctionObject().execute();
}
bool Foam::codedFunctionObject::write(const bool postProcess)
bool Foam::codedFunctionObject::write()
{
updateLibrary(name_);
return redirectFunctionObject().write(postProcess);
return redirectFunctionObject().write();
}

View File

@ -169,12 +169,12 @@ public:
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual writeControl behaviour and
// forces writing always (used in post-processing mode)
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Called when Time::run() determines that the time-loop exits.
// By default it simply calls execute().

View File

@ -85,10 +85,7 @@ bool Foam::functionObjects::removeRegisteredObject::read(const dictionary& dict)
}
bool Foam::functionObjects::removeRegisteredObject::execute
(
const bool postProcess
)
bool Foam::functionObjects::removeRegisteredObject::execute()
{
forAll(objectNames_, i)
{
@ -113,10 +110,7 @@ bool Foam::functionObjects::removeRegisteredObject::execute
}
bool Foam::functionObjects::removeRegisteredObject::write
(
const bool postProcess
)
bool Foam::functionObjects::removeRegisteredObject::write()
{
return true;
}

View File

@ -126,10 +126,10 @@ public:
virtual bool read(const dictionary&);
//- Remove the registered objects
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Do nothing
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -106,13 +106,13 @@ void Foam::functionObjects::residuals::writeFileHeader(const label i)
}
bool Foam::functionObjects::residuals::execute(const bool postProcess)
bool Foam::functionObjects::residuals::execute()
{
return true;
}
bool Foam::functionObjects::residuals::write(const bool postProcess)
bool Foam::functionObjects::residuals::write()
{
writeFiles::write();

View File

@ -139,10 +139,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the residuals
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -113,19 +113,13 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
}
bool Foam::functionObjects::setTimeStepFunctionObject::execute
(
const bool postProcess
)
bool Foam::functionObjects::setTimeStepFunctionObject::execute()
{
return true;
}
bool Foam::functionObjects::setTimeStepFunctionObject::write
(
const bool postProcess
)
bool Foam::functionObjects::setTimeStepFunctionObject::write()
{
return true;
}

View File

@ -113,12 +113,12 @@ public:
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual writeControl behaviour and
// forces writing always (used in post-processing mode)
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -105,7 +105,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict)
}
bool Foam::functionObjects::systemCall::execute(const bool postProcess)
bool Foam::functionObjects::systemCall::execute()
{
forAll(executeCalls_, callI)
{
@ -127,7 +127,7 @@ bool Foam::functionObjects::systemCall::end()
}
bool Foam::functionObjects::systemCall::write(const bool postProcess)
bool Foam::functionObjects::systemCall::write()
{
forAll(writeCalls_, callI)
{

View File

@ -156,13 +156,13 @@ public:
virtual bool read(const dictionary&);
//- Execute the "executeCalls" at each time-step
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Execute the "endCalls" at the final time-loop
virtual bool end();
//- Write, execute the "writeCalls"
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -131,10 +131,7 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
}
bool Foam::functionObjects::timeActivatedFileUpdate::execute
(
const bool postProcess
)
bool Foam::functionObjects::timeActivatedFileUpdate::execute()
{
updateFile();
@ -142,10 +139,7 @@ bool Foam::functionObjects::timeActivatedFileUpdate::execute
}
bool Foam::functionObjects::timeActivatedFileUpdate::write
(
const bool postProcess
)
bool Foam::functionObjects::timeActivatedFileUpdate::write()
{
return true;
}

View File

@ -135,10 +135,10 @@ public:
virtual bool read(const dictionary&);
//- Execute file updates
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Do nothing
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -153,13 +153,13 @@ bool Foam::functionObjects::writeDictionary::read(const dictionary& dict)
}
bool Foam::functionObjects::writeDictionary::execute(const bool postProcess)
bool Foam::functionObjects::writeDictionary::execute()
{
return true;
}
bool Foam::functionObjects::writeDictionary::write(const bool postProcess)
bool Foam::functionObjects::writeDictionary::write()
{
bool firstDict = true;
forAll(dictNames_, i)

View File

@ -122,10 +122,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the selected dictionaries
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -100,19 +100,13 @@ bool Foam::functionObjects::writeObjects::read(const dictionary& dict)
}
bool Foam::functionObjects::writeObjects::execute
(
const bool postProcess
)
bool Foam::functionObjects::writeObjects::execute()
{
return true;
}
bool Foam::functionObjects::writeObjects::write
(
const bool postProcess
)
bool Foam::functionObjects::writeObjects::write()
{
Info<< type() << " " << name() << " write:" << nl;

View File

@ -144,10 +144,10 @@ public:
virtual bool read(const dictionary&);
//- Do nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Write the registered objects
virtual bool write(const bool postProcess = false);
virtual bool write();
};

View File

@ -237,7 +237,7 @@ Foam::patchProbes::~patchProbes()
{}
bool Foam::patchProbes::write(const bool postProcess)
bool Foam::patchProbes::write()
{
if (this->size() && prepare())
{

View File

@ -154,7 +154,7 @@ public:
//- Public members
//- Sample and write
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Read
virtual bool read(const dictionary&);

View File

@ -357,13 +357,13 @@ bool Foam::probes::read(const dictionary& dict)
}
bool Foam::probes::execute(const bool postProcess)
bool Foam::probes::execute()
{
return true;
}
bool Foam::probes::write(const bool postProcess)
bool Foam::probes::write()
{
if (size() && prepare())
{

View File

@ -252,10 +252,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Sample and write
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&);

View File

@ -228,13 +228,13 @@ void Foam::sampledSets::verbose(const bool verbosity)
}
bool Foam::sampledSets::execute(const bool postProcess)
bool Foam::sampledSets::execute()
{
return true;
}
bool Foam::sampledSets::write(const bool postProcess)
bool Foam::sampledSets::write()
{
if (size())
{

View File

@ -288,10 +288,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Sample and write
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Correct for mesh changes
void correct();

View File

@ -177,13 +177,13 @@ void Foam::sampledSurfaces::verbose(const bool verbosity)
}
bool Foam::sampledSurfaces::execute(const bool postProcess)
bool Foam::sampledSurfaces::execute()
{
return true;
}
bool Foam::sampledSurfaces::write(const bool postProcess)
bool Foam::sampledSurfaces::write()
{
if (size())
{

View File

@ -219,10 +219,10 @@ public:
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual bool execute(const bool postProcess = false);
virtual bool execute();
//- Sample and write
virtual bool write(const bool postProcess = false);
virtual bool write();
//- Update for changes of mesh - expires the surfaces
virtual void updateMesh(const mapPolyMesh&);

Some files were not shown because too many files have changed in this diff Show More