AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct > Class Template Reference

Implements a boundary condition of Dirichlet-type. More...

#include <DirichletBC.hpp>

Inherits BoundaryCondition< Mat, Sol, Rhs >.

Public Member Functions

template<class Values , REQUIRES(Concepts::Functor< Values, Range(Domain)>) >
 DirichletBC (RowSubBasis rowBasis, ColSubBasis colBasis, BoundarySubset< Intersection > boundarySubset, Values &&values)
 Constructor accepting subspacebases.
 
void init () override
 
void apply (Mat &matrix, Sol &solution, Rhs &rhs) override
 Apply dirichlet BC to matrix and vector. More...
 
- Public Member Functions inherited from BoundaryCondition< Mat, Sol, Rhs >
 BoundaryCondition ()=default
 Default constructor.
 

Detailed Description

template<class Mat, class Sol, class Rhs, class RowSubBasis, class ColSubBasis, class ValueGridFct>
class AMDiS::DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct >

Implements a boundary condition of Dirichlet-type.

By calling the methods init and finish before and after assembling the system-matrix, respectively, dirichlet boundary conditions can be applied to the matrix and system vector. Therefore, a predicate functions indicates the DOFs where values should be enforced and a second functor provided in the constructor is responsible for determining the values to be set at the DOFs.

In the finish method the matrix is called with apply to erase the corresponding rows and columns for the DOF indices. This application of boundary conditions can be symmetric if the matrix does support this symmetric modification.

Template Parameters
MatMatrix
SolVector of solution
RhsVector of rhs
RowSubBasisSubspaceBasis of the row FE space
ColSubBasisSubspaceBasis of the column FE space
ValueGridFctType of the GridFunction representing the Dirichlet values.

Member Function Documentation

◆ apply()

void apply ( Mat &  matrix,
Sol &  solution,
Rhs &  rhs 
)
overridevirtual

Apply dirichlet BC to matrix and vector.

Add a unit-row to the matrix and optionally delete the corresponding matrix-column. Uses a backend-specific implementation.

Implements BoundaryCondition< Mat, Sol, Rhs >.

References AMDiS::interpolate().

Referenced by DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct >::DirichletBC(), and DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct >::init().

◆ init()

void init ( )
overridevirtual

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