2 #include "IO/InputBlock.hpp"
3 #include "NuclearData.hpp"
12 enum class ChargeDistro { Fermi, spherical, point, Gaussian, custom, Error };
30 std::string m_custom_pot_file_name;
32 std::vector<double> m_params;
35 Nucleus(
int in_z = 1,
int in_a = 0,
const std::string &str_type =
"Fermi",
36 double in_rrms = -1.0,
double in_t = -1.0,
double in_beta = 0.0,
37 const std::vector<double> &in_params = {},
38 const std::string &custom_pot_file_name =
"");
40 Nucleus(
const std::string &z_str,
int in_a,
41 const std::string &str_type =
"Fermi",
double in_rrms = -1.0,
42 double in_t = Nuclear::default_t,
double in_beta = 0.0,
43 const std::vector<double> &in_params = {},
44 const std::string &custom_pot_file_name =
"");
49 int &z() {
return m_iso.
Z; };
50 int z()
const {
return m_iso.
Z; };
51 int &a() {
return m_iso.
A; };
52 int a()
const {
return m_iso.
A; };
54 const std::vector<double> ¶ms()
const {
return m_params; };
55 std::vector<double> ¶ms() {
return m_params; };
57 void set_rrms(
double rrms) { m_iso.
r_rms = rrms; }
58 double r_rms()
const {
return m_iso.
r_rms ? *m_iso.
r_rms : 0.0; };
60 double &t() {
return m_t; };
61 double t()
const {
return m_t; };
63 double &beta() {
return m_beta; };
64 double beta()
const {
return m_beta; };
66 std::string &custom_pot_file() {
return m_custom_pot_file_name; };
67 std::string custom_pot_file()
const {
return m_custom_pot_file_name; };
71 friend std::ostream &operator<<(std::ostream &ostr,
const Nucleus &n);
75 Nucleus form_nucleus(
int Z, std::optional<int> A = std::nullopt,
81 [[nodiscard]] std::vector<double>
83 const std::vector<double> &rgrid);
86 [[nodiscard]] std::vector<double>
88 const std::vector<double> &rgrid);
92 [[nodiscard]] std::vector<double>
94 const std::vector<double> &rgrid);
97 [[nodiscard]] std::vector<double>
101 [[nodiscard]] std::vector<double>
formPotential(
const Nucleus &nucleus,
102 const std::vector<double> &r);
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
Stores set of nuclear parameters (all radii in fm)
Definition: NuclearPotentials.hpp:20
Data and useful functions for nuclear properties and potentials. Radii all in Fermi (fm,...
Definition: nuclear_data_table.hpp:21
double c_hdr_formula_rrms_t(double rrms, double t)
Calculates c from rrms and t.
Definition: NuclearData.cpp:73
std::vector< double > sphericalNuclearPotential(double Z, double rnuc, const std::vector< double > &rgrid)
Nuclear potentials: spherical charge distribution.
Definition: NuclearPotentials.cpp:232
std::vector< double > formPotential(const Nucleus &nuc, const std::vector< double > &r)
Calls one of the above, depending on params. Fills V(r), given r.
Definition: NuclearPotentials.cpp:358
std::vector< double > fermiNuclearDensity_tcN(double t, double c, double Z_norm, const Grid &grid)
Fermi charge distribution, rho(r) - normalised to Z_norm.
Definition: NuclearPotentials.cpp:322
std::vector< double > fermiNuclearPotential(double z, double t, double c, const std::vector< double > &rgrid)
Nuclear potentials: Fermi charge distribution [c is half-density radius, not rms].
Definition: NuclearPotentials.cpp:273
std::vector< double > GaussianNuclearPotential(double Z, double r_rms, const std::vector< double > &rgrid)
Nuclear potentials: Gaussian charge distribution.
Definition: NuclearPotentials.cpp:255
ChargeDistro
Nuclear charge distribution options.
Definition: NuclearPotentials.hpp:12
Isotope data: Z, A, r_rms/fm, I, pi, mu, Q.
Definition: NuclearData.hpp:18
std::optional< double > r_rms
root-mean-square charge radius, in Fermi (fm, e-15m)
Definition: NuclearData.hpp:24
int A
Atomic mass number (A = Z + N)
Definition: NuclearData.hpp:22
int Z
Atomic charge.
Definition: NuclearData.hpp:20