Base class for bin models to handle general bin characteristics. More...
#include <binModel.H>


Public Member Functions | |
| TypeName ("binModel") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, binModel, dictionary,(const dictionary &dict, const fvMesh &mesh, const word &outputPrefix),(dict, mesh, outputPrefix)) | |
| binModel (const dictionary &dict, const fvMesh &mesh, const word &outputPrefix) | |
| Construct from components. | |
| binModel (const binModel &)=delete | |
| No copy construct. | |
| void | operator= (const binModel &)=delete |
| No copy assignment. | |
| virtual | ~binModel ()=default |
| Destructor. | |
| virtual bool | read (const dictionary &dict) |
| Read the function-object dictionary. | |
| label | nBin () const noexcept |
| Return the total number of bins. | |
| virtual void | initialise ()=0 |
| Initialise bin properties. | |
| virtual void | apply ()=0 |
| Apply bins. | |
| virtual void | updateMesh (const mapPolyMesh &mpm) |
| Update for changes of mesh. | |
| virtual void | movePoints (const polyMesh &mesh) |
| Update for changes of mesh. | |
| template<> | |
| bool | decomposePatchValues (List< List< vector > > &data, const label bini, const vector &v, const vector &n) const |
| template<> | |
| bool | decomposePatchValues (List< List< vector > > &data, const label bini, const vector &v, const vector &n) const |
| template<class Type> | |
| Foam::string | writeComponents (const word &stem) const |
| 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< binModel > | New (const dictionary &dict, const fvMesh &mesh, const word &outputPrefix) |
| Return a reference to the selected bin model. | |
Protected Member Functions | |
| void | setCoordinateSystem (const dictionary &dict, const word &e3Name=word::null, const word &e1Name=word::null) |
| Set the co-ordinate system from dictionary and axes names. | |
| template<class Type> | |
| bool | decomposePatchValues (List< List< Type > > &data, const label bini, const Type &v, const vector &n) const |
| Helper function to decompose patch values into normal and tangential components. | |
| template<class Type> | |
| string | writeComponents (const word &stem) const |
| Helper function to construct a string description for a given type. | |
| template<class Type> | |
| void | writeBinnedData (List< List< Type > > &data, Ostream &os) const |
| Write binned data to stream. | |
| 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. | |
Protected Attributes | |
| const fvMesh & | mesh_ |
| Reference to the mesh. | |
| bool | decomposePatchValues_ |
| Decompose patch values into normal and tangential components. | |
| bool | cumulative_ |
| Flag to accumulate bin data with increasing distance in binning direction. | |
| autoPtr< coordinateSystem > | coordSysPtr_ |
| Local coordinate system of bins. | |
| label | nBin_ |
| Total number of bins. | |
| labelList | patchIDs_ |
| Indices of operand patches. | |
| wordList | fieldNames_ |
| Names of operand fields. | |
| labelList | cellZoneIDs_ |
| Indices of operand cell zones. | |
| PtrList< OFstream > | filePtrs_ |
| List of file pointers; 1 file per field. | |
| 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. | |
Additional Inherited Members | |
| Static Public Attributes inherited from writeFile | |
| static label | addChars = 8 |
| Additional characters for writing. | |
Base class for bin models to handle general bin characteristics.
Definition at line 57 of file binModel.H.
| binModel | ( | const dictionary & | dict, |
| const fvMesh & | mesh, | ||
| const word & | outputPrefix ) |
Construct from components.
Definition at line 107 of file binModel.C.
References coordSysPtr_, cumulative_, decomposePatchValues_, dict, mesh, mesh_, nBin_, and writeFile::writeFile().
Referenced by binModel(), declareRunTimeSelectionTable(), operator=(), singleDirectionUniformBin::singleDirectionUniformBin(), and uniformBin::uniformBin().


|
delete |
|
protected |
Set the co-ordinate system from dictionary and axes names.
Definition at line 66 of file binModel.C.
References coordSysPtr_, dict, Foam::endl(), Foam::Info, Foam::nl, and Foam::Zero.
Referenced by read().


|
protected |
Helper function to decompose patch values into normal and tangential components.
Definition at line 24 of file binModelTemplates.C.
References decomposePatchValues_, and n.
Referenced by singleDirectionUniformBin::processField(), and uniformBin::processField().

Helper function to construct a string description for a given type.
References os().
Referenced by singleDirectionUniformBin::writeFileHeader(), and uniformBin::writeFileHeader().


|
protected |
Write binned data to stream.
Definition at line 55 of file binModelTemplates.C.
References cumulative_, Foam::endl(), nBin_, os(), writeFile::writeCurrentTime(), writeFile::writeValue(), and Foam::Zero.
Referenced by singleDirectionUniformBin::processField(), and uniformBin::processField().


