#include <vtkoutput.h>
SMASH output in a paraview format, intended for simple visualization.
Definition at line 28 of file vtkoutput.h.
Public Member Functions | |
VtkOutput (const bf::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) 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, double impact_parameter) override |
Writes the final particle information list of an event to the VTK output. More... | |
void | at_intermediate_time (const Particles &particles, const Clock &clock, const DensityParameters &dens_param) 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... | |
![]() | |
OutputInterface (std::string name) | |
Construct output interface. More... | |
virtual | ~OutputInterface ()=default |
virtual void | at_interaction (const Action &action, const double density) |
Called whenever an action modified one or more particles. 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... | |
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 bf::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... | |
bool | is_thermodynamics_output_ |
Is the VTK output a thermodynamics output. More... | |
Additional Inherited Members | |
![]() | |
const bool | is_dilepton_output_ |
Is this the dilepton output? More... | |
const bool | is_photon_output_ |
Is this the photon output? More... | |
smash::VtkOutput::VtkOutput | ( | const bf::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 22 of file vtkoutput.cc.
smash::VtkOutput::~VtkOutput | ( | ) |
Definition at line 33 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. |
Implements smash::OutputInterface.
Definition at line 59 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. |
impact_parameter | Unused. Impact parameter of this event. |
Implements smash::OutputInterface.
Definition at line 75 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. |
Reimplemented from smash::OutputInterface.
Definition at line 79 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 217 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 248 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 296 of file vtkoutput.cc.
|
private |
Write the given particles to the output.
particles | The particles. |
Definition at line 87 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 204 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 211 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 156 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 173 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 191 of file vtkoutput.cc.
|
private |
filesystem path for output
Definition at line 166 of file vtkoutput.h.
|
private |
Event number.
Definition at line 169 of file vtkoutput.h.
|
private |
Number of vtk output in current event.
Definition at line 171 of file vtkoutput.h.
|
private |
Number of density lattice vtk output in current event.
Definition at line 174 of file vtkoutput.h.
|
private |
Number of energy-momentum tensor lattice vtk output in current event.
Definition at line 176 of file vtkoutput.h.
|
private |
Number of Landau frame energy-momentum tensor vtk output in current event.
Definition at line 178 of file vtkoutput.h.
|
private |
Number of Landau rest frame velocity vtk output in current event.
Definition at line 180 of file vtkoutput.h.
|
private |
Number of fluidization output.
Definition at line 182 of file vtkoutput.h.
|
private |
Is the VTK output a thermodynamics output.
Definition at line 184 of file vtkoutput.h.