Expand description
WebGPU Extension for QualiaDB Advanced
Continuous-physics compute for fluid dynamics, electromagnetics, heat,
waves, particles and dense tensor algebra. Each operation is backed by a
real finite-difference / finite-element / N-body solver (the solvers
below), validated against an exact analytic solution in its own unit test.
§CPU reference vs. GPU dispatch
The solvers here are the verifiable CPU reference path: deterministic,
analytic-solution-tested, and runnable on any machine (no GPU required).
This mirrors the core engine’s pattern (modalities/calculus) where the CPU
kernel is ground truth and the GPU is an accelerator of the same math.
The WGSL in shaders is the corresponding GPU kernel spec. GPU
acceleration routes through the core engine’s shared wgpu device
(qualia-core-db hetero_dispatch / WebGpuIntegrator) rather than a
second device spun up here — the repo deliberately owns a single wgpu stack.
The CPU reference is what the tests exercise and what runs when no GPU is
present.
Modules§
- electromagnetics
- 1D electromagnetics by the Yee FDTD scheme (the canonical, validatable Maxwell solver).
- fluid
- Incompressible 2D Navier–Stokes (periodic) via Chorin’s projection method.
- heat
- 2D heat diffusion
∂u/∂t = α∇²uby explicit finite differences (periodic). - particles
- Gravitational N-body simulation by velocity-Verlet (symplectic), 2D.
- shaders
- WGSL kernel specs mirroring the CPU reference solvers.
- tensor
- Dense matrix multiply
C[m×n] = A[m×k] · B[k×n](row-major). - wave
- 2D wave equation
∂²u/∂t² = c²∇²uby explicit leapfrog (periodic).
Structs§
- Convergence
Info - Convergence / residual report from a solve.
- Dispatch
Params - Time-stepping / iteration controls.
- GpuPerformance
Metrics - Measured throughput of the solve. On the CPU reference path the
gpu_*_utilizationfields are0.0(not applicable); the time, FLOP-rate and bandwidth figures are measured, not invented. - Solver
Report - Output of a solver: the field data plus honest residual/effort bookkeeping.
- WebGpu
Execution Result - Result of a physics solve.
- WebGpu
Extension - WebGPU Extension implementation
- WebGpu
JobParams - Job parameters for a physics solve.
- WebGpu
Shader - A GPU compute-shader spec (the kernel the CPU reference solver mirrors).
- WebGpu
Shader Manager - Registry of the GPU kernel specs (WGSL) for the supported physics domains.
Enums§
- Shader
Type - Physics domains this extension can solve.