diff --git a/atomic.h b/atomic.h index 8b1334594..cd537047c 100644 --- a/atomic.h +++ b/atomic.h @@ -269,7 +269,10 @@ inline void update_includedionslevels_maxnions() { } // return the number of ions of all elements combined -inline auto get_includedions() -> int { return includedions; } +inline auto get_includedions() -> int { + assert_testmodeonly(get_includedions() > 0); + return includedions; +} // return the number of ions of all elements combined inline auto get_includedlevels() -> int { return includedlevels; } diff --git a/input.cc b/input.cc index 94833f5d2..fa07a5a52 100644 --- a/input.cc +++ b/input.cc @@ -1445,9 +1445,9 @@ void setup_phixs_list() { } free(globals::elements[element].ions[ion].levels[level].photoion_xs); - globals::elements[element].ions[ion].levels[level].photoion_xs = - allphixsblock + (nbftableschanged * globals::NPHIXSPOINTS); + globals::elements[element].ions[ion].levels[level].photoion_xs = allphixsblock; + allphixsblock += globals::NPHIXSPOINTS; nbftableschanged++; } }