Class Acts::MaterialComposition

class MaterialComposition

Material composed from multiple elements with varying factions.

See also

ElementFraction for details.

Public Functions

MaterialComposition() = default

Construct an empty composition corresponding to vacuum.

inline MaterialComposition(std::vector<ElementFraction> elements)

Constructor from element fractions.

Rescales the fractions so they all add up to unity within the accuracy.

MaterialComposition(MaterialComposition&&) = default
MaterialComposition(const MaterialComposition&) = default
~MaterialComposition() = default
inline auto begin() const
inline auto end() const
inline operator bool() const

Check if the composed material is valid, i.e. it is not vacuum.

MaterialComposition &operator=(MaterialComposition&&) = default
MaterialComposition &operator=(const MaterialComposition&) = default
inline size_t size() const

Return the number of elements.