Intermediate class for code factorisation. It mainly deals with collector and buffer management. It delegates the actual collection to derived classes.
More...
#include <HistoryCollectionBase.hpp>
|
| HistoryCollectionBase (string const &name, Group *parent) |
| Constructor. More...
|
|
void | initializePostSubGroups () override |
|
localIndex | numCollectors () const override |
| Get the number of discrete collection operations this collector conducts. More...
|
|
virtual bool | execute (real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override |
|
void | registerBufferProvider (localIndex collectionIdx, BufferProvider bufferProvider) override |
| Register a callback that provides the current head of the time history data buffer. More...
|
|
HistoryMetadata | getTimeMetaData () const override |
| Get a metadata object relating the the Time variable itself. More...
|
|
void | registerTimeBufferProvider (TimeBufferProvider timeBufferProvider) override |
| Register a callback that gives the current head of the time data buffer. More...
|
|
HistoryCollection & | getMetaDataCollector (localIndex metaIdx) override |
| Get a collector of meta-information for this collector. More...
|
|
| HistoryCollection (string const &name, Group *parent) |
| Constructor. More...
|
|
void | initializePostSubGroups () override |
| Forwarding public initializing function...
|
|
virtual HistoryMetadata | getMetaData (DomainPartition const &domain, localIndex collectionIdx) const =0 |
| Get the metadata for what this collector collects. More...
|
|
virtual const string & | getTargetName () const =0 |
| Get the name of the object being targeted for collection. More...
|
|
virtual localIndex | numMetaDataCollectors () const =0 |
| Get the number of collectors of meta-information (set indices, etc) writing time-independent information during initialization. More...
|
|
Intermediate class for code factorisation. It mainly deals with collector and buffer management. It delegates the actual collection to derived classes.
Definition at line 32 of file HistoryCollectionBase.hpp.
◆ HistoryCollectionBase()
geos::HistoryCollectionBase::HistoryCollectionBase |
( |
string const & |
name, |
|
|
Group * |
parent |
|
) |
| |
|
inline |
◆ collect()
Collect history information into the provided buffer. Typically called from HistoryCollection::execute .
- Parameters
-
[in] | domain | The DomainPartition to collect time history on. |
[in] | collectionIdx | The index of the collection operation to collect from the targeted collection event. |
[in,out] | buffer | A properly-sized buffer to serialize history data into. |
◆ getMetaDataCollector()
Get a collector of meta-information for this collector.
- Parameters
-
- Returns
- A mutable reference.
Implements geos::HistoryCollection.
◆ getTargetObject()
Retrieve the target object from the data repository.
- Parameters
-
[in] | domain | The DomainPartition of the problem. |
[in] | objectPath | The data repo path of the target object. |
- Returns
- The target object as a Group
- Note
- If the object path is absolute this returns the target object by calling getGroupByPath. If the object path is relative, it searches relative to the mesh in the same way the fieldSpecification does, so any objectPath that works in fieldSpecification will also work here.
◆ getTimeMetaData()
Get a metadata object relating the the Time variable itself.
- Returns
- A HistroyMetadata object describing the Time variable.
Implements geos::HistoryCollection.
◆ numCollectors()
localIndex geos::HistoryCollectionBase::numCollectors |
( |
| ) |
const |
|
overridevirtual |
Get the number of discrete collection operations this collector conducts.
- Returns
- The number of collection operations for this collector.
Implements geos::HistoryCollection.
◆ registerBufferProvider()
Register a callback that provides the current head of the time history data buffer.
- Parameters
-
[in] | collectionIdx | Which collection item to register the buffer callback for. |
[in] | bufferProvider | A functional that when invoked returns a pointer to the head of a buffer at least large enough to serialize one time step of history data into. |
- Note
- This is typically meant to callback to BufferedHistoryIO::getBufferHead()
Implements geos::HistoryCollection.
◆ registerTimeBufferProvider()
void geos::HistoryCollectionBase::registerTimeBufferProvider |
( |
TimeBufferProvider |
timeBufferProvider | ) |
|
|
overridevirtual |
Register a callback that gives the current head of the time data buffer.
- Parameters
-
[in] | timeBufferProvider | A functional that when invoked returns a pointer to the head of a buffer at least large enough to serialize one instance of the Time variable into. |
- Note
- This is typically meant to callback to BufferedHistoryIO::GetBufferHead()
Implements geos::HistoryCollection.
◆ m_metaDataCollectors
std::vector< std::unique_ptr< HistoryCollection > > geos::HistoryCollectionBase::m_metaDataCollectors |
|
protected |
The set of metadata collectors for this collector.
- Note
- Currently only used to collect coordinates of mesh objects when collecting field data.
Definition at line 120 of file HistoryCollectionBase.hpp.
The documentation for this class was generated from the following file: