mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects: Added regionFunctionObject and fvMeshFunctionObject intermediate base-classes
to simplify writing common functionObjects and avoid unnecessary code duplication
This commit is contained in:
@ -100,20 +100,12 @@ Foam::Omanip<int> Foam::functionObjects::writeFile::valueWidth
|
||||
Foam::functionObjects::writeFile::writeFile
|
||||
(
|
||||
const word& name,
|
||||
const Time& t,
|
||||
const Time& runTime,
|
||||
const dictionary& dict,
|
||||
const word& prefix
|
||||
)
|
||||
:
|
||||
functionObject(name),
|
||||
time_(t),
|
||||
obr_
|
||||
(
|
||||
time_.lookupObject<objectRegistry>
|
||||
(
|
||||
dict.lookupOrDefault("region", polyMesh::defaultRegion)
|
||||
)
|
||||
),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
prefix_(prefix),
|
||||
log_(true)
|
||||
{}
|
||||
@ -127,9 +119,7 @@ Foam::functionObjects::writeFile::writeFile
|
||||
const word& prefix
|
||||
)
|
||||
:
|
||||
functionObject(name),
|
||||
time_(obr.time()),
|
||||
obr_(obr),
|
||||
regionFunctionObject(name, obr, dict),
|
||||
prefix_(prefix),
|
||||
log_(true)
|
||||
{}
|
||||
|
||||
@ -28,8 +28,8 @@ Description
|
||||
functionObject base class for writing single files
|
||||
|
||||
See Also
|
||||
Foam::regionFunctionObject
|
||||
Foam::functionObject
|
||||
Foam::OutputFilterFunctionObject
|
||||
|
||||
SourceFiles
|
||||
functionObjectFile.C
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#ifndef functionObjects_writeFile_H
|
||||
#define functionObjects_writeFile_H
|
||||
|
||||
#include "functionObject.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "Time.H"
|
||||
#include "IOmanip.H"
|
||||
|
||||
@ -56,19 +56,13 @@ namespace functionObjects
|
||||
|
||||
class writeFile
|
||||
:
|
||||
public functionObject
|
||||
public regionFunctionObject
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the Time
|
||||
const Time& time_;
|
||||
|
||||
//- Reference to the objectRegistry
|
||||
const objectRegistry& obr_;
|
||||
|
||||
//- Prefix
|
||||
const word prefix_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user