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

@ -53,7 +53,8 @@ Foam::functionObjects::residuals::residuals
const dictionary& dict
)
:
writeFiles(name, runTime, dict, name),
regionFunctionObject(name, runTime, dict),
logFiles(obr_, name),
fieldSet_()
{
if (!isA<fvMesh>(obr_))
@ -77,6 +78,8 @@ Foam::functionObjects::residuals::~residuals()
bool Foam::functionObjects::residuals::read(const dictionary& dict)
{
regionFunctionObject::read(dict);
dict.lookup("fields") >> fieldSet_;
return true;
@ -114,7 +117,7 @@ bool Foam::functionObjects::residuals::execute()
bool Foam::functionObjects::residuals::write()
{
writeFiles::write();
logFiles::write();
if (Pstream::master())
{

View File

@ -51,7 +51,8 @@ Description
See also
Foam::functionObject
Foam::functionObjects::writeFiles
Foam::functionObjects::regionFunctionObject
Foam::functionObjects::logFiles
Foam::functionObjects::timeControl
SourceFiles
@ -62,7 +63,8 @@ SourceFiles
#ifndef functionObjects_residuals_H
#define functionObjects_residuals_H
#include "writeFiles.H"
#include "regionFunctionObject.H"
#include "logFiles.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -77,7 +79,8 @@ namespace functionObjects
class residuals
:
public writeFiles
public regionFunctionObject,
public logFiles
{
protected: