AMDiS 2.11-git
The Adaptive Multi-Dimensional Simulation Toolbox
 
Loading...
Searching...
No Matches
SymmetricDirichletBC< Basis, Path, ValueGridFct > Class Template Reference

Implements a symmetric Dirichlet boundary condition. More...

#include <SymmetricDirichletBC.hpp>

Inherits DirichletBC< Basis, Path, Path, ValueGridFct >.

Public Member Functions

template<class B >
 SymmetricDirichletBC (B &&basis, Path const &path, BoundarySubset< Intersection > boundarySubset, ValueGridFct values)
 
template<class Mat , class Sol , class Rhs >
void apply (Mat &matrix, Sol &solution, Rhs &rhs)
 
- Public Member Functions inherited from DirichletBC< Basis, Path, Path, ValueGridFct >
 DirichletBC (B &&basis, Path const &row, Path const &col, BoundarySubset< Intersection > boundarySubset, ValueGridFct values)
 Make a DirichletBC from a basis with treepath arguments.
 
 DirichletBC (B &&basis, BoundarySubset< Intersection > boundarySubset, ValueGridFct values)
 Make a DirichletBC from a global basis.
 
void init ()
 
void apply (Mat &matrix, Sol &solution, Rhs &rhs, bool symmetric=false)
 Apply dirichlet BC to matrix and vector.
 

Detailed Description

template<class Basis, class Path, class ValueGridFct>
class AMDiS::SymmetricDirichletBC< Basis, Path, ValueGridFct >

Implements a symmetric Dirichlet boundary condition.

This class enforces Dirichlet boundary values by eliminating both rows and columns of the constrained degrees of freedom using MatZeroRowsColumns. This preserves symmetry and positive definiteness of the system matrix when row and column DOF sets coincide.

Motivation: The standard DirichletBC implementation eliminates only matrix rows. While this correctly enforces Dirichlet values, it breaks matrix symmetry, which can significantly degrade convergence of symmetric Krylov solvers such as Conjugate Gradient.

SymmetricDirichletBC restores symmetry by eliminating both rows and columns of constrained DOFs. This typically results in faster and more robust CG convergence for symmetric operators (e.g. Laplace or elasticity).

Usage constraints:

  • Only applicable when row and column tree paths refer to the same DOFs.
Template Parameters
BasisGlobalBasis of the solution space
PathTreePath identifying the constrained subspace
ValueGridFctGridFunction providing Dirichlet values

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