SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::discretization::domain::DomainOrSet Class Referencefinal

A DomainOrSet is a type that can represent either a single domain or a set of domains. More...

#include <concepts.hpp>

Collaboration diagram for serif::discretization::domain::DomainOrSet:
[legend]

Public Member Functions

template<IsDomain DomainT>
constexpr DomainOrSet (DomainT) noexcept
 Construct a DomainOrSet from a single domain type.
 
template<IsDomain... DomainTs>
constexpr DomainOrSet (DomainSet< DomainTs... >) noexcept
 Construct a DomainOrSet from a DomainSet type.
 
constexpr std::span< const std::string_view > domains () const noexcept
 Get the names of the domains in this DomainOrSet.
 

Private Attributes

std::span< const std::string_view > m_domains
 The names of the domains in this DomainOrSet.
 

Detailed Description

A DomainOrSet is a type that can represent either a single domain or a set of domains.

Note
Do not make the constructors of this class explicit. We want to be able to pass a single domain or a domain set to functions that take a DomainOrSet.

Constructor & Destructor Documentation

◆ DomainOrSet() [1/2]

template<IsDomain DomainT>
serif::discretization::domain::DomainOrSet::DomainOrSet ( DomainT )
inlineconstexprnoexcept

Construct a DomainOrSet from a single domain type.

Template Parameters
DomainTThe domain type to construct from.

◆ DomainOrSet() [2/2]

template<IsDomain... DomainTs>
serif::discretization::domain::DomainOrSet::DomainOrSet ( DomainSet< DomainTs... > )
inlineconstexprnoexcept

Construct a DomainOrSet from a DomainSet type.

Template Parameters
DomainTsThe domain types that make up the set.

Member Function Documentation

◆ domains()

std::span< const std::string_view > serif::discretization::domain::DomainOrSet::domains ( ) const
inlinenodiscardconstexprnoexcept

Get the names of the domains in this DomainOrSet.

Returns
A span of string_views containing the names of the domains.

Member Data Documentation

◆ m_domains

std::span<const std::string_view> serif::discretization::domain::DomainOrSet::m_domains
private

The names of the domains in this DomainOrSet.


The documentation for this class was generated from the following file: