MilAMin in the browser: a million unknowns a minute in TypeScript and WebAssembly
Abstract
In 2008 MILAMIN showed that a finite element code written in native MATLAB, a language then held to be too slow for large problems, could set up, solve and post-process one million unknowns per minute on a desktop, provided every stage of the pipeline gets equal care. This note brings the same pipeline to the web browser: Triangle meshing, 7-node Crouzeix-Raviart elements, supernodal Cholesky with fill-reducing ordering and Powell-Hestenes pressure iterations, in TypeScript and WebAssembly. Nothing is installed. Stokes models of inclusions, layers and grain swarms with up to two million unknowns are written in a few lines of JavaScript, and the folding and boudinage of layered rock is stepped through time. On a 2025 phone a million-unknown Stokes problem is meshed, assembled, factorized, iterated and rendered in nine seconds. Its assembly and solution alone take five to six times less than the 49 s the 2008 desktop needed for the same stages, and even a 2013 desktop lies below the 2008 curve at every size up to the four-gigabyte limit of WebAssembly. The largest gain came from the supernodal factorization, not from threads; the thread scaling on all devices is consistent with a memory-bandwidth limit. The solution is verified against the analytical circular-inclusion solution on a sequence of refined meshes. MilAMin, the browser version, runs at milamin.org; the code is public, under the GPL except for Triangle, which keeps its own terms, and the benchmark, the convergence study and the model presets have command-line twins that run the same code.
Related
- LQL-Equiv-web: a Python library and browser application for linear-quadratic-linear dose equivalence in radiotherapy
- Random walks in handaxe knapping before 1.2 million years ago in East Africa at Melka Kunture (Upper Awash, Ethiopia)
- A 5.3-million-year-old deep-sea whale necropolis in the Diamantina Zone
- On the possibility of deep seabed permafrost to occupy Ca. 7 million km2 in the Arctic Ocean
- 27 million years of sediment production in the Omo River catchment and contribution to the sedimentation in the Turkana Depression (EARS, Kenya/Ethiopia)
BibTeX
@misc{schmid2026milamin,
title = {{MilAMin in the browser: a million unknowns a minute in TypeScript and WebAssembly}},
author = {Daniel Walter Schmid},
howpublished = {EarthArXiv},
year = {2026},
month = sep,
doi = {10.31223/x5nf8t},
url = {https://eartharxiv.org/repository/view/15135/},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - MilAMin in the browser: a million unknowns a minute in TypeScript and WebAssembly
AU - Daniel Walter Schmid
PY - 2026
DA - 2026/09/22
PB - EarthArXiv
DO - 10.31223/x5nf8t
UR - https://eartharxiv.org/repository/view/15135/
AB - In 2008 MILAMIN showed that a finite element code written in native MATLAB, a language then held to be too slow for large problems, could set up, solve and post-process one million unknowns per minute on a desktop, provided every stage of the pipeline gets equal care. This note brings the same pipeline to the web browser: Triangle meshing, 7-node Crouzeix-Raviart elements, supernodal Cholesky with fill-reducing ordering and Powell-Hestenes pressure iterations, in TypeScript and WebAssembly. Nothing is installed. Stokes models of inclusions, layers and grain swarms with up to two million unknowns are written in a few lines of JavaScript, and the folding and boudinage of layered rock is stepped through time. On a 2025 phone a million-unknown Stokes problem is meshed, assembled, factorized, iterated and rendered in nine seconds. Its assembly and solution alone take five to six times less than the 49 s the 2008 desktop needed for the same stages, and even a 2013 desktop lies below the 2008 curve at every size up to the four-gigabyte limit of WebAssembly. The largest gain came from the supernodal factorization, not from threads; the thread scaling on all devices is consistent with a memory-bandwidth limit. The solution is verified against the analytical circular-inclusion solution on a sequence of refined meshes. MilAMin, the browser version, runs at milamin.org; the code is public, under the GPL except for Triangle, which keeps its own terms, and the benchmark, the convergence study and the model presets have command-line twins that run the same code.
ER -