Skip to content

Commit

Permalink
Renames
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 8, 2024
1 parent fafbb9b commit 6821e72
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ inline auto get_includedlevels() -> int { return includedlevels; }
}

[[nodiscard]] inline auto get_downtranslist(const int element, const int ion, const int level) -> LevelTransition * {
return globals::alltrans + globals::elements[element].ions[ion].levels[level].downtrans;
return globals::alltrans + globals::elements[element].ions[ion].levels[level].alltrans_startdown;
}

// the number of upward bound-bound transitions from the specified level
Expand All @@ -373,7 +373,7 @@ inline auto get_includedlevels() -> int { return includedlevels; }
}

[[nodiscard]] inline auto get_uptranslist(const int element, const int ion, const int level) -> LevelTransition * {
return globals::alltrans + globals::elements[element].ions[ion].levels[level].uptrans;
return globals::alltrans + globals::elements[element].ions[ion].levels[level].alltrans_startup;
}

[[nodiscard]] inline auto get_uptransspan(const int element, const int ion, const int level) {
Expand Down
14 changes: 7 additions & 7 deletions globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ struct GroundPhotoion {
int ion;
};

struct PhotoionTarget {
double probability; // fraction of phixs cross section leading to this final level
int levelindex; // index of upper ion level after photoionisation
};

struct LevelTransition {
int lineindex;
int targetlevelindex;
Expand All @@ -80,12 +75,17 @@ struct LevelTransition {
bool forbidden;
};

struct PhotoionTarget {
double probability; // fraction of phixs cross section leading to this final level
int levelindex; // index of upper ion level after photoionisation
};

struct EnergyLevel {
double epsilon{-1}; // Excitation energy of this level relative to the neutral ground level.
int nuptrans{0};
int uptrans{}; // Allowed upward transitions from this level
int alltrans_startup{}; // Allowed upward transitions from this level
int ndowntrans{0};
int downtrans{}; // Allowed downward transitions from this level
int alltrans_startdown{}; // Allowed downward transitions from this level
PhotoionTarget *phixstargets{}; // pointer to table of target states and probabilities
int phixsstart{-1}; // index to start of photoionisation cross-sections table in global::allphixs
int nphixstargets{0}; // length of phixstargets array:
Expand Down
32 changes: 16 additions & 16 deletions input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@ void add_transitions_to_unsorted_linelist(const int element, const int ion, cons
int alltransindex = temp_alltranslist.size();
temp_alltranslist.resize(temp_alltranslist.size() + totupdowntrans);
for (int level = 0; level < nlevelsmax; level++) {
globals::elements[element].ions[ion].levels[level].downtrans = alltransindex;
globals::elements[element].ions[ion].levels[level].alltrans_startdown = alltransindex;
alltransindex += get_ndowntrans(element, ion, level);

globals::elements[element].ions[ion].levels[level].uptrans = alltransindex;
globals::elements[element].ions[ion].levels[level].alltrans_startup = alltransindex;
alltransindex += get_nuptrans(element, ion, level);

set_ndowntrans(element, ion, level, 0);
Expand Down Expand Up @@ -552,20 +552,20 @@ void add_transitions_to_unsorted_linelist(const int element, const int ion, cons
// the line list has not been sorted yet, so the store the level index for now and
// the index into the sorted line list will be set later

temp_alltranslist[globals::elements[element].ions[ion].levels[level].downtrans + nupperdowntrans - 1] = {
.lineindex = -1,
.targetlevelindex = lowerlevel,
.einstein_A = transition.A,
.coll_str = transition.coll_str,
.osc_strength = f_ul,
.forbidden = transition.forbidden};
temp_alltranslist[globals::elements[element].ions[ion].levels[lowerlevel].uptrans + nloweruptrans - 1] = {
.lineindex = -1,
.targetlevelindex = level,
.einstein_A = transition.A,
.coll_str = transition.coll_str,
.osc_strength = f_ul,
.forbidden = transition.forbidden};
temp_alltranslist[globals::elements[element].ions[ion].levels[level].alltrans_startdown + nupperdowntrans -
1] = {.lineindex = -1,
.targetlevelindex = lowerlevel,
.einstein_A = transition.A,
.coll_str = transition.coll_str,
.osc_strength = f_ul,
.forbidden = transition.forbidden};
temp_alltranslist[globals::elements[element].ions[ion].levels[lowerlevel].alltrans_startup + nloweruptrans -
1] = {.lineindex = -1,
.targetlevelindex = level,
.einstein_A = transition.A,
.coll_str = transition.coll_str,
.osc_strength = f_ul,
.forbidden = transition.forbidden};
}

} else if (pass == 1 && globals::rank_in_node == 0) {
Expand Down

0 comments on commit 6821e72

Please sign in to comment.