mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
etc/codeTemplates/functionObject: Updated and simplified using fvMeshFunctionObject as the base-class
This commit is contained in:
@ -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")))
|
||||||
|
|||||||
@ -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_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user