/ concept-collection / fastandaccurate
Sign in
concept-collection / fastandaccurate
fastandaccurate / README.md
87 lines · 3.4 KBCodeBlameHistory
3Speed and accuracy benchmarks for PDE solvers.
5Live site: https://concept-collection.github.io/fastandaccurate/
7A limitation of most solver comparisons is that they fix a
8discretization, which quietly decides much of the outcome. Here each
9**problem** is posed in the continuum with an exact reference solution;
10a solver chooses its own discretization and is scored at
11problem-specified evaluation points. The central object is the
12**work-precision curve**: error against compute time as the solver's
13resolution varies. There is deliberately no single ranking, since which
14curve wins can differ by accuracy regime, instance, and machine.
16Solvers are MATLAB function files run by [numbl](https://numbl.org)
17(MATLAB syntax in the browser and in node), so every run on this site
18happens client side, and the identical harness runs from the command
19line. Each problem defines its own interface and instances in a written
20specification; the system is deliberately loose, and per-problem
21interfaces are expected to differ.
23## Problems
25- [laplace-dirichlet-2d](docs/problems/laplace-dirichlet-2d.md) —
26 interior Dirichlet Laplace problem on a star-shaped domain, data
27 manufactured from an exact harmonic function whose singularities sit an
28 adjustable distance outside the boundary.
30## Results
32Results are work-precision sweeps stored as JSON files in
33[fastandaccurate-results](https://github.com/concept-collection/fastandaccurate-results)
34and added by pull request; the site reads that repository statically, so
35there is no database and no server. Every result records its provenance:
36instance spec and hash, solver id and version, protocol, runtime, numbl
37version, and machine. In-browser results can be rerun by any visitor on
38their own machine directly on the site.
40## Running benchmarks outside the browser
42The command line installs from the site itself (node 20 or newer):
44```
45npx https://concept-collection.github.io/fastandaccurate/cli.tgz run --label "my workstation"
46```
48Note that npx caches by the exact URL string; the site offers the URL
49with a `?v=<commit>` suffix so each deployment is a fresh install.
51Useful flags: `--instance <id>`, `--solver <id>`, `--repeats N`,
52`--max-n N`, `--out dir`. To benchmark your own solver, point the
53harness at a MATLAB function file implementing the problem's interface:
55```
56npx https://concept-collection.github.io/fastandaccurate/cli.tgz run \
57 --solver-file my_method.m --solver-id my-method
58```
60The resulting JSON files can be loaded on the site (load result file) to
61view them against the committed curves, and submitted by PR to the
62results repository. To add a solver to the site itself (so visitors can
63rerun it in the browser), PR the solver directory and a manifest entry
64to this repository; see `src/solvers/`.
66## Development
68```
69npm install
70npm run dev # local dev server
71npm test # solver convergence tests through numbl in node
72npm run build # type-check, site build, CLI tarball (dist/)
73npm run check-app # headless end-to-end check of the built site
74```
76Layout: `src/problems/` holds problem specs, instances, exact solutions,
77and the problem-side MATLAB; `src/solvers/` the solver MATLAB files and
78manifests; `src/harness/` the shared runner, sweep, and result schema
79(used identically by the browser worker and the CLI); `src/app/` the
80React site; `src/cli/` the command line.
82Deployed to GitHub Pages by `.github/workflows/deploy.yml` on push to
83main.
85## License
87Apache-2.0
moveopenescclose