etc/codeTemplates/functionObject: Updated and simplified using fvMeshFunctionObject as the base-class

This commit is contained in:
Henry Weller
2016-05-16 22:16:22 +01:00
parent 18725ed3ac
commit d8c5eb43f7
2 changed files with 9 additions and 25 deletions

View File

@ -49,14 +49,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
const dictionary& dict const dictionary& dict
) )
: :
functionObject(name), fvMeshFunctionObject(name, runTime, dict),
obr_
(
runTime.lookupObject<objectRegistry>
(
dict.lookupOrDefault("region", polyMesh::defaultRegion)
)
),
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")), wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
scalarData_(readScalar(dict.lookup("scalarData"))), scalarData_(readScalar(dict.lookup("scalarData"))),
labelData_(readLabel(dict.lookup("labelData"))) labelData_(readLabel(dict.lookup("labelData")))

View File

@ -59,16 +59,12 @@ SourceFiles
#ifndef FUNCTIONOBJECT_H #ifndef FUNCTIONOBJECT_H
#define FUNCTIONOBJECT_H #define FUNCTIONOBJECT_H
#include "functionObject.H" #include "fvMeshFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// Forward declaration of classes
class objectRegistry;
namespace functionObjects namespace functionObjects
{ {
@ -78,15 +74,10 @@ namespace functionObjects
class FUNCTIONOBJECT class FUNCTIONOBJECT
: :
public functionObject public fvMeshFunctionObject
{ {
// Private data // Private data
//- Refererence to the objectRegistry
const objectRegistry& obr_;
// Read from dictionary
//- word //- word
word wordData_; word wordData_;