6#include <unordered_map>
52 [[nodiscard]]
virtual bool contains(
const std::string& symbol)
const = 0;
54 [[nodiscard]]
virtual size_t size() const noexcept = 0;
85 [[nodiscard]] virtual
double getMassFraction(const std::
string& symbol) const = 0;
Abstract base class for chemical composition representations.
virtual std::vector< double > getMolarAbundanceVector() const noexcept=0
Get the molar abundance as a vector.
virtual size_t getSpeciesIndex(const std::string &symbol) const =0
Get the index of a species by symbol.
virtual size_t size() const noexcept=0
virtual std::unordered_map< fourdst::atomic::Species, double > getNumberFraction() const noexcept=0
Get the number fraction for all registered symbols.
virtual std::set< std::string > getRegisteredSymbols() const noexcept=0
Get all registered chemical symbols in the composition.
virtual double getMolarAbundance(const std::string &symbol) const =0
Get the molar abundance for a given symbol.
virtual std::vector< double > getMassFractionVector() const noexcept=0
Get the mass fraction as a vector.
virtual double getMeanParticleMass() const noexcept=0
Get the mean particle mass of the composition.
virtual double getElectronAbundance() const noexcept=0
Get the electron abundance of the composition.
virtual std::vector< double > getNumberFractionVector() const noexcept=0
Get the number fraction as a vector.
virtual ~CompositionAbstract()=default
Virtual destructor.
virtual fourdst::atomic::Species getSpeciesAtIndex(size_t index) const =0
Get the species at a given index.
virtual const std::set< fourdst::atomic::Species > & getRegisteredSpecies() const noexcept=0
Get all registered atomic species in the composition.
virtual bool contains(const std::string &symbol) const =0
Check if the composition contains the given species.
virtual bool contains(const fourdst::atomic::Species &species) const noexcept=0
Check if the composition contains the given species.
virtual std::unordered_map< fourdst::atomic::Species, double > getMassFraction() const noexcept=0
Get the mass fraction for all registered symbols.
Represents an atomic species (isotope) with its fundamental physical properties.