Benchmarks

Published configurations

This catalogue presents Rodin's performance benchmarks, from individual mathematical operations to assembled finite element problems. Each benchmark describes the operation measured, the inputs and the measurement conditions. Published timing histories help track changes across commits for a selected configuration and benchmark case.

Benchmarks are organized by their owning module, following the library's directory hierarchy. The module groups below provide entry points to classes and workloads; MPI and PETSc benchmarks remain within their respective modules. Physical contexts, such as Stokes, collect benchmarks whose meaning depends on a mathematical model. Descriptions become more detailed as the navigation reaches individual benchmarks, explaining what is measured and why. Use the search to find a class, operation or workload directly. Modules without registered benchmarks are identified on their pages.

Core

Geometry, finite element spaces, variational expressions, assembly and linear algebra form the path from a weak formulation to an algebraic system.

Assembly

Global assembly of discrete operators.

\[ A_{ij}=a(\phi_j,\psi_i), \qquad b_i=\ell(\psi_i). \]

Sequential evaluates local integrals and accumulates global matrices and vectors; Default selects the configured assembly strategy. BilinearFormAssemblyInput supplies spaces and integrators, and ConstraintMap expands degree-of-freedom constraints when assembling constrained or coupled problems.

Form language

Typed expressions for constructing variational forms.

auto stiffness = Integral(Grad(u), Grad(v));

Base supplies the common expression-node interface, Traits describes ranges and algebraic properties, and List groups polymorphic nodes. They underpin the typed variational expressions used to compose integrals and operators, and provide extension points for new function and form types.

Geometry

Meshes, geometric transformations, and mapped evaluation.

\[ \mathbf{x}=F_K(\widehat{\mathbf{x}}). \]

Mesh and Connectivity describe mesh entities and their incidence relations. Polytope, Point, and PolytopeTransformation connect reference elements to physical geometry for integration, field evaluation, mesh extraction, and deformation.

IO

Reading and writing meshes, fields, and associated data.

IO::XDMF xdmf("output");
xdmf.grid().setMesh(mesh).add("u", u.getSolution());
xdmf.write();

MeshLoader and MeshPrinter import and export meshes; GridFunctionLoader and GridFunctionPrinter transfer discrete fields. Format-specific backends support MFEM, MEDIT, and HDF5 data, while XDMF writes meshes, multiple fields, and time series for visualization.

Math

Spatial arithmetic, matrix operations, and sparse linear algebra.

SpatialVector<Real> a{1, 2, 3};
SpatialVector<Real> b{4, 5, 6};
const Real product = dot(a, b);       // 32
const auto normal = a.cross(b);      // {-3, 6, -3}
const Real length = a.norm();        // sqrt(14)

SpatialVector and SpatialMatrix support small spatial calculations without heap allocation. Vector, Matrix, and their fixed-size counterparts provide Eigen-compatible algebra; LinearSystem groups system data and constraint elimination. These types support geometric mappings, constitutive calculations, assembly, and linear solves.

Quadrature formulae

Module for defining quadrature formulae over reference polytopes.

\[ \int_{\hat{K}} f(\hat{x}) \, d\hat{x} \approx \sum_{i=1}^n w_i \, f(\hat{x}_i) \]

QuadratureFormula selects persistent reference integration rules by geometry and exactness. GaussLegendre, TensorProduct, and the simplex rule families supply points and weights for element integration and reference-basis tabulation.

Solver

Solution of linear and nonlinear discrete systems.

\[ \text{Find } \mathbf{x} \text{ such that } A\mathbf{x}=\mathbf{b}. \]

CG handles symmetric positive-definite systems, GMRES handles general iterative solves, and SparseLU provides direct sparse factorization. NewtonSolver drives nonlinear solves. These solvers operate on prepared systems or variational problems and provide convergence controls for PDE and optimization calculations.

Variational

Finite element spaces, fields, and variational problems.

\[ \text{Find} \quad u \in U \quad \text{ s.t. } \quad \forall v \in V \quad a(u, v) = b(v) \ , \]

