![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A helper class to represent a single block of data in a Phantom dump. More...
#include <shammodels/sph/include/shammodels/sph/io/PhantomDump.hpp>
Collaboration diagram for shammodels::sph::PhantomDumpBlockArray< T >:Public Member Functions | |
| void | write (shambase::FortranIOFile &phfile, i64 tot_count) |
| Writes a block to a file. | |
| template<class Tb > | |
| void | fill_vec (std::string field_name, std::vector< Tb > &vec) |
| Fills a vector with the values of a given field name. | |
| void | print_state () |
| Prints the state of the block. | |
Static Public Member Functions | |
| static PhantomDumpBlockArray | from_file (shambase::FortranIOFile &phfile, i64 tot_count) |
| Reads a block from a file. | |
Public Attributes | |
| std::string | tag |
| The tag of the block. | |
| std::vector< T > | vals |
| The values of the block. | |
A helper class to represent a single block of data in a Phantom dump.
A single block of data in a Phantom dump consists of a 16-character tag, followed by a variable number of values of a given type. This class represents such a block.
| T | The type of the values in the block. |
Definition at line 130 of file PhantomDump.hpp.
|
inline |
Fills a vector with the values of a given field name.
| field_name | the name of the field to look for |
| vec | the vector to fill |
Definition at line 166 of file PhantomDump.hpp.
|
static |
Reads a block from a file.
| phfile | the file to read from |
| tot_count | the total number of values to read |
Definition at line 36 of file PhantomDump.cpp.
Here is the call graph for this function:| void shammodels::sph::PhantomDumpBlockArray< T >::print_state | ( | ) |
Prints the state of the block.
Definition at line 54 of file PhantomDump.cpp.
| void shammodels::sph::PhantomDumpBlockArray< T >::write | ( | shambase::FortranIOFile & | phfile, |
| i64 | tot_count | ||
| ) |
Writes a block to a file.
| phfile | the file to write to |
| tot_count | the total number of values to write |
Definition at line 46 of file PhantomDump.cpp.
Here is the call graph for this function:| std::string shammodels::sph::PhantomDumpBlockArray< T >::tag |
The tag of the block.
Definition at line 135 of file PhantomDump.hpp.
| std::vector<T> shammodels::sph::PhantomDumpBlockArray< T >::vals |
The values of the block.
Definition at line 140 of file PhantomDump.hpp.