| TypeName | ( | "binModel" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| binModel | , | ||
| dictionary | , | ||
| (const dictionary &dict, const fvMesh &mesh, const word &outputPrefix) | , | ||
| (dict, mesh, outputPrefix) | ) |
|
static |
Return a reference to the selected bin model.
Definition at line 26 of file binModelNew.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and mesh.
Referenced by binField::read().


|
delete |
|
virtual |
Read the function-object dictionary.
Reimplemented from writeFile.
Reimplemented in singleDirectionUniformBin, and uniformBin.
Definition at line 125 of file binModel.C.
References DynamicList< T, SizeMin >::append(), cellZoneIDs_, decomposePatchValues_, dict, UList< T >::empty(), Foam::endl(), fieldNames_, filePtrs_, forAll, mesh_, writeFile::newFileAtStartTime(), Foam::nl, patchIDs_, pbm, writeFile::read(), setCoordinateSystem(), UList< T >::size(), WarningInFunction, and zoneIDs.
Referenced by singleDirectionUniformBin::read(), and uniformBin::read().


|
inlinenoexcept |
Return the total number of bins.
Definition at line 233 of file binModel.H.
References nBin_, and Foam::noexcept.
|
pure virtual |
Initialise bin properties.
Implemented in singleDirectionUniformBin, and uniformBin.
|
pure virtual |
|
virtual |
|
virtual |
Update for changes of mesh.
Reimplemented in uniformBin.
Definition at line 186 of file binModel.C.
References mesh.
| bool decomposePatchValues | ( | List< List< vector > > & | data, |
| const label | bini, | ||
| const vector & | v, | ||
| const vector & | n ) const |
Definition at line 37 of file binModel.C.
References Foam::abort(), decomposePatchValues_, Foam::FatalError, FatalErrorInFunction, and n.

| bool decomposePatchValues | ( | List< List< vector > > & | data, |
| const label | bini, | ||
| const vector & | v, | ||
| const vector & | n ) const |
References n.
| Foam::string writeComponents | ( | const word & | stem | ) | const |
Definition at line 37 of file binModelTemplates.C.
|
protected |
Reference to the mesh.
Definition at line 68 of file binModel.H.
Referenced by singleDirectionUniformBin::apply(), binModel(), singleDirectionUniformBin::initialise(), uniformBin::initialise(), singleDirectionUniformBin::processField(), uniformBin::processField(), read(), and uniformBin::setBinsAddressing().
|
protected |
Decompose patch values into normal and tangential components.
Definition at line 73 of file binModel.H.
Referenced by binModel(), decomposePatchValues(), decomposePatchValues(), singleDirectionUniformBin::processField(), uniformBin::processField(), read(), singleDirectionUniformBin::read(), uniformBin::read(), singleDirectionUniformBin::writeFileHeader(), and uniformBin::writeFileHeader().
|
protected |
Flag to accumulate bin data with increasing distance in binning direction.
Definition at line 79 of file binModel.H.
Referenced by binModel(), singleDirectionUniformBin::read(), uniformBin::read(), and writeBinnedData().
|
protected |
Local coordinate system of bins.
Definition at line 84 of file binModel.H.
Referenced by binModel(), uniformBin::initialise(), uniformBin::setBinsAddressing(), setCoordinateSystem(), and uniformBin::writeFileHeader().
|
protected |
Total number of bins.
Definition at line 89 of file binModel.H.
Referenced by binModel(), singleDirectionUniformBin::initialise(), nBin(), singleDirectionUniformBin::processField(), uniformBin::processField(), singleDirectionUniformBin::read(), uniformBin::read(), writeBinnedData(), singleDirectionUniformBin::writeFileHeader(), and uniformBin::writeFileHeader().
|
protected |
Indices of operand patches.
Definition at line 94 of file binModel.H.
Referenced by singleDirectionUniformBin::initialise(), uniformBin::initialise(), singleDirectionUniformBin::processField(), uniformBin::processField(), read(), and uniformBin::setBinsAddressing().
|
protected |
Names of operand fields.
Definition at line 99 of file binModel.H.
Referenced by singleDirectionUniformBin::apply(), uniformBin::apply(), singleDirectionUniformBin::processField(), uniformBin::processField(), and read().
|
protected |
Indices of operand cell zones.
Definition at line 104 of file binModel.H.
Referenced by singleDirectionUniformBin::initialise(), uniformBin::initialise(), singleDirectionUniformBin::processField(), uniformBin::processField(), read(), and uniformBin::setBinsAddressing().
List of file pointers; 1 file per field.
Definition at line 109 of file binModel.H.
Referenced by singleDirectionUniformBin::processField(), uniformBin::processField(), and read().