Commit 1c992eba authored by Henry Weller's avatar Henry Weller
Browse files

etc/codeTemplates/functionObject: Updated and simplified using...

etc/codeTemplates/functionObject: Updated and simplified using fvMeshFunctionObject as the base-class
parent 83bae2ef
......@@ -49,14 +49,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
const dictionary& dict
)
:
functionObject(name),
obr_
(
runTime.lookupObject<objectRegistry>
(
dict.lookupOrDefault("region", polyMesh::defaultRegion)
)
),
fvMeshFunctionObject(name, runTime, dict),
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
scalarData_(readScalar(dict.lookup("scalarData"))),
labelData_(readLabel(dict.lookup("labelData")))
......
......@@ -59,16 +59,12 @@ SourceFiles
#ifndef FUNCTIONOBJECT_H
#define FUNCTIONOBJECT_H
#include "functionObject.H"
#include "fvMeshFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class objectRegistry;
namespace functionObjects
{
......@@ -78,23 +74,18 @@ namespace functionObjects
class FUNCTIONOBJECT
:
public functionObject
public fvMeshFunctionObject
{
// Private data
//- Refererence to the objectRegistry
const objectRegistry& obr_;
// Read from dictionary
//- word
word wordData_;
//- word
word wordData_;
//- scalar
scalar scalarData_;
//- scalar
scalar scalarData_;
//- label
label labelData_;
//- label
label labelData_;
// Private Member Functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment