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

A selection of supported DOFs from a term binding, with boundary attribute information. The purpose here is to allow for the selection of a subset of DOFs from a term binding, such as those associated with a particular boundary, while still retaining the ability to validate the selection against the underlying mesh and term binding. More...

#include <dof_selection.hpp>

Collaboration diagram for serif::discretization::backend::mfem::DofSelection:
[legend]

Public Member Functions

 DofSelection (const DofMap &binding, const ::mfem::Array< int > &reduced_dofs, const bool track_coordinates=false)
 Construct a DOF selection from a term binding and a list of reduced DOFs.
 
const DofMap & binding () const noexcept
 Return the underlying term binding associated with this DOF selection.
 
const ::mfem::Array< int > & reduced_dofs () const noexcept
 Return the list of reduced DOFs in this selection.
 
int size () const noexcept
 Return the number of selected DOFs in this selection.
 
const ::mfem::Array< int > & boundary_attributes () const noexcept
 Return the list of boundary attributes associated with this selection.
 
bool tracks_coordinates () const noexcept
 Report whether this selection becomes stale when the fixed mesh coordinates change. Point constraints require this tracking even when a caller supplies the selected DOFs explicitly.
 
void validate () const
 Validate the DOF selection against the underlying term binding and mesh. This checks that the underlying term binding and mesh have not changed since the DOF selection was constructed. If they have changed, an exception is thrown. This is important to ensure that the DOF selection remains valid and consistent with the underlying data structures.
 

Private Attributes

const DofMap & m_binding
 Reference to the underlying term binding. This must outlive the DOF selection.
 
::mfem::Array< int > m_dofs
 List of reduced DOFs in this selection. These are in the reduced space of the binding provided at construction time.
 
::mfem::Array< int > m_boundary_attributes
 List of boundary attributes associated with this selection. These are in the same order as the boundaries in the underlying mesh.
 
long m_nodes_sequence
 Coordinate revision, or -1 for selections independent of geometry.
 

Detailed Description

A selection of supported DOFs from a term binding, with boundary attribute information. The purpose here is to allow for the selection of a subset of DOFs from a term binding, such as those associated with a particular boundary, while still retaining the ability to validate the selection against the underlying mesh and term binding.

Constructor & Destructor Documentation

◆ DofSelection()

serif::discretization::backend::mfem::DofSelection::DofSelection ( const DofMap & binding,
const ::mfem::Array< int > & reduced_dofs,
const bool track_coordinates = false )
inline

Construct a DOF selection from a term binding and a list of reduced DOFs.

Parameters
bindingA reference to the term binding from which the DOFs are selected. Further, this binding must outlive the DOF selection.
reduced_dofsA list of reduced DOFs to select. This list should be in the reduced space of the term binding. Further, these must be sorted in a strictly increasing order and must be unique. This is enforced at construction time.

Member Function Documentation

◆ binding()

const DofMap & serif::discretization::backend::mfem::DofSelection::binding ( ) const
inlinenodiscardnoexcept

Return the underlying term binding associated with this DOF selection.

Returns
A reference to the underlying term binding.

◆ boundary_attributes()

const ::mfem::Array< int > & serif::discretization::backend::mfem::DofSelection::boundary_attributes ( ) const
inlinenodiscardnoexcept

Return the list of boundary attributes associated with this selection.

Returns
A reference to the list of boundary attributes. These are in the same order as the boundaries in the underlying mesh.

◆ reduced_dofs()

const ::mfem::Array< int > & serif::discretization::backend::mfem::DofSelection::reduced_dofs ( ) const
inlinenodiscardnoexcept

Return the list of reduced DOFs in this selection.

Returns
A reference to the list of reduced DOFs. Note these are in the reduced space of the binding provided at construction time.

◆ size()

int serif::discretization::backend::mfem::DofSelection::size ( ) const
inlinenodiscardnoexcept

Return the number of selected DOFs in this selection.

Returns
The number of selected DOFs.

◆ tracks_coordinates()

bool serif::discretization::backend::mfem::DofSelection::tracks_coordinates ( ) const
inlinenodiscardnoexcept

Report whether this selection becomes stale when the fixed mesh coordinates change. Point constraints require this tracking even when a caller supplies the selected DOFs explicitly.

Returns
True if coordinate updates invalidate the selection.

◆ validate()

void serif::discretization::backend::mfem::DofSelection::validate ( ) const
inline

Validate the DOF selection against the underlying term binding and mesh. This checks that the underlying term binding and mesh have not changed since the DOF selection was constructed. If they have changed, an exception is thrown. This is important to ensure that the DOF selection remains valid and consistent with the underlying data structures.

Member Data Documentation

◆ m_binding

const DofMap& serif::discretization::backend::mfem::DofSelection::m_binding
private

Reference to the underlying term binding. This must outlive the DOF selection.

◆ m_boundary_attributes

::mfem::Array<int> serif::discretization::backend::mfem::DofSelection::m_boundary_attributes
private

List of boundary attributes associated with this selection. These are in the same order as the boundaries in the underlying mesh.

◆ m_dofs

::mfem::Array<int> serif::discretization::backend::mfem::DofSelection::m_dofs
private

List of reduced DOFs in this selection. These are in the reduced space of the binding provided at construction time.

◆ m_nodes_sequence

long serif::discretization::backend::mfem::DofSelection::m_nodes_sequence
private

Coordinate revision, or -1 for selections independent of geometry.


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