SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::mapping::ElementDisplacementData Class Reference

A class representing the displacement data for a finite element, including the finite element, degree of freedom matrix, and dimension. More...

#include <data.hpp>

Public Member Functions

 ElementDisplacementData (const mfem::FiniteElement &element, mfem::Vector &displacement_dofs)
 Constructs an ElementDisplacementData object with the given finite element and displacement degrees of freedom.
 
const mfem::FiniteElement & get_element () const noexcept
 Returns the finite element associated with the displacement data.
 
const mfem::DenseMatrix & get_dof_matrix () const noexcept
 Returns the degree of freedom matrix for the displacement data.
 
int get_dimension () const noexcept
 Returns the dimension of the displacement data.
 
int get_dof_count () const noexcept
 Returns the degree of freedom count for the displacement data.
 

Private Attributes

const mfem::FiniteElement * m_element
 Pointer to the finite element associated with the displacement data.
 
mfem::DenseMatrix m_dof_matrix
 Matrix representing the degrees of freedom for the displacement data.
 
int m_dimension
 The dimension of the displacement data (number of components).
 

Detailed Description

A class representing the displacement data for a finite element, including the finite element, degree of freedom matrix, and dimension.

Constructor & Destructor Documentation

◆ ElementDisplacementData()

serif::mapping::ElementDisplacementData::ElementDisplacementData ( const mfem::FiniteElement & element,
mfem::Vector & displacement_dofs )

Constructs an ElementDisplacementData object with the given finite element and displacement degrees of freedom.

Parameters
elementThe finite element associated with the displacement data.
displacement_dofsThe element vector of displacement degrees of freedom, ordered by nodes within each component as MFEM element vdofs are.
Exceptions
std::invalid_argumentif the finite element has zero or negative degrees of freedom, or if the size of the displacement_dofs vector is not a positive multiple of the element's degree of freedom count.

The dof matrix is populated such that for row i and column j, with n total dofs, dof_matrix(i, j) = displacement_dofs(i + j * n).

Member Function Documentation

◆ get_dimension()

int serif::mapping::ElementDisplacementData::get_dimension ( ) const
nodiscardnoexcept

Returns the dimension of the displacement data.

Returns
The dimension of the displacement data.

◆ get_dof_count()

int serif::mapping::ElementDisplacementData::get_dof_count ( ) const
nodiscardnoexcept

Returns the degree of freedom count for the displacement data.

Returns
The degree of freedom count for the displacement data.

◆ get_dof_matrix()

const mfem::DenseMatrix & serif::mapping::ElementDisplacementData::get_dof_matrix ( ) const
nodiscardnoexcept

Returns the degree of freedom matrix for the displacement data.

Returns
A constant reference to the degree of freedom matrix.

◆ get_element()

const mfem::FiniteElement & serif::mapping::ElementDisplacementData::get_element ( ) const
nodiscardnoexcept

Returns the finite element associated with the displacement data.

Returns
A constant reference to the finite element.

Member Data Documentation

◆ m_dimension

int serif::mapping::ElementDisplacementData::m_dimension
private

The dimension of the displacement data (number of components).

◆ m_dof_matrix

mfem::DenseMatrix serif::mapping::ElementDisplacementData::m_dof_matrix
private

Matrix representing the degrees of freedom for the displacement data.

◆ m_element

const mfem::FiniteElement* serif::mapping::ElementDisplacementData::m_element
private

Pointer to the finite element associated with the displacement data.


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