functionObjects: Separated writeFile and logFiles (previously writeFiles) from regionFunctionObject
Now the functionality to write single graph files or log files (vs time) may be used in the creation of any form of functionObject, not just those relating to a mesh region.
This commit is contained in:
@ -103,7 +103,8 @@ Foam::functionObjects::fieldMinMax::fieldMinMax
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
location_(true),
|
||||
mode_(mdMag),
|
||||
fieldSet_()
|
||||
@ -129,7 +130,7 @@ Foam::functionObjects::fieldMinMax::~fieldMinMax()
|
||||
|
||||
bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
location_ = dict.lookupOrDefault<Switch>("location", true);
|
||||
|
||||
@ -148,7 +149,7 @@ bool Foam::functionObjects::fieldMinMax::execute()
|
||||
|
||||
bool Foam::functionObjects::fieldMinMax::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
if (!location_) writeTime(file());
|
||||
Log << type() << " " << name() << " write:" << nl;
|
||||
|
||||
@ -67,8 +67,8 @@ Usage
|
||||
Output data is written to the file \<timeDir\>/fieldMinMax.dat
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
fieldMinMax.C
|
||||
@ -78,7 +78,8 @@ SourceFiles
|
||||
#ifndef functionObjects_fieldMinMax_H
|
||||
#define functionObjects_fieldMinMax_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "vector.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -94,7 +95,8 @@ namespace functionObjects
|
||||
|
||||
class fieldMinMax
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@ -49,7 +49,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
const word& valueType
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("name"), dictionary::null)
|
||||
@ -67,7 +68,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
const word& valueType
|
||||
)
|
||||
:
|
||||
writeFiles(name, obr, dict, name),
|
||||
regionFunctionObject(name, obr, dict),
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("name"), dictionary::null)
|
||||
@ -88,7 +90,7 @@ Foam::functionObjects::fieldValue::~fieldValue()
|
||||
bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
|
||||
{
|
||||
dict_ = dict;
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fields_;
|
||||
dict.lookup("writeFields") >> writeFields_;
|
||||
@ -105,7 +107,7 @@ bool Foam::functionObjects::fieldValue::execute()
|
||||
|
||||
bool Foam::functionObjects::fieldValue::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
Log << type() << " " << name() << " write:" << nl;
|
||||
|
||||
|
||||
@ -30,6 +30,11 @@ Group
|
||||
Description
|
||||
Base class for field value -based function objects.
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
fieldValue.C
|
||||
|
||||
@ -38,7 +43,8 @@ SourceFiles
|
||||
#ifndef functionObjects_fieldValue_H
|
||||
#define functionObjects_fieldValue_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "Switch.H"
|
||||
#include "Field.H"
|
||||
|
||||
@ -59,7 +65,8 @@ namespace functionObjects
|
||||
|
||||
class fieldValue
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
@ -106,7 +106,8 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
operation_(opSubtract),
|
||||
region1Ptr_(nullptr),
|
||||
region2Ptr_(nullptr)
|
||||
@ -135,7 +136,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
region1Ptr_.reset
|
||||
(
|
||||
@ -166,7 +167,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
||||
|
||||
bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
region1Ptr_->write();
|
||||
region2Ptr_->write();
|
||||
|
||||
@ -65,7 +65,10 @@ Usage
|
||||
\endplaintable
|
||||
|
||||
See also
|
||||
Foam::fieldValue
|
||||
Foam::functionObject
|
||||
Foam::functionObject::fieldValue
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
fieldValueDelta.C
|
||||
@ -75,7 +78,8 @@ SourceFiles
|
||||
#ifndef functionObjects_fieldValueDelta_H
|
||||
#define functionObjects_fieldValueDelta_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "fieldValue.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -93,7 +97,8 @@ namespace fieldValues
|
||||
|
||||
class fieldValueDelta
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
public:
|
||||
//- Operation type enumeration
|
||||
|
||||
@ -50,7 +50,7 @@ void Foam::functionObjects::histogram::writeGraph
|
||||
{
|
||||
const wordList fieldNames(1, fieldName);
|
||||
|
||||
fileName outputPath = baseTimeDir();
|
||||
fileName outputPath = file_.baseTimeDir();
|
||||
mkDir(outputPath);
|
||||
OFstream graphFile
|
||||
(
|
||||
@ -75,7 +75,8 @@ Foam::functionObjects::histogram::histogram
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFile(name, runTime, dict, name)
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
file_(obr_, name)
|
||||
{
|
||||
if (!isA<fvMesh>(obr_))
|
||||
{
|
||||
|
||||
@ -59,6 +59,7 @@ Usage
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::writeFile
|
||||
|
||||
SourceFiles
|
||||
@ -69,8 +70,9 @@ SourceFiles
|
||||
#ifndef functionObjects_histogram_H
|
||||
#define functionObjects_histogram_H
|
||||
|
||||
#include "writer.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "writeFile.H"
|
||||
#include "writer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -85,10 +87,12 @@ namespace functionObjects
|
||||
|
||||
class histogram
|
||||
:
|
||||
public writeFile
|
||||
public regionFunctionObject
|
||||
{
|
||||
// Private data
|
||||
|
||||
writeFile file_;
|
||||
|
||||
//- Name of field
|
||||
word fieldName_;
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ void Foam::functionObjects::regionSizeDistribution::writeGraph
|
||||
{
|
||||
const wordList valNames(1, valueName);
|
||||
|
||||
fileName outputPath = baseTimeDir();
|
||||
fileName outputPath = file_.baseTimeDir();
|
||||
mkDir(outputPath);
|
||||
|
||||
OFstream str(outputPath/formatterPtr_().getFileName(coords, valNames));
|
||||
@ -330,7 +330,8 @@ Foam::functionObjects::regionSizeDistribution::regionSizeDistribution
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFile(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
file_(obr_, name),
|
||||
alphaName_(dict.lookup("field")),
|
||||
patchNames_(dict.lookup("patches"))
|
||||
{
|
||||
|
||||
@ -96,6 +96,7 @@ Usage
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::writeFile
|
||||
|
||||
SourceFiles
|
||||
@ -106,6 +107,7 @@ SourceFiles
|
||||
#ifndef functionObjects_regionSizeDistribution_H
|
||||
#define functionObjects_regionSizeDistribution_H
|
||||
|
||||
#include "regionFunctionObject.H"
|
||||
#include "writeFile.H"
|
||||
#include "writer.H"
|
||||
#include "Map.H"
|
||||
@ -130,10 +132,12 @@ namespace functionObjects
|
||||
|
||||
class regionSizeDistribution
|
||||
:
|
||||
public writeFile
|
||||
public regionFunctionObject
|
||||
{
|
||||
// Private data
|
||||
|
||||
writeFile file_;
|
||||
|
||||
//- Name of field
|
||||
word alphaName_;
|
||||
|
||||
|
||||
@ -102,7 +102,8 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
patchSet_()
|
||||
{
|
||||
if (!isA<fvMesh>(obr_))
|
||||
@ -147,7 +148,7 @@ Foam::functionObjects::wallHeatFlux::~wallHeatFlux()
|
||||
|
||||
bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
@ -237,7 +238,7 @@ bool Foam::functionObjects::wallHeatFlux::execute()
|
||||
|
||||
bool Foam::functionObjects::wallHeatFlux::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
const volScalarField& wallHeatFlux =
|
||||
obr_.lookupObject<volScalarField>(type());
|
||||
|
||||
@ -54,7 +54,8 @@ Usage
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
Foam::functionObjects::pressureTools
|
||||
Foam::functionObjects::timeControl
|
||||
|
||||
@ -66,7 +67,8 @@ SourceFiles
|
||||
#ifndef functionObjects_wallHeatFlux_H
|
||||
#define functionObjects_wallHeatFlux_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "surfaceFieldsFwd.H"
|
||||
#include "HashSet.H"
|
||||
@ -89,8 +91,10 @@ namespace functionObjects
|
||||
|
||||
class wallHeatFlux
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
@ -89,7 +89,8 @@ Foam::functionObjects::wallShearStress::wallShearStress
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
patchSet_()
|
||||
{
|
||||
if (!isA<fvMesh>(obr_))
|
||||
@ -139,7 +140,7 @@ Foam::functionObjects::wallShearStress::~wallShearStress()
|
||||
|
||||
bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
@ -236,7 +237,7 @@ bool Foam::functionObjects::wallShearStress::execute()
|
||||
|
||||
bool Foam::functionObjects::wallShearStress::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
const volVectorField& wallShearStress =
|
||||
obr_.lookupObject<volVectorField>(type());
|
||||
|
||||
@ -65,7 +65,8 @@ Usage
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
Foam::functionObjects::pressureTools
|
||||
Foam::functionObjects::timeControl
|
||||
|
||||
@ -77,7 +78,8 @@ SourceFiles
|
||||
#ifndef functionObjects_wallShearStress_H
|
||||
#define functionObjects_wallShearStress_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
@ -98,8 +100,10 @@ namespace functionObjects
|
||||
|
||||
class wallShearStress
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
@ -121,7 +121,8 @@ Foam::functionObjects::yPlus::yPlus
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name)
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name)
|
||||
{
|
||||
if (!isA<fvMesh>(obr_))
|
||||
{
|
||||
@ -164,7 +165,7 @@ Foam::functionObjects::yPlus::~yPlus()
|
||||
|
||||
bool Foam::functionObjects::yPlus::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -208,7 +209,7 @@ bool Foam::functionObjects::yPlus::write()
|
||||
|
||||
yPlus.write();
|
||||
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
const volScalarField::Boundary& yPlusBf = yPlus.boundaryField();
|
||||
|
||||
|
||||
@ -33,7 +33,8 @@ Description
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
Foam::functionObjects::timeControl
|
||||
|
||||
SourceFiles
|
||||
@ -44,7 +45,8 @@ SourceFiles
|
||||
#ifndef functionObjects_yPlus_H
|
||||
#define functionObjects_yPlus_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "volFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -65,7 +67,8 @@ namespace functionObjects
|
||||
|
||||
class yPlus
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ bool Foam::functionObjects::forceCoeffs::write()
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;
|
||||
|
||||
|
||||
@ -529,7 +529,8 @@ Foam::functionObjects::forces::forces
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
force_(3),
|
||||
moment_(3),
|
||||
patchSet_(),
|
||||
@ -569,7 +570,8 @@ Foam::functionObjects::forces::forces
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, obr, dict, name),
|
||||
regionFunctionObject(name, obr, dict),
|
||||
logFiles(obr_, name),
|
||||
force_(3),
|
||||
moment_(3),
|
||||
patchSet_(),
|
||||
@ -612,7 +614,7 @@ Foam::functionObjects::forces::~forces()
|
||||
|
||||
bool Foam::functionObjects::forces::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
initialised_ = false;
|
||||
|
||||
@ -909,7 +911,7 @@ bool Foam::functionObjects::forces::write()
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
writeForces();
|
||||
|
||||
|
||||
@ -101,7 +101,8 @@ Note
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
Foam::functionObjects::timeControl
|
||||
Foam::forceCoeffs
|
||||
|
||||
@ -113,7 +114,8 @@ SourceFiles
|
||||
#ifndef functionObjects_forces_H
|
||||
#define functionObjects_forces_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "coordinateSystem.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "HashSet.H"
|
||||
@ -131,8 +133,10 @@ namespace functionObjects
|
||||
|
||||
class forces
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
@ -25,6 +25,8 @@ License
|
||||
|
||||
#include "cloudInfo.H"
|
||||
#include "kinematicCloud.H"
|
||||
#include "dictionary.H"
|
||||
#include "PstreamReduceOps.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -66,7 +68,8 @@ Foam::functionObjects::cloudInfo::cloudInfo
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name)
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
@ -82,7 +85,9 @@ Foam::functionObjects::cloudInfo::~cloudInfo()
|
||||
|
||||
bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
|
||||
{
|
||||
writeFiles::resetNames(dict.lookup("clouds"));
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
logFiles::resetNames(dict.lookup("clouds"));
|
||||
|
||||
Info<< type() << " " << name() << ": ";
|
||||
if (names().size())
|
||||
@ -111,7 +116,7 @@ bool Foam::functionObjects::cloudInfo::execute()
|
||||
|
||||
bool Foam::functionObjects::cloudInfo::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
forAll(names(), i)
|
||||
{
|
||||
|
||||
@ -61,7 +61,8 @@ Usage
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
cloudInfo.C
|
||||
@ -71,7 +72,8 @@ SourceFiles
|
||||
#ifndef functionObjects_cloudInfo_H
|
||||
#define functionObjects_cloudInfo_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -86,7 +88,8 @@ namespace functionObjects
|
||||
|
||||
class cloudInfo
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
protected:
|
||||
|
||||
|
||||
@ -53,7 +53,8 @@ Foam::functionObjects::residuals::residuals
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
fieldSet_()
|
||||
{
|
||||
if (!isA<fvMesh>(obr_))
|
||||
@ -77,6 +78,8 @@ Foam::functionObjects::residuals::~residuals()
|
||||
|
||||
bool Foam::functionObjects::residuals::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fieldSet_;
|
||||
|
||||
return true;
|
||||
@ -114,7 +117,7 @@ bool Foam::functionObjects::residuals::execute()
|
||||
|
||||
bool Foam::functionObjects::residuals::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
@ -51,7 +51,8 @@ Description
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::writeFiles
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
Foam::functionObjects::timeControl
|
||||
|
||||
SourceFiles
|
||||
@ -62,7 +63,8 @@ SourceFiles
|
||||
#ifndef functionObjects_residuals_H
|
||||
#define functionObjects_residuals_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -77,7 +79,8 @@ namespace functionObjects
|
||||
|
||||
class residuals
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user