specfem::utilities::Band

template<typename T>
struct Band

A closed frequency/period band [min, max] parameterised by unit type.

The converting constructor accepts values in any unit that has a registered specfem::units::unit_cast specialisation, so you can write e.g.

Band<Omega>{some_seconds_value, another_seconds_value}
and the conversion to angular frequency is applied automatically.

Template Parameters:

T – Unit type of the stored bounds (e.g. specfem::units::Omega).

Public Functions

inline constexpr Band(T lo, T hi) noexcept

Same-unit construction (identity).

template<typename U>  requires (!std::is_same_v< T, U >) const expr Band(U lo

Converting constructor: accepts two bounds in a different unit U and converts to T. Bounds are swapped when the conversion is monotone-decreasing (e.g. period→omega) so the result satisfies min ≤ max.

specfem::utilities::unit_cast for Band

template<typename To, typename From>
constexpr Band<To> specfem::utilities::unit_cast(Band<From> b)

Convert a Band<From> to a Band<To> via specfem::units::unit_cast. Bounds are reordered to satisfy min ≤ max (handles decreasing conversions such as period→omega).