diff --git a/globals.h b/globals.h index 53ac58a93..a56064632 100644 --- a/globals.h +++ b/globals.h @@ -81,11 +81,10 @@ struct PhotoionTarget { }; struct EnergyLevel { - double epsilon{-1}; // Excitation energy of this level relative to the neutral ground level. - int nuptrans{0}; - int alltrans_startup{}; // Allowed upward transitions from this level + double epsilon{-1}; // Excitation energy of this level relative to the neutral ground level. + int alltrans_startdown{}; // Allowed downward transitions from this level int ndowntrans{0}; - int alltrans_startdown{}; // Allowed downward transitions from this level + int nuptrans{0}; 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 2d580bd76..02ac0f322 100644 --- a/input.cc +++ b/input.cc @@ -491,8 +491,6 @@ void add_transitions_to_unsorted_linelist(const int element, const int ion, cons for (int level = 0; level < nlevelsmax; level++) { globals::elements[element].ions[ion].levels[level].alltrans_startdown = alltransindex; alltransindex += get_ndowntrans(element, ion, level); - - globals::elements[element].ions[ion].levels[level].alltrans_startup = alltransindex; alltransindex += get_nuptrans(element, ion, level); set_ndowntrans(element, ion, level, 0); @@ -559,13 +557,13 @@ void add_transitions_to_unsorted_linelist(const int element, const int ion, cons .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}; + temp_alltranslist[globals::elements[element].ions[ion].levels[lowerlevel].alltrans_startdown + + nupperdowntrans + 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) {