BoundaryNormal.h file
Outward unit normal vector on domain boundaries.
This file defines the BoundaryNormal class, which represents the outward unit normal vector field on the boundary of a domain. Boundary normals are essential for imposing natural boundary conditions and computing boundary integrals in finite element formulations.
Mathematical Foundation
For a domain with boundary , the outward unit normal satisfies:
where is any tangent vector to .
Applications
- Neumann boundary conditions:
- Robin boundary conditions:
- Flux calculations:
- Integration by parts: Boundary terms involving normal derivatives
- DG methods: Numerical flux terms with normal components
Properties
- Orientation: Points outward from the domain
- Uniqueness: Well-defined except at corners/edges (where limits differ)
- Computation: Derived from surface geometry and element transformations
Usage Example
BoundaryNormal n(mesh); // Neumann BC: ∫_Γ g(n·∇u) v ds auto neumann = BoundaryIntegral(g * Dot(n, Grad(u)), v).on(boundary_attr); // Normal derivative auto normal_deriv = Dot(Grad(u), n); // ∂u/∂n
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
- class Rodin::Variational::BoundaryNormal
- Outward unit normal vector on domain boundaries.