HDF5Input Class Reference#
|
DiFfRG
|
DiFfRG::HDF5Input Class Reference
A class to output data to a CSV file. More...
#include <hdf5_input.hh>
Public Member Functions | |
| HDF5Input (const std::string file_name) | |
| void | load_map (const std::string &name, double *data, int series_number=-1) |
| Load a map from the HDF5 file. | |
| std::vector< double > | load_map (const std::string &name, int series_number=-1) |
| Load a map from the HDF5 file. | |
| template<size_t dim> | |
| std::vector< double > | load_map_coord (const std::string &name, int series_number=-1) |
| Load a map's coordinates from the HDF5 file. | |
| template<typename Coordinates > | |
| void | load_map (const std::string &name, double *data, const Coordinates &coordinates) |
| Load a map from the HDF5 file, while checking that the coordinates in the file match the provided coordinates. | |
| template<typename T > | |
| std::vector< T > | load_scalar (const std::string &name) |
| DiFfRG::hdf5::File & | get_file () |
Private Member Functions | |
| template<typename Coordinates > | |
| void | check_coordinates (const std::string &coord_name, const Coordinates &coordinates) |
Private Attributes | |
| const std::string | file_name |
| DiFfRG::hdf5::File | h5_file |
| DiFfRG::hdf5::Group | scalars |
| DiFfRG::hdf5::Group | maps |
| DiFfRG::hdf5::Group | coords |
| std::filesystem::path | path |
Detailed Description
A class to output data to a CSV file.
In every time step, the user can add values to the output, which will be written to the file when flush is called. Every timestep has to contain the same values, but the order in which they are added can change.
Constructor & Destructor Documentation
◆ HDF5Input()
| DiFfRG::HDF5Input::HDF5Input | ( | const std::string | file_name | ) |
Member Function Documentation
◆ check_coordinates()
template<typename Coordinates >
|
inlineprivate |
◆ get_file()
| DiFfRG::hdf5::File & DiFfRG::HDF5Input::get_file | ( | ) |
◆ load_map() [1/3]
template<typename Coordinates >
|
inline |
Load a map from the HDF5 file, while checking that the coordinates in the file match the provided coordinates.
- Parameters
-
name The name of the map. data The data buffer to load the map into. coordinates The coordinates of the map.
◆ load_map() [2/3]
|
inline |
Load a map from the HDF5 file.
- Parameters
-
name The name of the map. data The data buffer to load the map into.
◆ load_map() [3/3]
|
inline |
Load a map from the HDF5 file.
- Parameters
-
name The name of the map. data The data buffer to load the map into.
◆ load_map_coord()
template<size_t dim>
|
inline |
Load a map's coordinates from the HDF5 file.
- Template Parameters
-
dim The spatial dimension of the coordinate entries.
- Parameters
-
name The name of the map. series_number The series number to load (-1 for latest).
- Returns
- A flattened vector of doubles with size = num_points * dim.
◆ load_scalar()
template<typename T >
|
inline |
Member Data Documentation
◆ coords
|
private |
◆ file_name
|
private |
◆ h5_file
|
private |
◆ maps
|
private |
◆ path
|
private |
◆ scalars
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/data/hdf5_input.hh
Generated by