#include <binaryoutput.h>
Writes the particle list at specific times to the binary file.
This class writes the current particle list at a specific time t to the binary output file. This specific time can be: event start, event end or every next time interval \(\Delta t \). Writing (or not writing) the output at these moments is controlled by different options. The time interval \(\Delta t \) is also regulated by an option. The output file is binary and has a block structure.
Details of the output format can be found on the wiki in the User Guide section, look for binary output.
Definition at line 197 of file binaryoutput.h.
Public Member Functions | |
BinaryOutputParticles (const std::filesystem::path &path, std::string name, const OutputParameters &out_par) | |
Create binary particle output. More... | |
void | at_eventstart (const Particles &particles, const int event_number, const EventInfo &event) override |
Writes the initial particle information of an event to the binary output. More... | |
void | at_eventend (const Particles &particles, const int event_number, const EventInfo &event) override |
Writes the final particle information of an event to the binary output. More... | |
void | at_intermediate_time (const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &event) override |
Writes particles at each time interval; fixed by option OUTPUT_INTERVAL. More... | |
Public Member Functions inherited from smash::OutputInterface | |
OutputInterface (std::string name) | |
Construct output interface. More... | |
virtual | ~OutputInterface ()=0 |
Pure virtual destructor to make class abstract and prevent its instantiation. More... | |
virtual void | at_eventstart (const std::vector< Particles > &, int) |
Output launched at event start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventstart (const int, const ThermodynamicQuantity, const DensityType, RectangularLattice< DensityOnLattice >) |
Output launched at event start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventstart (const int, const ThermodynamicQuantity, const DensityType, RectangularLattice< EnergyMomentumTensor >) |
Output launched at event start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventend (const int, const ThermodynamicQuantity, const DensityType) |
Output launched at event end. More... | |
virtual void | at_eventend (const ThermodynamicQuantity) |
Output launched at event end. More... | |
virtual void | at_eventend (const std::vector< Particles > &, const int) |
Output launched at event end. More... | |
virtual void | at_interaction (const Action &, const double) |
Called whenever an action modified one or more particles. More... | |
virtual void | at_intermediate_time (const std::vector< Particles > &, const std::unique_ptr< Clock > &, const DensityParameters &) |
Output launched after every N'th timestep. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity, const DensityType, RectangularLattice< DensityOnLattice > &) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity, const DensityType, RectangularLattice< EnergyMomentumTensor > &) |
Output to write energy-momentum tensor and related quantities from the lattice. More... | |
virtual void | thermodynamics_lattice_output (RectangularLattice< DensityOnLattice > &, const double) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_lattice_output (RectangularLattice< DensityOnLattice > &, const double, const std::vector< Particles > &, const DensityParameters &) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_lattice_output (const ThermodynamicQuantity, RectangularLattice< EnergyMomentumTensor > &, const double) |
Output to write energy-momentum tensor and related quantities from the lattice. More... | |
virtual void | thermodynamics_output (const GrandCanThermalizer &) |
Output to write energy-momentum tensor and related quantities from the thermalizer class. More... | |
virtual void | fields_output (const std::string, const std::string, RectangularLattice< std::pair< ThreeVector, ThreeVector >> &) |
Write fields in vtk output Fields are a pair of threevectors for example electric and magnetic field. More... | |
bool | is_dilepton_output () const |
Get, whether this is the dilepton output? More... | |
bool | is_photon_output () const |
Get, whether this is the photon output? More... | |
bool | is_IC_output () const |
Get, whether this is the IC output? More... | |
const char * | to_string (const ThermodynamicQuantity tq) |
Convert thermodynamic quantities to strings. More... | |
const char * | to_string (const DensityType dens_type) |
Convert density types to strings. More... | |
Private Attributes | |
OutputOnlyFinal | only_final_ |
Whether final- or initial-state particles should be written. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from smash::BinaryOutputBase | |
BinaryOutputBase (const std::filesystem::path &path, const std::string &mode, const std::string &name, bool extended_format) | |
Create binary output base. More... | |
void | write (const char c) |
Write byte to binary output. More... | |
void | write (const std::string &s) |
Write string to binary output. More... | |
void | write (const double x) |
Write double to binary output. More... | |
void | write (const FourVector &v) |
Write four-vector to binary output. More... | |
void | write (const std::int32_t x) |
Write integer (32 bit) to binary output. More... | |
void | write (const std::uint32_t x) |
Write unsigned integer (32 bit) to binary output. More... | |
void | write (const std::uint16_t x) |
Write unsigned integer (16 bit) to binary output. More... | |
void | write (const size_t x) |
Write a std::size_t to binary output. More... | |
void | write (const Particles &particles) |
Write particle data of each particle in particles to binary output. More... | |
void | write (const ParticleList &particles) |
Write each particle data entry to binary output. More... | |
void | write_particledata (const ParticleData &p) |
Write particle data to binary output. More... | |
Protected Attributes inherited from smash::BinaryOutputBase | |
RenamingFilePtr | file_ |
Binary particles output file path. More... | |
Protected Attributes inherited from smash::OutputInterface | |
const bool | is_dilepton_output_ |
Is this the dilepton output? More... | |
const bool | is_photon_output_ |
Is this the photon output? More... | |
const bool | is_IC_output_ |
Is this the IC output? More... | |
smash::BinaryOutputParticles::BinaryOutputParticles | ( | const std::filesystem::path & | path, |
std::string | name, | ||
const OutputParameters & | out_par | ||
) |
Create binary particle output.
[in] | path | Output path. |
[in] | name | Name of the ouput. |
[in] | out_par | A structure containing the parameters of the output. |
Definition at line 259 of file binaryoutput.cc.
|
overridevirtual |
Writes the initial particle information of an event to the binary output.
[in] | particles | Current list of all particles. |
[in] | event_number | Unused, needed since inherited. |
[in] | event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 266 of file binaryoutput.cc.
|
overridevirtual |
Writes the final particle information of an event to the binary output.
[in] | particles | Current list of particles. |
[in] | event_number | Number of event. |
[in] | event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 276 of file binaryoutput.cc.
|
overridevirtual |
Writes particles at each time interval; fixed by option OUTPUT_INTERVAL.
[in] | particles | Current list of particles. |
[in] | clock | Unused, needed since inherited. |
[in] | dens_param | Unused, needed since inherited. |
[in] | event | Event info, see event_info. |
Reimplemented from smash::OutputInterface.
Definition at line 298 of file binaryoutput.cc.
|
private |
Whether final- or initial-state particles should be written.
Definition at line 241 of file binaryoutput.h.