27#include "quill/LogMacros.h"
39 LOG_ERROR(
m_logger,
"nuclearNetwork::Network::Network() called with UNKNOWN format");
40 throw std::runtime_error(
"nuclearNetwork::Network::Network() called with UNKNOWN format");
59 netOut =
network.evaluate(netIn);
64 throw std::runtime_error(
"Network format not implemented.");
67 LOG_ERROR(
m_logger,
"Unknown network format.");
68 throw std::runtime_error(
"Unknown network format.");
75 using namespace serif::network::reaclib;
76 REACLIBReactionSet reactions;
81 initializeAllReaclibReactions();
84 for (
const auto &reaction: s_all_reaclib_reactions | std::views::values) {
85 bool gotReaction =
true;
86 const auto& reactants = reaction.reactants();
87 for (
const auto& reactant : reactants) {
94 LOG_INFO(logger,
"Adding reaction {} to REACLIB reaction set.", reaction.id());
95 reactions.add_reaction(reaction);
103 using namespace serif::network::reaclib;
105 REACLIBReactionSet reactions;
106 for (
const auto& reaction : allReactions) {
107 if (reaction.calculate_rate(T9) >= culling) {
108 reactions.add_reaction(reaction);
Header file for the Approx8 nuclear reaction network.
Manages the composition of elements.
virtual NetOut evaluate(const NetIn &netIn)
Evaluate the network based on the input parameters.
NetworkFormat setFormat(const NetworkFormat format)
serif::probe::LogManager & m_logManager
Log manager instance.
NetworkFormat m_format
Format of the network.
NetworkFormat getFormat() const
Network(const NetworkFormat format=NetworkFormat::APPROX8)
serif::constant::Constants & m_constants
quill::Logger * m_logger
Logger instance.
serif::config::Config & m_config
Configuration instance.
Class for the Approx8 nuclear reaction network.
quill::Logger * getLogger(const std::string &loggerName)
Get a logger by name.
static LogManager & getInstance()
Get the singleton instance of LogManager.
@ APPROX8
Approx8 nuclear reaction network format.
serif::network::reaclib::REACLIBReactionSet build_reaclib_nuclear_network(const serif::composition::Composition &composition)
static std::unordered_map< NetworkFormat, std::string > FormatStringLookup
The Probe namespace contains utility functions for debugging and logging.
Input structure for the network evaluation.
Output structure for the network evaluation.