76 :
Nucleus(particle_list, nTest) {}
80 if (config.
has_value({
"Deformed",
"Automatic"}) &&
81 config.
take({
"Deformed",
"Automatic"})) {
114 return a_direction.
threevec() * a_radius;
137 throw std::domain_error(
138 "Mass number not listed for automatically setting deformation " 139 "parameters. Please specify at least \"Beta_2\" and \"Beta_4\" " 140 "manually and set \"Automatic: False.\" ");
150 if (config.
has_value({
"Deformed",
"Beta_2"})) {
151 set_beta_2(static_cast<double>(config.
take({
"Deformed",
"Beta_2"})));
153 if (config.
has_value({
"Deformed",
"Beta_4"})) {
154 set_beta_4(static_cast<double>(config.
take({
"Deformed",
"Beta_4"})));
156 if (config.
has_value({
"Deformed",
"Theta"})) {
159 if (config.
has_value({
"Deformed",
"Phi"})) {
165 for (
auto &particle : *
this) {
170 ThreeVector three_pos = particle.position().threevec();
173 particle.set_3position(three_pos);
178 throw std::domain_error(
179 "Fermi momenta currently not implemented" 180 " for a deformed nucleus.");
185 return (1. / 4) * std::sqrt(5 / M_PI) * (3. * (cosx * cosx) - 1);
187 return (3. / 16) * std::sqrt(1 / M_PI) *
188 (35. * (cosx * cosx) * (cosx * cosx) - 30. * (cosx * cosx) + 3);
190 throw std::domain_error(
191 "Not a valid angular momentum quantum number in" 192 "DeformedNucleus::y_l_0.");
The ThreeVector class represents a physical three-vector with the components .
Collection of useful constants that are known at compile time.
A nucleus is a collection of particles that are initialized, before the beginning of the simulation a...
ThreeVector threevec() const
double get_nuclear_radius() const
Interface to the SMASH configuration files.
bool has_value(std::initializer_list< const char *> keys) const
Returns whether there is a non-empty value behind the requested keys.
double get_diffusiveness() const
Value take(std::initializer_list< const char *> keys)
The default interface for SMASH to read configuration values.
double get_saturation_density() const
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
void distribute_isotropically()
Populate the object with a new direction.
void rotate(double phi, double theta, double psi)
Rotate vector by the given Euler angles phi, theta, psi.
size_t number_of_particles() const
Number of physical particles in the nucleus: