DirichletBC.h file
Dirichlet boundary condition implementation.
This file defines classes for imposing Dirichlet (essential) boundary conditions in finite element problems. Dirichlet conditions prescribe the solution values on specified boundaries.
Mathematical Foundation
A Dirichlet boundary condition specifies:
where is the solution, is the prescribed boundary value, and is a portion of the domain boundary.
Implementation
Dirichlet conditions are typically enforced by:
- Identifying boundary degrees of freedom
- Setting their values to
- Modifying the system matrix and right-hand side
Usage Example
// Homogeneous Dirichlet BC (u = 0 on boundary) auto bc = DirichletBC(u, Zero()); // Inhomogeneous Dirichlet BC auto g = [](const Point& p) { return sin(p.x()); }; auto bc = DirichletBC(u, g).on(1); // On boundary attribute 1
Namespaces
- namespace Rodin
- The Rodin library for Shape and Topology Optimization.
- namespace Rodin::Variational
- Module which provides the necessary tools for constructing variational problems.
Classes
-
template<class Scalar>class Rodin::Variational::DirichletBCBase
- Abstract base class for a Dirichlet boundary condition.
-
template<class Solution, class FES, class ValueDerived>class Rodin::Variational::DirichletBC<TrialFunction<Solution, FES>, FunctionBase<ValueDerived>>
- Represents a Dirichlet boundary condition on a ShapeFunction object.