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:
Henry Weller
2016-08-07 15:23:55 +01:00
parent 076c4c6e82
commit 6f098748cc
29 changed files with 197 additions and 186 deletions

View File

@ -103,7 +103,8 @@ Foam::functionObjects::fieldMinMax::fieldMinMax
const dictionary& dict
)
:
writeFiles(name, runTime, dict, name),
regionFunctionObject(name, runTime, dict),
logFiles(obr_, name),
location_(true),
mode_(mdMag),
fieldSet_()
@ -129,7 +130,7 @@ Foam::functionObjects::fieldMinMax::~fieldMinMax()
bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
{
writeFiles::read(dict);
regionFunctionObject::read(dict);
location_ = dict.lookupOrDefault<Switch>("location", true);
@ -148,7 +149,7 @@ bool Foam::functionObjects::fieldMinMax::execute()
bool Foam::functionObjects::fieldMinMax::write()
{
writeFiles::write();
logFiles::write();
if (!location_) writeTime(file());
Log << type() << " " << name() << " write:" << nl;

View File

@ -67,8 +67,8 @@ Usage
Output data is written to the file \<timeDir\>/fieldMinMax.dat
See also
Foam::functionObject
Foam::functionObjects::writeFiles
Foam::functionObjects::regionFunctionObject
Foam::functionObjects::logFiles
SourceFiles
fieldMinMax.C
@ -78,7 +78,8 @@ SourceFiles
#ifndef functionObjects_fieldMinMax_H
#define functionObjects_fieldMinMax_H
#include "writeFiles.H"
#include "regionFunctionObject.H"
#include "logFiles.H"
#include "vector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,7 +95,8 @@ namespace functionObjects
class fieldMinMax
:
public writeFiles
public regionFunctionObject,
public logFiles
{
public: