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.

MaterialComposition(const MaterialComposition&) = default
MaterialComposition(MaterialComposition&&) = default
inline MaterialComposition(std::vector<ElementFraction> elements)

Constructor from element fractions.

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

~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=(const MaterialComposition&) = default
MaterialComposition &operator=(MaterialComposition&&) = default
inline std::size_t size() const

Return the number of elements.