svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
svmp::FE::DofIndex Class Reference

DOF-specific index type. More...

#include <Types.h>

Inheritance diagram for svmp::FE::DofIndex:
[legend]

Public Member Functions

constexpr DofIndex () noexcept
 Construct an invalid DOF index (the negative sentinel).
 
constexpr bool is_valid () const noexcept
 Check whether this index refers to a valid DOF.
 
constexpr StrongType () noexcept(std::is_nothrow_default_constructible_v< T >)
 Value-initialize the wrapped value.
 
constexpr StrongType (T value) noexcept(std::is_nothrow_move_constructible_v< T >)
 Wrap an explicit value.
 
- Public Member Functions inherited from svmp::FE::StrongType< GlobalIndex, DofTag >
constexpr StrongType () noexcept(std::is_nothrow_default_constructible_v< GlobalIndex >)
 Value-initialize the wrapped value.
 
constexpr StrongType (GlobalIndex value) noexcept(std::is_nothrow_move_constructible_v< GlobalIndex >)
 Wrap an explicit value.
 
constexpr GlobalIndex & get () noexcept
 Access the wrapped value.
 
constexpr const GlobalIndex & get () const noexcept
 Access the wrapped value.
 
constexpr operator GlobalIndex () const noexcept
 Explicitly convert back to the underlying type.
 
constexpr bool operator== (const StrongType &other) const noexcept
 Compare wrapped values for equality.
 
constexpr bool operator!= (const StrongType &other) const noexcept
 Compare wrapped values for inequality.
 
constexpr bool operator< (const StrongType &other) const noexcept
 Order by wrapped value.
 

Additional Inherited Members

- Public Types inherited from svmp::FE::StrongType< GlobalIndex, DofTag >
using ValueType = GlobalIndex
 Underlying value type.
 

Detailed Description

DOF-specific index type.

A StrongType over GlobalIndex that prevents mixing DOF indices with other indices: conversion back to GlobalIndex is explicit (via get()), so a DofIndex cannot silently decay to a raw integer. Over the base StrongType it adds two DOF-specific conveniences – it default-constructs to the invalid sentinel (-1) and exposes is_valid() – for distributed DOF numbering where a negative value marks an unset or non-local DOF.

Constructor & Destructor Documentation

◆ DofIndex()

constexpr svmp::FE::DofIndex::DofIndex ( )
inlineconstexprnoexcept

Construct an invalid DOF index (the negative sentinel).

Member Function Documentation

◆ is_valid()

constexpr bool svmp::FE::DofIndex::is_valid ( ) const
inlineconstexprnoexcept

Check whether this index refers to a valid DOF.

Returns
True when the stored value is non-negative.

◆ StrongType() [1/2]

constexpr svmp::FE::StrongType< T, Tag >::StrongType ( )
inlineconstexprnoexcept

Value-initialize the wrapped value.

◆ StrongType() [2/2]

constexpr svmp::FE::StrongType< T, Tag >::StrongType ( T  value)
inlineexplicitconstexprnoexcept

Wrap an explicit value.

Parameters
valueValue to store.

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