Design Overview#

This page describes the actual core abstractions that exist in the current codebase and how they connect.

Mesh and grid#

  • Mesh stores raw vertex arrays and element connectivity.

  • Grid<1> and Grid<2> build adjacency (vertex/edge/face) from faces.

  • Mixed triangle + quad surface meshes are supported.

DoF layout and mapping#

  • DofLayout<2> describes per‑element DoF counts on vertices/edges/faces.

  • DofMap<2> builds global DoF indices for a specific mesh.

Reference element, mapping, Piola#

  • FiniteElement provides shape functions on the reference element.

  • ElementMapping maps reference coordinates to physical coordinates.

  • PiolaTransform pushes H(div) basis to physical space.

FunctionSpace#

FunctionSpace<SpaceType::Hdiv, 2, 3> ties together:

  • Grid<2,3>

  • FiniteElement (RWG/RT0)

  • ElementMapping and PiolaTransform

  • DofMap

Operators#

Scalar BEM

ScalarSingleLayerOperator builds a dense single‑layer boundary operator for Laplace/Helmholtz with analytic singular correction on triangles.

Maxwell EFIE

ElectricFieldOperator implements the surface EFIE with RWG basis and includes quadrature assembly and self‑term corrections.

Solvers#

Gmres is a matrix‑free iterative solver that only depends on LinearOperator::apply(...).

Post‑processing and IO#

  • MaxwellComputeCellCenterCurrentAndCharge for magnitude fields.

  • MaxwellFarFieldRcs for far‑field RCS at arbitrary angles.

  • WriteVtkPolyDataCellFields for ParaView.

Dependencies (bird’s‑eye)#

Mesh -> Grid -> DofMap -> FunctionSpace -> Operators -> GMRES
       \-> ElementMapping -> Piola --^