State information for writers with collated times. More...
#include <ensightWriterCaching.H>
Public Member Functions | |
| writerCaching (const word &cacheFileName) | |
| Construct with specified cache name. | |
| virtual | ~writerCaching ()=default |
| Destructor. | |
| const scalarList & | times () const noexcept |
| The output times for fields. | |
| const bitSet & | geometries () const noexcept |
| Indices in times() when geometry (mesh) has been written. | |
| label | latestTimeIndex () const |
| The most current time index. | |
| label | latestGeomIndex () const |
| The most current geometry index. | |
| int | geometryTimeset () const |
| Expected timeset for the geometry. | |
| const dictionary & | fieldsDict () const |
| Get or create the 'fields' information dictionary. | |
| void | clear () |
| Clear all values. | |
| bool | update (const fileName &baseDir, const scalar timeValue, const bool geomChanged, const word &fieldName, const string &fieldType, const word &varName=word::null) |
| Update time/geometry information and file cache. This routine should only be called from the master process. | |
State information for writers with collated times.
The class maintains an internal list of the known times as well as a file-cached version with the field information. The information is used for restarts.
Definition at line 55 of file ensightWriterCaching.H.
|
explicit |
Construct with specified cache name.
Definition at line 64 of file ensightWriterCaching.C.
|
virtualdefault |
Destructor.
|
inlinenoexcept |
The output times for fields.
Definition at line 125 of file ensightWriterCaching.H.
References Foam::noexcept.
|
inlinenoexcept |
Indices in times() when geometry (mesh) has been written.
Definition at line 133 of file ensightWriterCaching.H.
References Foam::noexcept.
| Foam::label latestTimeIndex | ( | ) | const |
The most current time index.
Definition at line 160 of file ensightWriterCaching.C.
References Foam::max().

| Foam::label latestGeomIndex | ( | ) | const |
The most current geometry index.
Definition at line 165 of file ensightWriterCaching.C.
References Foam::max().

| int geometryTimeset | ( | ) | const |
Expected timeset for the geometry.
Can be any of the following:
0: constant/static 1: moving, with the same frequency as the data 2: moving, with different frequency as the data
Definition at line 173 of file ensightWriterCaching.C.
| const Foam::dictionary & fieldsDict | ( | ) | const |
Get or create the 'fields' information dictionary.
Definition at line 72 of file ensightWriterCaching.C.
References dictionary::findDict(), keyType::LITERAL, and dictionary::null.

| void clear | ( | ) |
Clear all values.
Definition at line 110 of file ensightWriterCaching.C.
References dictionary::clear().

| bool update | ( | const fileName & | baseDir, |
| const scalar | timeValue, | ||
| const bool | geomChanged, | ||
| const word & | fieldName, | ||
| const string & | fieldType, | ||
| const word & | varName = word::null ) |
Update time/geometry information and file cache. This routine should only be called from the master process.
Note that the ensight field type may contain spaces (eg, "tensor symm")
| baseDir | Directory containing cache file |
| timeValue | The current time value |
| geomChanged | Monitored geometry changed |
| fieldName | Name of field |
| fieldType | Ensight type of field |
| varName | Alternative field name |
Definition at line 193 of file ensightWriterCaching.C.
References dict, Foam::equalTimes, Foam::findTimeIndex(), Foam::nl, os(), and timeIndex.
