98 :
Nucleus(particle_list, nTest) {}
102 if (config.
has_value({
"Deformed",
"Automatic"}) &&
103 config.
take({
"Deformed",
"Automatic"})) {
136 return a_direction.
threevec() * a_radius;
159 throw std::domain_error(
160 "Mass number not listed for automatically setting deformation " 161 "parameters. Please specify at least \"Beta_2\" and \"Beta_4\" " 162 "manually and set \"Automatic: False.\" ");
172 if (config.
has_value({
"Deformed",
"Beta_2"})) {
173 set_beta_2(static_cast<double>(config.
take({
"Deformed",
"Beta_2"})));
175 if (config.
has_value({
"Deformed",
"Beta_4"})) {
176 set_beta_4(static_cast<double>(config.
take({
"Deformed",
"Beta_4"})));
178 if (config.
has_value({
"Deformed",
"Theta"})) {
181 if (config.
has_value({
"Deformed",
"Phi"})) {
187 for (
auto &particle : *
this) {
192 ThreeVector three_pos = particle.position().threevec();
195 particle.set_3position(three_pos);
200 throw std::domain_error(
201 "Fermi momenta currently not implemented" 202 " for a deformed nucleus.");
207 return (1. / 4) * std::sqrt(5 / M_PI) * (3. * (cosx * cosx) - 1);
209 return (3. / 16) * std::sqrt(1 / M_PI) *
210 (35. * (cosx * cosx) * (cosx * cosx) - 30. * (cosx * cosx) + 3);
212 throw std::domain_error(
213 "Not a valid angular momentum quantum number in" 214 "DeformedNucleus::y_l_0.");
The ThreeVector class represents a physical three-vector with the components .
double get_nuclear_radius() const
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...
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_saturation_density() const
ThreeVector threevec() const
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.
double get_diffusiveness() const
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
size_t number_of_particles() const
Number of physical particles in the nucleus:
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.