Version: SMASH-3.1
smash::VtkOutput Class Reference

#include <vtkoutput.h>

SMASH output in a paraview format, intended for simple visualization.

Definition at line 29 of file vtkoutput.h.

Inheritance diagram for smash::VtkOutput:
smash::OutputInterface

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...
 

Constructor & Destructor Documentation

◆ VtkOutput()

smash::VtkOutput::VtkOutput ( const std::filesystem::path &  path,
const std::string &  name,
const OutputParameters out_par 
)

Create a new VTK output.

Parameters
pathPath to the output file.
nameName of the output.
out_parAdditional information on the configured output.

Definition at line 24 of file vtkoutput.cc.

26  : OutputInterface(name),
27  base_path_(std::move(path)),
28  is_thermodynamics_output_(name == "Thermodynamics"),
29  is_fields_output_(name == "Fields") {
30  if (out_par.part_extended) {
31  logg[LOutput].warn()
32  << "Creating VTK output: There is no extended VTK format.";
33  }
34 }
OutputInterface(std::string name)
Construct output interface.
bool is_fields_output_
Is the VTK output an output for fields.
Definition: vtkoutput.h:198
bool is_thermodynamics_output_
Is the VTK output a thermodynamics output.
Definition: vtkoutput.h:196
const std::filesystem::path base_path_
filesystem path for output
Definition: vtkoutput.h:176
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
static constexpr int LOutput

◆ ~VtkOutput()

smash::VtkOutput::~VtkOutput ( )

Definition at line 36 of file vtkoutput.cc.

36 {}

Member Function Documentation

◆ at_eventstart()

void smash::VtkOutput::at_eventstart ( const Particles particles,
const int  event_number,
const EventInfo event 
)
overridevirtual

Writes the initial particle information list of an event to the VTK output.

Parameters
particlesCurrent list of all particles.
event_numberNumber of the current event.
eventEvent info, see event_info

Reimplemented from smash::OutputInterface.

Definition at line 62 of file vtkoutput.cc.

63  {
70 
71  current_event_ = event_number;
73  write(particles);
75  }
76 }
int vtk_density_output_counter_
Number of density lattice vtk output in current event.
Definition: vtkoutput.h:184
int vtk_output_counter_
Number of vtk output in current event.
Definition: vtkoutput.h:181
void write(const Particles &particles)
Write the given particles to the output.
Definition: vtkoutput.cc:91
int vtk_fluidization_counter_
Number of fluidization output.
Definition: vtkoutput.h:192
int current_event_
Event number.
Definition: vtkoutput.h:179
int vtk_tmn_landau_output_counter_
Number of Landau frame energy-momentum tensor vtk output in current event.
Definition: vtkoutput.h:188
int vtk_v_landau_output_counter_
Number of Landau rest frame velocity vtk output in current event.
Definition: vtkoutput.h:190
int vtk_tmn_output_counter_
Number of energy-momentum tensor lattice vtk output in current event.
Definition: vtkoutput.h:186

◆ at_eventend()

void smash::VtkOutput::at_eventend ( const Particles particles,
const int  event_number,
const EventInfo event 
)
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.

Parameters
particlesUnused. Current list of particles.
event_numberUnused. Number of event.
[in]eventEvent info, see event_info

Reimplemented from smash::OutputInterface.

Definition at line 78 of file vtkoutput.cc.

79  {}

◆ at_intermediate_time()

void smash::VtkOutput::at_intermediate_time ( const Particles particles,
const std::unique_ptr< Clock > &  clock,
const DensityParameters dens_param,
const EventInfo event 
)
overridevirtual

Writes out all current particles.

Parameters
particlesCurrent list of particles.
clockUnused, needed since inherited.
dens_paramUnused, needed since inherited.
eventEvent info, see event_info

Reimplemented from smash::OutputInterface.

Definition at line 81 of file vtkoutput.cc.

84  {
86  write(particles);
88  }
89 }

◆ thermodynamics_output() [1/3]

void smash::VtkOutput::thermodynamics_output ( const ThermodynamicQuantity  tq,
const DensityType  dt,
RectangularLattice< DensityOnLattice > &  lattice 
)
overridevirtual

Prints the density lattice in VTK format on a grid.

