GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
gridfire::partition::GroundStatePartitionFunction Class Referencefinal

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

`#include <partition_ground.h>`

Inheritance diagram for gridfire::partition::GroundStatePartitionFunction:

## 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 (const int z, const 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.

Definition at line 22 of file partition_ground.h.

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

Definition at line 12 of file partition_ground.cpp.

## Member Function Documentation

## ◆ clone()

std::unique_ptr< PartitionFunction > gridfire::partition::GroundStatePartitionFunction::clone | ( |  | ) | const
| inline override virtual

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

Definition at line 88 of file partition_ground.h.

## ◆ evaluate()

double gridfire::partition::GroundStatePartitionFunction::evaluate | ( | const int | z,
|  | const int | a,
|  | const double | T9 ) const
| override virtual

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

Definition at line 18 of file partition_ground.cpp.

## ◆ evaluateDerivative()

double gridfire::partition::GroundStatePartitionFunction::evaluateDerivative | ( | const int | z,
|  | const int | a,
|  | const double | T9 ) const
| override virtual

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

Definition at line 29 of file partition_ground.cpp.

## ◆ make_key()

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

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

Definition at line 44 of file partition_ground.cpp.

## ◆ supports()

bool gridfire::partition::GroundStatePartitionFunction::supports | ( | const int | z,
|  | const int | a ) const
| override virtual

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

Definition at line 38 of file partition_ground.cpp.

## ◆ type()

std::string gridfire::partition::GroundStatePartitionFunction::type | ( |  | ) | const
| inline override virtual

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

Implements gridfire::partition::PartitionFunction.

Definition at line 82 of file partition_ground.h.

## Member Data Documentation

## ◆ m_ground_state_spin

std::unordered_map<int, double> gridfire::partition::GroundStatePartitionFunction::m_ground_state_spin
| private

Definition at line 93 of file partition_ground.h.

## ◆ m_logger

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

Definition at line 92 of file partition_ground.h.

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

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