/ concept-collection / mesh-pde-solver
Sign in
concept-collection / mesh-pde-solver
mesh-pde-solver / CLAUDE.md
4.8 KBPreviewCodeBlameHistoryRaw

CLAUDE.md#

Tips for future agents working in this repo.

Architecture#

matlab/
  solve_template.m the whole solve as ONE script — mip load -> import ->
                   resample -> surfaceop -> write result.json — with
                   {{PLACEHOLDER}} tokens for the parameters. The engine's
                   buildSolveScript fills them per solve, and the UI offers
                   the filled script for download any time a mesh is loaded
                   (before solving too — a solve might fail or hang). The
                   same script runs in desktop MATLAB with the converted
                   .msh alongside: via mip, or by commenting out the mip
                   line and putting surfacefun on the path.
src/mesh/          Pyodide + meshio upload pipeline (bridge.py runs in Pyodide)
src/engine/        run-per-solve wrapper over numbl/browser's
                   createNumblSession: solve() fills the template and boots
                   a fresh session with the script + mesh staged, reads
                   result.json back via session.readFile, and disposes the
                   worker. numbl owns the worker, VFS, mip bootstrap, and
                   IndexedDB package persistence; prewarm() at page load
                   triggers the one-time package download.
src/pde/presets.ts PDE definitions, presets, slow-mesh warning threshold
src/render/        three.js SurfaceView (mesh preview / solution) + parula
scripts/engine-test.mjs  headless Node check of the whole MATLAB pipeline

Key gotchas#

Testing#

moveopenescclose