Version: SMASH-2.0
grandcan_thermalizer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_SMASH_GRANDCAN_THERMALIZER_H_
8 #define SRC_INCLUDE_SMASH_GRANDCAN_THERMALIZER_H_
9 
10 #include <memory>
11 #include <vector>
12 
13 #include "angles.h"
14 #include "clock.h"
15 #include "configuration.h"
16 #include "density.h"
17 #include "distributions.h"
18 #include "forwarddeclarations.h"
19 #include "hadgas_eos.h"
20 #include "lattice.h"
21 #include "particledata.h"
22 #include "quantumnumbers.h"
23 
24 namespace smash {
25 
49  public:
66  void add_particle(const ParticleData& p, double factor);
91  void set_rest_frame_quantities(double T0, double mub0, double mus0,
92  double muq0, const ThreeVector v0);
94  FourVector Tmu0() const { return Tmu0_; }
96  double nb() const { return nb_; }
98  double ns() const { return ns_; }
100  double nq() const { return nq_; }
102  double e() const { return e_; }
104  double p() const { return p_; }
106  ThreeVector v() const { return v_; }
108  double T() const { return T_; }
110  double mub() const { return mub_; }
112  double mus() const { return mus_; }
114  double muq() const { return muq_; }
115 
116  private:
120  double nb_;
122  double ns_;
124  double nq_;
126  double e_;
128  double p_;
132  double T_;
134  double mub_;
136  double mus_;
138  double muq_;
139 };
140 
147 std::ostream& operator<<(std::ostream& s, const ThermLatticeNode& node);
148 
153 enum class HadronClass {
155  Baryon = 0,
157  Antibaryon = 1,
159  PositiveSMeson = 2,
161  NegativeSMeson = 3,
167  ZeroQZeroSMeson = 6,
168 };
169 
228  public:
245  GrandCanThermalizer(const std::array<double, 3> lat_sizes,
246  const std::array<int, 3> n_cells,
247  const std::array<double, 3> origin, bool periodicity,
248  double e_critical, double t_start, double delta_t,
249  ThermalizationAlgorithm algo, bool BF_microcanonical);
252  const std::array<double, 3> lat_sizes,
253  const std::array<double, 3> origin, bool periodicity)
255  lat_sizes, conf.take({"Cell_Number"}), origin, periodicity,
256  conf.take({"Critical_Edens"}), conf.take({"Start_Time"}),
257  conf.take({"Timestep"}),
258  conf.take({"Algorithm"}, ThermalizationAlgorithm::BiasedBF),
259  conf.take({"Microcanonical"}, false)) {}
265  bool is_time_to_thermalize(std::unique_ptr<Clock>& clock) const {
266  const double t = clock->current_time();
267  const int n = static_cast<int>(std::floor((t - t_start_) / period_));
268  return (t > t_start_ &&
269  t < t_start_ + n * period_ + clock->timestep_duration());
270  }
278  void update_thermalizer_lattice(const Particles& particles,
279  const DensityParameters& par,
280  bool ignore_cells_under_threshold = true);
290  void renormalize_momenta(ParticleList& plist,
291  const FourVector required_total_momentum);
292 
293  // Functions for BF-sampling algorithm
294 
303  void sample_multinomial(HadronClass particle_class, int N);
315  void sample_in_random_cell_BF_algo(ParticleList& plist, const double time,
316  size_t type_index);
329  void thermalize_BF_algo(QuantumNumbers& conserved_initial, double time,
330  int ntest);
331 
332  // Functions for mode-sampling algorithm
333 
338  template <typename F>
339  void compute_N_in_cells_mode_algo(F&& condition) {
340  N_in_cells_.clear();
341  N_total_in_cells_ = 0.0;
342  for (auto cell_index : cells_to_sample_) {
343  const ThermLatticeNode cell = (*lat_)[cell_index];
344  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
345  double N_tot = 0.0;
346  for (ParticleTypePtr i : eos_typelist_) {
347  if (condition(i->strangeness(), i->baryon_number(), i->charge())) {
348  // N_i = n u^mu dsigma_mu = (isochronous hypersurface) n * V * gamma
349  N_tot += lat_cell_volume_ * gamma *
350  HadronGasEos::partial_density(*i, cell.T(), cell.mub(),
351  cell.mus(), 0.0);
352  }
353  }
354  N_in_cells_.push_back(N_tot);
355  N_total_in_cells_ += N_tot;
356  }
357  }
358 
369  template <typename F>
371  F&& condition) {
372  // Choose random cell, probability = N_in_cell/N_total
373  double r = random::uniform(0.0, N_total_in_cells_);
374  double partial_sum = 0.0;
375  int index_only_thermalized = -1;
376  while (partial_sum < r) {
377  index_only_thermalized++;
378  partial_sum += N_in_cells_[index_only_thermalized];
379  }
380  const int cell_index = cells_to_sample_[index_only_thermalized];
381  const ThermLatticeNode cell = (*lat_)[cell_index];
382  const ThreeVector cell_center = lat_->cell_center(cell_index);
383  const double gamma = 1.0 / std::sqrt(1.0 - cell.v().sqr());
384  const double N_in_cell = N_in_cells_[index_only_thermalized];
385  // Which sort to sample - probability N_i/N_tot
386  r = random::uniform(0.0, N_in_cell);
387  double N_sum = 0.0;
388  ParticleTypePtr type_to_sample;
389  for (ParticleTypePtr i : eos_typelist_) {
390  if (!condition(i->strangeness(), i->baryon_number(), i->charge())) {
391  continue;
392  }
393  N_sum += lat_cell_volume_ * gamma *
394  HadronGasEos::partial_density(*i, cell.T(), cell.mub(),
395  cell.mus(), 0.0);
396  if (N_sum >= r) {
397  type_to_sample = i;
398  break;
399  }
400  }
401  ParticleData particle(*type_to_sample);
402  // Note: it's pole mass for resonances!
403  const double m = type_to_sample->mass();
404  // Position
405  particle.set_4position(FourVector(time, cell_center + uniform_in_cell()));
406  // Momentum
407  double momentum_radial = sample_momenta_from_thermal(cell.T(), m);
408  Angles phitheta;
409  phitheta.distribute_isotropically();
410  particle.set_4momentum(m, phitheta.threevec() * momentum_radial);
411  particle.boost_momentum(-cell.v());
412  particle.set_formation_time(time);
413  return particle;
414  }
415 
424  void thermalize_mode_algo(QuantumNumbers& conserved_initial, double time);
432  void thermalize(const Particles& particles, double time, int ntest);
433 
440  void print_statistics(const Clock& clock) const;
444  double e_crit() const { return e_crit_; }
446  ParticleList particles_to_remove() const { return to_remove_; }
448  ParticleList particles_to_insert() const { return sampled_list_; }
449 
450  private:
455  ParticleTypePtrList list_eos_particles() const {
456  ParticleTypePtrList res;
457  for (const ParticleType& ptype : ParticleType::list_all()) {
458  if (HadronGasEos::is_eos_particle(ptype)) {
459  res.push_back(&ptype);
460  }
461  }
462  return res;
463  }
468  HadronClass get_class(size_t typelist_index) const {
469  const int B = eos_typelist_[typelist_index]->baryon_number();
470  const int S = eos_typelist_[typelist_index]->strangeness();
471  const int ch = eos_typelist_[typelist_index]->charge();
472  // clang-format off
473  return (B > 0) ? HadronClass::Baryon :
474  (B < 0) ? HadronClass::Antibaryon :
480  // clang-format on
481  }
483  double mult_class(const HadronClass cl) const {
484  return mult_classes_[static_cast<size_t>(cl)];
485  }
487  std::vector<double> N_in_cells_;
489  std::vector<size_t> cells_to_sample_;
493  std::unique_ptr<RectangularLattice<ThermLatticeNode>> lat_;
495  ParticleList to_remove_;
497  ParticleList sampled_list_;
506  const ParticleTypePtrList eos_typelist_;
508  const size_t N_sorts_;
510  std::vector<double> mult_sort_;
512  std::vector<int> mult_int_;
517  std::array<double, 7> mult_classes_;
526  const double e_crit_;
528  const double t_start_;
530  const double period_;
535 };
536 
537 } // namespace smash
538 
539 #endif // SRC_INCLUDE_SMASH_GRANDCAN_THERMALIZER_H_
smash::HadronGasEos
Class to handle the equation of state (EoS) of the hadron gas, consisting of all hadrons included in ...
Definition: hadgas_eos.h:125
smash::ThermLatticeNode::p
double p() const
Get pressure in the rest frame.
Definition: grandcan_thermalizer.h:104
smash::GrandCanThermalizer::sample_multinomial
void sample_multinomial(HadronClass particle_class, int N)
The sample_multinomial function samples integer numbers n_i distributed according to the multinomial ...
Definition: grandcan_thermalizer.cc:227
smash
Definition: action.h:24
smash::ThermLatticeNode::add_particle_for_derivatives
void add_particle_for_derivatives(const ParticleData &, double, ThreeVector)
dummy function for update_lattice
Definition: grandcan_thermalizer.h:68
smash::GrandCanThermalizer::GrandCanThermalizer
GrandCanThermalizer(const std::array< double, 3 > lat_sizes, const std::array< int, 3 > n_cells, const std::array< double, 3 > origin, bool periodicity, double e_critical, double t_start, double delta_t, ThermalizationAlgorithm algo, bool BF_microcanonical)
Default constructor for the GranCanThermalizer to allocate the lattice.
Definition: grandcan_thermalizer.cc:106
quantumnumbers.h
particledata.h
smash::ThermLatticeNode::mub_
double mub_
Net baryon chemical potential.
Definition: grandcan_thermalizer.h:134
smash::DensityParameters
A class to pre-calculate and store parameters relevant for density calculation.
Definition: density.h:108
smash::ThermLatticeNode::ns
double ns() const
Get net strangeness density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:98
smash::ThermLatticeNode::nq
double nq() const
Get net charge density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:100
smash::HadronClass::NegativeSMeson
Mesons with strangeness S < 0.
smash::ParticleData
Definition: particledata.h:52
smash::ThermLatticeNode::ThermLatticeNode
ThermLatticeNode()
Default constructor of thermal quantities on the lattice returning thermodynamic quantities in comput...
Definition: grandcan_thermalizer.cc:23
smash::GrandCanThermalizer::t_start_
const double t_start_
Starting time of the simulation.
Definition: grandcan_thermalizer.h:528
smash::ThermLatticeNode::Tmu0_
FourVector Tmu0_
Four-momentum flow of the cell.
Definition: grandcan_thermalizer.h:118
smash::GrandCanThermalizer::list_eos_particles
ParticleTypePtrList list_eos_particles() const
Extracts the particles in the hadron gas equation of state from the complete list of particle types i...
Definition: grandcan_thermalizer.h:455
smash::ThermLatticeNode::v
ThreeVector v() const
Get 3-velocity of the rest frame.
Definition: grandcan_thermalizer.h:106
smash::GrandCanThermalizer::particles_to_remove
ParticleList particles_to_remove() const
List of particles to be removed from the simulation.
Definition: grandcan_thermalizer.h:446
smash::operator<<
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Definition: action.h:518
smash::GrandCanThermalizer::N_sorts_
const size_t N_sorts_
Number of different species to be sampled.
Definition: grandcan_thermalizer.h:508
smash::HadronClass::NegativeQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q < 0.
smash::ParticleType::mass
double mass() const
Definition: particletype.h:144
smash::Angles::distribute_isotropically
void distribute_isotropically()
Populate the object with a new direction.
Definition: angles.h:188
smash::GrandCanThermalizer::algorithm_
const ThermalizationAlgorithm algorithm_
Algorithm to choose for sampling of particles obeying conservation laws.
Definition: grandcan_thermalizer.h:532
smash::ThreeVector::sqr
double sqr() const
Definition: threevector.h:259
smash::ThermLatticeNode::T_
double T_
Temperature.
Definition: grandcan_thermalizer.h:132
smash::GrandCanThermalizer::period_
const double period_
Defines periodicity of the lattice in fm.
Definition: grandcan_thermalizer.h:530
smash::HadronGasEos::partial_density
static double partial_density(const ParticleType &ptype, double T, double mub, double mus, double muq, bool account_for_resonance_widths=false)
Compute partial density of one hadron sort.
Definition: hadgas_eos.cc:270
smash::GrandCanThermalizer::thermalize
void thermalize(const Particles &particles, double time, int ntest)
Main thermalize function, that chooses the algorithm to follow (BF or mode sampling).
Definition: grandcan_thermalizer.cc:505
smash::GrandCanThermalizer::thermalize_BF_algo
void thermalize_BF_algo(QuantumNumbers &conserved_initial, double time, int ntest)
Samples particles according to the BF algorithm by making use of the.
Definition: grandcan_thermalizer.cc:298
smash::GrandCanThermalizer::print_statistics
void print_statistics(const Clock &clock) const
Generates standard output with information about the thermodynamic properties of the lattice,...
Definition: grandcan_thermalizer.cc:573
smash::ParticleData::set_4momentum
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
Definition: particledata.h:158
clock.h
smash::ThermLatticeNode
The ThermLatticeNode class is intended to compute thermodynamical quantities in a cell given a set of...
Definition: grandcan_thermalizer.h:48
angles.h
smash::Configuration
Interface to the SMASH configuration files.
Definition: configuration.h:464
smash::ThermLatticeNode::set_rest_frame_quantities
void set_rest_frame_quantities(double T0, double mub0, double mus0, double muq0, const ThreeVector v0)
Set all the rest frame quantities to some values, this is useful for testing.
Definition: grandcan_thermalizer.cc:83
smash::GrandCanThermalizer::GrandCanThermalizer
GrandCanThermalizer(Configuration &conf, const std::array< double, 3 > lat_sizes, const std::array< double, 3 > origin, bool periodicity)
Definition: grandcan_thermalizer.h:251
smash::ThermLatticeNode::compute_rest_frame_quantities
void compute_rest_frame_quantities(HadronGasEos &eos)
Temperature, chemical potentials and rest frame velocity are calculated given the hadron gas equation...
Definition: grandcan_thermalizer.cc:43
smash::ThermLatticeNode::e
double e() const
Get energy density in the rest frame.
Definition: grandcan_thermalizer.h:102
forwarddeclarations.h
smash::ParticleTypePtr
Definition: particletype.h:665
ThermalizationAlgorithm
ThermalizationAlgorithm
Defines the algorithm used for the forced thermalization.
Definition: forwarddeclarations.h:251
smash::GrandCanThermalizer::lat_cell_volume_
double lat_cell_volume_
Volume of a single lattice cell, necessary to convert thermal densities to actual particle numbers.
Definition: grandcan_thermalizer.h:524
smash::ThreeVector
Definition: threevector.h:31
smash::ThermLatticeNode::T
double T() const
Get the temperature.
Definition: grandcan_thermalizer.h:108
smash::ThermLatticeNode::p_
double p_
Pressure in the rest frame.
Definition: grandcan_thermalizer.h:128
lattice.h
smash::ParticleData::set_formation_time
void set_formation_time(const double &form_time)
Set the absolute formation time.
Definition: particledata.h:245
smash::ParticleData::boost_momentum
void boost_momentum(const ThreeVector &v)
Apply a Lorentz-boost to only the momentum.
Definition: particledata.h:326
smash::ThermLatticeNode::nq_
double nq_
Net charge density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:124
smash::RectangularLattice
A container class to hold all the arrays on the lattice and access them.
Definition: lattice.h:47
smash::GrandCanThermalizer::BF_enforce_microcanonical_
const bool BF_enforce_microcanonical_
Enforce energy conservation as part of BF sampling algorithm or not.
Definition: grandcan_thermalizer.h:534
smash::GrandCanThermalizer::N_total_in_cells_
double N_total_in_cells_
Total number of particles over all cells in thermalization region.
Definition: grandcan_thermalizer.h:519
smash::ParticleType
Definition: particletype.h:97
smash::HadronClass::ZeroQZeroSMeson
Neutral non-strange mesons.
smash::GrandCanThermalizer::get_class
HadronClass get_class(size_t typelist_index) const
Defines the class of hadrons by quantum numbers.
Definition: grandcan_thermalizer.h:468
smash::GrandCanThermalizer::uniform_in_cell
ThreeVector uniform_in_cell() const
Definition: grandcan_thermalizer.cc:151
distributions.h
smash::HadronClass::PositiveSMeson
Mesons with strangeness S > 0.
smash::HadronClass::PositiveQZeroSMeson
Non-strange mesons (S = 0) with electric cherge Q > 0.
smash::GrandCanThermalizer::update_thermalizer_lattice
void update_thermalizer_lattice(const Particles &particles, const DensityParameters &par, bool ignore_cells_under_threshold=true)
Compute all the thermodynamical quantities on the lattice from particles.
Definition: grandcan_thermalizer.cc:130
smash::ThermLatticeNode::v_
ThreeVector v_
Velocity of the rest frame.
Definition: grandcan_thermalizer.h:130
smash::GrandCanThermalizer::renormalize_momenta
void renormalize_momenta(ParticleList &plist, const FourVector required_total_momentum)
Changes energy and momenta of the particles in plist to match the required_total_momentum.
Definition: grandcan_thermalizer.cc:160
density.h
smash::Clock
Clock tracks the time in the simulation.
Definition: clock.h:71
smash::GrandCanThermalizer::sample_in_random_cell_mode_algo
ParticleData sample_in_random_cell_mode_algo(const double time, F &&condition)
Samples one particle and the species, cell, momentum and coordinate are chosen from the corresponding...
Definition: grandcan_thermalizer.h:370
smash::GrandCanThermalizer::compute_N_in_cells_mode_algo
void compute_N_in_cells_mode_algo(F &&condition)
Computes average number of particles in each cell for the mode algorithm.
Definition: grandcan_thermalizer.h:339
smash::ThermLatticeNode::ns_
double ns_
Net strangeness density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:122
smash::GrandCanThermalizer::sample_in_random_cell_BF_algo
void sample_in_random_cell_BF_algo(ParticleList &plist, const double time, size_t type_index)
The total number of particles of species type_index is defined by mult_int_ array that is returned by...
Definition: grandcan_thermalizer.cc:252
smash::ThermLatticeNode::mus
double mus() const
Get the net strangeness chemical potential.
Definition: grandcan_thermalizer.h:112
smash::GrandCanThermalizer::N_in_cells_
std::vector< double > N_in_cells_
Number of particles to be sampled in one cell.
Definition: grandcan_thermalizer.h:487
smash::GrandCanThermalizer::sampled_list_
ParticleList sampled_list_
Newly generated particles by thermalizer.
Definition: grandcan_thermalizer.h:497
smash::GrandCanThermalizer::cells_to_sample_
std::vector< size_t > cells_to_sample_
Cells above critical energy density.
Definition: grandcan_thermalizer.h:489
ThermalizationAlgorithm::BiasedBF
smash::GrandCanThermalizer::mult_classes_
std::array< double, 7 > mult_classes_
The different hadron species according to the enum defined in.
Definition: grandcan_thermalizer.h:517
smash::HadronClass
HadronClass
Specifier to classify the different hadron species according to their quantum numbers.
Definition: grandcan_thermalizer.h:153
smash::Particles
Definition: particles.h:33
smash::HadronGasEos::is_eos_particle
static bool is_eos_particle(const ParticleType &ptype)
Check if a particle belongs to the EoS.
Definition: hadgas_eos.h:355
smash::ThermLatticeNode::nb_
double nb_
Net baryon density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:120
smash::GrandCanThermalizer::eos_
HadronGasEos eos_
Hadron gas equation of state.
Definition: grandcan_thermalizer.h:491
smash::GrandCanThermalizer::mult_sort_
std::vector< double > mult_sort_
Real number multiplicity for each particle type.
Definition: grandcan_thermalizer.h:510
smash::GrandCanThermalizer::mult_int_
std::vector< int > mult_int_
Integer multiplicity for each particle type.
Definition: grandcan_thermalizer.h:512
smash::ThermLatticeNode::mub
double mub() const
Get the net baryon chemical potential.
Definition: grandcan_thermalizer.h:110
smash::GrandCanThermalizer::e_crit
double e_crit() const
Get the critical energy density.
Definition: grandcan_thermalizer.h:444
configuration.h
smash::ThermLatticeNode::nb
double nb() const
Get net baryon density of the cell in the computational frame.
Definition: grandcan_thermalizer.h:96
smash::ThermLatticeNode::Tmu0
FourVector Tmu0() const
Get Four-momentum flow of the cell.
Definition: grandcan_thermalizer.h:94
smash::Configuration::take
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.
Definition: configuration.cc:140
smash::ParticleData::set_4position
void set_4position(const FourVector &pos)
Set the particle's 4-position directly.
Definition: particledata.h:203
smash::GrandCanThermalizer::eos_typelist_
const ParticleTypePtrList eos_typelist_
List of particle types from which equation of state is computed.
Definition: grandcan_thermalizer.h:506
smash::ThermLatticeNode::mus_
double mus_
Net strangeness chemical potential.
Definition: grandcan_thermalizer.h:136
smash::GrandCanThermalizer::mult_class
double mult_class(const HadronClass cl) const
Definition: grandcan_thermalizer.h:483
smash::GrandCanThermalizer::thermalize_mode_algo
void thermalize_mode_algo(QuantumNumbers &conserved_initial, double time)
Samples particles to the according to the mode algorithm.
Definition: grandcan_thermalizer.cc:404
smash::ThermLatticeNode::add_particle
void add_particle(const ParticleData &p, double factor)
Add particle contribution to Tmu0, nb, ns and nq May look like unused at first glance,...
Definition: grandcan_thermalizer.cc:36
smash::FourVector
Definition: fourvector.h:33
S
#define S(x, n)
Definition: sha256.cc:54
smash::GrandCanThermalizer::lattice
RectangularLattice< ThermLatticeNode > & lattice() const
Getter function for the lattice.
Definition: grandcan_thermalizer.h:442
smash::Angles
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
Definition: angles.h:59
smash::random::uniform
T uniform(T min, T max)
Definition: random.h:88
hadgas_eos.h
smash::pdg::n
constexpr int n
Neutron.
Definition: pdgcode_constants.h:30
smash::GrandCanThermalizer::particles_to_insert
ParticleList particles_to_insert() const
List of newly created particles to be inserted in the simulation.
Definition: grandcan_thermalizer.h:448
smash::GrandCanThermalizer
The GrandCanThermalizer class implements the following functionality:
Definition: grandcan_thermalizer.h:227
smash::DensityType::Baryon
smash::ThermLatticeNode::muq_
double muq_
Net charge chemical potential.
Definition: grandcan_thermalizer.h:138
smash::sample_momenta_from_thermal
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way,...
Definition: distributions.cc:199
smash::GrandCanThermalizer::to_remove_
ParticleList to_remove_
Particles to be removed after this thermalization step.
Definition: grandcan_thermalizer.h:495
smash::QuantumNumbers
Definition: quantumnumbers.h:53
smash::GrandCanThermalizer::e_crit_
const double e_crit_
Critical energy density above which cells are thermalized.
Definition: grandcan_thermalizer.h:526
smash::GrandCanThermalizer::lat_
std::unique_ptr< RectangularLattice< ThermLatticeNode > > lat_
The lattice on which the thermodynamic quantities are calculated.
Definition: grandcan_thermalizer.h:493
smash::ThermLatticeNode::muq
double muq() const
Get the net charge chemical potential.
Definition: grandcan_thermalizer.h:114
smash::ParticleType::list_all
static const ParticleTypeList & list_all()
Definition: particletype.cc:51
smash::HadronClass::Antibaryon
All anti-baryons.
smash::ThermLatticeNode::e_
double e_
Energy density in the rest frame.
Definition: grandcan_thermalizer.h:126
smash::GrandCanThermalizer::is_time_to_thermalize
bool is_time_to_thermalize(std::unique_ptr< Clock > &clock) const
Check that the clock is close to n * period of thermalization, since the thermalization only happens ...
Definition: grandcan_thermalizer.h:265