GEOSX
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geosx::BufferedHistoryIO Class Referenceabstract

An abstract class for performing buffered history output. More...

#include <HistoryIO.hpp>

Inheritance diagram for geosx::BufferedHistoryIO:
Inheritance graph
[legend]

Public Member Functions

 BufferedHistoryIO ()
 Constructor.
 
virtual ~BufferedHistoryIO ()
 Destructor.
 
buffer_unit_typegetBufferHead ()
 Get the head of the internal history storage buffer. More...
 
virtual void init (bool existsOkay)=0
 Perform and intialization needed for time-history output. More...
 
virtual void write ()=0
 Write the buffered history data to the output target.
 
virtual void compressInFile ()=0
 Ensure the repressentation of the data in the output target is dense and terse. More...
 
virtual void updateCollectingCount (localIndex count)=0
 Update the number of items being stored for IO in this object. More...
 
virtual size_t getRowBytes ()=0
 Get the size in bytes the buffer is currently set to hold per collection operation. More...
 
localIndex getBufferedCount ()
 Query the number of history states currently stored in the internal buffer. More...
 

Protected Member Functions

virtual void resizeBuffer ()=0
 Resize the buffer to accomodate additional history collection.
 
void emptyBuffer ()
 Empty the history collection buffer.
 

Protected Attributes

localIndex m_bufferedCount
 The current number of records in the buffer.
 
buffer_unit_typem_bufferHead
 The write head of the buffer.
 
buffer_type m_dataBuffer
 The data buffer containing the history info.
 

Detailed Description

An abstract class for performing buffered history output.

Definition at line 32 of file HistoryIO.hpp.

Member Function Documentation

◆ compressInFile()

virtual void geosx::BufferedHistoryIO::compressInFile ( )
pure virtual

Ensure the repressentation of the data in the output target is dense and terse.

Note
Typically the file will be oversized to receive data writes without constant resizing.

Implemented in geosx::HDFHistIO.

◆ getBufferedCount()

localIndex geosx::BufferedHistoryIO::getBufferedCount ( )
inline

Query the number of history states currently stored in the internal buffer.

Returns
The number of discrete time history records buffered to be written.
Note
Since the size of each discrete time history can change, this should not be used to calculate size, but is useful to check for consistency between collectors that should be operating at the same cadence (ie the time collector and the data collector).

Definition at line 99 of file HistoryIO.hpp.

◆ getBufferHead()

buffer_unit_type* geosx::BufferedHistoryIO::getBufferHead ( )
inline

Get the head of the internal history storage buffer.

Returns
The head of the internal history storage buffer to be written to.
Note
Depends on the virtual function resizeBuffer() being implemented correctly in an inheriting class.

Definition at line 52 of file HistoryIO.hpp.

◆ getRowBytes()

virtual size_t geosx::BufferedHistoryIO::getRowBytes ( )
pure virtual

Get the size in bytes the buffer is currently set to hold per collection operation.

Returns
The size in bytes.

Implemented in geosx::HDFHistIO.

◆ init()

virtual void geosx::BufferedHistoryIO::init ( bool  existsOkay)
pure virtual

Perform and intialization needed for time-history output.

Parameters
existsOkayWhether it is acceptable for the intended output target to already exist ( false on start from scratch, true on restart ).

Implemented in geosx::HDFHistIO.

◆ updateCollectingCount()

virtual void geosx::BufferedHistoryIO::updateCollectingCount ( localIndex  count)
pure virtual

Update the number of items being stored for IO in this object.

Parameters
count[in] The new number of items being collected

Implemented in geosx::HDFHistIO.


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