#include <vtkoutput.h>
SMASH output in a paraview format, intended for simple visualization.
Definition at line 29 of file vtkoutput.h.
Public Member Functions | |
VtkOutput (const std::filesystem::path &path, const std::string &name, const OutputParameters &out_par) | |
Create a new VTK output. More... | |
~VtkOutput () | |
void | at_eventstart (const Particles &particles, const int event_number, const EventInfo &event) override |
Writes the initial particle information list of an event to the VTK output. More... | |
void | at_eventend (const Particles &particles, const int event_number, const EventInfo &event) override |
Writes the final particle information list of an event to the VTK output. More... | |
void | at_intermediate_time (const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &event) override |
Writes out all current particles. More... | |
void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< DensityOnLattice > &lattice) override |
Prints the density lattice in VTK format on a grid. More... | |
void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< EnergyMomentumTensor > &lattice) override |
Prints the energy-momentum-tensor lattice in VTK format on a grid. More... | |
void | thermodynamics_output (const GrandCanThermalizer &gct) override |
Printout of all thermodynamic quantities from the thermalizer class. More... | |
void | fields_output (const std::string name1, const std::string name2, RectangularLattice< std::pair< ThreeVector, ThreeVector >> &lat) override |
Write fields in vtk output Fields are a pair of threevectors for example electric and magnetic field. 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_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... | |
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 Member Functions | |
void | write (const Particles &particles) |
Write the given particles to the output. More... | |
std::string | make_filename (const std::string &description, int counter) |
Make a file name given a description and a counter. More... | |
std::string | make_varname (const ThermodynamicQuantity tq, const DensityType dens_type) |
Make a variable name given quantity and density type. More... | |
template<typename T > | |
void | write_vtk_header (std::ofstream &file, RectangularLattice< T > &lat, const std::string &description) |
Write the VTK header. More... | |
template<typename T , typename F > | |
void | write_vtk_scalar (std::ofstream &file, RectangularLattice< T > &lat, const std::string &varname, F &&function) |
Write a VTK scalar. More... | |
template<typename T , typename F > | |
void | write_vtk_vector (std::ofstream &file, RectangularLattice< T > &lat, const std::string &varname, F &&function) |
Write a VTK vector. More... | |
Private Attributes | |
const std::filesystem::path | base_path_ |
filesystem path for output More... | |
int | current_event_ = 0 |
Event number. More... | |
int | vtk_output_counter_ = 0 |
Number of vtk output in current event. More... | |
int | vtk_density_output_counter_ = 0 |
Number of density lattice vtk output in current event. More... | |
int | vtk_tmn_output_counter_ = 0 |
Number of energy-momentum tensor lattice vtk output in current event. More... | |
int | vtk_tmn_landau_output_counter_ = 0 |
Number of Landau frame energy-momentum tensor vtk output in current event. More... | |
int | vtk_v_landau_output_counter_ = 0 |
Number of Landau rest frame velocity vtk output in current event. More... | |
int | vtk_fluidization_counter_ = 0 |
Number of fluidization output. More... | |
int | vtk_fields_output_counter_ = 0 |
Number of fields output in current event. More... | |
bool | is_thermodynamics_output_ |
Is the VTK output a thermodynamics output. More... | |
bool | is_fields_output_ |
Is the VTK output an output for fields. More... | |
Additional Inherited Members | |
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::VtkOutput::VtkOutput | ( | const std::filesystem::path & | path, |
const std::string & | name, | ||
const OutputParameters & | out_par | ||
) |
Create a new VTK output.
path | Path to the output file. |
name | Name of the output. |
out_par | Additional information on the configured output. |
Definition at line 24 of file vtkoutput.cc.
smash::VtkOutput::~VtkOutput | ( | ) |
Definition at line 36 of file vtkoutput.cc.
|
overridevirtual |
Writes the initial particle information list of an event to the VTK output.
particles | Current list of all particles. |
event_number | Number of the current event. |
event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 62 of file vtkoutput.cc.
|
overridevirtual |
Writes the final particle information list of an event to the VTK output.
This currently does not do anything, because it is not required for the VTK output.
particles | Unused. Current list of particles. | |
event_number | Unused. Number of event. | |
[in] | event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 78 of file vtkoutput.cc.
|
overridevirtual |
Writes out all current particles.
particles | Current list of particles. |
clock | Unused, needed since inherited. |
dens_param | Unused, needed since inherited. |
event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 81 of file vtkoutput.cc.
|
overridevirtual |
Prints the density lattice in VTK format on a grid.
tq | The quantity whose density should be written, see ThermodynamicQuantity. |
dt | The type of the density, see DensityType. |
lattice | The lattice from which the quantity is taken. |
Reimplemented from smash::OutputInterface.
Definition at line 240 of file vtkoutput.cc.
|
overridevirtual |
Prints the energy-momentum-tensor lattice in VTK format on a grid.
tq | The quantity whose density should be written, see ThermodynamicQuantity. |
dt | The type of the density, see DensityType |
lattice | The lattice from which the quantity is taken. |
Reimplemented from smash::OutputInterface.
Definition at line 271 of file vtkoutput.cc.
|
overridevirtual |
Printout of all thermodynamic quantities from the thermalizer class.
gct | Grand-canonical thermalizer from which the quantities are taken. |
Reimplemented from smash::OutputInterface.
Definition at line 340 of file vtkoutput.cc.
|
overridevirtual |
Write fields in vtk output Fields are a pair of threevectors for example electric and magnetic field.
Reimplemented from smash::OutputInterface.
Definition at line 319 of file vtkoutput.cc.
|
private |
Write the given particles to the output.
particles | The particles. |
Definition at line 91 of file vtkoutput.cc.
|
private |
Make a file name given a description and a counter.
description | The description. |
counter | The counter enumerating the outputs. |
Definition at line 227 of file vtkoutput.cc.
|
private |
Make a variable name given quantity and density type.
tq | The quantity. |
dens_type | The density type. |
Definition at line 234 of file vtkoutput.cc.
|
private |
Write the VTK header.
file | Output file. |
lat | Lattice corresponding to output. |
description | Description of the output. |
Definition at line 179 of file vtkoutput.cc.
|
private |
Write a VTK scalar.
file | Output file. |
lat | Lattice corresponding to output. |
varname | Name of the output variable. |
function | Function that gets the scalar given a lattice node. |
Definition at line 196 of file vtkoutput.cc.
|
private |
Write a VTK vector.
file | Output file. |
lat | Lattice corresponding to output. |
varname | Name of the output variable. |
function | Function that gets the vector given a lattice node. |
Definition at line 214 of file vtkoutput.cc.
|
private |
filesystem path for output
Definition at line 176 of file vtkoutput.h.
|
private |
Event number.
Definition at line 179 of file vtkoutput.h.
|
private |
Number of vtk output in current event.
Definition at line 181 of file vtkoutput.h.
|
private |
Number of density lattice vtk output in current event.
Definition at line 184 of file vtkoutput.h.
|
private |
Number of energy-momentum tensor lattice vtk output in current event.
Definition at line 186 of file vtkoutput.h.
|
private |
Number of Landau frame energy-momentum tensor vtk output in current event.
Definition at line 188 of file vtkoutput.h.
|
private |
Number of Landau rest frame velocity vtk output in current event.
Definition at line 190 of file vtkoutput.h.
|
private |
Number of fluidization output.
Definition at line 192 of file vtkoutput.h.
|
private |
Number of fields output in current event.
Definition at line 194 of file vtkoutput.h.
|
private |
Is the VTK output a thermodynamics output.
Definition at line 196 of file vtkoutput.h.
|
private |
Is the VTK output an output for fields.
Definition at line 198 of file vtkoutput.h.