Skip to main content
MilAMin in the browser: a million unknowns a minute in TypeScript and WebAssembly

MilAMin in the browser: a million unknowns a minute in TypeScript and WebAssembly

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


Comments

There are no comments or no comments have been made public for this article.

Downloads

Download Preprint

Authors

Daniel Walter Schmid 

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.

DOI

https://doi.org/10.31223/X5NF8T

Subjects

Geophysics and Seismology, Numerical Analysis and Scientific Computing, Tectonics and Structure

Keywords

finite element method, Stokes flow, WebAssembly, sparse Cholesky, MILAMIN, verification

Dates

Published: 2026-09-22 11:40

Last Updated: 2026-09-22 11:40

License

CC BY Attribution 4.0 International

Additional Metadata

Data Availability:
Source code, the benchmark log with all measurements and the model presets: https://github.com/dwschmid/milamin-web. Release v1.0.0 archived at https://doi.org/10.5281/zenodo.22895506. The software runs at https://milamin.org.

Metrics

Views: 15

Downloads: 0