star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.fr/star-line.git
Log | Files | Refs | README | LICENSE

commit 2f731318232214f5db6517480df548a4188a7117
parent 9c458f08535c2f7093fb5d2772fe7f377a7e0e0e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 10 Mar 2026 11:17:31 +0100

Remove the SLN_MAX_ISOTOPES_COUNT constant

Use the Star-Hitran library constant instead, which now defines this
value. In fact, this should already have been the case, as only the
loading library can define the constraint set it imposes on the data it
loads.

Diffstat:
Msrc/sln.h | 4+---
Msrc/sln_tree.c | 2+-
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/sln.h b/src/sln.h @@ -43,8 +43,6 @@ #define SLN(Func) sln_ ## Func #endif -#define SLN_MAX_ISOTOPES_COUNT 10 - /* Forward declaration of external data structures */ struct logger; struct mem_allocator; @@ -79,7 +77,7 @@ struct sln_isotope { }; struct sln_molecule { - struct sln_isotope isotopes[SLN_MAX_ISOTOPES_COUNT]; + struct sln_isotope isotopes[SHTR_MAX_ISOTOPE_COUNT]; double concentration; double cutoff; /* [cm^-1] */ int non_default_isotope_abundances; diff --git a/src/sln_tree.c b/src/sln_tree.c @@ -82,7 +82,7 @@ check_molecule_isotope_abundances /* The isotopic abundances are not the default ones. * Verify that they are valid ... */ - FOR_EACH(i, 0, SLN_MAX_ISOTOPES_COUNT) { + FOR_EACH(i, 0, SHTR_MAX_ISOTOPE_COUNT) { if(molecule->isotopes[i].abundance < 0) { const int isotope_id = i + 1; /* isotope id in [1, 10] */ ERROR(sln, "%s: invalid abundance of isotopie %d of %s: %g.\n",