H1 and P1 define finite element spaces, while GridFunction evaluates and interpolates discrete fields. TrialFunction, TestFunction, and Problem express weak forms, boundary conditions, and the algebraic problems used to solve PDEs.

Infrastructure

Execution contexts, diagnostics, spatial search, type utilities, serialization and numerical test helpers support the numerical modules.

Alert

Contextual exceptions and diagnostic reporting.

Alert::Info() << "Assembling the system..." << Alert::Raise;

Exception and MemberFunctionException report errors with contextual diagnostics. Info and Warning provide nonfatal messages through the same stream interface. These classes communicate invalid inputs, unavailable operations, and solver or mesh-processing status.

Context

Execution contexts for local and distributed computation.

using LocalMesh = Geometry::Mesh<Context::Local>;
auto mesh = LocalMesh::UniformGrid(Geometry::Polytope::Type::Triangle, {8, 8});

Local selects local execution, and MPI carries the environment and communicator for distributed execution. Mesh, connectivity, and finite element specializations use these context types to select their data distribution and backend behavior while preserving the same mathematical interfaces.

Location

Spatial indexing and geometric search.

Location::AABB locator(mesh);
const auto point = locator.locate(physicalCoordinates);

AABB builds a bounding-volume hierarchy to locate physical coordinates in a mesh and recover the containing cell and reference coordinates. The resulting Point can be used for field sampling and evaluation at arbitrary locations. The locator must be rebuilt when the mesh geometry or topology changes.

Serialization

Serialization and reconstruction of library objects.

archive << values;

Boost.Serialization adapters store arrays, Eigen-compatible dense matrices, flat containers, and optional values. The export registrations cover selected ParametricTransformation instantiations used in MPI shard transfer. Including the relevant adapter headers enables binary archives of supported numerical data and container structures.

Test

Helpers for constructing numerical tests.

\[ A(u)w \approx -\frac{b(u+\epsilon w)-b(u-\epsilon w)}{2\epsilon}. \]

FDProbe compares assembled tangents with finite differences and returns error diagnostics in FDProbeReport. ExpectedResultTable organizes known input-output cases, and random generators supply test samples. These helpers support numerical regression tests for constitutive laws, geometry, and variational operators.

Utility

Type utilities and generic programming helpers.

std::variant<int, Real> value = 2;
const Real result = std::visit(Utility::Overloaded{
  [](int x) { return Real(x); },
  [](Real x) { return x; }
}, value);

ParameterPack and Zip support compile-time type and parameter manipulation. Overloaded combines callable visitors, and OptionalReference represents optional non-owning access. These helpers support generic expressions, type dispatch, and reusable library extensions.

Models

Transport, distance construction, regularization, solid mechanics and cardiac models are expressed using the core numerical interfaces.

Adaptation

Mesh adaptation and deformation operations.

\[ \mathbf{x}^{\prime}=\mathbf{x}+\mathbf{d}(\mathbf{x}). \]

SWIFT::Adapt and SWIFT::Problem fit mesh interfaces to level sets while controlling element distortion. DeformationMap and CellDeformation describe mapped geometry for evaluating deformed cells and fields. These components support moving-interface calculations and body-fitted mesh updates.

Advection

Transport and advection of fields.

\[ \frac{\partial \phi}{\partial t} + \mathbf{v} \cdot \nabla \phi = 0 \]

Lagrangian advances scalar fields on unstructured meshes by tracing characteristics and projecting the transported field into a finite element space. It is used to transport level sets and other evolving fields; boundary policies control the treatment of characteristics that reach the mesh boundary.

Distance

Distance-field computations.

\[ d(\mathbf{x},\Gamma)=\inf_{\mathbf{y}\in\Gamma}\|\mathbf{x}-\mathbf{y}\|. \]

Eikonal constructs distance fields through fast marching, while Poisson and SignedPoisson provide PDE-based alternatives. These models convert boundary or level-set information into distance approximations for shape optimization, interface processing, and mesh adaptation.

Eikonal

Eikonal equations and distance propagation.

\[ |\nabla u| = F(x) \]

