Skip to content

Commit 18aab70

Browse files
committed
Update the benchmark numbers from the 0.4.0 release runs
The solver times, memory and agreement with Elmer and scikit-fem came from the runs of 0.4.0-rc.1, before the sparse LU fix of FEAScript-core #136. They now come from the 0.4.0 release, measured on the Ryzen 5 9600X on 2026-11-17. The solutions are the same up to round-off, so only the last digits of the differences change. The browser table gains most from #136: in Firefox, `lusolve` on the largest fin and cavity meshes takes 4.4 s and 20 s instead of 21 s and 218 s, about 2.4 times its Node.js time instead of 11 to 23 times. The paragraph on the browsers is reworded to match. The solver time and memory plots are drawn again from the new numbers. Signed-off-by: Nikos Chamakos <nikoscham@gmail.com>
1 parent 8b67673 commit 18aab70

7 files changed

Lines changed: 90 additions & 90 deletions

File tree

‎docs/examples/creeping-flow.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ including those next to the lid corners:
8888
| ------- | ------------------------------ | ------------------------------ |
8989
| 8 × 8 | 5.1e-14 | 1.1e-11 |
9090
| 16 × 16 | 1.3e-13 | 1.2e-11 |
91-
| 24 × 24 | 9.2e-14 | 3.1e-11 |
91+
| 24 × 24 | 9.3e-14 | 4.1e-11 |
9292
| 32 × 32 | 4.0e-13 | 8.7e-11 |
93-
| 48 × 48 | 2.4e-13 | 2.2e-10 |
93+
| 48 × 48 | 2.3e-13 | 7.9e-11 |
9494
| 64 × 64 | 2.6e-13 | 1.1e-10 |
9595

9696
The velocity is compared at all the nodes, and the pressure at the mesh vertices, where it is defined.

‎docs/examples/heat-conduction.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,21 @@ so both programs are compared with it at every node, and with each other:
112112

113113
| Elements | Mesh | Nodes | Largest error (°C) | RMS error (°C) | Difference from Elmer (°C) |
114114
| --------- | --------- | ------ | ------------------ | -------------- | -------------------------- |
115-
| Linear | 20 × 10 | 231 | 1.0e0 | 1.1e-1 | 3.1e-13 |
115+
| Linear | 20 × 10 | 231 | 1.0e0 | 1.1e-1 | 4.3e-13 |
116116
| Linear | 40 × 20 | 861 | 5.7e-1 | 3.2e-2 | 3.4e-12 |
117-
| Linear | 80 × 40 | 3,321 | 3.1e-1 | 8.8e-3 | 9.2e-12 |
118-
| Linear | 160 × 80 | 13,041 | 1.6e-1 | 2.4e-3 | 4.4e-11 |
119-
| Linear | 320 × 160 | 51,681 | 8.1e-2 | 6.7e-4 | 1.9e-10 |
120-
| Quadratic | 10 × 5 | 231 | 8.0e-1 | 6.7e-2 | 5.4e-13 |
121-
| Quadratic | 20 × 10 | 861 | 3.9e-1 | 1.7e-2 | 2.5e-12 |
122-
| Quadratic | 40 × 20 | 3,321 | 2.0e-1 | 4.3e-3 | 6.3e-12 |
117+
| Linear | 80 × 40 | 3,321 | 3.1e-1 | 8.8e-3 | 1.1e-11 |
118+
| Linear | 160 × 80 | 13,041 | 1.6e-1 | 2.4e-3 | 4.9e-11 |
119+
| Linear | 320 × 160 | 51,681 | 8.1e-2 | 6.7e-4 | 2.0e-10 |
120+
| Quadratic | 10 × 5 | 231 | 8.0e-1 | 6.7e-2 | 6.8e-13 |
121+
| Quadratic | 20 × 10 | 861 | 3.9e-1 | 1.7e-2 | 2.7e-12 |
122+
| Quadratic | 40 × 20 | 3,321 | 2.0e-1 | 4.3e-3 | 8.1e-12 |
123123
| Quadratic | 80 × 40 | 13,041 | 9.7e-2 | 1.1e-3 | 2.9e-11 |
124-
| Quadratic | 160 × 80 | 51,681 | 4.9e-2 | 2.7e-4 | 1.0e-10 |
124+
| Quadratic | 160 × 80 | 51,681 | 4.9e-2 | 2.7e-4 | 9.6e-11 |
125125

