From 6821e728841b16cbfe0c283e69b3ada7257531b3 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Sun, 8 Sep 2024 23:08:26 +0100 Subject: [PATCH] Renames --- atomic.h | 4 ++-- globals.h | 14 +++++++------- input.cc | 32 ++++++++++++++++---------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/atomic.h b/atomic.h index 25979c3ad..e6cda880a 100644 --- a/atomic.h +++ b/atomic.h @@ -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 @@ -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) { diff --git a/globals.h b/globals.h index 9a20ff73e..53ac58a93 100644 --- a/globals.h +++ b/globals.h @@ -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; @@ -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: diff --git a/input.cc b/input.cc index 1dce260ad..2d580bd76 100644 --- a/input.cc +++ b/input.cc @@ -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); @@ -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) {