#pragma once #include "gridfire/partition/partition_abstract.h" #include "fourdst/logging/logging.h" #include #include #include #include #include namespace gridfire::partition { class RauscherThielemannPartitionFunction final : public PartitionFunction { public: RauscherThielemannPartitionFunction(); double evaluate(int z, int a, double T9) const override; double evaluateDerivative(int z, int a, double T9) const override; bool supports(int z, int a) const override; std::string type() const override { return "RauscherThielemann"; } private: enum Bounds { FRONT, BACK, MIDDLE }; private: struct IsotopeData { double ground_state_spin; std::array normalized_g_values; }; struct InterpolationPoints { double T9_high; double G_norm_high; double T9_low; double G_norm_low; }; struct IdentifiedIsotope { Bounds bound; const IsotopeData& data; size_t upperIndex; size_t lowerIndex; }; private: quill::Logger* m_logger = fourdst::logging::LogManager::getInstance().getLogger("log"); std::unordered_map m_partitionData; private: static InterpolationPoints get_interpolation_points( const size_t upper_index, const size_t lower_index, const std::array& normalized_g_values ); IdentifiedIsotope find(int z, int a, double T9) const; static constexpr int make_key(int z, int a); }; }