Program Listing for File DecayChain.hpp

↰ Return to documentation for file (src/elem/DecayChain.hpp)

#ifndef DECAYCHAIN_HPP
#define DECAYCHAIN_HPP

#include "ElemCommons.hpp"
#include <Eigen/Dense> // NOLINT(misc-include-cleaner) -- provides Eigen::MatrixXd/VectorXd, used throughout; clang-tidy's IWYU mapping doesn't know this header
#include <cstddef>
#include <span>
#include <vector>

namespace elem
{
    class DecayChain
    {
    public:

        explicit DecayChain(const IsotopeList& isotopes, const IsotopeList& skippedIsotopes = {});

        DecayChain(const DecayChain&) = default;
        auto operator=(const DecayChain&) -> DecayChain& = default;
        DecayChain(DecayChain&&) = default;
        auto operator=(DecayChain&&) -> DecayChain& = default;
        ~DecayChain() = default;

        void applyDecay(double dtDecay, std::span<double> values) const;

        [[nodiscard]] auto propagator(double dtDecay) const -> Eigen::MatrixXd; // NOLINT(misc-include-cleaner) -- Eigen::MatrixXd is provided by <Eigen/Dense> (already included above); clang-tidy's IWYU mapping just doesn't know that

        void applyDecay(const Eigen::MatrixXd& propagator, std::span<double> values) const;

    private:
        std::vector<std::size_t> relevantIndices_;
        std::vector<double> massNumbers_;
        Eigen::MatrixXd depletionMatrix_;
    };

} // namespace elem

#endif // DECAYCHAIN_HPP