Class IsotopeData

Inheritance Relationships

Base Type

Class Documentation

class IsotopeData : public elem::ElemData

Isotopic data: mass number, radioactive decay lifetime, and decay daughters.

Inherits atomic symbol and atomic number from ElemData. A lifetime_ of 0 indicates a stable isotope.

Public Functions

inline IsotopeData(std::array<char, 2> symbol, unsigned int z, unsigned int a, double lifetime = 0.0, std::vector<IsotopeDecayData> daughters = {})

Construct an IsotopeData record.

Parameters:
  • symbol – Two-character atomic symbol; single-char symbols use ‘\0’ as the second character (e.g. {‘H’, ‘\0’})

  • z – Atomic number

  • a – Mass number

  • lifetime – Radioactive decay lifetime, in yr (matching every other time quantity in this codebase, e.g. Cluster::formTime_/curTime_, Tracks2D::starLifetime()); 0 indicates a stable isotope

  • daughters – List of decay channels (daughter nuclide and branching ratio). May be empty even for an unstable isotope (lifetime > 0): some isotopes are known to decay, but their decay channel isn’t tabulated.

Throws:

std::runtime_error – if lifetime is negative

IsotopeData(const IsotopeData&) = default
auto operator=(const IsotopeData&) -> IsotopeData& = default
IsotopeData(IsotopeData&&) = default
auto operator=(IsotopeData&&) -> IsotopeData& = default
~IsotopeData() = default
inline auto A() const noexcept -> unsigned int

Return the mass number.

inline auto label() const -> std::string

Return this isotope formatted as “<symbol><A>”.

Returns:

ElemData::symbol() (its trailing ‘\0’ stripped, for a single-letter symbol) immediately followed by A(), e.g. “Fe56”, “H1”, “Na22” – the inverse of the parsing io::SimControls::readYields() does for its own yields.isotopes keyword (see its own comment)

inline auto lifetime() const noexcept -> double

Return the radioactive decay lifetime, in yr; 0 indicates a stable isotope.

inline auto daughters() const noexcept -> const std::vector<IsotopeDecayData>&

Return the list of decay channels (daughter nuclide and branching ratio)

inline auto stable() const noexcept -> bool

Return true if this isotope is stable (lifetime_ == 0)

inline auto operator==(const IsotopeData &o) const noexcept -> bool

Equality: true iff both Z and A match.

inline auto operator!=(const IsotopeData &o) const noexcept -> bool

Inequality: true iff Z or A differ.

inline auto operator<(const IsotopeData &o) const noexcept -> bool

Ordering: compares Z first, then A as a tiebreaker.

inline auto operator>(const IsotopeData &o) const noexcept -> bool

Ordering: compares Z first, then A as a tiebreaker.

inline auto operator<=(const IsotopeData &o) const noexcept -> bool

Ordering: compares Z first, then A as a tiebreaker.

inline auto operator>=(const IsotopeData &o) const noexcept -> bool

Ordering: compares Z first, then A as a tiebreaker.

Protected Attributes

unsigned int A_
double lifetime_

Radioactive decay lifetime, in yr; 0 indicates a stable isotope

std::vector<IsotopeDecayData> daughters_

Decay channels: daughter nuclide and branching ratio