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:
@ -81,7 +81,6 @@ See also
|
|||||||
#include "noiseFFT.H"
|
#include "noiseFFT.H"
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "writeFiles.H"
|
|
||||||
#include "CSV.H"
|
#include "CSV.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -222,7 +222,7 @@ $(dll)/codedBase/codedBase.C
|
|||||||
db/functionObjects/functionObject/functionObject.C
|
db/functionObjects/functionObject/functionObject.C
|
||||||
db/functionObjects/functionObjectList/functionObjectList.C
|
db/functionObjects/functionObjectList/functionObjectList.C
|
||||||
db/functionObjects/writeFile/writeFile.C
|
db/functionObjects/writeFile/writeFile.C
|
||||||
db/functionObjects/writeFiles/writeFiles.C
|
db/functionObjects/logFiles/logFiles.C
|
||||||
db/functionObjects/timeControl/timeControl.C
|
db/functionObjects/timeControl/timeControl.C
|
||||||
db/functionObjects/timeControl/timeControlFunctionObject.C
|
db/functionObjects/timeControl/timeControlFunctionObject.C
|
||||||
db/functionObjects/regionFunctionObject/regionFunctionObject.C
|
db/functionObjects/regionFunctionObject/regionFunctionObject.C
|
||||||
|
|||||||
@ -23,18 +23,18 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "logFiles.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::functionObjects::writeFiles::createFiles()
|
void Foam::functionObjects::logFiles::createFiles()
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
const word startTimeName =
|
const word startTimeName =
|
||||||
obr_.time().timeName(obr_.time().startTime().value());
|
fileObr_.time().timeName(fileObr_.time().startTime().value());
|
||||||
|
|
||||||
forAll(names_, i)
|
forAll(names_, i)
|
||||||
{
|
{
|
||||||
@ -49,7 +49,7 @@ void Foam::functionObjects::writeFiles::createFiles()
|
|||||||
IFstream is(outputDir/(fName + ".dat"));
|
IFstream is(outputDir/(fName + ".dat"));
|
||||||
if (is.good())
|
if (is.good())
|
||||||
{
|
{
|
||||||
fName = fName + "_" + obr_.time().timeName();
|
fName = fName + "_" + fileObr_.time().timeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
filePtrs_.set(i, new OFstream(outputDir/(fName + ".dat")));
|
filePtrs_.set(i, new OFstream(outputDir/(fName + ".dat")));
|
||||||
@ -57,14 +57,13 @@ void Foam::functionObjects::writeFiles::createFiles()
|
|||||||
initStream(filePtrs_[i]);
|
initStream(filePtrs_[i]);
|
||||||
|
|
||||||
writeFileHeader(i);
|
writeFileHeader(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::writeFiles::resetNames(const wordList& names)
|
void Foam::functionObjects::logFiles::resetNames(const wordList& names)
|
||||||
{
|
{
|
||||||
names_.clear();
|
names_.clear();
|
||||||
names_.append(names);
|
names_.append(names);
|
||||||
@ -77,7 +76,7 @@ void Foam::functionObjects::writeFiles::resetNames(const wordList& names)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::writeFiles::resetName(const word& name)
|
void Foam::functionObjects::logFiles::resetName(const word& name)
|
||||||
{
|
{
|
||||||
names_.clear();
|
names_.clear();
|
||||||
names_.append(name);
|
names_.append(name);
|
||||||
@ -92,29 +91,13 @@ void Foam::functionObjects::writeFiles::resetName(const word& name)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::functionObjects::writeFiles::writeFiles
|
Foam::functionObjects::logFiles::logFiles
|
||||||
(
|
(
|
||||||
const word& name,
|
|
||||||
const Time& time,
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
|
||||||
)
|
|
||||||
:
|
|
||||||
writeFile(name, time, dict, prefix),
|
|
||||||
names_(),
|
|
||||||
filePtrs_()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::functionObjects::writeFiles::writeFiles
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
const word& prefix
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFile(name, obr, dict, prefix),
|
writeFile(obr, prefix),
|
||||||
names_(),
|
names_(),
|
||||||
filePtrs_()
|
filePtrs_()
|
||||||
{}
|
{}
|
||||||
@ -122,19 +105,19 @@ Foam::functionObjects::writeFiles::writeFiles
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::functionObjects::writeFiles::~writeFiles()
|
Foam::functionObjects::logFiles::~logFiles()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::wordList& Foam::functionObjects::writeFiles::names() const
|
const Foam::wordList& Foam::functionObjects::logFiles::names() const
|
||||||
{
|
{
|
||||||
return names_;
|
return names_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::OFstream& Foam::functionObjects::writeFiles::file()
|
Foam::OFstream& Foam::functionObjects::logFiles::file()
|
||||||
{
|
{
|
||||||
if (!Pstream::master())
|
if (!Pstream::master())
|
||||||
{
|
{
|
||||||
@ -161,7 +144,7 @@ Foam::OFstream& Foam::functionObjects::writeFiles::file()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::PtrList<Foam::OFstream>& Foam::functionObjects::writeFiles::files()
|
Foam::PtrList<Foam::OFstream>& Foam::functionObjects::logFiles::files()
|
||||||
{
|
{
|
||||||
if (!Pstream::master())
|
if (!Pstream::master())
|
||||||
{
|
{
|
||||||
@ -174,7 +157,7 @@ Foam::PtrList<Foam::OFstream>& Foam::functionObjects::writeFiles::files()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::OFstream& Foam::functionObjects::writeFiles::file(const label i)
|
Foam::OFstream& Foam::functionObjects::logFiles::file(const label i)
|
||||||
{
|
{
|
||||||
if (!Pstream::master())
|
if (!Pstream::master())
|
||||||
{
|
{
|
||||||
@ -194,7 +177,7 @@ Foam::OFstream& Foam::functionObjects::writeFiles::file(const label i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::writeFiles::write()
|
bool Foam::functionObjects::logFiles::write()
|
||||||
{
|
{
|
||||||
createFiles();
|
createFiles();
|
||||||
|
|
||||||
@ -22,22 +22,23 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
Description
|
Description
|
||||||
functionObject base class for writing files
|
functionObject base class for creating, maintaining and writing log
|
||||||
|
files e.g. integrated of averaged field data vs time.
|
||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::OutputFilterFunctionObject
|
Foam::functionObjects::writeFile
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
functionObjectFiles.C
|
logFiles.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef functionObjects_writeFiles_H
|
#ifndef functionObjects_logFiles_H
|
||||||
#define functionObjects_writeFiles_H
|
#define functionObjects_logFiles_H
|
||||||
|
|
||||||
#include "writeFile.H"
|
#include "writeFile.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
@ -51,14 +52,17 @@ namespace functionObjects
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class writeFiles Declaration
|
Class logFiles Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class writeFiles
|
class logFiles
|
||||||
:
|
:
|
||||||
public writeFile
|
public writeFile
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
//- File names
|
//- File names
|
||||||
wordList names_;
|
wordList names_;
|
||||||
@ -67,8 +71,6 @@ class writeFiles
|
|||||||
PtrList<OFstream> filePtrs_;
|
PtrList<OFstream> filePtrs_;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Create the output file
|
//- Create the output file
|
||||||
@ -80,38 +82,35 @@ protected:
|
|||||||
//- Reset the list of names to a single name entry
|
//- Reset the list of names to a single name entry
|
||||||
virtual void resetName(const word& name);
|
virtual void resetName(const word& name);
|
||||||
|
|
||||||
|
//- File header information
|
||||||
|
virtual void writeFileHeader(const label i = 0) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
writeFiles(const writeFiles&);
|
logFiles(const logFiles&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const writeFiles&);
|
void operator=(const logFiles&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from name, Time, dictionary and prefix
|
//- Construct from objectRegistry and prefix
|
||||||
writeFiles
|
logFiles
|
||||||
(
|
(
|
||||||
const word& name,
|
|
||||||
const Time& time,
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from name, objectRegistry, dictionary and prefix
|
|
||||||
writeFiles
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
const word& prefix
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~writeFiles();
|
virtual ~logFiles();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -119,12 +118,12 @@ public:
|
|||||||
//- Return const access to the names
|
//- Return const access to the names
|
||||||
const wordList& names() const;
|
const wordList& names() const;
|
||||||
|
|
||||||
//- Return access to the file (if only 1)
|
|
||||||
OFstream& file();
|
|
||||||
|
|
||||||
//- Return access to the files
|
//- Return access to the files
|
||||||
PtrList<OFstream>& files();
|
PtrList<OFstream>& files();
|
||||||
|
|
||||||
|
//- Return access to the file (if only 1)
|
||||||
|
OFstream& file();
|
||||||
|
|
||||||
//- Return file 'i'
|
//- Return file 'i'
|
||||||
OFstream& file(const label i);
|
OFstream& file(const label i);
|
||||||
|
|
||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "writeFile.H"
|
#include "writeFile.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "IOmanip.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ void Foam::functionObjects::writeFile::initStream(Ostream& os) const
|
|||||||
|
|
||||||
Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
|
Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
|
||||||
{
|
{
|
||||||
fileName baseDir = obr_.time().path();
|
fileName baseDir = fileObr_.time().path();
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -63,9 +62,9 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Append mesh name if not default region
|
// Append mesh name if not default region
|
||||||
if (isA<polyMesh>(obr_))
|
if (isA<polyMesh>(fileObr_))
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = refCast<const polyMesh>(obr_);
|
const polyMesh& mesh = refCast<const polyMesh>(fileObr_);
|
||||||
if (mesh.name() != polyMesh::defaultRegion)
|
if (mesh.name() != polyMesh::defaultRegion)
|
||||||
{
|
{
|
||||||
baseDir = baseDir/mesh.name();
|
baseDir = baseDir/mesh.name();
|
||||||
@ -78,14 +77,10 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
|
|||||||
|
|
||||||
Foam::fileName Foam::functionObjects::writeFile::baseTimeDir() const
|
Foam::fileName Foam::functionObjects::writeFile::baseTimeDir() const
|
||||||
{
|
{
|
||||||
return baseFileDir()/prefix_/obr_.time().timeName();
|
return baseFileDir()/prefix_/fileObr_.time().timeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::writeFile::writeFileHeader(const label i)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::Omanip<int> Foam::functionObjects::writeFile::valueWidth
|
Foam::Omanip<int> Foam::functionObjects::writeFile::valueWidth
|
||||||
(
|
(
|
||||||
const label offset
|
const label offset
|
||||||
@ -99,26 +94,11 @@ Foam::Omanip<int> Foam::functionObjects::writeFile::valueWidth
|
|||||||
|
|
||||||
Foam::functionObjects::writeFile::writeFile
|
Foam::functionObjects::writeFile::writeFile
|
||||||
(
|
(
|
||||||
const word& name,
|
|
||||||
const Time& runTime,
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
|
||||||
)
|
|
||||||
:
|
|
||||||
regionFunctionObject(name, runTime, dict),
|
|
||||||
prefix_(prefix)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::functionObjects::writeFile::writeFile
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
const word& prefix
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
regionFunctionObject(name, obr, dict),
|
fileObr_(obr),
|
||||||
prefix_(prefix)
|
prefix_(prefix)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -171,7 +151,7 @@ void Foam::functionObjects::writeFile::writeHeader
|
|||||||
|
|
||||||
void Foam::functionObjects::writeFile::writeTime(Ostream& os) const
|
void Foam::functionObjects::writeFile::writeTime(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << setw(charWidth()) << obr_.time().timeName();
|
os << setw(charWidth()) << fileObr_.time().timeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,19 +28,18 @@ Description
|
|||||||
functionObject base class for writing single files
|
functionObject base class for writing single files
|
||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::regionFunctionObject
|
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
functionObjectFile.C
|
writeFile.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef functionObjects_writeFile_H
|
#ifndef functionObjects_writeFile_H
|
||||||
#define functionObjects_writeFile_H
|
#define functionObjects_writeFile_H
|
||||||
|
|
||||||
#include "regionFunctionObject.H"
|
#include "objectRegistry.H"
|
||||||
#include "Time.H"
|
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -55,34 +54,22 @@ namespace functionObjects
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class writeFile
|
class writeFile
|
||||||
:
|
|
||||||
public regionFunctionObject
|
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
|
//- Reference to the region objectRegistry
|
||||||
|
const objectRegistry& fileObr_;
|
||||||
|
|
||||||
//- Prefix
|
//- Prefix
|
||||||
const word prefix_;
|
const word prefix_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
private:
|
||||||
|
|
||||||
//- Initialise the output stream for writing
|
// Private Member Functions
|
||||||
virtual void initStream(Ostream& os) const;
|
|
||||||
|
|
||||||
//- Return the base directory for output
|
|
||||||
virtual fileName baseFileDir() const;
|
|
||||||
|
|
||||||
//- Return the base directory for the current time value
|
|
||||||
virtual fileName baseTimeDir() const;
|
|
||||||
|
|
||||||
//- File header information
|
|
||||||
virtual void writeFileHeader(const label i = 0);
|
|
||||||
|
|
||||||
//- Return the value width when writing to stream with optional offset
|
|
||||||
virtual Omanip<int> valueWidth(const label offset = 0) const;
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
writeFile(const writeFile&);
|
writeFile(const writeFile&);
|
||||||
@ -102,31 +89,32 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from name, Time, dictionary and prefix
|
//- Construct from objectRegistry and prefix
|
||||||
writeFile
|
writeFile
|
||||||
(
|
(
|
||||||
const word& name,
|
|
||||||
const Time& t,
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from name, objectRegistry, dictionary and prefix
|
|
||||||
writeFile
|
|
||||||
(
|
|
||||||
const word& name,
|
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
const dictionary& dict,
|
|
||||||
const word& prefix
|
const word& prefix
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~writeFile();
|
~writeFile();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Initialise the output stream for writing
|
||||||
|
void initStream(Ostream& os) const;
|
||||||
|
|
||||||
|
//- Return the base directory for output
|
||||||
|
fileName baseFileDir() const;
|
||||||
|
|
||||||
|
//- Return the base directory for the current time value
|
||||||
|
fileName baseTimeDir() const;
|
||||||
|
|
||||||
|
//- Return the value width when writing to stream with optional offset
|
||||||
|
Omanip<int> valueWidth(const label offset = 0) const;
|
||||||
|
|
||||||
//- Write a commented string to stream
|
//- Write a commented string to stream
|
||||||
void writeCommented(Ostream& os, const string& str) const;
|
void writeCommented(Ostream& os, const string& str) const;
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,8 @@ Foam::functionObjects::fieldMinMax::fieldMinMax
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
location_(true),
|
location_(true),
|
||||||
mode_(mdMag),
|
mode_(mdMag),
|
||||||
fieldSet_()
|
fieldSet_()
|
||||||
@ -129,7 +130,7 @@ Foam::functionObjects::fieldMinMax::~fieldMinMax()
|
|||||||
|
|
||||||
bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
|
bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
location_ = dict.lookupOrDefault<Switch>("location", true);
|
location_ = dict.lookupOrDefault<Switch>("location", true);
|
||||||
|
|
||||||
@ -148,7 +149,7 @@ bool Foam::functionObjects::fieldMinMax::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::fieldMinMax::write()
|
bool Foam::functionObjects::fieldMinMax::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
if (!location_) writeTime(file());
|
if (!location_) writeTime(file());
|
||||||
Log << type() << " " << name() << " write:" << nl;
|
Log << type() << " " << name() << " write:" << nl;
|
||||||
|
|||||||
@ -67,8 +67,8 @@ Usage
|
|||||||
Output data is written to the file \<timeDir\>/fieldMinMax.dat
|
Output data is written to the file \<timeDir\>/fieldMinMax.dat
|
||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObjects::regionFunctionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldMinMax.C
|
fieldMinMax.C
|
||||||
@ -78,7 +78,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_fieldMinMax_H
|
#ifndef functionObjects_fieldMinMax_H
|
||||||
#define functionObjects_fieldMinMax_H
|
#define functionObjects_fieldMinMax_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -94,7 +95,8 @@ namespace functionObjects
|
|||||||
|
|
||||||
class fieldMinMax
|
class fieldMinMax
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
|||||||
const word& valueType
|
const word& valueType
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
regionName_(word::null),
|
regionName_(word::null),
|
||||||
resultDict_(fileName("name"), dictionary::null)
|
resultDict_(fileName("name"), dictionary::null)
|
||||||
@ -67,7 +68,8 @@ Foam::functionObjects::fieldValue::fieldValue
|
|||||||
const word& valueType
|
const word& valueType
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, obr, dict, name),
|
regionFunctionObject(name, obr, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
regionName_(word::null),
|
regionName_(word::null),
|
||||||
resultDict_(fileName("name"), dictionary::null)
|
resultDict_(fileName("name"), dictionary::null)
|
||||||
@ -88,7 +90,7 @@ Foam::functionObjects::fieldValue::~fieldValue()
|
|||||||
bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
|
bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict_ = dict;
|
dict_ = dict;
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
dict.lookup("fields") >> fields_;
|
dict.lookup("fields") >> fields_;
|
||||||
dict.lookup("writeFields") >> writeFields_;
|
dict.lookup("writeFields") >> writeFields_;
|
||||||
@ -105,7 +107,7 @@ bool Foam::functionObjects::fieldValue::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::fieldValue::write()
|
bool Foam::functionObjects::fieldValue::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
Log << type() << " " << name() << " write:" << nl;
|
Log << type() << " " << name() << " write:" << nl;
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,11 @@ Group
|
|||||||
Description
|
Description
|
||||||
Base class for field value -based function objects.
|
Base class for field value -based function objects.
|
||||||
|
|
||||||
|
See also
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldValue.C
|
fieldValue.C
|
||||||
|
|
||||||
@ -38,7 +43,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_fieldValue_H
|
#ifndef functionObjects_fieldValue_H
|
||||||
#define functionObjects_fieldValue_H
|
#define functionObjects_fieldValue_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "Field.H"
|
#include "Field.H"
|
||||||
|
|
||||||
@ -59,7 +65,8 @@ namespace functionObjects
|
|||||||
|
|
||||||
class fieldValue
|
class fieldValue
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -106,7 +106,8 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
operation_(opSubtract),
|
operation_(opSubtract),
|
||||||
region1Ptr_(nullptr),
|
region1Ptr_(nullptr),
|
||||||
region2Ptr_(nullptr)
|
region2Ptr_(nullptr)
|
||||||
@ -135,7 +136,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
region1Ptr_.reset
|
region1Ptr_.reset
|
||||||
(
|
(
|
||||||
@ -166,7 +167,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
|
|||||||
|
|
||||||
bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
|
bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
region1Ptr_->write();
|
region1Ptr_->write();
|
||||||
region2Ptr_->write();
|
region2Ptr_->write();
|
||||||
|
|||||||
@ -65,7 +65,10 @@ Usage
|
|||||||
\endplaintable
|
\endplaintable
|
||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::fieldValue
|
Foam::functionObject
|
||||||
|
Foam::functionObject::fieldValue
|
||||||
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldValueDelta.C
|
fieldValueDelta.C
|
||||||
@ -75,7 +78,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_fieldValueDelta_H
|
#ifndef functionObjects_fieldValueDelta_H
|
||||||
#define functionObjects_fieldValueDelta_H
|
#define functionObjects_fieldValueDelta_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "fieldValue.H"
|
#include "fieldValue.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -93,7 +97,8 @@ namespace fieldValues
|
|||||||
|
|
||||||
class fieldValueDelta
|
class fieldValueDelta
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//- Operation type enumeration
|
//- Operation type enumeration
|
||||||
|
|||||||
@ -50,7 +50,7 @@ void Foam::functionObjects::histogram::writeGraph
|
|||||||
{
|
{
|
||||||
const wordList fieldNames(1, fieldName);
|
const wordList fieldNames(1, fieldName);
|
||||||
|
|
||||||
fileName outputPath = baseTimeDir();
|
fileName outputPath = file_.baseTimeDir();
|
||||||
mkDir(outputPath);
|
mkDir(outputPath);
|
||||||
OFstream graphFile
|
OFstream graphFile
|
||||||
(
|
(
|
||||||
@ -75,7 +75,8 @@ Foam::functionObjects::histogram::histogram
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFile(name, runTime, dict, name)
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
file_(obr_, name)
|
||||||
{
|
{
|
||||||
if (!isA<fvMesh>(obr_))
|
if (!isA<fvMesh>(obr_))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -59,6 +59,7 @@ Usage
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
|
Foam::functionObjects::regionFunctionObject
|
||||||
Foam::functionObjects::writeFile
|
Foam::functionObjects::writeFile
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -69,8 +70,9 @@ SourceFiles
|
|||||||
#ifndef functionObjects_histogram_H
|
#ifndef functionObjects_histogram_H
|
||||||
#define functionObjects_histogram_H
|
#define functionObjects_histogram_H
|
||||||
|
|
||||||
#include "writer.H"
|
#include "regionFunctionObject.H"
|
||||||
#include "writeFile.H"
|
#include "writeFile.H"
|
||||||
|
#include "writer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -85,10 +87,12 @@ namespace functionObjects
|
|||||||
|
|
||||||
class histogram
|
class histogram
|
||||||
:
|
:
|
||||||
public writeFile
|
public regionFunctionObject
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
writeFile file_;
|
||||||
|
|
||||||
//- Name of field
|
//- Name of field
|
||||||
word fieldName_;
|
word fieldName_;
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void Foam::functionObjects::regionSizeDistribution::writeGraph
|
|||||||
{
|
{
|
||||||
const wordList valNames(1, valueName);
|
const wordList valNames(1, valueName);
|
||||||
|
|
||||||
fileName outputPath = baseTimeDir();
|
fileName outputPath = file_.baseTimeDir();
|
||||||
mkDir(outputPath);
|
mkDir(outputPath);
|
||||||
|
|
||||||
OFstream str(outputPath/formatterPtr_().getFileName(coords, valNames));
|
OFstream str(outputPath/formatterPtr_().getFileName(coords, valNames));
|
||||||
@ -330,7 +330,8 @@ Foam::functionObjects::regionSizeDistribution::regionSizeDistribution
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFile(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
file_(obr_, name),
|
||||||
alphaName_(dict.lookup("field")),
|
alphaName_(dict.lookup("field")),
|
||||||
patchNames_(dict.lookup("patches"))
|
patchNames_(dict.lookup("patches"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -96,6 +96,7 @@ Usage
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
|
Foam::functionObjects::regionFunctionObject
|
||||||
Foam::functionObjects::writeFile
|
Foam::functionObjects::writeFile
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -106,6 +107,7 @@ SourceFiles
|
|||||||
#ifndef functionObjects_regionSizeDistribution_H
|
#ifndef functionObjects_regionSizeDistribution_H
|
||||||
#define functionObjects_regionSizeDistribution_H
|
#define functionObjects_regionSizeDistribution_H
|
||||||
|
|
||||||
|
#include "regionFunctionObject.H"
|
||||||
#include "writeFile.H"
|
#include "writeFile.H"
|
||||||
#include "writer.H"
|
#include "writer.H"
|
||||||
#include "Map.H"
|
#include "Map.H"
|
||||||
@ -130,10 +132,12 @@ namespace functionObjects
|
|||||||
|
|
||||||
class regionSizeDistribution
|
class regionSizeDistribution
|
||||||
:
|
:
|
||||||
public writeFile
|
public regionFunctionObject
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
writeFile file_;
|
||||||
|
|
||||||
//- Name of field
|
//- Name of field
|
||||||
word alphaName_;
|
word alphaName_;
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,8 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
patchSet_()
|
patchSet_()
|
||||||
{
|
{
|
||||||
if (!isA<fvMesh>(obr_))
|
if (!isA<fvMesh>(obr_))
|
||||||
@ -147,7 +148,7 @@ Foam::functionObjects::wallHeatFlux::~wallHeatFlux()
|
|||||||
|
|
||||||
bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
|
bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||||
@ -237,7 +238,7 @@ bool Foam::functionObjects::wallHeatFlux::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::wallHeatFlux::write()
|
bool Foam::functionObjects::wallHeatFlux::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
const volScalarField& wallHeatFlux =
|
const volScalarField& wallHeatFlux =
|
||||||
obr_.lookupObject<volScalarField>(type());
|
obr_.lookupObject<volScalarField>(type());
|
||||||
|
|||||||
@ -54,7 +54,8 @@ Usage
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
Foam::functionObjects::pressureTools
|
Foam::functionObjects::pressureTools
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
@ -66,7 +67,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_wallHeatFlux_H
|
#ifndef functionObjects_wallHeatFlux_H
|
||||||
#define functionObjects_wallHeatFlux_H
|
#define functionObjects_wallHeatFlux_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
@ -89,8 +91,10 @@ namespace functionObjects
|
|||||||
|
|
||||||
class wallHeatFlux
|
class wallHeatFlux
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|||||||
@ -89,7 +89,8 @@ Foam::functionObjects::wallShearStress::wallShearStress
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
patchSet_()
|
patchSet_()
|
||||||
{
|
{
|
||||||
if (!isA<fvMesh>(obr_))
|
if (!isA<fvMesh>(obr_))
|
||||||
@ -139,7 +140,7 @@ Foam::functionObjects::wallShearStress::~wallShearStress()
|
|||||||
|
|
||||||
bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
|
bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||||
@ -236,7 +237,7 @@ bool Foam::functionObjects::wallShearStress::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::wallShearStress::write()
|
bool Foam::functionObjects::wallShearStress::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
const volVectorField& wallShearStress =
|
const volVectorField& wallShearStress =
|
||||||
obr_.lookupObject<volVectorField>(type());
|
obr_.lookupObject<volVectorField>(type());
|
||||||
|
|||||||
@ -65,7 +65,8 @@ Usage
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
Foam::functionObjects::pressureTools
|
Foam::functionObjects::pressureTools
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
@ -77,7 +78,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_wallShearStress_H
|
#ifndef functionObjects_wallShearStress_H
|
||||||
#define functionObjects_wallShearStress_H
|
#define functionObjects_wallShearStress_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
|
|
||||||
@ -98,8 +100,10 @@ namespace functionObjects
|
|||||||
|
|
||||||
class wallShearStress
|
class wallShearStress
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|||||||
@ -121,7 +121,8 @@ Foam::functionObjects::yPlus::yPlus
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name)
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name)
|
||||||
{
|
{
|
||||||
if (!isA<fvMesh>(obr_))
|
if (!isA<fvMesh>(obr_))
|
||||||
{
|
{
|
||||||
@ -164,7 +165,7 @@ Foam::functionObjects::yPlus::~yPlus()
|
|||||||
|
|
||||||
bool Foam::functionObjects::yPlus::read(const dictionary& dict)
|
bool Foam::functionObjects::yPlus::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -208,7 +209,7 @@ bool Foam::functionObjects::yPlus::write()
|
|||||||
|
|
||||||
yPlus.write();
|
yPlus.write();
|
||||||
|
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
const volScalarField::Boundary& yPlusBf = yPlus.boundaryField();
|
const volScalarField::Boundary& yPlusBf = yPlus.boundaryField();
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,8 @@ Description
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -44,7 +45,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_yPlus_H
|
#ifndef functionObjects_yPlus_H
|
||||||
#define functionObjects_yPlus_H
|
#define functionObjects_yPlus_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -65,7 +67,8 @@ namespace functionObjects
|
|||||||
|
|
||||||
class yPlus
|
class yPlus
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ bool Foam::functionObjects::forceCoeffs::write()
|
|||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;
|
scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;
|
||||||
|
|
||||||
|
|||||||
@ -529,7 +529,8 @@ Foam::functionObjects::forces::forces
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
force_(3),
|
force_(3),
|
||||||
moment_(3),
|
moment_(3),
|
||||||
patchSet_(),
|
patchSet_(),
|
||||||
@ -569,7 +570,8 @@ Foam::functionObjects::forces::forces
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, obr, dict, name),
|
regionFunctionObject(name, obr, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
force_(3),
|
force_(3),
|
||||||
moment_(3),
|
moment_(3),
|
||||||
patchSet_(),
|
patchSet_(),
|
||||||
@ -612,7 +614,7 @@ Foam::functionObjects::forces::~forces()
|
|||||||
|
|
||||||
bool Foam::functionObjects::forces::read(const dictionary& dict)
|
bool Foam::functionObjects::forces::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::read(dict);
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
initialised_ = false;
|
initialised_ = false;
|
||||||
|
|
||||||
@ -909,7 +911,7 @@ bool Foam::functionObjects::forces::write()
|
|||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
writeForces();
|
writeForces();
|
||||||
|
|
||||||
|
|||||||
@ -101,7 +101,8 @@ Note
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
Foam::forceCoeffs
|
Foam::forceCoeffs
|
||||||
|
|
||||||
@ -113,7 +114,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_forces_H
|
#ifndef functionObjects_forces_H
|
||||||
#define functionObjects_forces_H
|
#define functionObjects_forces_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
#include "coordinateSystem.H"
|
#include "coordinateSystem.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
@ -131,8 +133,10 @@ namespace functionObjects
|
|||||||
|
|
||||||
class forces
|
class forces
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|||||||
@ -25,6 +25,8 @@ License
|
|||||||
|
|
||||||
#include "cloudInfo.H"
|
#include "cloudInfo.H"
|
||||||
#include "kinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
|
#include "dictionary.H"
|
||||||
|
#include "PstreamReduceOps.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -66,7 +68,8 @@ Foam::functionObjects::cloudInfo::cloudInfo
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name)
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
@ -82,7 +85,9 @@ Foam::functionObjects::cloudInfo::~cloudInfo()
|
|||||||
|
|
||||||
bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
|
bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
writeFiles::resetNames(dict.lookup("clouds"));
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
|
logFiles::resetNames(dict.lookup("clouds"));
|
||||||
|
|
||||||
Info<< type() << " " << name() << ": ";
|
Info<< type() << " " << name() << ": ";
|
||||||
if (names().size())
|
if (names().size())
|
||||||
@ -111,7 +116,7 @@ bool Foam::functionObjects::cloudInfo::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::cloudInfo::write()
|
bool Foam::functionObjects::cloudInfo::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
forAll(names(), i)
|
forAll(names(), i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -61,7 +61,8 @@ Usage
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
cloudInfo.C
|
cloudInfo.C
|
||||||
@ -71,7 +72,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_cloudInfo_H
|
#ifndef functionObjects_cloudInfo_H
|
||||||
#define functionObjects_cloudInfo_H
|
#define functionObjects_cloudInfo_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -86,7 +88,8 @@ namespace functionObjects
|
|||||||
|
|
||||||
class cloudInfo
|
class cloudInfo
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,8 @@ Foam::functionObjects::residuals::residuals
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
writeFiles(name, runTime, dict, name),
|
regionFunctionObject(name, runTime, dict),
|
||||||
|
logFiles(obr_, name),
|
||||||
fieldSet_()
|
fieldSet_()
|
||||||
{
|
{
|
||||||
if (!isA<fvMesh>(obr_))
|
if (!isA<fvMesh>(obr_))
|
||||||
@ -77,6 +78,8 @@ Foam::functionObjects::residuals::~residuals()
|
|||||||
|
|
||||||
bool Foam::functionObjects::residuals::read(const dictionary& dict)
|
bool Foam::functionObjects::residuals::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
|
regionFunctionObject::read(dict);
|
||||||
|
|
||||||
dict.lookup("fields") >> fieldSet_;
|
dict.lookup("fields") >> fieldSet_;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -114,7 +117,7 @@ bool Foam::functionObjects::residuals::execute()
|
|||||||
|
|
||||||
bool Foam::functionObjects::residuals::write()
|
bool Foam::functionObjects::residuals::write()
|
||||||
{
|
{
|
||||||
writeFiles::write();
|
logFiles::write();
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -51,7 +51,8 @@ Description
|
|||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::functionObject
|
Foam::functionObject
|
||||||
Foam::functionObjects::writeFiles
|
Foam::functionObjects::regionFunctionObject
|
||||||
|
Foam::functionObjects::logFiles
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -62,7 +63,8 @@ SourceFiles
|
|||||||
#ifndef functionObjects_residuals_H
|
#ifndef functionObjects_residuals_H
|
||||||
#define functionObjects_residuals_H
|
#define functionObjects_residuals_H
|
||||||
|
|
||||||
#include "writeFiles.H"
|
#include "regionFunctionObject.H"
|
||||||
|
#include "logFiles.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -77,7 +79,8 @@ namespace functionObjects
|
|||||||
|
|
||||||
class residuals
|
class residuals
|
||||||
:
|
:
|
||||||
public writeFiles
|
public regionFunctionObject,
|
||||||
|
public logFiles
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user