Rodin/Variational/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 $ \Omega \subset \mathbb{R}^d $ with boundary $ \partial\Omega $ , the outward unit normal $ \mathbf{n} $ satisfies:

\[ \|\mathbf{n}\| = 1, \quad \mathbf{n} \cdot \mathbf{t} = 0 \]

where $ \mathbf{t} $ is any tangent vector to $ \partial\Omega $ .

Applications

  • Neumann boundary conditions: $ \nabla u \cdot \mathbf{n} = g $
  • Robin boundary conditions: $ \alpha u + \beta \nabla u \cdot \mathbf{n} = g $
  • Flux calculations: $ \int_{\partial\Omega} (\mathbf{v} \cdot \mathbf{n}) \, ds $
  • 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.