diff --git a/src/include/gridfire/engine/procedures/construction.h b/src/include/gridfire/engine/procedures/construction.h index 3f267122..e14c98f5 100644 --- a/src/include/gridfire/engine/procedures/construction.h +++ b/src/include/gridfire/engine/procedures/construction.h @@ -105,7 +105,7 @@ namespace gridfire { */ reaction::ReactionSet build_nuclear_network( const fourdst::composition::Composition &composition, - const std::optional &weakInterpolator, + const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers = NetworkBuildDepth::Full, NetworkConstructionFlags ReactionTypes = NetworkConstructionFlags::DEFAULT ); diff --git a/src/lib/engine/procedures/construction.cpp b/src/lib/engine/procedures/construction.cpp index a46cf969..8584e344 100644 --- a/src/lib/engine/procedures/construction.cpp +++ b/src/lib/engine/procedures/construction.cpp @@ -40,16 +40,15 @@ namespace { gridfire::reaction::ReactionSet register_weak_reactions( - const std::optional &weakInterpolator, + const gridfire::rates::weak::WeakRateInterpolator &weakInterpolator, const gridfire::NetworkConstructionFlags reactionTypes ) { gridfire::reaction::ReactionSet weak_reaction_pool; - assert(weakInterpolator.has_value()); if (!has_flag(reactionTypes, gridfire::NetworkConstructionFlags::WEAK)) { return weak_reaction_pool; } - for (const auto& parent_species: weakInterpolator->available_isotopes()) { + for (const auto& parent_species: weakInterpolator.available_isotopes()) { std::expected upProduct = fourdst::atomic::az_to_species( parent_species.a(), parent_species.z() + 1 @@ -64,7 +63,7 @@ namespace { std::make_unique( parent_species, gridfire::rates::weak::WeakReactionType::BETA_PLUS_DECAY, - *weakInterpolator + weakInterpolator ) ); } @@ -73,7 +72,7 @@ namespace { std::make_unique( parent_species, gridfire::rates::weak::WeakReactionType::ELECTRON_CAPTURE, - *weakInterpolator + weakInterpolator ) ); } @@ -84,7 +83,7 @@ namespace { std::make_unique( parent_species, gridfire::rates::weak::WeakReactionType::BETA_MINUS_DECAY, - *weakInterpolator + weakInterpolator ) ); } @@ -93,7 +92,7 @@ namespace { std::make_unique( parent_species, gridfire::rates::weak::WeakReactionType::POSITRON_CAPTURE, - *weakInterpolator + weakInterpolator ) ); } @@ -127,7 +126,7 @@ namespace gridfire { ReactionSet build_nuclear_network( const Composition& composition, - const std::optional &weakInterpolator, + const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers, NetworkConstructionFlags ReactionTypes ) { diff --git a/src/lib/engine/views/engine_priming.cpp b/src/lib/engine/views/engine_priming.cpp index c47b5fd7..ac908487 100644 --- a/src/lib/engine/views/engine_priming.cpp +++ b/src/lib/engine/views/engine_priming.cpp @@ -55,9 +55,10 @@ namespace gridfire { } } if (primeReactions.empty()) { - LOG_ERROR(m_logger, "No priming reactions found for species '{}'.", primingSpecies.name()); - m_logger->flush_log(); - throw std::runtime_error("No priming reactions found for species '" + std::string(primingSpecies.name()) + "'."); + LOG_INFO(m_logger, "No priming reactions found for species '{}', returning empty peName set.", primingSpecies.name()); + return std::vector{}; + // m_logger->flush_log(); + // throw std::runtime_error("No priming reactions found for species '" + std::string(primingSpecies.name()) + "'."); } std::vector primingReactionSet(primeReactions.begin(), primeReactions.end()); // LOG_INFO(m_logger, "Constructed priming reaction set with {} reactions for species '{}'.", primingReactionSet.size(), primingSpecies.name());