Parameters
tqThe quantity whose density should be written, see ThermodynamicQuantity.
dtThe type of the density, see DensityType.
latticeThe lattice from which the quantity is taken.

Reimplemented from smash::OutputInterface.

Definition at line 240 of file vtkoutput.cc.

242  {
244  return;
245  }
246  std::ofstream file;
247  const std::string varname = make_varname(tq, dens_type);
248  file.open(make_filename(varname, vtk_density_output_counter_), std::ios::out);
249  write_vtk_header(file, lattice, varname);
250  write_vtk_scalar(file, lattice, varname,
251  [&](DensityOnLattice &node) { return node.rho(); });
253 }
void write_vtk_scalar(std::ofstream &file, RectangularLattice< T > &lat, const std::string &varname, F &&function)
Write a VTK scalar.
Definition: vtkoutput.cc:196
void write_vtk_header(std::ofstream &file, RectangularLattice< T > &lat, const std::string &description)
Write the VTK header.
Definition: vtkoutput.cc:179
std::string make_varname(const ThermodynamicQuantity tq, const DensityType dens_type)
Make a variable name given quantity and density type.
Definition: vtkoutput.cc:234
std::string make_filename(const std::string &description, int counter)
Make a file name given a description and a counter.
Definition: vtkoutput.cc:227

◆ thermodynamics_output() [2/3]

void smash::VtkOutput::thermodynamics_output ( const ThermodynamicQuantity  tq,
const DensityType  dt,
RectangularLattice< EnergyMomentumTensor > &  lattice 
)
overridevirtual

Prints the energy-momentum-tensor lattice in VTK format on a grid.

Parameters
tqThe quantity whose density should be written, see ThermodynamicQuantity.
dtThe type of the density, see DensityType
latticeThe lattice from which the quantity is taken.

Reimplemented from smash::OutputInterface.

Definition at line 271 of file vtkoutput.cc.

273  {
275  return;
276  }
277  std::ofstream file;
278  const std::string varname = make_varname(tq, dens_type);
279 
280  if (tq == ThermodynamicQuantity::Tmn) {
281  file.open(make_filename(varname, vtk_tmn_output_counter_++), std::ios::out);
282  write_vtk_header(file, Tmn_lattice, varname);
283  for (int i = 0; i < 4; i++) {
284  for (int j = i; j < 4; j++) {
285  write_vtk_scalar(file, Tmn_lattice,
286  varname + std::to_string(i) + std::to_string(j),
287  [&](EnergyMomentumTensor &node) {
288  return node[EnergyMomentumTensor::tmn_index(i, j)];
289  });
290  }
291  }
292  } else if (tq == ThermodynamicQuantity::TmnLandau) {
293  file.open(make_filename(varname, vtk_tmn_landau_output_counter_++),
294  std::ios::out);
295  write_vtk_header(file, Tmn_lattice, varname);
296  for (int i = 0; i < 4; i++) {
297  for (int j = i; j < 4; j++) {
298  write_vtk_scalar(file, Tmn_lattice,
299  varname + std::to_string(i) + std::to_string(j),
300  [&](EnergyMomentumTensor &node) {
301  const FourVector u = node.landau_frame_4velocity();
302  const EnergyMomentumTensor Tmn_L = node.boosted(u);
303  return Tmn_L[EnergyMomentumTensor::tmn_index(i, j)];
304  });
305  }
306  }
307  } else {
308  file.open(make_filename(varname, vtk_v_landau_output_counter_++),
309  std::ios::out);
310  write_vtk_header(file, Tmn_lattice, varname);
311  write_vtk_vector(file, Tmn_lattice, varname,
312  [&](EnergyMomentumTensor &node) {
313  const FourVector u = node.landau_frame_4velocity();
314  return -u.velocity();
315  });
316  }
317 }
static std::int8_t tmn_index(std::int8_t mu, std::int8_t nu)
Access the index of component .
void write_vtk_vector(std::ofstream &file, RectangularLattice< T > &lat, const std::string &varname, F &&function)
Write a VTK vector.
Definition: vtkoutput.cc:214
@ Tmn
Energy-momentum tensor in lab frame.
@ TmnLandau
Energy-momentum tensor in Landau rest frame.

◆ thermodynamics_output() [3/3]

