mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects: Separated writeFile and logFiles (previously writeFiles) from regionFunctionObject
Now the functionality to write single graph files or log files (vs time) may be used in the creation of any form of functionObject, not just those relating to a mesh region.
This commit is contained in:
@ -49,7 +49,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
const word& valueType
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("name"), dictionary::null)
|
||||
@ -67,7 +68,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
const word& valueType
|
||||
)
|
||||
:
|
||||
writeFiles(name, obr, dict, name),
|
||||
regionFunctionObject(name, obr, dict),
|
||||
logFiles(obr_, name),
|
||||
dict_(dict),
|
||||
regionName_(word::null),
|
||||
resultDict_(fileName("name"), dictionary::null)
|
||||
@ -88,7 +90,7 @@ Foam::functionObjects::fieldValue::~fieldValue()
|
||||
bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
|
||||
{
|
||||
dict_ = dict;
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fields_;
|
||||
dict.lookup("writeFields") >> writeFields_;
|
||||
@ -105,7 +107,7 @@ bool Foam::functionObjects::fieldValue::execute()
|
||||
|
||||
bool Foam::functionObjects::fieldValue::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
Log << type() << " " << name() << " write:" << nl;
|
||||
|
||||
|
||||
@ -30,6 +30,11 @@ Group
|
||||
Description
|
||||
Base class for field value -based function objects.
|
||||
|
||||
See also
|
||||
Foam::functionObject
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
fieldValue.C
|
||||
|
||||
@ -38,7 +43,8 @@ SourceFiles
|
||||
#ifndef functionObjects_fieldValue_H
|
||||
#define functionObjects_fieldValue_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "Switch.H"
|
||||
#include "Field.H"
|
||||
|
||||
@ -59,7 +65,8 @@ namespace functionObjects
|
||||
|
||||
class fieldValue
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
@ -106,7 +106,8 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
writeFiles(name, runTime, dict, name),
|
||||
regionFunctionObject(name, runTime, dict),
|
||||
logFiles(obr_, name),
|
||||
operation_(opSubtract),
|
||||
region1Ptr_(nullptr),
|
||||
region2Ptr_(nullptr)
|
||||
@ -135,7 +136,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
writeFiles::read(dict);
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
region1Ptr_.reset
|
||||
(
|
||||
@ -166,7 +167,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
||||
|
||||
bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
|
||||
{
|
||||
writeFiles::write();
|
||||
logFiles::write();
|
||||
|
||||
region1Ptr_->write();
|
||||
region2Ptr_->write();
|
||||
|
||||
@ -65,7 +65,10 @@ Usage
|
||||
\endplaintable
|
||||
|
||||
See also
|
||||
Foam::fieldValue
|
||||
Foam::functionObject
|
||||
Foam::functionObject::fieldValue
|
||||
Foam::functionObjects::regionFunctionObject
|
||||
Foam::functionObjects::logFiles
|
||||
|
||||
SourceFiles
|
||||
fieldValueDelta.C
|
||||
@ -75,7 +78,8 @@ SourceFiles
|
||||
#ifndef functionObjects_fieldValueDelta_H
|
||||
#define functionObjects_fieldValueDelta_H
|
||||
|
||||
#include "writeFiles.H"
|
||||
#include "regionFunctionObject.H"
|
||||
#include "logFiles.H"
|
||||
#include "fieldValue.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -93,7 +97,8 @@ namespace fieldValues
|
||||
|
||||
class fieldValueDelta
|
||||
:
|
||||
public writeFiles
|
||||
public regionFunctionObject,
|
||||
public logFiles
|
||||
{
|
||||
public:
|
||||
//- Operation type enumeration
|
||||
|
||||
Reference in New Issue
Block a user