feat(reverse-reactions): major work towrds detailed balance calculations
This commit is contained in:
@@ -17,6 +17,13 @@ namespace gridfire::partition {
|
||||
}
|
||||
}
|
||||
|
||||
CompositePartitionFunction::CompositePartitionFunction(const CompositePartitionFunction &other) {
|
||||
m_partitionFunctions.reserve(other.m_partitionFunctions.size());
|
||||
for (const auto& pf : other.m_partitionFunctions) {
|
||||
m_partitionFunctions.push_back(pf->clone());
|
||||
}
|
||||
}
|
||||
|
||||
double CompositePartitionFunction::evaluate(int z, int a, double T9) const {
|
||||
LOG_TRACE_L1(m_logger, "Evaluating partition function for Z={} A={} T9={}", z, a, T9);
|
||||
for (const auto& partitionFunction : m_partitionFunctions) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
|
||||
namespace gridfire::partition {
|
||||
static constexpr std::array<double, 24> RT_TEMPERATURE_GRID_T9 = {
|
||||
@@ -25,8 +26,17 @@ namespace gridfire::partition {
|
||||
IsotopeData data;
|
||||
data.ground_state_spin = record.ground_state_spin;
|
||||
std::ranges::copy(record.normalized_g_values, data.normalized_g_values.begin());
|
||||
const int key = make_key(record.z, record.a);
|
||||
LOG_TRACE_L3_LIMIT_EVERY_N(
|
||||
100,
|
||||
m_logger,
|
||||
"(EVERY 100) Adding Rauscher-Thielemann partition data for Z={} A={} (key={})",
|
||||
record.z,
|
||||
record.a,
|
||||
key
|
||||
);
|
||||
|
||||
m_partitionData[make_key(record.z, record.a)] = std::move(data);
|
||||
m_partitionData[key] = std::move(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user