A base class for histogram models. More...
#include <histogramModel.H>


Public Member Functions | |
| TypeName ("histogramModel") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, histogramModel, dictionary,(const word &name, const fvMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
| histogramModel (const word &name, const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. | |
| histogramModel (const histogramModel &)=delete | |
| No copy construct. | |
| void | operator= (const histogramModel &)=delete |
| No copy assignment. | |
| virtual | ~histogramModel ()=default |
| Destructor. | |
| const fvMesh & | mesh () const noexcept |
| Return const reference to the mesh. | |
| const word & | fieldName () const noexcept |
| Return const reference to the operand field name. | |
| virtual bool | read (const dictionary &dict) |
| Read the function-object dictionary. | |
| virtual bool | write (const bool log)=0 |
| Write data to stream and files. | |
| Public Member Functions inherited from writeFile | |
| writeFile (const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat") | |
| Construct from objectRegistry, prefix, fileName. | |
| writeFile (const objectRegistry &obr, const fileName &prefix, const word &name, const dictionary &dict, const bool writeToFile=true, const string &ext=".dat") | |
| Construct from objectRegistry, prefix, fileName and read options from dictionary. | |
| writeFile (const writeFile &wf) | |
| Construct copy. | |
| virtual | ~writeFile ()=default |
| Destructor. | |
| virtual const string & | setExt (const string &ext) |
| Set extension. | |
| virtual OFstream & | file () |
| Return access to the file (if only 1). | |
| virtual bool | writeToFile () const |
| Flag to allow writing to file. | |
| virtual bool | canWriteToFile () const |
| Flag to allow writing to the file. | |
| virtual bool | canResetFile () const |
| Flag to allow resetting the file. | |
| virtual bool | canWriteHeader () const |
| Flag to allow writing the header. | |
| virtual label | charWidth () const |
| Return width of character stream output. | |
| virtual void | writeCommented (Ostream &os, const string &str) const |
| Write a commented string to stream. | |
| virtual void | writeTabbed (Ostream &os, const string &str) const |
| Write a tabbed string to stream. | |
| virtual void | writeHeader (Ostream &os, const string &str) const |
| Write a commented header to stream. | |
| virtual void | writeCurrentTime (Ostream &os) const |
| Write the current time to stream. | |
| virtual void | writeBreak (Ostream &os) const |
| Write a break marker to the stream. | |
| template<class Type> | |
| void | writeHeaderValue (Ostream &os, const string &property, const Type &value) const |
| Write a (commented) header property and value pair. | |
| template<class Type> | |
| void | writeValue (Ostream &os, const Type &val) const |
| Write a given value to stream with the space delimiter. | |
Static Public Member Functions | |
| static autoPtr< histogramModel > | New (const word &name, const fvMesh &mesh, const dictionary &dict) |
| Return a reference to the selected histogram model. | |
Protected Member Functions | |
| virtual void | writeFileHeader (Ostream &os) |
| Output file header information. | |
| volScalarField & | getOrReadField (const word &fieldName) const |
| Return requested field from the object registry or read+register the field to the object registry. | |
| void | write (scalarField &dataNormalised, const labelField &dataCount, const scalarField &magMidBin) |
| Write histogram data. | |
| Protected Member Functions inherited from writeFile | |
| void | initStream (Ostream &os) const |
| Initialise the output stream for writing. | |
| fileName | baseFileDir () const |
| Return the base directory for output. | |
| fileName | baseTimeDir () const |
| Return the base directory for the current time value. | |
| fileName | filePath (const fileName &fName) const |
| Return the full path for the supplied file name. | |
| virtual autoPtr< OFstream > | newFile (const fileName &fName) const |
| Return autoPtr to a new file using file name. | |
| virtual autoPtr< OFstream > | newFileAtTime (const word &name, scalar timeValue) const |
| Return autoPtr to a new file for a given time. | |
| virtual autoPtr< OFstream > | newFileAtStartTime (const word &name) const |
| Return autoPtr to a new file using the simulation start time. | |
| virtual void | resetFile (const word &name) |
| Reset internal file pointer to new file with new name. | |
| Omanip< int > | valueWidth (const label offset=0) const |
| Return the value width when writing to stream with optional offset. | |
| void | operator= (const writeFile &)=delete |
| No copy assignment. | |
| virtual autoPtr< OFstream > | createFile (const word &name, scalar timeValue) const |
| Deprecated(2022-09) Return autoPtr to a new file for a given time. | |
| virtual autoPtr< OFstream > | createFile (const word &name) const |
| Deprecated(2022-09) Return autoPtr to a new file using the simulation start time. | |
Additional Inherited Members | |
| Static Public Attributes inherited from writeFile | |
| static label | addChars = 8 |
| Additional characters for writing. | |
| Protected Attributes inherited from writeFile | |
| const objectRegistry & | fileObr_ |
| Reference to the region objectRegistry. | |
| const fileName | prefix_ |
| Prefix. | |
| word | fileName_ |
| Name of file. | |
| autoPtr< OFstream > | filePtr_ |
| File pointer. | |
| label | writePrecision_ |
| Write precision. | |
| bool | writeToFile_ |
| Flag to enable/disable writing to file. | |
| bool | updateHeader_ |
| Flag to update the header, e.g. on mesh changes. Default is true. | |
| bool | writtenHeader_ |
| Flag to identify whether the header has been written. | |
| bool | useUserTime_ |
| Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true. | |
| scalar | startTime_ |
| Start time value. | |
| string | ext_ |
| File extension; default = .dat. | |
| histogramModel | ( | const word & | name, |
| const fvMesh & | mesh, | ||
| const dictionary & | dict ) |
Construct from components.
Definition at line 113 of file histogramModel.C.
References dict, mesh(), Foam::name(), and writeFile::writeFile().
Referenced by declareRunTimeSelectionTable(), equalBinWidth::equalBinWidth(), histogramModel(), operator=(), and unequalBinWidth::unequalBinWidth().


|
delete |
|
virtualdefault |
Destructor.
|
protectedvirtual |
Output file header information.
Definition at line 36 of file histogramModel.C.
References Foam::endl(), os(), writeFile::writeCommented(), writeFile::writeHeader(), and writeFile::writeTabbed().
Referenced by read().


|
protected |
Return requested field from the object registry or read+register the field to the object registry.
Definition at line 47 of file histogramModel.C.
References IOobjectOption::AUTO_WRITE, fieldName(), IOobjectOption::MUST_READ, IOobjectOption::REGISTER, and regIOobject::store().
Referenced by equalBinWidth::write(), and unequalBinWidth::write().


|
protected |
Write histogram data.
Definition at line 76 of file histogramModel.C.
References Foam::endl(), writeFile::file(), forAll, UPstream::master(), mesh, Foam::sum(), Foam::tab, fvMesh::time(), and dimensioned< Type >::value().
Referenced by equalBinWidth::write(), and unequalBinWidth::write().


| TypeName | ( | "histogramModel" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| histogramModel | , | ||
| dictionary | , | ||
| (const word &name, const fvMesh &mesh, const dictionary &dict) | , | ||
| (name, mesh, dict) | ) |
References dict, histogramModel(), mesh(), and Foam::name().

|
static |
Return a reference to the selected histogram model.
Definition at line 27 of file histogramModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, mesh(), Foam::name(), and Foam::nl.
Referenced by histogram::read().


|
delete |
|
inlinenoexcept |
Return const reference to the mesh.
Definition at line 174 of file histogramModel.H.
References Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), equalBinWidth::equalBinWidth(), histogramModel(), New(), equalBinWidth::TypeName(), unequalBinWidth::TypeName(), and unequalBinWidth::unequalBinWidth().

|
inlinenoexcept |
Return const reference to the operand field name.
Definition at line 179 of file histogramModel.H.
References Foam::noexcept.
Referenced by getOrReadField(), equalBinWidth::write(), and unequalBinWidth::write().

|
virtual |
Read the function-object dictionary.
Reimplemented from writeFile.
Reimplemented in equalBinWidth, and unequalBinWidth.
Definition at line 128 of file histogramModel.C.
References dict, writeFile::file(), writeFile::read(), writeFileHeader(), writeFile::writeToFile(), and writeFile::writtenHeader_.
Referenced by equalBinWidth::read(), and unequalBinWidth::read().


|
pure virtual |
Write data to stream and files.
Implemented in equalBinWidth, and unequalBinWidth.
References Foam::log().
