Partition function implementation for nuclear ground states.
More...
#include <partition_ground.h>
|
static constexpr int | make_key (const int z, const int a) |
|
|
quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
|
std::unordered_map< int, double > | m_ground_state_spin |
|
Partition function implementation for nuclear ground states.
Computes the partition function as (2J + 1) based on the ground state spin J of each isotope. The temperature derivative is always zero. Ground state spins are loaded from the fourdst::atomic::species registry at construction.
- See also
- partition_ground.cpp for implementation details.
◆ GroundStatePartitionFunction()
gridfire::partition::GroundStatePartitionFunction::GroundStatePartitionFunction |
( |
| ) |
|
@brief Construct and populate the ground state spin map.
- * Loads spins for all isotopes from the atomic species registry into m_ground_state_spin.
- Precondition
- atomic::species registry is initialized and non-empty.
- Postcondition
- m_ground_state_spin contains entries for each isotope.
◆ clone()
std::unique_ptr< PartitionFunction > gridfire::partition::GroundStatePartitionFunction::clone |
( |
| ) |
const |
|
inlineoverridevirtual |
@brief Create a deep copy of this partition function.
@return Unique_ptr to a new GroundStatePartitionFunction cloned from this object.
@post Caller owns the returned instance.
Implements gridfire::partition::PartitionFunction.
◆ evaluate()
double gridfire::partition::GroundStatePartitionFunction::evaluate |
( |
const int | z, |
|
|
const int | a, |
|
|
const double | T9 ) const |
|
overridevirtual |
@brief Evaluate the ground state partition function.
- *
- Parameters
-
z | Proton number (atomic number) of the isotope; must be >= 1. |
a | Mass number of the isotope; must be >= z. |
T9 | Temperature in units of 10^9 K; unused for ground state. |
- Precondition
- supports(z,a) returns true.
- Postcondition
- No side effects.
- Returns
- Dimensionless partition function value = 2*spin + 1.
- Exceptions
-
std::out_of_range | If the isotope key is not found in m_ground_state_spin. |
Implements gridfire::partition::PartitionFunction.
◆ evaluateDerivative()
double gridfire::partition::GroundStatePartitionFunction::evaluateDerivative |
( |
const int | z, |
|
|
const int | a, |
|
|
const double | T9 ) const |
|
overridevirtual |
@brief Evaluate the temperature derivative of the ground state partition function.
- * Always returns zero as ground state has no temperature dependence.
- Parameters
-
z | Proton number of the isotope; must be supported. |
a | Mass number of the isotope; must be supported. |
T9 | Temperature in units of 10^9 K; unused. |
- Precondition
- supports(z,a) returns true.
- Postcondition
- No side effects.
- Returns
- Zero.
- Exceptions
-
std::out_of_range | If the isotope key is not found. |
Implements gridfire::partition::PartitionFunction.
◆ make_key()
int gridfire::partition::GroundStatePartitionFunction::make_key |
( |
const int | z, |
|
|
const int | a ) |
|
staticconstexprprivate |
@brief Generate a unique lookup key for an isotope.
- * Combines atomic number z and mass number a into a single integer.
- Parameters
-
z | Proton number of the isotope. |
a | Mass number of the isotope; should be < 1000 to avoid collisions. |
- Precondition
- a < 1000.
- Returns
- Integer key = z * 1000 + a.
◆ supports()
bool gridfire::partition::GroundStatePartitionFunction::supports |
( |
const int | z, |
|
|
const int | a ) const |
|
overridevirtual |
@brief Check if ground state data exists for the given isotope.
- *
- Parameters
-
z | Proton number of the isotope. |
a | Mass number of the isotope. |
- Returns
- True if m_ground_state_spin contains the key; false otherwise.
- Postcondition
- No side effects.
Implements gridfire::partition::PartitionFunction.
◆ type()
std::string gridfire::partition::GroundStatePartitionFunction::type |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ m_ground_state_spin
std::unordered_map<int, double> gridfire::partition::GroundStatePartitionFunction::m_ground_state_spin |
|
private |
◆ m_logger
quill::Logger* gridfire::partition::GroundStatePartitionFunction::m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
|
private |
The documentation for this class was generated from the following files: