|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#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 |
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).
| hpfem::assembly::DirichletElimination::DirichletElimination | ( | SparseMatrix & | matrix, |
| std::vector< Index > | dofs, | ||
| bool | unit_diagonal = true |
||
| ) |
| InvalidArgument | if the matrix is not square or a DoF is out of range. |
\( 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().
| InvalidArgument | for a size mismatch. |
|
inlinenoexcept |