hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::assembly::DirichletElimination Class Reference

#include <dirichlet.hpp>

Public Member Functions

 DirichletElimination (SparseMatrix &matrix, std::vector< Index > dofs, bool unit_diagonal=true)
 
void apply (Vector &rhs, const Vector &values) const
 
const std::vector< Index > & dofs () const noexcept
 

Detailed Description

Elimination of a fixed Dirichlet DoF set applied to many right-hand sides: the matrix is modified once as in apply_dirichlet while the eliminated columns \( A_{:,D} \) are kept, so any load can be transformed afterwards (apply). With unit_diagonal false the diagonal of the eliminated rows is left at zero (the mass part of an affine operator \( S - k^2 M \) whose stiffness part carries the unit diagonal).

Constructor & Destructor Documentation

◆ DirichletElimination()

hpfem::assembly::DirichletElimination::DirichletElimination ( SparseMatrix &  matrix,
std::vector< Index >  dofs,
bool  unit_diagonal = true 
)
Exceptions
InvalidArgumentif the matrix is not square or a DoF is out of range.

Member Function Documentation

◆ apply()

void hpfem::assembly::DirichletElimination::apply ( Vector &  rhs,
const Vector &  values 
) const

\( b \leftarrow b - A_{:,D}\,g \) on the free rows, \( b_D = g \) (or 0 without the unit diagonal); values in the order of dofs().

Exceptions
InvalidArgumentfor a size mismatch.

◆ dofs()

const std::vector< Index > & hpfem::assembly::DirichletElimination::dofs ( ) const
inlinenoexcept

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