126126
![Fin in 2D: largest error against the exact solution against element size, for linear and quadratic elements, logarithmic axes](/assets/examples/fin-elmer-comparison.svg)
127127

128128
The errors of Elmer are the same to the digits shown, and the temperatures of the two programs differ by at most
129-
1.9e-10 °C on every mesh, the round-off of double precision arithmetic, which grows with the size of the mesh. The
129+
2.0e-10 °C on every mesh, the round-off of double precision arithmetic, which grows with the size of the mesh. The
130130
largest error is at the node next to the top right corner, where the fixed temperature of the right edge meets the
131131
convection of the top edge and the exact solution is not smooth. There it falls only in proportion to the element
132132
size $h$, with either element; the RMS error over all the nodes falls about as $h^2$.
@@ -140,7 +140,7 @@ its `HeatSolver` with the UMFPACK direct solver, run on one core as a single MPI
140140

141141
The fin was also solved with [scikit-fem](https://github.com/kinnala/scikit-fem), an open-source finite element library for Python, on the
142142
same meshes, with the same elements and its default direct solver. The temperatures of FEAScript and scikit-fem
143-
differ by at most 1.7e-10 °C on every mesh, from 231 to 51,681 nodes, as close as with Elmer.
143+
differ by at most 1.9e-10 °C on every mesh, from 231 to 51,681 nodes, as close as with Elmer.
144144

145145
## Fin in 2D, Gmsh mesh
146146

‎docs/fundamentals/solvers.mdx‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,19 @@ on the larger meshes it does not converge with its default settings (see below).
167167

168168
| Mesh | Nodes | `"frontal"` | `"lusolve"` | `"jacobi"` | Elmer (UMFPACK) |
169169
| --------- | ------ | ----------- | ----------- | ------------- | --------------- |
170-
| 20 × 10 | 231 | 0.022 s | 0.052 s | 0.016 s | < 0.01 s |
171-
| 40 × 20 | 861 | 0.094 s | 0.10 s | 0.063 s | < 0.01 s |
172-
| 80 × 40 | 3,321 | 0.13 s | 0.20 s | 0.45 s | 0.01 s |
173-
| 160 × 80 | 13,041 | 0.37 s | 0.51 s | not converged | 0.04 s |
174-
| 320 × 160 | 51,681 | 2.4 s | 2.0 s | not converged | 0.21 s |
170+
| 20 × 10 | 231 | 0.022 s | 0.056 s | 0.016 s | < 0.01 s |
171+
| 40 × 20 | 861 | 0.093 s | 0.10 s | 0.064 s | < 0.01 s |
172+
| 80 × 40 | 3,321 | 0.12 s | 0.19 s | 0.45 s | 0.01 s |
173+
| 160 × 80 | 13,041 | 0.36 s | 0.51 s | not converged | 0.04 s |
174+
| 320 × 160 | 51,681 | 2.4 s | 1.8 s | not converged | 0.21 s |
175175

176176
`"frontal"` is the faster direct solver up to about 13,000 nodes, and `"lusolve"` on the largest mesh. Both give
177177
the same temperatures, to within 2e-10.
178178

179179
`"jacobi"` is the fastest on the two smallest meshes, but the number of iterations it needs grows with the mesh.
180180
On the 80 × 40 mesh it takes 9,860 iterations, just under the default `maxIterations` of 10,000, and 0.45 s against
181-
0.13 s for `"frontal"`. From 13,041 nodes it does not converge with its default settings. Raising `maxIterations`
182-
lets it converge, but slowly: 36,424 iterations and 6.0 s on the 160 × 80 mesh, against 0.37 s for `"frontal"`. Use
181+
0.12 s for `"frontal"`. From 13,041 nodes it does not converge with its default settings. Raising `maxIterations`
182+
lets it converge, but slowly: 36,424 iterations and 6.0 s on the 160 × 80 mesh, against 0.36 s for `"frontal"`. Use
183183
it for small problems only. Its temperatures differ from those of the direct solvers by up to 3e-4 °C on the 80 × 40
184184
mesh and 8e-4 °C on the 160 × 80 mesh, because it stops at the residual tolerance.
185185

@@ -190,22 +190,22 @@ which includes about 60 MB for Node.js and FEAScript themselves:
190190

191191
| Mesh | Nodes | `"frontal"` | `"lusolve"` | `"jacobi"` | Elmer (UMFPACK) |
192192
| --------- | ------ | ----------- | ----------- | ------------- | --------------- |
193-
| 20 × 10 | 231 | 61 MB | 65 MB | 58 MB | 29 MB |
194-
| 40 × 20 | 861 | 69 MB | 67 MB | 63 MB | 30 MB |
195-
| 80 × 40 | 3,321 | 71 MB | 83 MB | 65 MB | 34 MB |
196-
| 160 × 80 | 13,041 | 96 MB | 140 MB | not converged | 50 MB |
197-
| 320 × 160 | 51,681 | 255 MB | 347 MB | not converged | 121 MB |
193+
| 20 × 10 | 231 | 61 MB | 65 MB | 57 MB | 29 MB |
194+
| 40 × 20 | 861 | 69 MB | 66 MB | 63 MB | 30 MB |
195+
| 80 × 40 | 3,321 | 71 MB | 80 MB | 64 MB | 34 MB |
196+
| 160 × 80 | 13,041 | 95 MB | 129 MB | not converged | 50 MB |
197+
| 320 × 160 | 51,681 | 249 MB | 330 MB | not converged | 120 MB |
198198

199199
From about 3,000 nodes, `"frontal"` needs less memory than `"lusolve"`, about three quarters of it on the
200200
largest mesh.
201201

202202
Creeping flow is solved with `"lusolve"` only, and its time and memory grow faster with the mesh: on the
203-
[lid-driven cavity](../examples/creeping-flow.mdx#comparison-with-elmer), 1.4 s and 195 MB on a 32 × 32 mesh
204-
(4,225 nodes), and 9.6 s and 736 MB on a 64 × 64 mesh (16,641 nodes). The pressure rows of its matrix have zeros
203+
[lid-driven cavity](../examples/creeping-flow.mdx#comparison-with-elmer), 1.4 s and 194 MB on a 32 × 32 mesh
204+
(4,225 nodes), and 8.7 s and 690 MB on a 64 × 64 mesh (16,641 nodes). The pressure rows of its matrix have zeros
205205
on the diagonal, so its LU decomposition fills in more than that of heat conduction, even with the ordering that
206206
suits it (see [LU decomposition](#lu-decomposition-lusolve)).
207207

208-
These numbers are from FEAScript-core 0.4.0 (RC), loaded from its built bundle in Node.js 18, on one core of an
208+
These numbers are from FEAScript-core 0.4.0, loaded from its built bundle in Node.js 18, on one core of an
209209
AMD Ryzen 5 9600X. Each is the median of 5 runs, and the times include mesh generation. On another computer the
210210
times differ, but the comparison between the solvers holds in Node.js and Chrome.
211211

@@ -216,7 +216,7 @@ built for much larger problems, typically in 3D, and this setup does not show it
216216

217217
The same problems were also run with [scikit-fem](https://github.com/kinnala/scikit-fem), an open-source finite
218218
element library for Python whose heavy work runs in the compiled code of NumPy and SciPy, with its default direct
219-
solver. On one core, it took 0.24 s and 209 MB on the 320 × 160 fin, and 0.94 s and 361 MB on the 64 × 64 cavity.
219+
solver. On one core, it took 0.24 s and 209 MB on the 320 × 160 fin, and 1.3 s and 361 MB on the 64 × 64 cavity.
220220

221221
### In the browser
222222

@@ -225,14 +225,14 @@ case, in fresh headless browsers on the same core:
225225

226226
| Case | Nodes | Node.js | Chromium | Firefox |
227227
| ------------------------------ | ------ | ------- | -------- | ------- |
228-
| Fin, `"frontal"` | 51,681 | 2.4 s | 1.6 s | 3.2 s |
229-
| Fin, `"lusolve"` | 51,681 | 2.0 s | 1.5 s | 21 s |
230-
| Lid-driven cavity, `"lusolve"` | 16,641 | 9.6 s | 7.8 s | 218 s |
231-
232-
Chromium, whose V8 JavaScript engine Node.js also uses, is as fast as Node.js or faster on these meshes. In Firefox,
233-
`"frontal"` is close to the others, but `"lusolve"` is 11 to 23 times slower than in Node.js on the largest meshes,
234-
so for heat conduction in Firefox, prefer `"frontal"`. Creeping flow needs `"lusolve"`, so keep its meshes small
235-
there. The solutions are the same in all three, to the last bit. Chromium 156 and Firefox 159 were used.
228+
| Fin, `"frontal"` | 51,681 | 2.4 s | 2.0 s | 3.8 s |
229+
| Fin, `"lusolve"` | 51,681 | 1.8 s | 2.1 s | 4.4 s |
230+
| Lid-driven cavity, `"lusolve"` | 16,641 | 8.7 s | 8.7 s | 20 s |
231+
232+
Chromium, whose V8 JavaScript engine Node.js also uses, is about as fast as Node.js on these meshes: faster with
233+
`"frontal"`, a little slower with `"lusolve"` on the fin, and the same on the cavity. Firefox is slower on the
234+
largest meshes, 1.6 times with `"frontal"` and 2.3 to 2.4 times with `"lusolve"`, so for heat conduction in Firefox,
235+
`"frontal"` is the faster solver. The solutions are the same in all three, to the last bit. Chromium 156 and Firefox 159 were used.
236236

237237
The benchmarks, with the Elmer, scikit-fem and browser setups, are in
238238
[FEAScript-benchmark](https://github.com/FEAScript/FEAScript-benchmark).

‎docs/verification/overview.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ part of the test suite; they are run with
4141
## Comparison with scikit-fem
4242

4343
The same two examples are also solved with [scikit-fem](https://github.com/kinnala/scikit-fem), an open-source finite element library
44-
for Python, on the same meshes. FEAScript and scikit-fem agree to within 1.7e-10 °C on the
45-
[fin in 2D](../examples/heat-conduction#comparison-with-scikit-fem), and to within 4.0e-13 in velocity and 2.2e-10 in
44+
for Python, on the same meshes. FEAScript and scikit-fem agree to within 1.9e-10 °C on the
45+
[fin in 2D](../examples/heat-conduction#comparison-with-scikit-fem), and to within 4.0e-13 in velocity and 1.1e-10 in
4646
pressure on the [lid-driven cavity](../examples/creeping-flow#comparison-with-scikit-fem), lid corners included.
4747
They also agree on [unstructured Gmsh meshes](../examples/heat-conduction#comparison-on-unstructured-meshes).
4848

‎scripts/generate-plot-figures.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@
5959
# docs/fundamentals/solvers.mdx, performance
6060
"solver-performance": log_plot(
6161
[
62-
('"frontal"', [(231, 0.022), (861, 0.09407), (3321, 0.1284), (13041, 0.3676), (51681, 2.396)]),
63-
('"lusolve"', [(231, 0.05207), (861, 0.1038), (3321, 0.1955), (13041, 0.5122), (51681, 1.959)]),
64-
('"jacobi"', [(231, 0.01563), (861, 0.06255), (3321, 0.4542)]), # Does not converge with its defaults on larger meshes
62+
('"frontal"', [(231, 0.02194), (861, 0.09285), (3321, 0.1236), (13041, 0.3597), (51681, 2.386)]),
63+
('"lusolve"', [(231, 0.05553), (861, 0.1050), (3321, 0.1896), (13041, 0.5086), (51681, 1.834)]),
64+
('"jacobi"', [(231, 0.01631), (861, 0.06373), (3321, 0.4529)]), # Does not converge with its defaults on larger meshes
6565
],
6666
"Number of nodes",
6767
"Time (s)",
6868
"Fin in 2D: assembly and solve time",
6969
),
7070
"solver-memory": log_plot(
7171
[
72-
('"frontal"', [(231, 61.2), (861, 69.3), (3321, 70.8), (13041, 96.4), (51681, 254.6)]),
73-
('"lusolve"', [(231, 65.2), (861, 66.8), (3321, 82.6), (13041, 140.1), (51681, 347.4)]),
74-
('"jacobi"', [(231, 57.8), (861, 63.2), (3321, 64.6)]),
72+
('"frontal"', [(231, 60.9), (861, 68.9), (3321, 70.5), (13041, 94.7), (51681, 248.7)]),
73+
('"lusolve"', [(231, 65.2), (861, 66.4), (3321, 80.1), (13041, 128.9), (51681, 329.6)]),
74+
('"jacobi"', [(231, 56.8), (861, 62.9), (3321, 63.8)]),
7575
],
7676
"Number of nodes",
7777
"Peak memory (MB)",

‎static/assets/solver-memory.svg‎

Lines changed: 24 additions & 24 deletions
Loading

0 commit comments

Comments
 (0)