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 65207e29ea
commit 4a301e94c6
29 changed files with 197 additions and 186 deletions

View File

@ -50,7 +50,7 @@ void Foam::functionObjects::histogram::writeGraph
{
const wordList fieldNames(1, fieldName);
fileName outputPath = baseTimeDir();
fileName outputPath = file_.baseTimeDir();
mkDir(outputPath);
OFstream graphFile
(
@ -75,7 +75,8 @@ Foam::functionObjects::histogram::histogram
const dictionary& dict
)
:
writeFile(name, runTime, dict, name)
regionFunctionObject(name, runTime, dict),
file_(obr_, name)
{
if (!isA<fvMesh>(obr_))
{

View File

@ -59,6 +59,7 @@ Usage
See also
Foam::functionObject
Foam::functionObjects::regionFunctionObject
Foam::functionObjects::writeFile
SourceFiles
@ -69,8 +70,9 @@ SourceFiles
#ifndef functionObjects_histogram_H
#define functionObjects_histogram_H
#include "writer.H"
#include "regionFunctionObject.H"
#include "writeFile.H"
#include "writer.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -85,10 +87,12 @@ namespace functionObjects
class histogram
:
public writeFile
public regionFunctionObject
{
// Private data
writeFile file_;
//- Name of field
word fieldName_;