Version: SMASH-2.0
thermodynamicoutput.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2014-2020
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_THERMODYNAMICOUTPUT_H_
11 #define SRC_INCLUDE_SMASH_THERMODYNAMICOUTPUT_H_
12 
13 #include <memory>
14 #include <set>
15 #include <string>
16 
17 #include "density.h"
18 #include "experimentparameters.h"
19 #include "file.h"
20 #include "forwarddeclarations.h"
21 #include "outputinterface.h"
22 #include "outputparameters.h"
23 #include "threevector.h"
24 
25 namespace smash {
26 
39  public:
46  ThermodynamicOutput(const bf::path &path, const std::string &name,
47  const OutputParameters &out_par);
50 
58  void at_eventstart(const Particles &particles, const int event_number,
59  const EventInfo &event) override;
60 
67  void at_eventend(const Particles &particles, const int event_number,
68  const EventInfo &event) override;
69 
79  void at_intermediate_time(const Particles &particles,
80  const std::unique_ptr<Clock> &clock,
81  const DensityParameters &dens_param,
82  const EventInfo &event) override;
83 
96  void density_along_line(const char *file_name, const ParticleList &plist,
97  const DensityParameters &param, DensityType dens_type,
98  const ThreeVector &line_start,
99  const ThreeVector &line_end, int n_points);
100 
101  private:
106 };
107 
108 } // namespace smash
109 
110 #endif // SRC_INCLUDE_SMASH_THERMODYNAMICOUTPUT_H_
smash
Definition: action.h:24
smash::ThermodynamicOutput::density_along_line
void density_along_line(const char *file_name, const ParticleList &plist, const DensityParameters &param, DensityType dens_type, const ThreeVector &line_start, const ThreeVector &line_end, int n_points)
Prints density along the specified line.
Definition: thermodynamicoutput.cc:250
smash::ThermodynamicOutput::ThermodynamicOutput
ThermodynamicOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par)
Construct Output param[in] path Path to output param[in] name Filename param[in] out_par Parameters o...
Definition: thermodynamicoutput.cc:114
outputparameters.h
smash::ThermodynamicOutput::file_
RenamingFilePtr file_
Pointer to output file.
Definition: thermodynamicoutput.h:103
smash::DensityParameters
A class to pre-calculate and store parameters relevant for density calculation.
Definition: density.h:108
smash::ThermodynamicOutput
Writes the thermodynamic quantities at a specified point versus time.
Definition: thermodynamicoutput.h:38
experimentparameters.h
smash::ThermodynamicOutput::at_eventstart
void at_eventstart(const Particles &particles, const int event_number, const EventInfo &event) override
writes the event header
Definition: thermodynamicoutput.cc:168
smash::ThermodynamicOutput::out_par_
const OutputParameters out_par_
Structure that holds all the information about what to printout.
Definition: thermodynamicoutput.h:105
smash::EventInfo
Structure to contain custom data for output.
Definition: outputinterface.h:35
forwarddeclarations.h
smash::ThreeVector
Definition: threevector.h:31
outputinterface.h
smash::OutputParameters
Helper structure for Experiment to hold output options and parameters.
Definition: outputparameters.h:25
threevector.h
smash::OutputInterface
Abstraction of generic output.
Definition: outputinterface.h:65
smash::ThermodynamicOutput::at_eventend
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
only flushes the output the file
Definition: thermodynamicoutput.cc:174
density.h
smash::Particles
Definition: particles.h:33
smash::DensityType
DensityType
Allows to choose which kind of density to calculate.
Definition: density.h:36
smash::ThermodynamicOutput::~ThermodynamicOutput
~ThermodynamicOutput()
Default destructor.
Definition: thermodynamicoutput.cc:166
smash::RenamingFilePtr
A RAII type to replace std::FILE *.
Definition: file.h:73
file.h
smash::ThermodynamicOutput::at_intermediate_time
void at_intermediate_time(const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &event) override
Writes thermodynamics every fixed time interval.
Definition: thermodynamicoutput.cc:180