Loading...
Searching...
No Matches
gridfire::partition::GroundStatePartitionFunction Class Referencefinal

Partition function implementation for nuclear ground states. More...

`#include <partition_ground.h>`

Inheritance diagram for gridfire::partition::GroundStatePartitionFunction:
[legend]
Collaboration diagram for gridfire::partition::GroundStatePartitionFunction:
[legend]

## Public Member Functions

| GroundStatePartitionFunction ()
double | evaluate (const int z, const int a, const double T9) const override
double | evaluateDerivative (const int z, const int a, const double T9) const override
bool | supports (const int z, const int a) const override
std::string | type () const override
std::unique_ptr< PartitionFunction > | clone () const override
Public Member Functions inherited from gridfire::partition::PartitionFunction
virtual | ~PartitionFunction ()=default
| Virtual destructor.

## Static Private Member Functions

static constexpr int | make_key (int z, int a)

## Private Attributes

quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
std::unordered_map< int, double > | m_ground_state_spin

## Detailed Description

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.

## Constructor & Destructor Documentation

## 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.

## Member Function Documentation

## 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()

constexpr int gridfire::partition::GroundStatePartitionFunction::make_key | ( | int | z,
|  | int | a
| ) |  |

staticconstexprprivate

           @brief Generate a unique lookup key for an isotope.

- * Combines atomic number z and mass number an 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

           @brief Get the type identifier of this partition function.
           @return The string literal "GroundState".
           @post No side effects.

Implements gridfire::partition::PartitionFunction.

## Member Data Documentation

## 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:

- src/include/gridfire/partition/partition_ground.h
- src/lib/partition/partition_ground.cpp