|
Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website |
The C++ classes and functions of Mallard's solver, generated from the comments in src/. To build and run Mallard, write input files, or read about the numerical methods, see the user guide.
All of Mallard is one static library, MallardCore, linked by the Mallard executable (src/main.cpp) and the test suite. Data live in Kokkos views on the execution device, with host mirrors (h_ prefix) for setup and output; kernels are functors, so the same code runs on CPUs and GPUs.
| Directory | Contents | Main types |
|---|---|---|
src/solver/ | Initialization, the time loop, right-hand-side assembly, Dirichlet and averaged-pressure boundary updates, restarts | Solver, Data, DirichletBoundary |
src/mesh/ | Generated meshes (cartesian, cartesian_tri, wedge), the Gmsh reader, geometry (face normals and centroids, cell volumes, neighbors), zones | Mesh, Zone, FaceZone, CellZone |
src/boundary/ | Boundary conditions as device-copyable ghost-state rules, and the map from boundary faces to conditions | BoundaryCondition, BoundaryData |
src/numerics/ | Face reconstruction, Riemann solvers, convective and viscous fluxes, gradients, quadrature, time integrators | FaceReconstruction, TENO, MUSCL, FirstOrder, TimeIntegrator, ConvectiveFluxFunctor, ViscousFluxFunctor |
src/physics/ | Calorically perfect gas: state conversions and transport properties | Euler |
src/io/ | VTU output (with .pvd series), boundary-zone surface output, restart files | DataWriter |
src/common/ | Precision (rtype), dimensions, small math, TOML input lookups, exprtk expressions of x, y and t | Expression |
The Riemann solvers are in namespace riemann: Rusanov, HLL, HLLC, Roe and RHLL, each with a static calc_flux on primitive states W = [ρ, u, v, p]. The TENO-E stencil machinery is in namespace teno.
Solver::run calls take_step until a stop condition is met. Each stage of the TimeIntegrator evaluates calc_rhs:
face_solution(face, point, side, variable). Side 1 of a boundary face is left unset.Face normals point from cells_of_face(f, 0) to cells_of_face(f, 1); boundary faces have cells_of_face(f, 1) = -1.