5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 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
a6326c5Remove design-rationale phrasing from site copy and READMEsJeremy Magland 13resolution varies. No single ranking is presented; which curve wins can
14differ by accuracy regime, instance, and machine.
5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 15
e58e208chunkie-dlp runs in real MATLAB via the CLI; solver runtime field, matlab -batch harnessJeremy Magland 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
ad5dc23Three new instances, near-field target sets, and an adaptive timing policyJeremy Magland 20reproducible in the browser. Two registry entries may share one file:
21the `-mat` solvers are their numbl twin's `solver.m` run in real MATLAB,
22so that pair of curves measures the runtime rather than the method. Each
23problem defines its own interface and instances in a written
24specification; interfaces are per problem rather than shared.
5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 25
26## Problems
28- [laplace-dirichlet-2d](docs/problems/laplace-dirichlet-2d.md) —
29 interior Dirichlet Laplace problem on a star-shaped domain, data
30 manufactured from an exact harmonic function whose singularities sit an
31 adjustable distance outside the boundary.
33## Results
35Results are work-precision sweeps stored as JSON files in
36[fastandaccurate-results](https://github.com/concept-collection/fastandaccurate-results)
a6326c5Remove design-rationale phrasing from site copy and READMEsJeremy Magland 37and added by pull request; the site reads that repository statically.
38Every result records its provenance: instance spec and hash, solver id
39and version, protocol, runtime, numbl version, and machine. Solvers
40included on the site can be rerun in the browser on the problem page to
41compare against the committed curves.
5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 42
43## Running benchmarks outside the browser
45The command line installs from the site itself (node 20 or newer):
47```
48npx https://concept-collection.github.io/fastandaccurate/cli.tgz run --label "my workstation"
49```
51Note that npx caches by the exact URL string; the site offers the URL
52with a `?v=<commit>` suffix so each deployment is a fresh install.
ad5dc23Three new instances, near-field target sets, and an adaptive timing policyJeremy Magland 54The solvers whose runtime is `matlab` need `matlab` on the PATH; the run
55skips them when it is absent. `chunkie-dlp` needs one thing more, the
56[mip](https://mip.sh) package manager on the MATLAB path, from which the
57harness installs chunkie and its FLAM and fmm2d dependencies on first
58use. Taking chunkie from mip rather than from a source clone is what
59makes its accelerated code path available without a Fortran compiler on
60the machine, since the mip fmm2d package ships a compiled MEX binary per
61platform.
63Useful flags: `--instance <id>`, `--solver <id>`, `--repeats N` (the
64minimum timed runs per point; each point is then repeated until it has
65used the `--time-budget`, 0.5 s by default), `--max-n N`, `--out dir`.
66To benchmark your own solver, point the harness at a MATLAB function file
67implementing the problem's interface:
5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 68
69```
70npx https://concept-collection.github.io/fastandaccurate/cli.tgz run \
71 --solver-file my_method.m --solver-id my-method
72```
74The resulting JSON files can be loaded on the site (load result file) to
75view them against the committed curves, and submitted by PR to the
76results repository. To add a solver to the site itself (so visitors can
77rerun it in the browser), PR the solver directory and a manifest entry
78to this repository; see `src/solvers/`.
80## Development
82```
83npm install
84npm run dev # local dev server
85npm test # solver convergence tests through numbl in node
86npm run build # type-check, site build, CLI tarball (dist/)
87npm run check-app # headless end-to-end check of the built site
88```
90Layout: `src/problems/` holds problem specs, instances, exact solutions,
91and the problem-side MATLAB; `src/solvers/` the solver MATLAB files and
92manifests; `src/harness/` the shared runner, sweep, and result schema
93(used identically by the browser worker and the CLI); `src/app/` the
94React site; `src/cli/` the command line.
96Deployed to GitHub Pages by `.github/workflows/deploy.yml` on push to
97main.
99## License
101Apache-2.0