SpECTRE  v2024.03.19
h5::EosTable Class Reference

An equation of state table subfile written inside an H5 file. More...

#include <EosTable.hpp>

Public Member Functions

 EosTable (bool subfile_exists, detail::OpenGroup &&group, hid_t location, const std::string &name, std::vector< std::string > independent_variable_names, std::vector< std::array< double, 2 > > independent_variable_bounds, std::vector< size_t > independent_variable_number_of_points, std::vector< bool > independent_variable_uses_log_spacing, bool beta_equilibrium, uint32_t version=1)
 Constructor used when writing a new equation of state.
 
 EosTable (bool subfile_exists, detail::OpenGroup &&group, hid_t location, const std::string &name)
 Constructor used when reading in an equation of state.
 
 EosTable (const EosTable &)=delete
 
EosTableoperator= (const EosTable &)=delete
 
 EosTable (EosTable &&)=delete
 
EosTableoperator= (EosTable &&)=delete
 
const std::stringget_header () const
 
uint32_t get_version () const
 
const std::stringsubfile_path () const override
 Return the path to the subfile where this object is stored. More...
 
void write_quantity (std::string name, const DataVector &data)
 Write a thermodynamic quantity to disk.
 
DataVector read_quantity (const std::string &name) const
 Read a thermodynamic quantity to disk.
 
const std::vector< std::stringavailable_quantities () const
 The available thermodynamic quantities.
 
size_t number_of_independent_variables () const
 Number of independent variables.
 
const std::vector< std::string > & independent_variable_names () const
 Names of the independent variables.
 
const std::vector< std::array< double, 2 > > & independent_variable_bounds () const
 Lower and upper bounds of the independent variables.
 
const std::vector< size_t > & independent_variable_number_of_points () const
 The number of points for each of the independent variables.
 
const std::vector< bool > & independent_variable_uses_log_spacing () const
 Whether each independent variable is in log spacing. Linear spacing is used if false.
 
bool beta_equilibrium () const
 true if the EOS is in beta equilibrium.
 
virtual const std::stringsubfile_path () const =0
 Return the path to the subfile where this object is stored. More...
 

Static Public Member Functions

static std::string extension ()
 

Detailed Description

An equation of state table subfile written inside an H5 file.

Data Layout

To be consistent with the CompOSE ASCII table format, the data is stored in a last independent variable varies fastest. For example, if you had independent variables \(\rho\), \(T\), and \(Y_e\), then \(Y_e\) varies fastest while \(\rho\) varies slowest.

Member Function Documentation

◆ get_header()

const std::string & h5::EosTable::get_header ( ) const
inline

Returns: the header of the EosTable file

◆ get_version()

uint32_t h5::EosTable::get_version ( ) const
inline

Returns: the user-specified version number of the EosTable file

Note
h5::Version returns a uint32_t, so we return one here too for the version

◆ subfile_path()

const std::string & h5::EosTable::subfile_path ( ) const
inlineoverridevirtual

Return the path to the subfile where this object is stored.

Implements h5::Object.


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