28 py::class_<T>(m,
"PhantomDump")
31 [](T &self, std::string fname) {
32 auto file = self.gen_file();
33 file.write_to_file(fname);
37 [](T &self, std::string s) {
38 return self.read_header_float<
f64>(s);
42 [](T &self, std::string s) {
43 return self.read_header_int<
i64>(s);
47 m.def(
"load_phantom_dump", [](std::string fname) {
53 "compare_phantom_dumps",
double f64
Alias for double.
std::int64_t i64
64 bit integer
Class for reading and writing Fortran-style binary files.
FortranIOFile load_fortran_file(const std::string &fname)
Load a Fortran formatted file from disk.
bool compare_phantom_dumps(PhantomDump &dump1, PhantomDump &dump2)
Compare two phantom dumps and report offenses.
Pybind11 include and definitions.
#define Register_pymod(placeholdername)
Register a python module init function using static initialisation.
void debug_ln(std::string module_name, Types... var2)
Prints a log message with multiple arguments followed by a newline.
Class representing a Phantom dump file.
static PhantomDump from_file(shambase::FortranIOFile &phfile)
Reads a Phantom dump file and returns a PhantomDump object.
void print_state()
Print current state of the data stored in the class.