From 01955c388c3af6ca1754922ab3a7806440c644f8 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Fri, 30 Aug 2024 13:56:48 +0100 Subject: [PATCH] Update atomic.h --- atomic.h | 5 ++++- input.cc | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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++; } }