void smash::VtkOutput::thermodynamics_output ( const GrandCanThermalizer gct)
overridevirtual

Printout of all thermodynamic quantities from the thermalizer class.

Parameters
gctGrand-canonical thermalizer from which the quantities are taken.

Reimplemented from smash::OutputInterface.

Definition at line 340 of file vtkoutput.cc.

340  {
342  return;
343  }
344  std::ofstream file;
345  file.open(make_filename("fluidization_td", vtk_fluidization_counter_++),
346  std::ios::out);
347  write_vtk_header(file, gct.lattice(), "fluidization_td");
348  write_vtk_scalar(file, gct.lattice(), "e",
349  [&](ThermLatticeNode &node) { return node.e(); });
350  write_vtk_scalar(file, gct.lattice(), "p",
351  [&](ThermLatticeNode &node) { return node.p(); });
352  write_vtk_vector(file, gct.lattice(), "v",
353  [&](ThermLatticeNode &node) { return node.v(); });
354  write_vtk_scalar(file, gct.lattice(), "T",
355  [&](ThermLatticeNode &node) { return node.T(); });
356  write_vtk_scalar(file, gct.lattice(), "mub",
357  [&](ThermLatticeNode &node) { return node.mub(); });
358  write_vtk_scalar(file, gct.lattice(), "mus",
359  [&](ThermLatticeNode &node) { return node.mus(); });
360 }

◆ fields_output()

void smash::VtkOutput::fields_output ( const std::string  name1,
const std::string  name2,
RectangularLattice< std::pair< ThreeVector, ThreeVector >> &  lat 
)
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.

321  {
322  if (!is_fields_output_) {
323  return;
324  }
325  std::ofstream file1;
326  file1.open(make_filename(name1, vtk_fields_output_counter_), std::ios::out);
327  write_vtk_header(file1, lat, name1);
329  file1, lat, name1,
330  [&](std::pair<ThreeVector, ThreeVector> &node) { return node.first; });
331  std::ofstream file2;
332  file2.open(make_filename(name2, vtk_fields_output_counter_), std::ios::out);
333  write_vtk_header(file2, lat, name2);
335  file2, lat, name2,
336  [&](std::pair<ThreeVector, ThreeVector> &node) { return node.second; });
338 }
int vtk_fields_output_counter_
Number of fields output in current event.
Definition: vtkoutput.h:194

◆ write()

void smash::VtkOutput::write ( const Particles particles)
private

Write the given particles to the output.

Parameters
particlesThe particles.

Definition at line 91 of file vtkoutput.cc.

