19       use_skyrme_(conf.has_value({
"Skyrme"})),
    20       use_symmetry_(conf.has_value({
"Symmetry"})) {
    73     skyrme_a_ = conf.take({
"Skyrme", 
"Skyrme_A"});
    74     skyrme_b_ = conf.take({
"Skyrme", 
"Skyrme_B"});
    75     skyrme_tau_ = conf.take({
"Skyrme", 
"Skyrme_Tau"});
    97     symmetry_S_Pot_ = conf.take({
"Symmetry", 
"S_Pot"});
    98     if (conf.has_value({
"Symmetry", 
"gamma"})) {
    99       symmetry_gamma_ = conf.take({
"Symmetry", 
"gamma"});
   100       symmetry_is_rhoB_dependent_ = 
true;
   111   const int sgn = tmp > 0 ? 1 : -1;
   113   return 1.0e-3 * sgn *
   126                                 const double baryon_density)
 const {
   130     pot += 1.0e-3 * 
symmetry_S(baryon_density) * baryon_isospin_density *
   131            baryon_isospin_density / (baryon_density * baryon_density);
   138   double total_potential = 0.0;
   139   const bool compute_gradient = 
false;
   140   const bool smearing = 
true;
   144     return total_potential;
   149     total_potential += scale.first * 
skyrme_pot(rho_B);
   152     const double rho_iso = std::get<0>(
   154                        compute_gradient, smearing));
   155     const double sym_pot =
   157     total_potential += scale.second * sym_pot;
   159   return total_potential;
   163   double skyrme_scale = data.
is_baryon() ? 1.0 : 0.0;
   166       skyrme_scale = 1. / 3.;
   170       skyrme_scale = 2. / 3.;
   175   return std::make_pair(skyrme_scale, symmetry_scale);
   181   ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
   183     const double dV_drho =
   187     E_component -= dV_drho * (grad_rho + dj_dt);
   188     B_component += dV_drho * rot_j;
   190   return std::make_pair(E_component, B_component);
   197   ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
   199     E_component -= 
dVsym_drhoI3(rhoB, rhoI3) * (grad_rhoI3 + djI3_dt) +
   204   return std::make_pair(E_component, B_component);
   210     double term2 = 2. * rhoI3 * 
symmetry_S(rhoB) / (rhoB * rhoB);
   220     double term1 = 8.2 * std::pow(rhoB_over_rho0, -1. / 3.) / 
nuclear_density +
   224     return mev_to_gev * (term1 + term2) * rhoI3 * rhoI3 / (rhoB * rhoB);
   230 std::tuple<ThreeVector, ThreeVector, ThreeVector, ThreeVector>
   232   const bool compute_gradient = 
true;
   233   const bool smearing = 
true;
   241   const double rhoB = std::get<0>(baryon_density_and_gradient);
   242   const ThreeVector grad_rhoB = std::get<2>(baryon_density_and_gradient);
   243   const ThreeVector djB_dt = std::get<3>(baryon_density_and_gradient);
   244   const ThreeVector rot_jB = std::get<4>(baryon_density_and_gradient);
   246     F_skyrme = 
skyrme_force(rhoB, grad_rhoB, djB_dt, rot_jB);
   250     const auto density_and_gradient =
   252                        compute_gradient, smearing);
   253     const double rhoI3 = std::get<0>(density_and_gradient);
   254     const ThreeVector grad_rhoI3 = std::get<2>(density_and_gradient);
   255     const ThreeVector djI3_dt = std::get<3>(density_and_gradient);
   256     const ThreeVector rot_jI3 = std::get<4>(density_and_gradient);
   257     F_symmetry = 
symmetry_force(rhoI3, grad_rhoI3, djI3_dt, rot_jI3, rhoB,
   258                                 grad_rhoB, djB_dt, rot_jB);
   261   return std::make_tuple(F_skyrme.first, F_skyrme.second, F_symmetry.first,
 
double symmetry_pot(const double baryon_isospin_density, const double baryon_density) const 
Evaluates symmetry potential given baryon isospin density. 
The ThreeVector class represents a physical three-vector  with the components . 
bool symmetry_is_rhoB_dependent_
Wheter the baryon density dependence of the symmetry potential is included. 
double skyrme_pot(const double baryon_density) const 
Evaluates skyrme potential given a baryon density. 
double symmetry_gamma_
Power  in formula for : . 
double skyrme_a_
Parameter of skyrme potentials: the coefficient in front of  in GeV. 
bool use_symmetry_
Symmetry potential on/off. 
virtual ~Potentials()
Standard destructor. 
Collection of useful constants that are known at compile time. 
int baryon_number() const 
Potentials(Configuration conf, const DensityParameters ¶meters)
Potentials constructor. 
virtual std::tuple< ThreeVector, ThreeVector, ThreeVector, ThreeVector > all_forces(const ThreeVector &r, const ParticleList &plist) const 
Evaluates the electrical and magnetic components of the forces at point r. 
std::pair< ThreeVector, ThreeVector > symmetry_force(const double rhoI3, const ThreeVector grad_rhoI3, const ThreeVector djI3_dt, const ThreeVector rot_jI3, const double rhoB, const ThreeVector grad_rhoB, const ThreeVector djB_dt, const ThreeVector rot_jB) const 
Evaluates the electrical and magnetic components of the symmetry force. 
double symmetry_S_Pot_
Parameter S_Pot in the symmetry potential in MeV. 
double dVsym_drhoI3(const double rhoB, const double rhoI3) const 
Calculate the derivative of the symmetry potential with respect to the isospin density in GeV * fm^3 ...
double symmetry_S(const double baryon_density) const 
Calculate the factor  in the symmetry potential. 
Particle type contains the static properties of a particle species. 
constexpr double mev_to_gev
MeV to GeV conversion factor. 
const DensityParameters param_
Struct that contains the gaussian smearing width , the distance cutoff  and the testparticle number n...
bool use_skyrme_
Skyrme potential on/off. 
double dVsym_drhoB(const double rhoB, const double rhoI3) const 
Calculate the derivative of the symmetry potential with respect to the net baryon density in GeV * fm...
double skyrme_b_
Parameters of skyrme potentials: the coefficient in front of  in GeV. 
double potential(const ThreeVector &r, const ParticleList &plist, const ParticleType &acts_on) const 
Evaluates potential at point r. 
std::tuple< double, FourVector, ThreeVector, ThreeVector, ThreeVector > current_eckart(const ThreeVector &r, const ParticleList &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
Calculates Eckart rest frame density and 4-current of a given density type and optionally the gradien...
std::pair< double, int > force_scale(const ParticleType &data) const 
Evaluates the scaling factor of the forces acting on the particles. 
double skyrme_tau_
Parameters of skyrme potentials: the power index. 
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3]. 
std::pair< ThreeVector, ThreeVector > skyrme_force(const double density, const ThreeVector grad_rho, const ThreeVector dj_dt, const ThreeVector rot_j) const 
Evaluates the electrical and magnetic components of the skyrme force. 
double isospin3_rel() const 
int sgn(T val)
Signum function.