Each solver card shows its numerical scheme, AD strategy, and Tesseract schema; per-(solver, problem) exclusions and explained anomalies come from the problem configs and are listed alongside. Click Inputs / Outputs on any solver to expand its field tables. The ∂ column marks fields that support automatic differentiation (VJP/JVP).
Navier–Stokes (Grid)
Exponax
Numerics: Spectral, ETDRK
jax AD: autodiff GPU
Upstream docs: https://fkoehler.site/exponax/
Path: mosaic/tesseracts/navier-stokes-grid/exponax
Image: exponax_navier_stokes_grid
Exponential time-differencing Runge–Kutta (ETDRK) spectral integrator for 3D Navier–Stokes, enforcing incompressibility to machine precision by construction. Gradients via JAX source-transformation AD
Inputs
supports_recurrent_state |
ClassVar[bool] |
|
|
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint from a preceding call. Its layout is solver-specific. Only solvers that explicitly opt in to recurrent state accept a non-null value. |
return_state |
bool |
|
Request a solver-native recurrent checkpoint in the output. Defaults to false, so canonical one-shot calls are unchanged. Supplying state also implies that a supporting solver returns the continued state. |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
✓ |
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
drag |
Array[(1,), Float32] |
✓ |
Linear drag coefficient |
order |
int |
|
ETDRK time integration order (0-4) |
kolmogorov_forcing |
bool |
|
Enable Kolmogorov sinusoidal body forcing for sustained turbulence |
injection_mode |
int |
|
Wavenumber at which energy is injected (Kolmogorov forcing) |
injection_scale |
Array[(1,), Float32] |
✓ |
Amplitude of the Kolmogorov body forcing |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint. Present only when requested from a solver that opts in to recurrent state. |
drag |
Array[(1,), Float32] | None |
|
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
INS.jl
Numerics: Finite Volume, Projection, RK4
julia AD: autodiff
Upstream docs: https://agdestein.github.io/IncompressibleNavierStokes.jl/dev/
Path: mosaic/tesseracts/navier-stokes-grid/ins-jl
Image: ins_navier_stokes_grid
Julia staggered finite-volume solver with spectral pressure projection and RK4 time integration; run on CPU in this benchmark (the library itself also supports CUDA via KernelAbstractions.jl). Differentiates through the time loop via Zygote.jl reverse-mode AD.
Inputs
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
✓ |
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
supports_recurrent_state |
ClassVar[bool] |
|
|
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Optional native staggered face velocity returned by a previous call. When provided, v0 is interpreted as the desired corrected canonical velocity and is reconciled with this state before advancing. The grid, boundary conditions, timestep, and solver configuration must be unchanged. |
return_state |
bool |
|
Return native staggered state for recurrent continuation. |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
drag |
Array[(1,), Float32] | None |
|
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Float32 native staggered interior velocity for recurrent continuation. Unavailable for the obstacle/channel path. |
jax-cfd
Numerics: Finite Difference, Projection, semi-implicit
jax AD: autodiff GPU
Upstream docs: https://github.com/google/jax-cfd
Path: mosaic/tesseracts/navier-stokes-grid/jax-cfd
Image: jax_cfd_navier_stokes_grid
JAX-native incompressible Navier–Stokes solver on a staggered MAC grid with finite-difference advection and spectral FFT pressure projection. Gradients via JAX source-transformation AD through the time loop.
Inputs
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
|
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
supports_recurrent_state |
ClassVar[bool] |
|
|
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Optional native staggered face velocity returned by a previous call. When provided, v0 is interpreted as the desired corrected canonical velocity and is reconciled with this state before advancing. The grid, boundary conditions, timestep, and solver configuration must be unchanged. |
return_state |
bool |
|
Return native staggered state for recurrent continuation. |
density |
Array[(1,), Float32] |
✓ |
Density of the fluid |
inner_steps |
int |
|
Solver sub-iterations per timestep (higher = more accurate pressure solve) |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
drag |
Array[(1,), Float32] | None |
|
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Native staggered face velocity for recurrent continuation. |
OpenFOAM
Numerics: Finite Volume, PISO/PIMPLE, Euler
cpp AD: forward-only
Upstream docs: https://www.openfoam.com/documentation/overview
Path: mosaic/tesseracts/navier-stokes-grid/openfoam
Image: openfoam_navier_stokes_grid
OpenFOAM icoFoam PISO solver run as a forward-only reference baseline (C++ subprocess). No reverse-mode AD; used to anchor cross-solver comparisons.
Inputs
supports_recurrent_state |
ClassVar[bool] |
|
|
v0 |
GridVectorField |
|
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint from a preceding call. Its layout is solver-specific. Only solvers that explicitly opt in to recurrent state accept a non-null value. |
return_state |
bool |
|
Request a solver-native recurrent checkpoint in the output. Defaults to false, so canonical one-shot calls are unchanged. Supplying state also implies that a supporting solver returns the continued state. |
viscosity |
Array[(1,), Float32] |
|
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
|
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
|
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
Outputs
result |
GridVectorField |
|
Final cell-centred velocity field, same shape as v0. |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint. Present only when requested from a solver that opts in to recurrent state. |
drag |
Array[(1,), Float32] | None |
|
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
PhiFlow
Numerics: Finite Difference, Semi-Lagrangian, Euler
jax AD: hybrid GPU
Upstream docs: https://tum-pbs.github.io/PhiFlow/
Path: mosaic/tesseracts/navier-stokes-grid/phiflow
Image: phiflow_navier_stokes_grid
Semi-Lagrangian advection with CG pressure projection, unconditionally stable at large dt. Gradients via JAX autodiff combined with analytic adjoint rules through the same simulation code.
Inputs
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
✓ |
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
supports_recurrent_state |
ClassVar[bool] |
|
|
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Optional recurrent checkpoint returned by a previous call. The final axis packs the native staggered velocity followed by the canonical cell-centred velocity, so its size is twice that of v0. Periodic native state uses Mosaic’s high-face indexing and is translated to PhiFlow’s lower-face indexing internally. When provided, v0 is interpreted as the desired corrected canonical velocity and is reconciled with this state before advancing. The grid, boundary conditions, timestep, and solver configuration must be unchanged. |
return_state |
bool |
|
Return a recurrent checkpoint containing native staggered velocity and the exact canonical result. |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
drag |
Array[(1,), Float32] | None |
✓ |
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Recurrent checkpoint for continuation. The final axis packs native staggered velocity followed by the exact canonical result; periodic native state uses Mosaic’s high-face indexing. |
PICT
Numerics: Finite Volume, PISO, BDF1
pytorch AD: autodiff GPU
Upstream docs: https://github.com/tum-pbs/PICT
Path: mosaic/tesseracts/navier-stokes-grid/pict
Image: pict_navier_stokes_grid
GPU-accelerated differentiable PISO solver built on PyTorch with custom CUDA kernels (PISOtorch). VJP w.r.t. v0, inflow_profile, and viscosity flows through the PISO time loop via PISOtorch_diff (tracks VELOCITY, BOUNDARY_VELOCITY, and VISCOSITY gradients). dt is a Python scalar consumed at construction time; zero gradients are returned for it.
Inputs
supports_recurrent_state |
ClassVar[bool] |
|
|
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint from a preceding call. Its layout is solver-specific. Only solvers that explicitly opt in to recurrent state accept a non-null value. |
return_state |
bool |
|
Request a solver-native recurrent checkpoint in the output. Defaults to false, so canonical one-shot calls are unchanged. Supplying state also implies that a supporting solver returns the continued state. |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
|
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
✓ |
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint. Present only when requested from a solver that opts in to recurrent state. |
drag |
Array[(1,), Float32] | None |
✓ |
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
Warp-NS
Numerics: Finite Difference, IPCS, SSP-RK3
warp AD: autodiff GPU
Upstream docs: https://github.com/NVIDIA/warp
Path: mosaic/tesseracts/navier-stokes-grid/warp-ns
Image: warp_ns_navier_stokes_grid
IPCS projection scheme implemented in NVIDIA Warp CUDA kernels with FFT pressure Poisson on periodic domains. Gradients via wp.Tape kernel-level VJP.
Inputs
supports_recurrent_state |
ClassVar[bool] |
|
|
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint from a preceding call. Its layout is solver-specific. Only solvers that explicitly opt in to recurrent state accept a non-null value. |
return_state |
bool |
|
Request a solver-native recurrent checkpoint in the output. Defaults to false, so canonical one-shot calls are unchanged. Supplying state also implies that a supporting solver returns the continued state. |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
|
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
num_iters_poisson |
int |
|
Minimum number of Jacobi iterations per 2-D streamfunction Poisson solve. The solver auto-scales to max(this value, min(4*N², 8000)) at runtime, so convergence is maintained across grid sizes N=16..128 without manual tuning. For N≥128 with production accuracy, a multigrid or FFT Poisson solver is recommended as Jacobi is capped at 8000 iterations. |
num_iters_poisson_3d |
int |
|
Number of Jacobi iterations per 3-D pressure Poisson solve. 800 iterations is adequate for N≤32; increase for larger grids. |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
state |
Array[(None, None, None, None), Float32] | None |
|
Optional opaque solver-native recurrent checkpoint. Present only when requested from a solver that opts in to recurrent state. |
drag |
Array[(1,), Float32] | None |
|
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
XLB
Numerics: Lattice Boltzmann, Streaming
jax AD: autodiff GPU
Upstream docs: https://github.com/Autodesk/XLB
Path: mosaic/tesseracts/navier-stokes-grid/xlb
Image: xlb_navier_stokes_grid
JAX-accelerated lattice Boltzmann solver (D2Q9 / D3Q19) with BGK or KBC collision, running the streaming/collision loop on GPU. Gradients via source-transformation AD; recovers incompressible Navier–Stokes only to O(Ma²) via Chapman–Enskog expansion.
Inputs
v0 |
GridVectorField |
✓ |
Initial cell-centred (non-staggered), component-last velocity field, shape (N, N, 1, 2). Default: 64×64 divergence-free random vortex field (seed=42). |
viscosity |
Array[(1,), Float32] |
✓ |
Kinematic viscosity ν. |
dt |
Array[(1,), Float32] |
✓ |
Timestep size. |
steps |
int |
|
Number of timesteps. Total simulated time = steps × dt. |
domain_extent |
float |
|
Side length of the square periodic domain. |
boundary_conditions |
GridBC |
|
Per-face boundary conditions. Default: all periodic. |
obstacle |
GridObstacle | None |
|
Optional solid obstacle embedded in the domain (no-slip walls). |
inflow_profile |
Array[(None,), Float32] | None |
✓ |
1-D inlet velocity profile u_x(y), shape (N,). When provided, overrides the x_lo Dirichlet BC with a spatially-varying inlet. u_y is set to zero. Used for inflow-profile optimisation (e.g. cylinder drag minimisation). |
supports_recurrent_state |
ClassVar[bool] |
|
|
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Optional recurrent checkpoint, shape (q+d, nx, ny, nz), containing q LBM populations followed by d canonical velocity channels. q=9 in 2-D (nz=1) and q=27 in 3-D. When supplied, the change from the checkpointed canonical velocity to v0 replaces the macroscopic velocity while density and non-equilibrium moments are preserved. The grid, timestep, domain, substep policy, and collision configuration must be unchanged. |
return_state |
bool |
|
Return recurrent checkpoint state for continuation. Static control flag; state is also returned whenever an input state is supplied. |
Outputs
result |
GridVectorField |
✓ |
Final cell-centred velocity field, same shape as v0. |
drag |
Array[(1,), Float32] | None |
✓ |
x-direction drag force on the embedded obstacle, shape (1,). Computed as the surface integral of pressure and viscous stress: F_x = ∮_S (p n_x − μ (∂u/∂n)_x) dS. None when no obstacle is present. |
state |
Differentiable[Array[(None, None, None, None), Float32]] | None |
|
Final recurrent checkpoint when requested, shape (q+d, nx, ny, nz): q populations followed by d canonical velocity channels. |
Structural mechanics
deal.II
Numerics: Finite Element, Direct (spsolve)
cpp AD: forward-only
Upstream docs: https://www.dealii.org/
Path: mosaic/tesseracts/structural-mesh/dealii-structural
Image: dealii_structural_mesh
deal.II Q1 trilinear hexahedral FEM linear-elasticity solver via C++ subprocess (UMFPACK direct). Forward-only — reference implementation for cross-framework validation.
Inputs
rho |
Array[(None,), Float32] |
|
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. Values in [0, 1]: 0 = void, 1 = solid. |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe displacement (values shape (n_groups, 3), None → zero); neumann.mask/values prescribe surface traction (values shape (n_groups, 3)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
E_max |
float |
|
Young’s modulus of the fully solid material [MPa]. |
nu |
float |
|
Poisson’s ratio. |
xmin |
float |
|
Void stiffness ratio (E_min = xmin * E_max). |
penal |
float |
|
SIMP penalisation exponent (E(ρ) = E_min + (E_max−E_min)·ρ^penal). |
Outputs
compliance |
Array[(), Float32] |
|
Structural compliance C = F^T U (scalar). Minimising compliance is equivalent to maximising stiffness. |
FEniCS
Numerics: Finite Element, GMRES+AMG
fenics AD: adjoint
Upstream docs: https://fenicsproject.org/
Path: mosaic/tesseracts/structural-mesh/fenics-structural
Image: fenics_structural_mesh
FEniCS/DOLFIN CG1 FEM linear-elasticity solver with SIMP penalisation. Gradient ∂C/∂ρ via dolfin-adjoint tape replay (discrete adjoint derived at the variational level via UFL).
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. Values in [0, 1]: 0 = void, 1 = solid. |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe displacement (values shape (n_groups, 3), None → zero); neumann.mask/values prescribe surface traction (values shape (n_groups, 3)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
E_max |
float |
|
Young’s modulus of the fully solid material. |
nu |
float |
|
Poisson’s ratio. |
xmin |
float |
|
Void stiffness ratio (E_min = xmin * E_max). |
penal |
float |
|
SIMP penalisation exponent (E(rho) = E_min + (E_max-E_min)*rho^penal). |
Outputs
compliance |
Array[(), Float32] |
✓ |
Structural compliance C = F^T U (scalar). Minimising compliance is equivalent to maximising stiffness. |
Firedrake
Numerics: Finite Element, GMRES+AMG
firedrake AD: adjoint
Upstream docs: https://www.firedrakeproject.org/
Path: mosaic/tesseracts/structural-mesh/firedrake-structural
Image: firedrake_structural_mesh
Firedrake CG1 FEM linear-elasticity solver with SIMP penalisation. Gradient ∂C/∂ρ via firedrake-adjoint (pyadjoint ReducedFunctional) — an independent tape-based discrete adjoint complement to FEniCS.
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. Values in [0, 1]: 0 = void, 1 = solid. |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe displacement (values shape (n_groups, 3), None → zero); neumann.mask/values prescribe surface traction (values shape (n_groups, 3)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
E_max |
float |
|
Young’s modulus of the fully solid material. |
nu |
float |
|
Poisson’s ratio. |
xmin |
float |
|
Void stiffness ratio (E_min = xmin * E_max). |
penal |
float |
|
SIMP penalisation exponent (E(rho) = E_min + (E_max-E_min)*rho^penal). |
Outputs
compliance |
Array[(), Float32] |
✓ |
Structural compliance C = F^T U (scalar). Minimising compliance is equivalent to maximising stiffness. |
JAX-FEM
Numerics: Finite Element, Direct (UMFPACK)
jax AD: hybrid GPU
Upstream docs: https://github.com/deepmodeling/jax-fem
Path: mosaic/tesseracts/structural-mesh/jax-fem
Image: jax_fem_structural_mesh
JAX-FEM HEX8 linear-elasticity solver with SIMP stiffness E(ρ) = E_min + (E_max − E_min)·ρ^penal. Gradient ∂C/∂ρ via JAX automatic differentiation through the linear FE solve (hybrid implicit-function-theorem adjoint).
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. Values in [0, 1]: 0 = void, 1 = solid. |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe displacement (values shape (n_groups, 3), None → zero); neumann.mask/values prescribe surface traction (values shape (n_groups, 3)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
Outputs
compliance |
Array[(), Float32] |
✓ |
Structural compliance C = F^T U (scalar). Minimising compliance is equivalent to maximising stiffness. |
TopOpt.jl
Numerics: Finite Element, Direct (CHOLMOD)
julia AD: adjoint
Upstream docs: https://github.com/JuliaTopOpt/TopOpt.jl
Path: mosaic/tesseracts/structural-mesh/topopt-jl
Image: topopt_jl_structural_grid
TopOpt.jl HEX8 FEM linear-elasticity solver with SIMP penalisation, Julia + Ferrite.jl backend. Gradient ∂C/∂ρ via analytical SIMP adjoint sensitivity computed alongside the forward solve.
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. Values in [0, 1]: 0 = void, 1 = solid. |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe displacement (values shape (n_groups, 3), None → zero); neumann.mask/values prescribe surface traction (values shape (n_groups, 3)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
E |
float |
|
Young’s modulus of the solid material. |
nu |
float |
|
Poisson’s ratio. |
xmin |
float |
|
Minimum density (void stiffness) to prevent singular stiffness matrix. |
Outputs
compliance |
Array[(), Float32] |
✓ |
Structural compliance C = F^T U (scalar). Minimising compliance is equivalent to maximising stiffness. |
Heat transfer
deal.II
Numerics: Finite Element, Direct (spsolve)
cpp AD: forward-only
Upstream docs: https://www.dealii.org/
Path: mosaic/tesseracts/thermal-mesh/dealii-heat
Image: dealii_heat_thermal_mesh
deal.II Q1 trilinear hexahedral FEM heat-conduction solver with SIMP conductivity (C++ subprocess, UMFPACK direct). Forward-only — reference implementation for cross-framework validation.
Inputs
rho |
Array[(None,), Float32] |
|
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. ρ=1 → fully conducting, ρ=0 → insulating. |
source |
Array[(None,), Float32] |
|
Per-element volumetric heat source (W/m³), shape (n_cells,). Active slice = source[:hex_mesh.n_faces]. Zero by default (topology-optimisation mode; no body heat source). |
target_temperature |
Array[(None,), Float32] |
|
Per-node target temperature for the inverse (source-identification) objective, shape (n_nodes,). identification_error = |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe temperature (values shape (n_groups, 1), None → zero); neumann.mask/values prescribe heat flux (values shape (n_groups, 1)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
k_max |
float |
|
Maximum thermal conductivity (fully solid material). |
p_exp |
float |
|
SIMP penalisation exponent p (k(ρ) = k_min + (k_max−k_min)·ρ^p). |
Outputs
thermal_compliance |
Array[(), Float32] |
|
Total thermal compliance C = ∮_Γ_N q_n · T dΓ (scalar). Equals the work done by the Neumann heat flux on the temperature field. |
identification_error |
Array[(), Float32] |
|
Source-identification objective: |
FEniCS
Numerics: Finite Element, GMRES+AMG
fenics AD: adjoint
Upstream docs: https://fenicsproject.org/
Path: mosaic/tesseracts/thermal-mesh/fenics-heat
Image: fenics_heat_thermal_mesh
FEniCS P1 FEM heat-conduction solver with SIMP penalisation. Gradients (∂C/∂ρ, ∂C/∂source) via dolfin-adjoint tape replay.
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. ρ=1 → fully conducting, ρ=0 → insulating. |
source |
Array[(None,), Float32] |
✓ |
Per-element volumetric heat source (W/m³), shape (n_cells,). Active slice = source[:hex_mesh.n_faces]. Zero by default (topology-optimisation mode; no body heat source). |
target_temperature |
Array[(None,), Float32] |
|
Per-node target temperature for the inverse (source-identification) objective, shape (n_nodes,). identification_error = |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe temperature (values shape (n_groups, 1), None → zero); neumann.mask/values prescribe heat flux (values shape (n_groups, 1)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
k_max |
float |
|
Maximum thermal conductivity (fully solid/conducting material). |
p_exp |
float |
|
SIMP penalisation exponent p (k(ρ) = k_min + (k_max−k_min)·ρ^p). |
Outputs
thermal_compliance |
Array[(), Float32] |
✓ |
Total thermal compliance C = ∮_Γ_N q_n · T dΓ (scalar). Equals the work done by the Neumann heat flux on the temperature field. |
identification_error |
Array[(), Float32] |
✓ |
Source-identification objective: |
Firedrake
Numerics: Finite Element, GMRES+AMG
firedrake AD: adjoint
Upstream docs: https://www.firedrakeproject.org/
Path: mosaic/tesseracts/thermal-mesh/firedrake-heat
Image: firedrake_heat_thermal_mesh
Firedrake P1 FEM heat-conduction solver with SIMP penalisation. Gradients (∂C/∂ρ, ∂C/∂source) via firedrake-adjoint, complementing the FEniCS reference.
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. ρ=1 → fully conducting, ρ=0 → insulating. |
source |
Array[(None,), Float32] |
✓ |
Per-element volumetric heat source (W/m³), shape (n_cells,). Active slice = source[:hex_mesh.n_faces]. Zero by default (topology-optimisation mode; no body heat source). |
target_temperature |
Array[(None,), Float32] |
|
Per-node target temperature for the inverse (source-identification) objective, shape (n_nodes,). identification_error = |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe temperature (values shape (n_groups, 1), None → zero); neumann.mask/values prescribe heat flux (values shape (n_groups, 1)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
k_max |
float |
|
Maximum thermal conductivity (fully solid/conducting material). |
p_exp |
float |
|
SIMP penalisation exponent p (k(ρ) = k_min + (k_max−k_min)·ρ^p). |
Outputs
thermal_compliance |
Array[(), Float32] |
✓ |
Total thermal compliance C = ∮_Γ_N q_n · T dΓ (scalar). Equals the work done by the Neumann heat flux on the temperature field. |
identification_error |
Array[(), Float32] |
✓ |
Source-identification objective: |
JAX-FEM
Numerics: Finite Element, Direct (UMFPACK)
jax AD: hybrid GPU
Upstream docs: https://github.com/deepmodeling/jax-fem
Path: mosaic/tesseracts/thermal-mesh/jax-fem
Image: jax_fem_thermal_mesh
JAX-FEM HEX8 steady-state heat-conduction solver with SIMP conductivity and optional volumetric source. Gradients ∂C/∂ρ and ∂C/∂source via JAX autodiff through the linear FE solve (hybrid implicit-function-theorem adjoint)
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. ρ=1 → fully conducting, ρ=0 → insulating. |
source |
Array[(None,), Float32] |
✓ |
Per-element volumetric heat source (W/m³), shape (n_cells,). Active slice = source[:hex_mesh.n_faces]. Zero by default (topology-optimisation mode; no body heat source). |
target_temperature |
Array[(None,), Float32] |
|
Per-node target temperature for the inverse (source-identification) objective, shape (n_nodes,). identification_error = |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe temperature (values shape (n_groups, 1), None → zero); neumann.mask/values prescribe heat flux (values shape (n_groups, 1)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
Outputs
thermal_compliance |
Array[(), Float32] |
✓ |
Total thermal compliance C = ∮_Γ_N q_n · T dΓ (scalar). Equals the work done by the Neumann heat flux on the temperature field. |
identification_error |
Array[(), Float32] |
✓ |
Source-identification objective: |
torch-fem
Numerics: Finite Element, Direct (spsolve)
pytorch AD: autodiff GPU
Upstream docs: https://github.com/meyer-nils/torch-fem
Path: mosaic/tesseracts/thermal-mesh/torch-fem-thermal
Image: torch_fem_thermal_mesh
torch-fem SolidHeat HEX8 heat-conduction solver with IsotropicConductivity3D SIMP material — the first PyTorch backend in thermal-mesh. Gradients via PyTorch autograd through the FE solve; GPU-native.
Inputs
rho |
Array[(None,), Float32] |
✓ |
Per-cell density field, shape (n_max_cells,). Active slice = rho[:hex_mesh.n_faces]. ρ=1 → fully conducting, ρ=0 → insulating. |
source |
Array[(None,), Float32] |
✓ |
Per-element volumetric heat source (W/m³), shape (n_cells,). Active slice = source[:hex_mesh.n_faces]. Zero by default (topology-optimisation mode; no body heat source). |
target_temperature |
Array[(None,), Float32] |
|
Per-node target temperature for the inverse (source-identification) objective, shape (n_nodes,). identification_error = |
boundary_conditions |
MeshBC |
|
Mesh boundary conditions. dirichlet.mask/values prescribe temperature (values shape (n_groups, 1), None → zero); neumann.mask/values prescribe heat flux (values shape (n_groups, 1)). |
hex_mesh |
HexMesh |
|
Hexahedral mesh (8-node hex elements). n_points / n_faces give the active slice sizes. |
k_max |
float |
|
Maximum thermal conductivity (fully solid material). |
p_exp |
float |
|
SIMP penalisation exponent p (k(ρ) = k_min + (k_max−k_min)·ρ^p). |
Outputs
thermal_compliance |
Array[(), Float32] |
✓ |
Total thermal compliance C = ∮_Γ_N q_n · T dΓ (scalar). Equals the work done by the Neumann heat flux on the temperature field. |
identification_error |
Array[(), Float32] |
✓ |
Source-identification objective: |