SpECTRE
v2024.09.29
|
Represents Cauchy-Characteristic Extraction (CCE) bondi variables inside of an HDF5 file. More...
#include <Cce.hpp>
Public Member Functions | |
HIDDEN_SYMBOLS void | append (const std::unordered_map< std::string, std::vector< double > > &data) |
For each bondi variable name, appends the data to the dataset in the H5 file. More... | |
const std::vector< std::string > | get_legend () const |
Return the legend. All bondi variables have the same legend. | |
const std::array< hsize_t, 2 > & | get_dimensions (const std::string &bondi_variable_name) const |
Return the number of rows (first index) and columns (second index) of the bondi_variable_name dataset. All bondi variables will have the same dimensions. | |
const std::string & | get_header () const |
The header of the Cce file. | |
uint32_t | get_version () const |
The user-specified version number of the Cce file. More... | |
const std::string & | subfile_path () const override |
Path to this Cce file. More... | |
template<typename T = Matrix> | |
std::unordered_map< std::string, T > | get_data () const |
Return all currently stored data in the h5::Cce file in the form of a Matrix or a std::vector<std::vector<double>> for each bondi variable. | |
template<typename T = Matrix> | |
T | get_data (const std::string &bondi_variable_name) const |
Return all currently stored data in the h5::Cce file in the form of a Matrix or a std::vector<std::vector<double>> for each bondi variable. | |
template<typename T = Matrix> | |
std::unordered_map< std::string, T > | get_data_subset (const std::vector< size_t > &these_ell, size_t first_row=0, size_t num_rows=1) const |
Get only some values of \(\ell\) over a range of rows. More... | |
template<typename T = Matrix> | |
T | get_data_subset (const std::string &bondi_variable_name, const std::vector< size_t > &these_ell, size_t first_row=0, size_t num_rows=1) const |
Get only some values of \(\ell\) over a range of rows. More... | |
virtual const std::string & | subfile_path () const =0 |
Return the path to the subfile where this object is stored. More... | |
Represents Cauchy-Characteristic Extraction (CCE) bondi variables inside of an HDF5 file.
Within a Cce object, there are several datasets that correspond to the Cce::scri_plus_interpolation_set
bondi variables at future null infinity represented as complex spherical harmonic coefficients. The names of these bondi variables are
EthInertialRetardedTime
News
Psi0
Psi1
Psi2
Psi3
Psi4
Strain
Each dataset has a couple H5 attributes:
Legend
which is determined by the l_max
massed to the constructor.sxs_format
which is a string. The value is "SpECTRE_CCE_v1"The Cce object itself also has the sxs_format
attribute with the same value, along with a version
and header
attribute.
The columns of data are stored in each dataset in the following order:
time
Real Y_0,0
Imag Y_0,0
Real Y_1,-1
Imag Y_1,-1
Real Y_1,0
Imag Y_1,0
Real Y_1,1
Imag Y_1,1
and so on until you reach the coefficients for l_max
.
HIDDEN_SYMBOLS void h5::Cce::append | ( | const std::unordered_map< std::string, std::vector< double > > & | data | ) |
For each bondi variable name, appends the data
to the dataset in the H5 file.
The data.at(name).size()
must be the same as the number of columns already in the dataset. Also, all bondi variable names listed in the constructor of h5::Cce
must be present in the data
.
T h5::Cce::get_data_subset | ( | const std::string & | bondi_variable_name, |
const std::vector< size_t > & | these_ell, | ||
size_t | first_row = 0 , |
||
size_t | num_rows = 1 |
||
) | const |
Get only some values of \(\ell\) over a range of rows.
The time
column is always returned. The coefficients will be returned in the order that you requested them in. No sorting is done internally. All requested these_ell
must be less that or equal to the l_max
that this file was constructed with. Also both the first and last row requested must be less than or equal to the total number of rows.
std::unordered_map< std::string, T > h5::Cce::get_data_subset | ( | const std::vector< size_t > & | these_ell, |
size_t | first_row = 0 , |
||
size_t | num_rows = 1 |
||
) | const |
Get only some values of \(\ell\) over a range of rows.
The time
column is always returned. The coefficients will be returned in the order that you requested them in. No sorting is done internally. All requested these_ell
must be less that or equal to the l_max
that this file was constructed with. Also both the first and last row requested must be less than or equal to the total number of rows.
|
inline |
The user-specified version number of the Cce file.
|
inlineoverridevirtual |
Path to this Cce file.
Implements h5::Object.