GridFire 0.6.0
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::partition::RauscherThielemannPartitionFunction Class Referencefinal

Partition function using Rauscher-Thielemann tabulated normalized G-values. More...

#include <partition_rauscher_thielemann.h>

Inheritance diagram for gridfire::partition::RauscherThielemannPartitionFunction:
gridfire::partition::PartitionFunction

Classes

struct  IdentifiedIsotope
 
struct  InterpolationPoints
 
struct  IsotopeData
 

Public Member Functions

 RauscherThielemannPartitionFunction ()
 Construct and populate partition data.
 
double evaluate (int z, int a, double T9) const override
 Evaluate partition function for isotope at temperature.
 
double evaluateDerivative (int z, int a, double T9) const override
 Evaluate temperature derivative of partition function.
 
bool supports (int z, int a) const override
 Check if partition data exists for given isotope.
 
std::string type () const override
 Get type identifier for this partition function.
 
std::unique_ptr< PartitionFunctionclone () const override
 Clone this partition function instance.
 
- Public Member Functions inherited from gridfire::partition::PartitionFunction
virtual ~PartitionFunction ()=default
 Virtual destructor.
 

Private Types

enum  Bounds { FRONT , BACK , MIDDLE }
 Indicator for temperature grid bound position. More...
 

Private Member Functions

IdentifiedIsotope find (int z, int a, double T9) const
 Identify isotope entry and grid indices for given T9.
 

Static Private Member Functions

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.
 
static constexpr int make_key (int z, int a)
 Generate integer key for isotope (z,a).
 

Private Attributes

quill::Logger * m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
 
std::unordered_map< int, IsotopeDatam_partitionData
 Map of isotope key to data.
 

Detailed Description

Partition function using Rauscher-Thielemann tabulated normalized G-values.

Loads isotope partition data from embedded records and computes values by selecting boundary data or interpolating between grid points on a fixed T9 grid. Implementation in partition_rauscher_thielemann.cpp.

Exceptions
std::out_of_rangeIf requested isotope data is missing.

Member Enumeration Documentation

◆ Bounds

Indicator for temperature grid bound position.

Enumerator
FRONT 

Below first grid point.

BACK 

Above last grid point.

MIDDLE 

Between grid points.

Constructor & Destructor Documentation

◆ RauscherThielemannPartitionFunction()

gridfire::partition::RauscherThielemannPartitionFunction::RauscherThielemannPartitionFunction ( )

Construct and populate partition data.

Reads embedded RT partition data records and fills m_partitionData.

Precondition
Embedded data arrays are available and non-empty.
Postcondition
m_partitionData contains entries for all isotopes in data.

Member Function Documentation

◆ clone()

std::unique_ptr< PartitionFunction > gridfire::partition::RauscherThielemannPartitionFunction::clone ( ) const
inlineoverridevirtual

Clone this partition function instance.

Returns
Unique pointer to a copy of this object.
Postcondition
Caller owns the returned object.

Implements gridfire::partition::PartitionFunction.

◆ evaluate()

double gridfire::partition::RauscherThielemannPartitionFunction::evaluate ( int z,
int a,
double T9 ) const
overridevirtual

Evaluate partition function for isotope at temperature.

Retrieves boundary or interpolated normalized G-value and scales by (2J+1).

Parameters
zAtomic number of the isotope (>=1).
aMass number of the isotope (>=z).
T9Temperature in units of 10^9 K.
Returns
Dimensionless partition function.
Precondition
supports(z,a) returns true.
Postcondition
No side effects.
Exceptions
std::out_of_rangeIf isotope key not found in m_partitionData.

Implements gridfire::partition::PartitionFunction.

◆ evaluateDerivative()

double gridfire::partition::RauscherThielemannPartitionFunction::evaluateDerivative ( int z,
int a,
double T9 ) const
overridevirtual

Evaluate temperature derivative of partition function.

Zero at grid extremes; otherwise derivative of linear interpolation.

Parameters
zAtomic number (>=1).
aMass number (>=z).
T9Temperature in 10^9 K.
Returns
d(PartitionFunction)/dT9.
Precondition
supports(z,a) returns true.
Postcondition
No side effects.
Exceptions
std::out_of_rangeIf isotope data is missing.

Implements gridfire::partition::PartitionFunction.

◆ find()

RauscherThielemannPartitionFunction::IdentifiedIsotope gridfire::partition::RauscherThielemannPartitionFunction::find ( int z,
int a,
double T9 ) const
private

Identify isotope entry and grid indices for given T9.

Parameters
zAtomic number of isotope.
aMass number of isotope.
T9Temperature in 10^9 K.
Returns
IdentifiedIsotope with data reference and indices.
Exceptions
std::out_of_rangeIf isotope not found in m_partitionData.

◆ get_interpolation_points()

RauscherThielemannPartitionFunction::InterpolationPoints gridfire::partition::RauscherThielemannPartitionFunction::get_interpolation_points ( const size_t upper_index,
const size_t lower_index,
const std::array< double, 24 > & normalized_g_values )
staticprivate

Get interpolation points from normalized G array.

Parameters
upper_indexIndex of upper grid point.
lower_indexIndex of lower grid point.
normalized_g_valuesArray of normalized G values.
Returns
InterpolationPoints containing bounds and G values.

◆ make_key()

int gridfire::partition::RauscherThielemannPartitionFunction::make_key ( int z,
int a )
staticconstexprprivate

Generate integer key for isotope (z,a).

Parameters
zAtomic number.
aMass number (<1000).
Returns
Key computed as z*1000 + a.

◆ supports()

bool gridfire::partition::RauscherThielemannPartitionFunction::supports ( int z,
int a ) const
overridevirtual

Check if partition data exists for given isotope.

Parameters
zAtomic number.
aMass number.
Returns
true if data available; false otherwise.
Postcondition
No side effects.

Implements gridfire::partition::PartitionFunction.

◆ type()

std::string gridfire::partition::RauscherThielemannPartitionFunction::type ( ) const
inlineoverridevirtual

Get type identifier for this partition function.

Returns
Literal string "RauscherThielemann".
Postcondition
No side effects.

Implements gridfire::partition::PartitionFunction.

Member Data Documentation

◆ m_logger

quill::Logger* gridfire::partition::RauscherThielemannPartitionFunction::m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
private

◆ m_partitionData

std::unordered_map<int, IsotopeData> gridfire::partition::RauscherThielemannPartitionFunction::m_partitionData
private

Map of isotope key to data.


The documentation for this class was generated from the following files: