feat(GridFire): brought gridfire up to where network module in SERiF was before splitting it off

This commit is contained in:
2025-06-21 13:18:38 -04:00
parent a6bab8f037
commit 8bc48b8d19
37 changed files with 18155 additions and 39796 deletions

View File

@@ -9,7 +9,7 @@
#include "cppad/cppad.hpp"
namespace serif::network::reaclib {
namespace gridfire::reaclib {
/**
* @struct RateFitSet
* @brief Holds the seven fitting parameters for a single REACLIB rate set.
@@ -33,8 +33,8 @@ namespace serif::network::reaclib {
private:
std::string m_id; ///< Unique identifier for the reaction, generated by the Python script.
int m_chapter; ///< Chapter number from the REACLIB database, defining the reaction structure.
std::vector<serif::atomic::Species> m_reactantNames; ///< Names of the reactant species involved in the reaction.
std::vector<serif::atomic::Species> m_productNames; ///< Names of the product species produced by the reaction.
std::vector<fourdst::atomic::Species> m_reactantNames; ///< Names of the reactant species involved in the reaction.
std::vector<fourdst::atomic::Species> m_productNames; ///< Names of the product species produced by the reaction.
double m_qValue; ///< Q-value of the reaction in MeV, representing the energy released or absorbed.
std::string m_sourceLabel; ///< Source label for the rate data, indicating the origin of the rate coefficients (e.g., "wc12w", "st08").
RateFitSet m_rateSets; ///< Fitting coefficients for the reaction rate, containing the seven parameters used in the rate calculation.
@@ -57,8 +57,8 @@ namespace serif::network::reaclib {
REACLIBReaction(
std::string id,
int chapter,
std::vector<serif::atomic::Species> reactants,
std::vector<serif::atomic::Species> products,
std::vector<fourdst::atomic::Species> reactants,
std::vector<fourdst::atomic::Species> products,
double qValue,
std::string label,
RateFitSet sets,
@@ -89,9 +89,9 @@ namespace serif::network::reaclib {
[[nodiscard]] int chapter() const { return m_chapter; }
[[nodiscard]] const std::vector<serif::atomic::Species>& reactants() const { return m_reactantNames; }
[[nodiscard]] const std::vector<fourdst::atomic::Species>& reactants() const { return m_reactantNames; }
[[nodiscard]] const std::vector<serif::atomic::Species>& products() const { return m_productNames; }
[[nodiscard]] const std::vector<fourdst::atomic::Species>& products() const { return m_productNames; }
[[nodiscard]] double qValue() const { return m_qValue; }
@@ -183,7 +183,7 @@ namespace serif::network::reaclib {
return m_reactions.end();
}
bool containsSpecies(const serif::atomic::Species &species) const {
bool containsSpecies(const fourdst::atomic::Species &species) const {
for (const auto& reaction : m_reactions) {
if (std::ranges::find(reaction.reactants(), species) != reaction.reactants().end() ||
std::ranges::find(reaction.products(), species) != reaction.products().end()) {
@@ -238,8 +238,8 @@ namespace serif::network::reaclib {
namespace std {
template<>
struct hash<serif::network::reaclib::REACLIBReaction> {
size_t operator()(const serif::network::reaclib::REACLIBReaction& r) const noexcept {
struct hash<gridfire::reaclib::REACLIBReaction> {
size_t operator()(const gridfire::reaclib::REACLIBReaction& r) const noexcept {
return std::hash<std::string>()(r.id());
}
};

File diff suppressed because it is too large Load Diff