91  {
92  char filename[32];
93  snprintf(filename, sizeof(filename), "pos_ev%05i_tstep%05i.vtk",
95  FilePtr file_{std::fopen((base_path_ / filename).native().c_str(), "w")};
96 
97  /* Legacy VTK file format */
98  std::fprintf(file_.get(), "# vtk DataFile Version 2.0\n");
99  std::fprintf(file_.get(), "Generated from molecular-offset data %s\n",
100  SMASH_VERSION);
101  std::fprintf(file_.get(), "ASCII\n");
102 
103  /* Unstructured data sets are composed of points, lines, polygons, .. */
104  std::fprintf(file_.get(), "DATASET UNSTRUCTURED_GRID\n");
105  std::fprintf(file_.get(), "POINTS %zu double\n", particles.size());
106  for (const auto &p : particles) {
107  std::fprintf(file_.get(), "%g %g %g\n", p.position().x1(),
108  p.position().x2(), p.position().x3());
109  }
110  std::fprintf(file_.get(), "CELLS %zu %zu\n", particles.size(),
111  particles.size() * 2);
112  for (size_t point_index = 0; point_index < particles.size(); point_index++) {
113  std::fprintf(file_.get(), "1 %zu\n", point_index);
114  }
115  std::fprintf(file_.get(), "CELL_TYPES %zu\n", particles.size());
116  for (size_t point_index = 0; point_index < particles.size(); point_index++) {
117  std::fprintf(file_.get(), "1\n");
118  }
119  std::fprintf(file_.get(), "POINT_DATA %zu\n", particles.size());
120  std::fprintf(file_.get(), "SCALARS pdg_codes int 1\n");
121  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
122  for (const auto &p : particles) {
123  std::fprintf(file_.get(), "%s\n", p.pdgcode().string().c_str());
124  }
125  std::fprintf(file_.get(), "SCALARS is_formed int 1\n");
126  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
127  double current_time = particles.time();
128  for (const auto &p : particles) {
129  std::fprintf(file_.get(), "%s\n",
130  (p.formation_time() > current_time) ? "0" : "1");
131  }
132  std::fprintf(file_.get(), "SCALARS cross_section_scaling_factor double 1\n");
133  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
134  for (const auto &p : particles) {
135  std::fprintf(file_.get(), "%g\n", p.xsec_scaling_factor());
136  }
137  std::fprintf(file_.get(), "SCALARS mass double 1\n");
138  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
139  for (const auto &p : particles) {
140  std::fprintf(file_.get(), "%g\n", p.effective_mass());
141  }
142  std::fprintf(file_.get(), "SCALARS N_coll int 1\n");
143  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
144  for (const auto &p : particles) {
145  std::fprintf(file_.get(), "%i\n", p.get_history().collisions_per_particle);
146  }
147  std::fprintf(file_.get(), "SCALARS particle_ID int 1\n");
148  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
149  for (const auto &p : particles) {
150  std::fprintf(file_.get(), "%i\n", p.id());
151  }
152  std::fprintf(file_.get(), "SCALARS baryon_number int 1\n");
153  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
154  for (const auto &p : particles) {
155  std::fprintf(file_.get(), "%i\n", p.pdgcode().baryon_number());
156  }
157  std::fprintf(file_.get(), "SCALARS strangeness int 1\n");
158  std::fprintf(file_.get(), "LOOKUP_TABLE default\n");
159  for (const auto &p : particles) {
160  std::fprintf(file_.get(), "%i\n", p.pdgcode().strangeness());
161  }
162  std::fprintf(file_.get(), "VECTORS momentum double\n");
163  for (const auto &p : particles) {
164  std::fprintf(file_.get(), "%g %g %g\n", p.momentum().x1(),
165  p.momentum().x2(), p.momentum().x3());
166  }
167 }
constexpr int p
Proton.
std::unique_ptr< std::FILE, FileDeleter > FilePtr
A RAII type to replace std::FILE *.
Definition: file.h:61
FilePtr fopen(const std::filesystem::path &filename, const std::string &mode)
Open a file with given mode.
Definition: file.cc:14

◆ make_filename()

std::string smash::VtkOutput::make_filename ( const std::string &  description,
int  counter 
)
private

Make a file name given a description and a counter.

Parameters
descriptionThe description.
counterThe counter enumerating the outputs.

Definition at line 227 of file vtkoutput.cc.

227  {
228  char suffix[22];
229  snprintf(suffix, sizeof(suffix), "_%05i_tstep%05i.vtk", current_event_,
230  counter);
231  return base_path_.string() + std::string("/") + descr + std::string(suffix);
232 }

◆ make_varname()

std::string smash::VtkOutput::make_varname ( const ThermodynamicQuantity  tq,
const DensityType  dens_type 
)
private

Make a variable name given quantity and density type.

Parameters
tqThe quantity.
dens_typeThe density type.

Definition at line 234 of file vtkoutput.cc.

235  {
236  return std::string(to_string(dens_type)) + std::string("_") +
237  std::string(to_string(tq));
238 }
const char * to_string(const ThermodynamicQuantity tq)
Convert thermodynamic quantities to strings.

◆ write_vtk_header()

template<typename T >
void smash::VtkOutput::write_vtk_header ( std::ofstream &  file,
RectangularLattice< T > &  lat,
const std::string &  description 
)
private

Write the VTK header.

Parameters
fileOutput file.
latLattice corresponding to output.
descriptionDescription of the output.

Definition at line 179 of file vtkoutput.cc.

181  {
182  const auto dim = lattice.n_cells();
183  const auto cs = lattice.cell_sizes();
184  const auto orig = lattice.origin();
185  file << "# vtk DataFile Version 2.0\n"
186  << description << "\n"
187  << "ASCII\n"
188  << "DATASET STRUCTURED_POINTS\n"
189  << "DIMENSIONS " << dim[0] << " " << dim[1] << " " << dim[2] << "\n"
190  << "SPACING " << cs[0] << " " << cs[1] << " " << cs[2] << "\n"
191  << "ORIGIN " << orig[0] << " " << orig[1] << " " << orig[2] << "\n"
192  << "POINT_DATA " << lattice.size() << "\n";
193 }

◆ write_vtk_scalar()

template<typename T , typename F >
void smash::VtkOutput::write_vtk_scalar ( std::ofstream &  file,
RectangularLattice< T > &  lat,
const std::string &  varname,
F &&  function 
)
private

Write a VTK scalar.

Parameters
fileOutput file.
latLattice corresponding to output.
varnameName of the output variable.
functionFunction that gets the scalar given a lattice node.

Definition at line 196 of file vtkoutput.cc.

198  {
199  file << "SCALARS " << varname << " double 1\n"
200  << "LOOKUP_TABLE default\n";
201  file << std::setprecision(3);
202  file << std::fixed;
203  const auto dim = lattice.n_cells();
204  lattice.iterate_sublattice({0, 0, 0}, dim, [&](T &node, int ix, int, int) {
205  const double f_from_node = get_quantity(node);
206  file << f_from_node << " ";
207  if (ix == dim[0] - 1) {
208  file << "\n";
209  }
210  });
211 }

◆ write_vtk_vector()

template<typename T , typename F >
void smash::VtkOutput::write_vtk_vector ( std::ofstream &  file,
RectangularLattice< T > &  lat,
const std::string &  varname,
F &&  function 
)
private

Write a VTK vector.

Parameters
fileOutput file.
latLattice corresponding to output.
varnameName of the output variable.
functionFunction that gets the vector given a lattice node.

Definition at line 214 of file vtkoutput.cc.

216  {
217  file << "VECTORS " << varname << " double\n";
218  file << std::setprecision(3);
219  file << std::fixed;
220  const auto dim = lattice.n_cells();
221  lattice.iterate_sublattice({0, 0, 0}, dim, [&](T &node, int, int, int) {
222  const ThreeVector v = get_quantity(node);
223  file << v.x1() << " " << v.x2() << " " << v.x3() << "\n";
224  });
225 }

Member Data Documentation

◆ base_path_

const std::filesystem::path smash::VtkOutput::base_path_
private

filesystem path for output

Definition at line 176 of file vtkoutput.h.

◆ current_event_

int smash::VtkOutput::current_event_ = 0
private

Event number.

Definition at line 179 of file vtkoutput.h.

◆ vtk_output_counter_

int smash::VtkOutput::vtk_output_counter_ = 0
private

Number of vtk output in current event.

Definition at line 181 of file vtkoutput.h.

◆ vtk_density_output_counter_

int smash::VtkOutput::vtk_density_output_counter_ = 0
private

Number of density lattice vtk output in current event.

Definition at line 184 of file vtkoutput.h.

◆ vtk_tmn_output_counter_

int smash::VtkOutput::vtk_tmn_output_counter_ = 0
private

Number of energy-momentum tensor lattice vtk output in current event.

Definition at line 186 of file vtkoutput.h.

◆ vtk_tmn_landau_output_counter_

int smash::VtkOutput::vtk_tmn_landau_output_counter_ = 0
private

Number of Landau frame energy-momentum tensor vtk output in current event.

Definition at line 188 of file vtkoutput.h.

◆ vtk_v_landau_output_counter_

int smash::VtkOutput::vtk_v_landau_output_counter_ = 0
private

Number of Landau rest frame velocity vtk output in current event.

Definition at line 190 of file vtkoutput.h.

◆ vtk_fluidization_counter_

int smash::VtkOutput::vtk_fluidization_counter_ = 0
private

Number of fluidization output.

Definition at line 192 of file vtkoutput.h.

◆ vtk_fields_output_counter_

int smash::VtkOutput::vtk_fields_output_counter_ = 0
private

Number of fields output in current event.

Definition at line 194 of file vtkoutput.h.

◆ is_thermodynamics_output_

bool smash::VtkOutput::is_thermodynamics_output_
private

Is the VTK output a thermodynamics output.

Definition at line 196 of file vtkoutput.h.

◆ is_fields_output_

bool smash::VtkOutput::is_fields_output_
private

Is the VTK output an output for fields.

Definition at line 198 of file vtkoutput.h.


The documentation for this class was generated from the following files: