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. | |
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.
Mat | Matrix |
Sol | Vector of solution |
Rhs | Vector of rhs |
RowSubBasis | SubspaceBasis of the row FE space |
ColSubBasis | SubspaceBasis of the column FE space |
ValueGridFct | Type of the GridFunction representing the Dirichlet values. |
|
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().
|
overridevirtual |
Fill dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not.
Implements BoundaryCondition< Mat, Sol, Rhs >.
References DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct >::apply(), and AMDiS::Concepts::LocalView.
Referenced by DirichletBC< Mat, Sol, Rhs, RowSubBasis, ColSubBasis, ValueGridFct >::DirichletBC().