Version: SMASH-2.0
smash::ModusDefault Class Reference

#include <modusdefault.h>

Base class for Modus classes that provides default function implementations.

This is only a base class for actual Modus classes. Meaning there will never be objects, references, or pointers to ModusDefault. Therefore, it does not have - and will never need any virtual functions.

The rules for adding functions to this class are as follows:

  • This class is empty per default.
  • You can add a function if you have a function that is different in at least one subclass.
  • Code that is common to all goes into ExperimentImplementation.

    Todo:
    JB: many of these functions could/should be virtual (contradicts description given above, Vinzent says (in a nice way): does not make any sense whatsoever anyway)

Definition at line 44 of file modusdefault.h.

Inheritance diagram for smash::ModusDefault:
[legend]

Classes

struct  BadInput
 
struct  InvalidEnergy
 

Public Member Functions

int impose_boundary_conditions (Particles *, const OutputsList &={})
 Enforces sensible positions for the particles. More...
 
int total_N_number () const
 
int proj_N_number () const
 
bool cll_in_nucleus () const
 
bool is_collider () const
 
bool is_box () const
 
bool is_list () const
 
double sqrt_s_NN () const
 
double impact_parameter () const
 
double velocity_projectile () const
 
double velocity_target () const
 
FermiMotion fermi_motion () const
 
double max_timestep (double) const
 
double equilibration_time () const
 
double nuclei_passing_time () const
 Get the passing time of the two nuclei in a collision. More...
 
Grid< GridOptions::Normalcreate_grid (const Particles &particles, double min_cell_length, double timestep_duration, CellSizeStrategy strategy=CellSizeStrategy::Optimal) const
 Creates the Grid with normal boundary conditions. More...
 

Member Function Documentation

◆ impose_boundary_conditions()

int smash::ModusDefault::impose_boundary_conditions ( Particles ,
const OutputsList &  = {} 
)
inline

Enforces sensible positions for the particles.

Currently, this is only needed for BoxModus; the other Modi do nothing.

See also
BoxModus::impose_boundary_conditions

Definition at line 59 of file modusdefault.h.

60  {}) {
61  return 0;
62  }

◆ total_N_number()

int smash::ModusDefault::total_N_number ( ) const
inline
Returns
Number of nucleons in both nuclei; only used in ColliderModus

Definition at line 65 of file modusdefault.h.

65 { return 0; }

◆ proj_N_number()

int smash::ModusDefault::proj_N_number ( ) const
inline
Returns
Number of nucleons in projectile; only used in ColliderModus

Definition at line 67 of file modusdefault.h.

67 { return 0; }

◆ cll_in_nucleus()

bool smash::ModusDefault::cll_in_nucleus ( ) const
inline
Returns
Whether to allow collisions in nuclei; only used in ColliderModus

Definition at line 69 of file modusdefault.h.

69 { return false; }

◆ is_collider()

bool smash::ModusDefault::is_collider ( ) const
inline
Returns
Checks if modus is collider; overwritten in ColliderModus

Definition at line 71 of file modusdefault.h.

71 { return false; }

◆ is_box()

bool smash::ModusDefault::is_box ( ) const
inline
Returns
Checks if modus is a box; overwritten in BoxModus

Definition at line 73 of file modusdefault.h.

73 { return false; }

◆ is_list()

bool smash::ModusDefault::is_list ( ) const
inline
Returns
Checks if modus is list modus; overwritten in ListModus

Definition at line 75 of file modusdefault.h.

75 { return false; }

◆ sqrt_s_NN()

double smash::ModusDefault::sqrt_s_NN ( ) const
inline
Returns
Center of mass energy per nucleon pair in ColliderModus

Definition at line 77 of file modusdefault.h.

77 { return 0.; }

◆ impact_parameter()

double smash::ModusDefault::impact_parameter ( ) const
inline
Returns
The impact parameter; overwritten in ColliderModus

Definition at line 79 of file modusdefault.h.

79 { return 0.0; }

◆ velocity_projectile()

double smash::ModusDefault::velocity_projectile ( ) const
inline
Returns
The beam velocity of the projectile required in the Collider modus. In the other modus, return zero.

Definition at line 82 of file modusdefault.h.

82 { return 0.0; }

◆ velocity_target()

double smash::ModusDefault::velocity_target ( ) const
inline
Returns
The beam velocity of the target required in the Collider modus. In the other modus, return zero.

Definition at line 85 of file modusdefault.h.

85 { return 0.0; }

◆ fermi_motion()

FermiMotion smash::ModusDefault::fermi_motion ( ) const
inline
Returns
The type of Fermi motion required in the Collider modus. In the other modus, just return FermiMotion::Off.

Definition at line 88 of file modusdefault.h.

88 { return FermiMotion::Off; }

◆ max_timestep()

double smash::ModusDefault::max_timestep ( double  ) const
inline
Returns
Maximal timestep accepted by this modus. Negative means infinity.

Definition at line 90 of file modusdefault.h.

90 { return -1.; }

◆ equilibration_time()

double smash::ModusDefault::equilibration_time ( ) const
inline
Returns
equilibration time of the box; overwritten in BoxModus

Definition at line 92 of file modusdefault.h.

92 { return -1.; }

◆ nuclei_passing_time()

double smash::ModusDefault::nuclei_passing_time ( ) const
inline

Get the passing time of the two nuclei in a collision.

This time corresponds to the moment when the nuclei have just passed entirely through each other and all primary collisions have occured. Formula taken from: Eq. (1) in Karpenko:2015xea [25]

Only used in ColliderModus for IC output.

Returns
passing_time

Definition at line 103 of file modusdefault.h.

103 { return 0.0; }

◆ create_grid()

Grid<GridOptions::Normal> smash::ModusDefault::create_grid ( const Particles particles,
double  min_cell_length,
double  timestep_duration,
CellSizeStrategy  strategy = CellSizeStrategy::Optimal 
) const
inline

Creates the Grid with normal boundary conditions.

Parameters
[in]particlesThe Particles object containing all particles of the currently running Experiment.
[in]min_cell_lengthThe minimal length of the grid cells.
[in]timestep_durationDuration of the timestep. It is necessary for formation times treatment: if particle is fully or partially formed before the end of the timestep, it has to be on the grid.
[in]strategyThe strategy to determine the cell size
Returns
the Grid object
See also
Grid::Grid

Definition at line 118 of file modusdefault.h.

121  {
122  return {particles, min_cell_length, timestep_duration, strategy};
123  }

The documentation for this class was generated from the following file:
FermiMotion::Off
Don't use fermi motion.