Skip to content

Commit

Permalink
Requested adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
u0148069 committed Sep 18, 2024
1 parent 49ecbeb commit 635d697
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions lib/atom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ double TransitionMatrix::totalRate() {
* @param Z: Atomic number (nuclear charge, can be fractional)
* @param m: Mass of the orbiting particle (e.g. electron)
* @param A: Atomic mass (amus, ignored if -1)
* @param radius: Solid sphere equivalent radius (fm, ignored if -1)
* @param radius_model: Which NuclearRadiusModel to use
* @param fc: Central point of the grid (corresponding to i = 0), as a
* fraction of 1/(Z*mu), the 1s orbital radius for this atom, or of the nuclear
Expand Down Expand Up @@ -112,7 +113,7 @@ Atom::Atom(int Z, double m, int A, double radius, NuclearRadiusModel radius_mode
// Define radius
if (A == -1) {
R = -1;
} else if (radius < 0) {
} else if (radius == -1) {
switch (radius_model) {
case POINT:
R = -1;
Expand Down Expand Up @@ -141,7 +142,7 @@ Atom::Atom(int Z, double m, int A, double radius, NuclearRadiusModel radius_mode

if (radius_model == FERMI2) {
V_coulomb = new CoulombFermi2Potential(Z, R, A);
} else if (radius_model == SPHERE) {
} else {
V_coulomb = new CoulombSpherePotential(Z, R);
}

Expand Down Expand Up @@ -327,6 +328,7 @@ double Atom::sphereNuclearModel(int Z, int A) {
* @param Z: Atomic number (nuclear charge, can be fractional)
* @param m: Mass of the orbiting particle (e.g. electron)
* @param A: Atomic mass (amus, ignored if -1)
* @param radius: Solid sphere equivalent radius (fm, ignored if -1)
* @param radius_model: Which NuclearRadiusModel to use
* @param fc: Central point of the grid (corresponding to i = 0), as a
* fraction of 1/(Z*mu), the 1s orbital radius for this atom, or of the nuclear
Expand All @@ -337,9 +339,9 @@ double Atom::sphereNuclearModel(int Z, int A) {
* (default = -1)
* @retval
*/
DiracAtom::DiracAtom(int Z, double m, int A, double R, NuclearRadiusModel radius_model,
DiracAtom::DiracAtom(int Z, double m, int A, double radius, NuclearRadiusModel radius_model,
double fc, double dx, int ideal_minshell)
: Atom(Z, m, A, R, radius_model, fc, dx) {
: Atom(Z, m, A, radius, radius_model, fc, dx) {
restE = mu * pow(Physical::c, 2);
LOG(DEBUG) << "Rest energy = " << restE / Physical::eV << " eV\n";
idshell = ideal_minshell;
Expand Down Expand Up @@ -1047,7 +1049,7 @@ TransitionMatrix DiracAtom::getTransitionProbabilities(int n1, int l1, bool s1,
return tmat;
}

DiracIdealAtom::DiracIdealAtom(int Z, double m, int A, double R,
DiracIdealAtom::DiracIdealAtom(int Z, double m, int A, double radius,
NuclearRadiusModel radius_model, double fc,
double dx)
: DiracAtom(Z, m, A, R, radius_model, fc, dx, 1) {}
: DiracAtom(Z, m, A, radius, radius_model, fc, dx, 1) {}
4 changes: 2 additions & 2 deletions lib/atom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class DiracAtom : public Atom {
double in_eps = 1e-5;
int min_n = 1000;

DiracAtom(int Z = 1, double m = 1, int A = -1, double R = -1,
DiracAtom(int Z = 1, double m = 1, int A = -1, double radius = -1,
NuclearRadiusModel radius_model = POINT, double fc = 1.0,
double dx = 0.005, int ideal_minshell = -1);

Expand Down Expand Up @@ -221,7 +221,7 @@ class DiracAtom : public Atom {
// the analytical hydrogen-like solution
class DiracIdealAtom : public DiracAtom {
public:
DiracIdealAtom(int Z = 1, double m = 1, int A = -1, double R = -1,
DiracIdealAtom(int Z = 1, double m = 1, int A = -1, double radius = -1,
NuclearRadiusModel radius_model = POINT, double fc = 1.0,
double dx = 0.005);
};
Expand Down
4 changes: 2 additions & 2 deletions lib/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ MuDiracInputFile::MuDiracInputFile() : InputFile() {
DiracAtom MuDiracInputFile::makeAtom() {
// Now extract the relevant parameters
int Z = getElementZ(this->getStringValue("element"));
double R = this->getDoubleValue("radius");
double radius = this->getDoubleValue("radius");
double t = this->getDoubleValue("tFermi");
double m = this->getDoubleValue("mass");
int A = this->getIntValue("isotope");
Expand All @@ -103,7 +103,7 @@ DiracAtom MuDiracInputFile::makeAtom() {

// Prepare the DiracAtom
DiracAtom da;
da = DiracAtom(Z, m, A, R, nucmodel, fc, dx, idshell);
da = DiracAtom(Z, m, A, radius, nucmodel, fc, dx, idshell);
da.Etol = this->getDoubleValue("energy_tol");
da.Edamp = this->getDoubleValue("energy_damp");
da.max_dE_ratio = this->getDoubleValue("max_dE_ratio");
Expand Down

0 comments on commit 635d697

Please sign in to comment.