feat(reaclib): working on building efficient reaclib tooling for general nuclear network

this commit primarily adds a more robust ability to cull reactions that are not needed from the generated header
This commit is contained in:
2025-06-18 12:13:24 -04:00
parent bcc460e7a8
commit 774bdca083
5 changed files with 10749 additions and 10719 deletions

View File

@@ -33,11 +33,11 @@
namespace serif::composition {
CompositionEntry::CompositionEntry() : m_symbol("H-1"), m_isotope(chemSpecies::species.at("H-1")),
CompositionEntry::CompositionEntry() : m_symbol("H-1"), m_isotope(serif::atomic::species.at("H-1")),
m_initialized(false) {
}
CompositionEntry::CompositionEntry(const std::string& symbol, const bool massFracMode) : m_symbol(symbol), m_isotope(chemSpecies::species.at(symbol)), m_massFracMode(massFracMode) {
CompositionEntry::CompositionEntry(const std::string& symbol, const bool massFracMode) : m_symbol(symbol), m_isotope(serif::atomic::species.at(symbol)), m_massFracMode(massFracMode) {
setSpecies(symbol);
}
@@ -54,11 +54,11 @@ namespace serif::composition {
if (m_initialized) {
throw std::runtime_error("Composition entry is already initialized.");
}
if (chemSpecies::species.count(symbol) == 0) {
if (serif::atomic::species.count(symbol) == 0) {
throw std::runtime_error("Invalid symbol.");
}
m_symbol = symbol;
m_isotope = chemSpecies::species.at(symbol);
m_isotope = serif::atomic::species.at(symbol);
m_initialized = true;
}
@@ -99,7 +99,7 @@ namespace serif::composition {
return m_relAbundance;
}
chemSpecies::Species CompositionEntry::isotope() const {
serif::atomic::Species CompositionEntry::isotope() const {
return m_isotope;
}
@@ -256,7 +256,7 @@ namespace serif::composition {
}
bool Composition::isValidSymbol(const std::string& symbol) {
return chemSpecies::species.contains(symbol);
return serif::atomic::species.contains(symbol);
}
double Composition::setMassFraction(const std::string& symbol, const double& mass_fraction) {

View File

@@ -63,7 +63,7 @@ namespace serif::composition {
*/
struct CompositionEntry {
std::string m_symbol; ///< The chemical symbol of the species.
chemSpecies::Species m_isotope; ///< The isotope of the species.
serif::atomic::Species m_isotope; ///< The isotope of the species.
bool m_massFracMode = true; ///< The mode of the composition entry. True if mass fraction, false if number fraction.
double m_massFraction = 0.0; ///< The mass fraction of the species.
@@ -142,7 +142,7 @@ namespace serif::composition {
* @brief Gets the isotope of the species.
* @return The isotope of the species.
*/
chemSpecies::Species isotope() const;
serif::atomic::Species isotope() const;
/**
* @brief Gets the mode of the composition entry.