Version: SMASH-1.5
boxmodus.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2018
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_BOXMODUS_H_
8 #define SRC_INCLUDE_BOXMODUS_H_
9 
10 #include <map>
11 #include <memory>
12 
13 #include "forwarddeclarations.h"
14 #include "modusdefault.h"
15 
16 namespace smash {
17 
46 class BoxModus : public ModusDefault {
47  public:
58  explicit BoxModus(Configuration modus_config,
59  const ExperimentParameters &parameters);
60 
71  double initial_conditions(Particles *particles,
72  const ExperimentParameters &parameters);
73 
87  const OutputsList &output_list = {});
88 
91  const Particles &particles, double min_cell_length,
93  return {{{0, 0, 0}, {length_, length_, length_}},
94  particles,
95  min_cell_length,
96  strategy};
97  }
98 
105  std::unique_ptr<GrandCanThermalizer> create_grandcan_thermalizer(
106  Configuration &conf) const {
107  const std::array<double, 3> lat_size = {length_, length_, length_};
108  const std::array<double, 3> origin = {0., 0., 0.};
109  const bool periodicity = true;
110  return make_unique<GrandCanThermalizer>(conf, lat_size, origin,
111  periodicity);
112  }
113 
115  double max_timestep(double max_transverse_distance_sqr) const {
116  return 0.5 * std::sqrt(length_ * length_ - max_transverse_distance_sqr);
117  }
118 
120  double length() const { return length_; }
121 
122  private:
126  const double length_;
128  const double temperature_;
130  const double start_time_ = 0.;
135  const bool use_thermal_ = false;
140  const double mub_;
145  const double mus_;
150  const std::map<PdgCode, int> init_multipl_;
155  std::map<PdgCode, double> average_multipl_;
156 
165  friend std::ostream &operator<<(std::ostream &out, const BoxModus &m);
166 };
167 
168 } // namespace smash
169 
170 #endif // SRC_INCLUDE_BOXMODUS_H_
double max_timestep(double max_transverse_distance_sqr) const
Definition: boxmodus.h:115
const double start_time_
Initial time of the box.
Definition: boxmodus.h:130
const double length_
Length of the cube&#39;s edge in fm/c.
Definition: boxmodus.h:126
const std::map< PdgCode, int > init_multipl_
Particle multiplicities at initialization; required if use_thermal_ is false.
Definition: boxmodus.h:150
const bool use_thermal_
Whether to use a thermal initialization for all particles instead of specific numbers.
Definition: boxmodus.h:135
const double temperature_
Temperature of the Box in GeV.
Definition: boxmodus.h:128
BoxInitialCondition
Initial condition for a particle in a box.
const BoxInitialCondition initial_condition_
Initial momenta distribution: thermal or peaked momenta.
Definition: boxmodus.h:124
Look for optimal cell size.
double length() const
Definition: boxmodus.h:120
const double mus_
Strange chemical potential for thermal initialization; only used if use_thermal_ is true...
Definition: boxmodus.h:145
Interface to the SMASH configuration files.
Base class for Modus classes that provides default function implementations.
Definition: modusdefault.h:44
friend std::ostream & operator<<(std::ostream &out, const BoxModus &m)
Console output on startup of box specific parameters; writes the initial state for the box to the out...
Definition: boxmodus.cc:37
std::map< PdgCode, double > average_multipl_
Average multiplicities in case of thermal initialization.
Definition: boxmodus.h:155
BoxModus: Provides a modus for infinite matter calculations.
Definition: boxmodus.h:46
Grid< GridOptions::PeriodicBoundaries > create_grid(const Particles &particles, double min_cell_length, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const
Creates the Grid with normal boundary conditions.
Definition: boxmodus.h:90
BoxModus(Configuration modus_config, const ExperimentParameters &parameters)
Constructor.
Definition: boxmodus.cc:161
double initial_conditions(Particles *particles, const ExperimentParameters &parameters)
Generates initial state of the particles in the system according to specified parameters: number of p...
Definition: boxmodus.cc:175
CellSizeStrategy
Indentifies the strategy of determining the cell size.
Definition: grid.h:33
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
std::unique_ptr< GrandCanThermalizer > create_grandcan_thermalizer(Configuration &conf) const
Creates GrandCanThermalizer.
Definition: boxmodus.h:105
Helper structure for Experiment.
Definition: action.h:24
int impose_boundary_conditions(Particles *particles, const OutputsList &output_list={})
Enforces that all particles are inside the box.
Definition: boxmodus.cc:254
const double mub_
Baryon chemical potential for thermal initialization; only used if use_thermal_ is true...
Definition: boxmodus.h:140