AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
DirichletBC< Basis, RowPath, ColPath, ValueGridFct > Class Template Reference

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

#include <DirichletBC.hpp>

Public Member Functions

template<class B >
 DirichletBC (B &&basis, RowPath const &row, ColPath const &col, BoundarySubset< Intersection > boundarySubset, ValueGridFct values)
 Make a DirichletBC from a basis with treepath arguments.
 
template<class B >
 DirichletBC (B &&basis, BoundarySubset< Intersection > boundarySubset, ValueGridFct values)
 Make a DirichletBC from a global basis.
 
void init ()
 
template<class Mat , class Sol , class Rhs >
void apply (Mat &matrix, Sol &solution, Rhs &rhs, bool symmetric=false)
 Apply dirichlet BC to matrix and vector. More...
 

Detailed Description

template<class Basis, class RowPath, class ColPath, class ValueGridFct>
class AMDiS::DirichletBC< Basis, RowPath, ColPath, 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
BasisGlobalBasis of the solution FE space
RowPathPath to the row-node where the boundary condition should be applied to.
ColPathPath to the col-node where the boundary condition should be applied to.
ValueGridFctType of the GridFunction representing the Dirichlet values.

Member Function Documentation

◆ apply()

void apply ( Mat &  matrix,
Sol &  solution,
Rhs &  rhs,
bool  symmetric = false 
)

Apply dirichlet BC to matrix and vector.

Add a unit-row to the matrix and optionally delete the corresponding matrix-column.

Parameters
symmetricApply a symmetric form of the DBC, by eliminating entries in the column of the matrix

◆ init()

void init

Fill dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not.

See also
BoundaryCondition::init

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