writerCaching Class Reference

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 scalarListtimes () const
 The output times for fields. More...
 
const bitSetgeometries () 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 dictionaryfieldsDict () 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)
 

Detailed Description

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.

Source files

Definition at line 59 of file surfaceWriterCaching.H.

Constructor & Destructor Documentation

◆ writerCaching()

writerCaching ( const word cacheFileName)
explicit

Construct with specified cache name.

Definition at line 70 of file surfaceWriterCaching.C.

◆ ~writerCaching()

virtual ~writerCaching ( )
virtualdefault

Destructor.

Member Function Documentation

◆ times()

const scalarList& times ( ) const
inline

The output times for fields.

Definition at line 108 of file surfaceWriterCaching.H.

◆ geometries()

const bitSet& geometries ( ) const
inline

Indices in times() when geometry (mesh) has been written.

Definition at line 114 of file surfaceWriterCaching.H.

◆ latestTimeIndex()

label latestTimeIndex ( ) const
inline

The most current time index.

Definition at line 120 of file surfaceWriterCaching.H.

References Foam::max().

Here is the call graph for this function:

◆ latestGeomIndex()

label latestGeomIndex ( ) const
inline

The most current geometry index.

Definition at line 126 of file surfaceWriterCaching.H.

References bitSet::find_last(), and Foam::max().

Here is the call graph for this function:

◆ fieldsDict()

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.

Here is the call graph for this function:

◆ clear()

void clear ( )

Clear all values.

Definition at line 116 of file surfaceWriterCaching.C.

◆ update()

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

Returns
True if there is a state change, which is either a geometry change or a new time interval
Parameters
baseDirDirectory containing the cache file
timeValueThe current time value
geomChangedMonitored geometry changed
fieldNameName of field
fieldTypeType of field
varNameAlternative field name

Definition at line 190 of file surfaceWriterCaching.C.

References dict, Foam::equalTimes, Foam::findTimeIndex(), Foam::nl, os(), and timeIndex.

Here is the call graph for this function:

The documentation for this class was generated from the following files: