![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Class representing a Phantom dump file. More...
#include <shammodels/sph/include/shammodels/sph/io/PhantomDump.hpp>
Collaboration diagram for shammodels::sph::PhantomDump:Public Types | |
| using | fort_real = f64 |
| Floating-point type used in the phantom dump format. | |
| using | fort_int = int |
| Integer type used in the phantom dump format. | |
Public Member Functions | |
| void | override_magic_number () |
| Overrides the magic numbers used in the PhantomDump struct. | |
| void | check_magic_numbers () |
| Checks if the magic numbers in the PhantomDump struct match the expected values. | |
| shambase::FortranIOFile | gen_file () |
| Generates a Phantom dump file from the current state of the object. | |
| bool | has_header_entry (std::string s) const |
| Checks if a given string is present in any of the table headers. | |
| template<class T > | |
| T | read_header_float (std::string s) const |
| Retrieves a floating-point value from the table headers. | |
| template<class T > | |
| std::vector< T > | read_header_floats (std::string s) |
| Reads multiple float values from the table headers based on the given string. | |
| template<class T > | |
| T | read_header_int (std::string s) const |
| Retrieves an integer value from the table headers. | |
| template<class T > | |
| std::vector< T > | read_header_ints (std::string s) |
| Retrieves multiple integer values from the table headers based on the given string. | |
| void | print_state () |
| Print current state of the data stored in the class. | |
Static Public Member Functions | |
| static PhantomDump | from_file (shambase::FortranIOFile &phfile) |
| Reads a Phantom dump file and returns a PhantomDump object. | |
Public Attributes | |
| fort_int | i1 |
| Magic number used in the phantom dump format. | |
| fort_int | i2 |
| Magic number used in the phantom dump format. | |
| fort_int | iversion |
| Magic number used in the phantom dump format. | |
| fort_int | i3 |
| Magic number used in the phantom dump format. | |
| fort_real | r1 |
| Magic number used in the phantom dump format. | |
| std::string | fileid |
| Magic number used in the phantom dump format. | |
| PhantomDumpTableHeader< fort_int > | table_header_fort_int |
| Table header for integer data. | |
| PhantomDumpTableHeader< i8 > | table_header_i8 |
| Table header for signed 8-bit integer data. | |
| PhantomDumpTableHeader< i16 > | table_header_i16 |
| Table header for signed 16-bit integer data. | |
| PhantomDumpTableHeader< i32 > | table_header_i32 |
| Table header for signed 32-bit integer data. | |
| PhantomDumpTableHeader< i64 > | table_header_i64 |
| Table header for signed 64-bit integer data. | |
| PhantomDumpTableHeader< fort_real > | table_header_fort_real |
| Table header for floating-point data. | |
| PhantomDumpTableHeader< f32 > | table_header_f32 |
| Table header for 32-bit floating-point data. | |
| PhantomDumpTableHeader< f64 > | table_header_f64 |
| Table header for 64-bit floating-point data. | |
| std::vector< PhantomDumpBlock > | blocks |
| List of blocks in the Phantom dump file. | |
Class representing a Phantom dump file.
The class provides methods to read and write Phantom dump files, as well as to retrieve data from the file.
Definition at line 347 of file PhantomDump.hpp.
| using shammodels::sph::PhantomDump::fort_int = int |
Integer type used in the phantom dump format.
Definition at line 352 of file PhantomDump.hpp.
Floating-point type used in the phantom dump format.
Definition at line 350 of file PhantomDump.hpp.
|
inline |
Checks if the magic numbers in the PhantomDump struct match the expected values.
| std::runtime_error | if any of the magic numbers do not match the expected values |
Definition at line 380 of file PhantomDump.hpp.
Here is the call graph for this function:
|
static |
Reads a Phantom dump file and returns a PhantomDump object.
| phfile | Phantom dump file to read |
Definition at line 315 of file PhantomDump.cpp.
Here is the call graph for this function:| shambase::FortranIOFile shammodels::sph::PhantomDump::gen_file | ( | ) |
Generates a Phantom dump file from the current state of the object.
Definition at line 268 of file PhantomDump.cpp.
Here is the call graph for this function:
|
inline |
Checks if a given string is present in any of the table headers.
| s | the string to be searched in the table headers |
Definition at line 436 of file PhantomDump.hpp.
Here is the call graph for this function:
|
inline |
Overrides the magic numbers used in the PhantomDump struct.
Definition at line 368 of file PhantomDump.hpp.
| void shammodels::sph::PhantomDump::print_state | ( | ) |
Print current state of the data stored in the class.
Definition at line 370 of file PhantomDump.cpp.
|
inline |
Retrieves a floating-point value from the table headers.
| s | the string to be searched in the table headers |
| std::runtime_error | if the entry cannot be found in the table headers |
Definition at line 478 of file PhantomDump.hpp.
Here is the call graph for this function:
|
inline |
Reads multiple float values from the table headers based on the given string.
| s | the string to be searched in the table headers |
Definition at line 506 of file PhantomDump.hpp.
Here is the call graph for this function:
|
inline |
Retrieves an integer value from the table headers.
| s | the string to be searched in the table headers |
| std::runtime_error | if the entry cannot be found in the table headers |
Definition at line 528 of file PhantomDump.hpp.
Here is the call graph for this function:
|
inline |
Retrieves multiple integer values from the table headers based on the given string.
| s | the string to be searched in the table headers |
Definition at line 562 of file PhantomDump.hpp.
Here is the call graph for this function:| std::vector<PhantomDumpBlock> shammodels::sph::PhantomDump::blocks |
List of blocks in the Phantom dump file.
Definition at line 412 of file PhantomDump.hpp.
| std::string shammodels::sph::PhantomDump::fileid |
Magic number used in the phantom dump format.
Definition at line 365 of file PhantomDump.hpp.
| fort_int shammodels::sph::PhantomDump::i1 |
Magic number used in the phantom dump format.
Definition at line 355 of file PhantomDump.hpp.
| fort_int shammodels::sph::PhantomDump::i2 |
Magic number used in the phantom dump format.
Definition at line 357 of file PhantomDump.hpp.
| fort_int shammodels::sph::PhantomDump::i3 |
Magic number used in the phantom dump format.
Definition at line 361 of file PhantomDump.hpp.
| fort_int shammodels::sph::PhantomDump::iversion |
Magic number used in the phantom dump format.
Definition at line 359 of file PhantomDump.hpp.
| fort_real shammodels::sph::PhantomDump::r1 |
Magic number used in the phantom dump format.
Definition at line 363 of file PhantomDump.hpp.
| PhantomDumpTableHeader<f32> shammodels::sph::PhantomDump::table_header_f32 |
Table header for 32-bit floating-point data.
Definition at line 408 of file PhantomDump.hpp.
| PhantomDumpTableHeader<f64> shammodels::sph::PhantomDump::table_header_f64 |
Table header for 64-bit floating-point data.
Definition at line 410 of file PhantomDump.hpp.
| PhantomDumpTableHeader<fort_int> shammodels::sph::PhantomDump::table_header_fort_int |
Table header for integer data.
Definition at line 396 of file PhantomDump.hpp.
| PhantomDumpTableHeader<fort_real> shammodels::sph::PhantomDump::table_header_fort_real |
Table header for floating-point data.
Definition at line 406 of file PhantomDump.hpp.
| PhantomDumpTableHeader<i16> shammodels::sph::PhantomDump::table_header_i16 |
Table header for signed 16-bit integer data.
Definition at line 400 of file PhantomDump.hpp.
| PhantomDumpTableHeader<i32> shammodels::sph::PhantomDump::table_header_i32 |
Table header for signed 32-bit integer data.
Definition at line 402 of file PhantomDump.hpp.
| PhantomDumpTableHeader<i64> shammodels::sph::PhantomDump::table_header_i64 |
Table header for signed 64-bit integer data.
Definition at line 404 of file PhantomDump.hpp.
| PhantomDumpTableHeader<i8> shammodels::sph::PhantomDump::table_header_i8 |
Table header for signed 8-bit integer data.
Definition at line 398 of file PhantomDump.hpp.