functionObjects: Further simplification and rationalization using the fvMeshFunctionObject base-class

This commit is contained in:
Henry Weller
2016-08-10 12:29:19 +01:00
parent 8339b57255
commit 2da5570c92
35 changed files with 256 additions and 447 deletions

View File

@ -49,7 +49,7 @@ Foam::functionObjects::fieldValue::fieldValue
const word& valueType
)
:
regionFunctionObject(name, runTime, dict),
fvMeshFunctionObject(name, runTime, dict),
logFiles(obr_, name),
dict_(dict),
regionName_(word::null),
@ -68,7 +68,7 @@ Foam::functionObjects::fieldValue::fieldValue
const word& valueType
)
:
regionFunctionObject(name, obr, dict),
fvMeshFunctionObject(name, obr, dict),
logFiles(obr_, name),
dict_(dict),
regionName_(word::null),
@ -89,8 +89,12 @@ Foam::functionObjects::fieldValue::~fieldValue()
bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
{
dict_ = dict;
regionFunctionObject::read(dict);
if (dict != dict_)
{
dict_ = dict;
}
fvMeshFunctionObject::read(dict);
dict.lookup("fields") >> fields_;
dict.lookup("writeFields") >> writeFields_;

View File

@ -32,7 +32,7 @@ Description
See also
Foam::functionObject
Foam::functionObjects::regionFunctionObject
Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::logFiles
SourceFiles
@ -43,7 +43,7 @@ SourceFiles
#ifndef functionObjects_fieldValue_H
#define functionObjects_fieldValue_H
#include "regionFunctionObject.H"
#include "fvMeshFunctionObject.H"
#include "logFiles.H"
#include "Switch.H"
#include "Field.H"
@ -65,7 +65,7 @@ namespace functionObjects
class fieldValue
:
public regionFunctionObject,
public fvMeshFunctionObject,
public logFiles
{
@ -169,9 +169,6 @@ public:
//- Return the output field values flag
inline const Switch& writeFields() const;
//- Helper function to return the reference to the mesh
inline const fvMesh& mesh() const;
//- Return access to the latest set of results
inline const dictionary& resultDict() const;

View File

@ -53,12 +53,6 @@ Foam::functionObjects::fieldValue::writeFields() const
}
inline const Foam::fvMesh& Foam::functionObjects::fieldValue::mesh() const
{
return refCast<const fvMesh>(obr_);
}
inline const Foam::dictionary&
Foam::functionObjects::fieldValue::resultDict() const
{