GridFire 0.0.1a
General Purpose Nuclear Network
Loading...
Searching...
No Matches
partition_rauscher_thielemann.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "fourdst/logging/logging.h"
6
7#include <string>
8#include <vector>
9#include <unordered_map>
10#include <array>
11#include <utility>
12#include <memory>
13
14namespace gridfire::partition {
15
27 public:
48 double evaluate(int z, int a, double T9) const override;
61 double evaluateDerivative(int z, int a, double T9) const override;
69 bool supports(int z, int a) const override;
75 std::string type() const override { return "RauscherThielemann"; }
81 std::unique_ptr<PartitionFunction> clone() const override {
82 return std::make_unique<RauscherThielemannPartitionFunction>(*this);
83 }
84 private:
94 private:
95 struct IsotopeData {
97 std::array<double, 24> normalized_g_values;
98 };
100 double T9_high;
101 double G_norm_high;
102 double T9_low;
103 double G_norm_low;
104 };
111 private:
112 quill::Logger* m_logger = fourdst::logging::LogManager::getInstance().getLogger("log");
113 std::unordered_map<int, IsotopeData> m_partitionData;
114 private:
123 const size_t upper_index,
124 const size_t lower_index,
125 const std::array<double, 24>& normalized_g_values
126 );
135 IdentifiedIsotope find(int z, int a, double T9) const;
142 static constexpr int make_key(int z, int a);
143 };
144
145}
Abstract interface for evaluating nuclear partition functions.
IdentifiedIsotope find(int z, int a, double T9) const
Identify isotope entry and grid indices for given T9.
std::string type() const override
Get type identifier for this partition function.
static InterpolationPoints get_interpolation_points(const size_t upper_index, const size_t lower_index, const std::array< double, 24 > &normalized_g_values)
Get interpolation points from normalized G array.
std::unordered_map< int, IsotopeData > m_partitionData
Map of isotope key to data.
bool supports(int z, int a) const override
Check if partition data exists for given isotope.
double evaluateDerivative(int z, int a, double T9) const override
Evaluate temperature derivative of partition function.
static constexpr int make_key(int z, int a)
Generate integer key for isotope (z,a).
std::unique_ptr< PartitionFunction > clone() const override
Clone this partition function instance.
RauscherThielemannPartitionFunction()
Construct and populate partition data.
double evaluate(int z, int a, double T9) const override
Evaluate partition function for isotope at temperature.
std::array< double, 24 > normalized_g_values
Normalized G values on RT grid.