State information for writers with collated times. More...
Public Member Functions | |
writerCaching (const word &cacheFileName) | |
Construct with specified cache name. More... | |
virtual | ~writerCaching ()=default |
Destructor. More... | |
const scalarList & | times () const noexcept |
The output times for fields. More... | |
const bitSet & | geometries () const noexcept |
Indices in times() when geometry (mesh) has been written. More... | |
label | latestTimeIndex () const |
The most current time index. More... | |
label | latestGeomIndex () const |
The most current geometry index. More... | |
int | geometryTimeset () const |
Expected timeset for the geometry. More... | |
const dictionary & | fieldsDict () const |
Get or create the 'fields' information dictionary. More... | |
void | clear () |
Clear all values. More... | |
bool | update (const fileName &baseDir, const scalar timeValue, const bool geomChanged, const word &fieldName, const word &fieldType, const word &varName=word::null) |
Update time/geometry information and file cache. This routine should only be called from the master process. More... | |
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 63 of file ensightWriterCaching.C.
|
virtualdefault |
Destructor.
|
inlinenoexcept |
The output times for fields.
Definition at line 125 of file ensightWriterCaching.H.
|
inlinenoexcept |
Indices in times() when geometry (mesh) has been written.
Definition at line 133 of file ensightWriterCaching.H.
Foam::label latestTimeIndex | ( | ) | const |
The most current time index.
Definition at line 180 of file ensightWriterCaching.C.
References Foam::max().
Foam::label latestGeomIndex | ( | ) | const |
The most current geometry index.
Definition at line 185 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 193 of file ensightWriterCaching.C.
const Foam::dictionary & fieldsDict | ( | ) | const |
Get or create the 'fields' information dictionary.
Definition at line 71 of file ensightWriterCaching.C.
References dictionary::findDict(), keyType::LITERAL, and dictionary::null.
void clear | ( | ) |
Clear all values.
Definition at line 109 of file ensightWriterCaching.C.
bool update | ( | const fileName & | baseDir, |
const scalar | timeValue, | ||
const bool | geomChanged, | ||
const word & | fieldName, | ||
const word & | fieldType, | ||
const word & | varName = word::null |
||
) |
Update time/geometry information and file cache. This routine should only be called from the master process.
baseDir | Directory containing cache file |
timeValue | The current time value |
geomChanged | Monitored geometry changed |
fieldName | Name of field |
fieldType | Type of field |
varName | Alternative field name |
Definition at line 214 of file ensightWriterCaching.C.
References dict, Foam::equalTimes, Foam::findTimeIndex(), Foam::nl, os(), and timeIndex.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.