SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations > Struct Template Reference

A DomainSchema is a collection of relations that describe the relationships between domains and boundaries in a mesh. It is used to validate that a mesh has the expected set of domains and boundaries, and that those domains and boundaries have the expected topological relations. This is important for ensuring that the mesh is suitable for the intended simulation or analysis. There is one primary schema we define for SERiF, that is three domains (core, envelope, and vacuum) and two boundaries (stellar surface and infinity surface). See schemas.hpp for more information on this schema. More...

#include <domain_schema.hpp>

Public Types

using domain_ids_type = DomainIDs
 The list of domain IDs that are expected in the mesh.
 
using boundary_ids_type = BoundaryIDs
 The list of boundary IDs that are expected in the mesh.
 
using relations_type = Relations
 The list of relations that describe the relationships between the domains and boundaries.
 

Static Public Member Functions

static constexpr auto domain_descriptors () noexcept
 Get the descriptors for the domain IDs in this schema.
 
static constexpr auto boundary_descriptors () noexcept
 Get the descriptors for the boundary IDs in this schema.
 
static constexpr auto relation_descriptors () noexcept
 Get the descriptors for the relations in this schema.
 
template<IsDomainOrSet DomainT>
static consteval bool contains_domain () noexcept
 Check if the schema contains the specified domain.
 
template<IsDomainOrSet DomainT>
static constexpr bool domain_id_belongs_to (const int domainID) noexcept
 Check if the specified domain ID belongs to the given domain type.
 
template<IsDomain DomainT>
static consteval int domain_id () noexcept
 Get the ID for the specified domain type.
 
template<IsBoundary BoundaryT>
static consteval bool contains_boundary () noexcept
 Check if the schema contains the specified boundary.
 
template<IsBoundary BoundaryT>
static consteval int boundary_id () noexcept
 Get the ID for the specified boundary type.
 
template<IsBoundary BoundaryT>
static constexpr bool boundary_id_matches (const int boundaryID) noexcept
 Check if the specified boundary ID belongs to the given boundary type.
 

Static Public Attributes

static constexpr std::size_t domain_id_count = DomainIDs::count
 The number of domain IDs that are expected in the mesh.
 
static constexpr std::size_t boundary_id_count = BoundaryIDs::count
 The number of boundary IDs that are expected in the mesh.
 
static constexpr std::size_t relation_count = Relations::count
 The number of relations that describe the relationships between the domains and boundaries.
 

Detailed Description

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
requires HaveValidRelationEntities<DomainIDs, BoundaryIDs, Relations>
struct serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >

A DomainSchema is a collection of relations that describe the relationships between domains and boundaries in a mesh. It is used to validate that a mesh has the expected set of domains and boundaries, and that those domains and boundaries have the expected topological relations. This is important for ensuring that the mesh is suitable for the intended simulation or analysis. There is one primary schema we define for SERiF, that is three domains (core, envelope, and vacuum) and two boundaries (stellar surface and infinity surface). See schemas.hpp for more information on this schema.

Template Parameters
DomainIDsThe list of domain IDs that are expected in the mesh.
BoundaryIDsThe list of boundary IDs that are expected in the mesh.
RelationsThe list of relations that describe the relationships between the domains and boundaries.

Member Typedef Documentation

◆ boundary_ids_type

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
using serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::boundary_ids_type = BoundaryIDs

The list of boundary IDs that are expected in the mesh.

◆ domain_ids_type

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
using serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::domain_ids_type = DomainIDs

The list of domain IDs that are expected in the mesh.

◆ relations_type

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
using serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::relations_type = Relations

The list of relations that describe the relationships between the domains and boundaries.

Member Function Documentation

◆ boundary_descriptors()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
static constexpr auto serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::boundary_descriptors ( )
inlinestaticnodiscardconstexprnoexcept

Get the descriptors for the boundary IDs in this schema.

Returns
A constexpr array of BoundaryIDDescriptor objects describing the boundary IDs in this schema.

◆ boundary_id()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsBoundary BoundaryT>
static consteval int serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::boundary_id ( )
inlinestaticnodiscardconstevalnoexcept

Get the ID for the specified boundary type.

Template Parameters
BoundaryTThe boundary type to get the ID for.
Returns
The ID for the specified boundary type.

◆ boundary_id_matches()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsBoundary BoundaryT>
static constexpr bool serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::boundary_id_matches ( const int boundaryID)
inlinestaticnodiscardconstexprnoexcept

Check if the specified boundary ID belongs to the given boundary type.

Template Parameters
BoundaryTThe boundary type to check.
Parameters
boundaryIDThe boundary ID to check.
Returns
True if the boundary ID belongs to the specified boundary type, false otherwise.

◆ contains_boundary()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsBoundary BoundaryT>
static consteval bool serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::contains_boundary ( )
inlinestaticnodiscardconstevalnoexcept

Check if the schema contains the specified boundary.

Template Parameters
BoundaryTThe boundary type to check.
Returns
True if the boundary is registered in this schema, false otherwise.

◆ contains_domain()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsDomainOrSet DomainT>
static consteval bool serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::contains_domain ( )
inlinestaticnodiscardconstevalnoexcept

Check if the schema contains the specified domain.

Template Parameters
DomainTThe domain type to check.
Returns
True if the domain is registered in this schema, false otherwise.

◆ domain_descriptors()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
static constexpr auto serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::domain_descriptors ( )
inlinestaticnodiscardconstexprnoexcept

Get the descriptors for the domain IDs in this schema.

Returns
A constexpr array of DomainIDDescriptor objects describing the domain IDs in this schema.

◆ domain_id()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsDomain DomainT>
static consteval int serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::domain_id ( )
inlinestaticnodiscardconstevalnoexcept

Get the ID for the specified domain type.

Template Parameters
DomainTThe domain type to get the ID for.
Returns
The ID for the specified domain type.

◆ domain_id_belongs_to()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
template<IsDomainOrSet DomainT>
static constexpr bool serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::domain_id_belongs_to ( const int domainID)
inlinestaticnodiscardconstexprnoexcept

Check if the specified domain ID belongs to the given domain type.

Template Parameters
DomainTThe domain type to check.
Parameters
domainIDThe domain ID to check.
Returns
True if the domain ID belongs to the specified domain type, false otherwise.

◆ relation_descriptors()

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
static constexpr auto serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::relation_descriptors ( )
inlinestaticnodiscardconstexprnoexcept

Get the descriptors for the relations in this schema.

Returns
A constexpr array of RelationDescriptor objects describing the relations in this schema.

Member Data Documentation

◆ boundary_id_count

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
std::size_t serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::boundary_id_count = BoundaryIDs::count
staticconstexpr

The number of boundary IDs that are expected in the mesh.

◆ domain_id_count

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
std::size_t serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::domain_id_count = DomainIDs::count
staticconstexpr

The number of domain IDs that are expected in the mesh.

◆ relation_count

template<IsDomainIDList DomainIDs, IsBoundaryIDList BoundaryIDs, IsRelationList Relations>
std::size_t serif::discretization::domain::schema::DomainSchema< DomainIDs, BoundaryIDs, Relations >::relation_count = Relations::count
staticconstexpr

The number of relations that describe the relationships between the domains and boundaries.


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