AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
DirichletBC< SubBasis, ValueGridFct > Class Template Reference

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

#include <DirichletBC.hpp>

Public Member Functions

template<class Values , REQUIRES(Concepts::Functor< Values, Range(Domain)>) >
 DirichletBC (SubBasis basis, BoundarySubset< Intersection > boundarySubset, Values &&values)
 Constructor accepting subspacebases.
 
template<class Basis , class TP , class Values , REQUIRES(Concepts::GlobalBasis< Basis >) >
 DirichletBC (Basis const &basis, TP const &treePath, BoundarySubset< Intersection > boundarySubset, Values &&values)
 Make a DirichletBC from a basis with treepath arguments.
 
template<class Basis , class Values , REQUIRES(Concepts::GlobalBasis< Basis >) >
 DirichletBC (Basis const &basis, BoundarySubset< Intersection > boundarySubset, Values &&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)
 Apply dirichlet BC to matrix and vector. More...
 

Detailed Description

template<class SubBasis, class ValueGridFct>
class AMDiS::DirichletBC< SubBasis, 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
SubBasisSubspaceBasis of the solution FE space
ValueGridFctType of the GridFunction representing the Dirichlet values.

Member Function Documentation

◆ apply()

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

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.

References AMDiS::interpolate().

Referenced by DirichletBC< SubBasis, ValueGridFct >::DirichletBC(), and DirichletBC< SubBasis, ValueGridFct >::init().

◆ init()

void init ( )

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

See also
BoundaryCondition::init

References DirichletBC< SubBasis, ValueGridFct >::apply().

Referenced by DirichletBC< SubBasis, ValueGridFct >::DirichletBC().


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