/ concept-collection / fastandaccurate
Sign in
concept-collection / fastandaccurate
fastandaccurate / README.md
88 lines · 3.4 KBPreviewCodeBlameHistoryRaw
1# fastandaccurate
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. No single ranking is presented; which curve wins can
14differ by accuracy regime, instance, and machine.
16Solvers are MATLAB function files. Most run via
17[numbl](https://numbl.org) (MATLAB syntax in the browser and in node),
18both on the site and from the command line; some run only in real
19MATLAB through the command line, and their results are marked as not
20reproducible in the browser. Each problem defines its own interface and
21instances in a written specification; interfaces are per problem rather
22than shared.
24## Problems
26- [laplace-dirichlet-2d](docs/problems/laplace-dirichlet-2d.md) —
27 interior Dirichlet Laplace problem on a star-shaped domain, data
28 manufactured from an exact harmonic function whose singularities sit an
29 adjustable distance outside the boundary.
31## Results
33Results are work-precision sweeps stored as JSON files in
34[fastandaccurate-results](https://github.com/concept-collection/fastandaccurate-results)
35and added by pull request; the site reads that repository statically.
36Every result records its provenance: instance spec and hash, solver id
37and version, protocol, runtime, numbl version, and machine. Solvers
38included on the site can be rerun in the browser on the problem page to
39compare against the committed curves.
41## Running benchmarks outside the browser
43The command line installs from the site itself (node 20 or newer):
45```
46npx https://concept-collection.github.io/fastandaccurate/cli.tgz run --label "my workstation"
47```
49Note that npx caches by the exact URL string; the site offers the URL
50with a `?v=<commit>` suffix so each deployment is a fresh install.
52Useful flags: `--instance <id>`, `--solver <id>`, `--repeats N`,
53`--max-n N`, `--out dir`. To benchmark your own solver, point the
54harness at a MATLAB function file implementing the problem's interface:
56```
57npx https://concept-collection.github.io/fastandaccurate/cli.tgz run \
58 --solver-file my_method.m --solver-id my-method
59```
61The resulting JSON files can be loaded on the site (load result file) to
62view them against the committed curves, and submitted by PR to the
63results repository. To add a solver to the site itself (so visitors can
64rerun it in the browser), PR the solver directory and a manifest entry
65to this repository; see `src/solvers/`.
67## Development
69```
70npm install
71npm run dev # local dev server
72npm test # solver convergence tests through numbl in node
73npm run build # type-check, site build, CLI tarball (dist/)
74npm run check-app # headless end-to-end check of the built site
75```
77Layout: `src/problems/` holds problem specs, instances, exact solutions,
78and the problem-side MATLAB; `src/solvers/` the solver MATLAB files and
79manifests; `src/harness/` the shared runner, sweep, and result schema
80(used identically by the browser worker and the CLI); `src/app/` the
81React site; `src/cli/` the command line.
83Deployed to GitHub Pages by `.github/workflows/deploy.yml` on push to
84main.
86## License
88Apache-2.0
moveopenescclose