FMM implements fast marching on simplicial meshes, propagating arrival times from prescribed seed vertices. It provides the underlying distance propagation used by level-set reinitialization and distance-field construction, with a priority queue controlling the order of vertex updates.

Heart

Cardiac models and their coupled state evolution.

const auto report = model.step(dt);

CCMLC2014T advances a reduced ventricular model through a cardiac cycle. HolzapfelReducedLaw and CCMLC2014PassiveLaw supply its reduced passive energy and stress response. The module supports cardiac-cycle studies and constitutive parameter calibration before larger three-dimensional simulations.

Hilbert

Hilbert-space formulations and regularization.

\[ \alpha^2 \int_\Omega \nabla u : \nabla v \, dx + \int_\Omega u \cdot v \, dx = \ell(v) \]

H1a solves a regularized extension problem that converts a linear functional into a smooth field over the mesh. It is commonly used to extend boundary shape derivatives into volume descent directions, with a configurable length scale controlling smoothing and boundary conditions constraining the extension.

Solid

Constitutive laws, kinematics, and solid-mechanics integration.

\[ \mathbf{P}=\frac{\partial W}{\partial\mathbf{F}}. \]

KinematicState computes deformation measures for constitutive laws such as NeoHookean and HolzapfelOgden. InternalVirtualWork assembles residuals and consistent tangents, and stress fields such as CauchyStress support postprocessing. The module covers finite-strain elasticity and fiber-reinforced material models.

Parallelism and integrations

These modules connect Rodin to distributed execution, external solver backends, mesh adaptation and graph partitioning libraries.

MMG

Mesh adaptation through the MMG integration.

MMG::Mesh cut = MMG::LevelSetDiscretizer()
  .setLevelSet(0.0)
  .split(interior, { interior, exterior })
  .setBoundaryReference(interface)
  .discretize(phi);

Mesh connects Rodin geometry to MMG. Adapt performs metric-driven adaptation, Optimizer improves mesh quality, and LevelSetDiscretizer fits or extracts an isosurface. These workflows support remeshing and interface reconstruction in shape optimization and evolving-geometry simulations.

MPI

Distributed meshes, finite element spaces, and search operations.

using DistributedMesh = Geometry::Mesh<Context::MPI>;

Context::MPI supplies the distributed execution context, while Mesh<Context::MPI> manages distributed mesh entities and connectivity. Sharder partitions mesh data for transfer between ranks. Distributed finite element spaces, point location, and assembly build on these components for multi-process PDE calculations.

PETSc

PETSc integration module for Rodin.

Solver::KSP(poisson).solve();

PETSc::Math::LinearSystem groups PETSc matrix and vector handles, while KSP and SNES expose linear and nonlinear solvers. PETSc-backed variational and assembly specializations connect the same weak-form interfaces to distributed algebra, preconditioning, and solver configuration for larger PDE systems.

Scotch

Graph partitioning through the Scotch integration.

Scotch::Partitioner partitioner(mesh);
partitioner.partition(numRanks);

Partitioner builds a graph-based partition of mesh cells using Scotch. The resulting cell assignments feed mesh sharding and distribution, helping divide finite element workloads across MPI ranks while limiting connections between partitions.

Physical contexts

Stokes

The stationary Stokes model describes slow viscous flow of an incompressible Newtonian fluid, with inertia neglected. In a domain \(\Omega\), the velocity \(\boldsymbol{u}\) and pressure \(p\) satisfy momentum balance and incompressibility:

\[ -\nu\Delta\boldsymbol{u}+\nabla p=\boldsymbol{f}, \qquad \nabla\cdot\boldsymbol{u}=0. \]

Here \(\nu>0\) is the constant viscosity coefficient and \(\boldsymbol{f}\) is the applied force. Pressure enforces the incompressibility constraint. With homogeneous velocity prescribed on \(\partial\Omega\), pressure is determined up to an additive constant; the normalization \(\int_\Omega p\,\mathrm dx=0\) fixes that constant. The mixed velocity–pressure discretization must preserve this coupling to give a stable approximation.