Information for surface 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 |
The output times for fields. More... | |
const bitSet & | geometries () const |
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... | |
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) |
Information for surface 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 59 of file surfaceWriterCaching.H.
|
explicit |
Construct with specified cache name.
Definition at line 70 of file surfaceWriterCaching.C.
|
virtualdefault |
Destructor.
|
inline |
The output times for fields.
Definition at line 108 of file surfaceWriterCaching.H.
|
inline |
Indices in times() when geometry (mesh) has been written.
Definition at line 114 of file surfaceWriterCaching.H.
|
inline |
The most current time index.
Definition at line 120 of file surfaceWriterCaching.H.
References Foam::max().
|
inline |
The most current geometry index.
Definition at line 126 of file surfaceWriterCaching.H.
References bitSet::find_last(), and Foam::max().
const Foam::dictionary & fieldsDict | ( | ) | const |
Get or create the 'fields' information dictionary.
Definition at line 78 of file surfaceWriterCaching.C.
References dictionary::findDict(), keyType::LITERAL, and dictionary::null.
void clear | ( | ) |
Clear all values.
Definition at line 116 of file surfaceWriterCaching.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 the 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 190 of file surfaceWriterCaching.C.
References dict, Foam::equalTimes, Foam::findTimeIndex(), Foam::nl, os(), and timeIndex.