Repository navigation
Mallard 0.2.0
Mallard 0.2.0 is the first release built with agentic development. It turns the 0.1 prototype into a validated, high-order 2D solver that runs on CPUs and NVIDIA GPUs.
Documentation and gallery: https://matthewbonanni.github.io/mallard/
Highlights
- TENO-E (Liang, Shyy & Fu 2025), orders 3 to 6 on triangles, quadrilaterals and mixed meshes: k-exact least squares, sector stencils, characteristic stencil selection, adaptive cutoff, boundary mirror cells, optional bound preservation and a stencil cache. Design order verified on triangles and quads.
- Navier–Stokes: viscous fluxes with constant or Sutherland viscosity; adiabatic, isothermal, heat-flux and moving walls; wall force monitors. Validated against exact solutions and vortex shedding behind a cylinder at Re = 100 (St = 0.164, mean Cd = 1.36).
- Boundary conditions: characteristic far field, inflow, pressure outlets (local or area-averaged), symmetry, time-dependent Dirichlet states from expressions in x, y and t, and partial-zone assignment with
where. - Riemann solvers: Roe and the carbuncle-free rotated-hybrid HLL–Roe (RHLL), in addition to Rusanov, HLL and HLLC.
- Meshes and I/O: Gmsh 2.2 and 4.1 reader, surface output, exact restarts,
.pvdtime series. - GPUs: builds and runs with CUDA (tested on A100); the TENO kernel is templated on degree and split into smooth and troubled passes.
- Examples: 2D Riemann problem on triangles and quads, double Mach reflection, the Daru–Tenaud viscous shock tube (matches the grid-converged reference), Shu–Osher, Sod, wedge, cylinder.
Fixes
The 0.1 code had several bugs that affected results, among them:
- Builds were accidentally single precision.
- Transmissive boundaries made the boundary shocks of the 2D Riemann problem run almost twice too fast.
- A sign error in the TRRS wave-speed estimate corrupted HLL/HLLC.
- First-order reconstruction read out of bounds, and quad centroids were wrong.
- Integer TOML values were silently ignored.
See the merged pull requests #20–#30 for details.
Testing
The test suite grew from 53 tests (3 failing) to more than 200, all passing, with CI on the Serial and OpenMP backends.
Dependencies
Kokkos 5.2.2, toml11 4.4.0, googletest 1.18, exprtk; Kokkos Kernels is no longer required.