10 #ifndef SRC_INCLUDE_SMASH_THERMODYNAMICLATTICEOUTPUT_H_
11 #define SRC_INCLUDE_SMASH_THERMODYNAMICLATTICEOUTPUT_H_
19 #include <boost/filesystem.hpp>
58 const bool enable_ascii,
const bool enable_binary);
100 double current_time)
override;
115 const std::vector<Particles> &ensembles,
130 double current_time)
override;
144 const int event_number,
const char type);
186 std::map<ThermodynamicQuantity, std::shared_ptr<std::ofstream>>
190 std::map<ThermodynamicQuantity, std::shared_ptr<std::ofstream>>
A class to pre-calculate and store parameters relevant for density calculation.
Abstraction of generic output.
A container class to hold all the arrays on the lattice and access them.
Writes the thermodynamic quantities at lattice points versus time.
const bf::path base_path_
filesystem path for output
std::array< int, 3 > nodes_
number of nodes in the lattice along the three axes
std::map< ThermodynamicQuantity, std::shared_ptr< std::ofstream > > output_ascii_files_
map of output file handlers for ASCII format
bool enable_binary_
enable output type Binary
void at_eventstart(const int event_number, const ThermodynamicQuantity tq, const DensityType dens_type, const RectangularLattice< DensityOnLattice > lattice) override
Output launched at event start after initialization, when particles are generated but not yet propaga...
std::string make_filename(const std::string &description, const int event_number, const char type)
Makes a file name given a description and a counter.
static const double_t version
Version of the thermodynamic lattice output.
~ThermodynamicLatticeOutput()
Default destructor.
std::map< ThermodynamicQuantity, std::shared_ptr< std::ofstream > > output_binary_files_
map of output file handlers for binary format
int to_int(const ThermodynamicQuantity &tq)
Convert a ThermodynamicQuantity into an int.
void write_therm_lattice_binary_header(std::shared_ptr< std::ofstream > file, const ThermodynamicQuantity &tq)
Writes the header for the binary output files.
void write_therm_lattice_ascii_header(std::shared_ptr< std::ofstream > file, const ThermodynamicQuantity &tq)
Writes the header for the ASCII output files.
void thermodynamics_lattice_output(RectangularLattice< DensityOnLattice > &lattice, double current_time) override
Prints the density lattice on a grid.
void at_eventend(const ThermodynamicQuantity tq) override
Final actions at the end of each event (it closes the output files).
const OutputParameters out_par_
Structure that holds all the information about what to printout.
bool enable_output_
enable output, of any kind (if False, the object does nothing)
ThermodynamicLatticeOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par, const bool enable_ascii, const bool enable_binary)
Construct Output.
std::string make_varname(const ThermodynamicQuantity tq, const DensityType dens_type)
Makes a variable name given quantity and density type.
bool enable_ascii_
enable output type ASCII
std::array< double, 3 > sizes_
lattice resolution along the three axes
std::array< double, 3 > origin_
lattice origin orientation: if 0,0,0 is the origin of a cube with face widths 10, the center is at 5,...
DensityType
Allows to choose which kind of density to calculate.
Helper structure for Experiment to hold output options and parameters.