GEOSX
Public Member Functions | List of all members
geos::HistoryMetadata Class Reference

A minimal class to specify information about time history information being collected and output. More...

#include <HistoryDataSpec.hpp>

Public Member Functions

 HistoryMetadata ()
 Default constructor.
 
 HistoryMetadata (const string &name, localIndex rank, localIndex *dims, std::type_index type)
 Constructor for multi-dimensional array types. More...
 
 HistoryMetadata (const string &name, localIndex count, std::type_index type)
 Constructor for one-dimensional array types. More...
 
void setName (const string &name)
 Set the name. Typically used for metadata collectors to avoid writing data with the same name to the history output files. More...
 
const stringgetName () const
 Get the name. More...
 
void setType (std::type_index type)
 Set the type. Typically used for metadata collectors where local metadata is used to produce and output global metadata. More...
 
std::type_index getType () const
 Get the type of the collected data. More...
 
localIndex size () const
 Get the total data count for the data being collected. More...
 
localIndex getRank () const
 Get the rank of the array data to be collected. More...
 
const std::vector< localIndex > & getDims () const
 Get a pointer to the extent of each dimension. More...
 
localIndex size (localIndex dim) const
 Get the size of the specified dimension. More...
 

Detailed Description

A minimal class to specify information about time history information being collected and output.

Definition at line 42 of file HistoryDataSpec.hpp.

Constructor & Destructor Documentation

◆ HistoryMetadata() [1/2]

geos::HistoryMetadata::HistoryMetadata ( const string name,
localIndex  rank,
localIndex dims,
std::type_index  type 
)
inline

Constructor for multi-dimensional array types.

Parameters
nameA name for the underlying information – used to specify the data name in time history files.
rankThe rank of the array of data being collected.
dimsThe extent of each dimension of the array being collected.
typeThe std::type_index of the array being collected (std::type_index(typeid(T)))

Definition at line 62 of file HistoryDataSpec.hpp.

◆ HistoryMetadata() [2/2]

geos::HistoryMetadata::HistoryMetadata ( const string name,
localIndex  count,
std::type_index  type 
)
inline

Constructor for one-dimensional array types.

Parameters
nameA name for the underlying information – used to specify the data name in time history files.
countThe extent of the one-dimensional array.
typeThe std::type_index of the array being collected (std::type_index(typeid(T)))

Definition at line 74 of file HistoryDataSpec.hpp.

Member Function Documentation

◆ getDims()

const std::vector< localIndex >& geos::HistoryMetadata::getDims ( ) const
inline

Get a pointer to the extent of each dimension.

Returns
The head of the array containing the dimensional extent of each dimension of the array data being collected.

Definition at line 139 of file HistoryDataSpec.hpp.

◆ getName()

const string& geos::HistoryMetadata::getName ( ) const
inline

Get the name.

Returns
The name of the data being collected.

Definition at line 93 of file HistoryDataSpec.hpp.

◆ getRank()

localIndex geos::HistoryMetadata::getRank ( ) const
inline

Get the rank of the array data to be collected.

Returns
The rank.

Definition at line 131 of file HistoryDataSpec.hpp.

◆ getType()

std::type_index geos::HistoryMetadata::getType ( ) const
inline

Get the type of the collected data.

Returns
The std::type_index of the collected data.

Definition at line 110 of file HistoryDataSpec.hpp.

◆ setName()

void geos::HistoryMetadata::setName ( const string name)
inline

Set the name. Typically used for metadata collectors to avoid writing data with the same name to the history output files.

Parameters
nameThe name to set.

Definition at line 85 of file HistoryDataSpec.hpp.

◆ setType()

void geos::HistoryMetadata::setType ( std::type_index  type)
inline

Set the type. Typically used for metadata collectors where local metadata is used to produce and output global metadata.

Parameters
typeThe std::type_index of the type being collected. (std::type_index(typeid(T)))

Definition at line 102 of file HistoryDataSpec.hpp.

◆ size() [1/2]

localIndex geos::HistoryMetadata::size ( ) const
inline

Get the total data count for the data being collected.

Returns
The number of data units of HistoryMetadata::getType( ) to be collected.

Definition at line 118 of file HistoryDataSpec.hpp.

◆ size() [2/2]

localIndex geos::HistoryMetadata::size ( localIndex  dim) const
inline

Get the size of the specified dimension.

Parameters
dimThe dimsion to get the extent off.
Returns
The extend of the dimension in the array data being collected.

Definition at line 148 of file HistoryDataSpec.hpp.


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