FaceNormal.h file
Normal vector on mesh faces for DG methods.
This file defines the FaceNormal class, which represents the unit normal vector on mesh faces (both interior and boundary). Face normals are crucial for Discontinuous Galerkin (DG) methods where numerical fluxes depend on the normal direction at element interfaces.
Mathematical Foundation
For a face shared by elements and , the face normal satisfies:
Orientation Convention
The normal direction is chosen according to a consistent orientation:
- For interior faces: points from to
- For boundary faces: points outward from the domain
Applications in DG Methods
- Numerical fluxes:
- Jump terms:
- Average terms:
- Penalty terms:
Difference from BoundaryNormal
- FaceNormal: Defined on all faces (interior + boundary)
- BoundaryNormal: Only defined on domain boundary
Usage Example
FaceNormal n(mesh); // DG numerical flux on interior faces auto flux = InterfaceIntegral(Average(u) * Dot(n, Jump(v))); // Normal component of vector field auto normal_component = Dot(velocity, 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::FaceNormal
- Unit normal vector on mesh faces.