Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
392bbf1
Significant speed improvements
kylebme Oct 6, 2026
683c496
Refuse to build the solver without every SPOOLES thread patch
kylebme Oct 6, 2026
4b1566e
Add PaStiX and optional MKL PARDISO solvers on every platform
claude Oct 7, 2026
244ccfe
Fix the first CI round of the cross-platform solver build
claude Oct 7, 2026
5d2abdd
Run the Windows MinGW tools with the environment on PATH
claude Oct 7, 2026
64669e9
Build PaStiX on Windows against conda's OpenBLAS development package
claude Oct 7, 2026
78c4637
Link conda's MSVC-built Scotch into PaStiX on Windows; report solver …
claude Oct 7, 2026
8986ace
Build PaStiX from source on macOS too; let its no-hwloc code compile
claude Oct 7, 2026
3a1d6d7
Fix PaStiX's no-hwloc code at build time on macOS and Windows
claude Oct 7, 2026
1540e65
Link winpthreads into PaStiX's Windows build; drop CI's PaStiX debug …
claude Oct 7, 2026
75638ff
Normalize Windows separators in PaStiX's install scripts
claude Oct 7, 2026
148b269
Drop CalculiX's file-scope _set_output_format call before compiling
claude Oct 7, 2026
fcbbb00
Flush PaStiX progress lines; trace PaStiX on Windows CI
claude Oct 7, 2026
9a7a82c
Build Scotch from source on Windows; widen the eigenvalue tolerance
claude Oct 7, 2026
689f99f
Build Windows Scotch with threads, as conda-forge does
claude Oct 7, 2026
755a5d6
Drop CI's Windows PaStiX trace; note the bundled Visual C++ runtime
claude Oct 7, 2026
3a79264
Run PARDISO in sprung-solve, a separate MKL program; drop PaStiX
claude Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Patches apply byte for byte: no line-ending conversion on checkout.
*.patch -text
38 changes: 20 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ jobs:
include:
- name: macOS (Apple Silicon)
os: macos-14
solver: macos
package: dist:mac
artifact: release/*.dmg
- name: Windows (x64)
os: windows-latest
solver: windows
package: package:win
artifact: release/*.exe
- name: Linux (x64)
# The oldest supported runner, so the app runs on older glibc.
os: ubuntu-22.04
solver: linux
package: package:linux
artifact: release/*.AppImage
env:
Expand All @@ -53,30 +56,22 @@ jobs:
with:
python-version: "3.10"

# CalculiX 2.23 on every platform: the Homebrew tap on macOS (as for
# local builds), conda-forge on Windows and Linux.
- name: Install CalculiX (macOS)
if: runner.os == 'macOS'
run: brew install costerwi/calculix/calculix-ccx

- name: Install CalculiX (Windows, Linux)
if: runner.os != 'macOS'
# CalculiX 2.23 built from source on every platform, with threaded
# SPOOLES and PARDISO (Apple Accelerate on macOS; on Windows and Linux,
# Intel oneMKL's in sprung-solve, a separate program built beside it),
# from a conda-forge environment.
- name: Set up the solver build environment
uses: mamba-org/setup-micromamba@v2
with:
environment-name: calculix
# OpenBLAS: MKL, the Windows default, loads its kernels at run
# time, so they cannot be found and bundled from the imports.
create-args: calculix=2.23 libblas=*=*openblas
environment-name: sprung-solver
environment-file: native/calculix/solver-env-${{ matrix.solver }}.yml
init-shell: none
cache-environment: true

- name: Locate CalculiX (Windows, Linux)
if: runner.os != 'macOS'
- name: Build CalculiX
run: |
env="$MAMBA_ROOT_PREFIX/envs/calculix"
if [ "$RUNNER_OS" = Windows ]; then ccx="$env/Library/bin/ccx.exe"; else ccx="$env/bin/ccx"; fi
test -f "$ccx"
echo "SPRUNG_FEA_CCX=$ccx" >> "$GITHUB_ENV"
if [ "$RUNNER_OS" = Windows ]; then python -m pip install pefile; fi
python scripts/build-solver.py --prefix "$MAMBA_ROOT_PREFIX/envs/sprung-solver"

- name: Install Linux build tools
if: runner.os == 'Linux'
Expand All @@ -93,9 +88,16 @@ jobs:
if [ "$RUNNER_OS" = Windows ]; then py=.venv/Scripts/python.exe; else py=.venv/bin/python; fi
"$py" -m pip install pyinstaller==6.22.3

- name: Compare the direct solvers
run: |
if [ "$RUNNER_OS" = Windows ]; then py=.venv/Scripts/python.exe; else py=.venv/bin/python; fi
"$py" -m unittest -v tests.test_solvers

- name: Package
run: npm run ${{ matrix.package }}

# The packaged app as shipped: its own sprung-solve and MKL, none
# installed on the computer.
- name: Solve with the packaged engine
run: npm run test:packaged

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ output/
.DS_Store

runtime/
/solver/
*.tsbuildinfo

.cad-venv/
Expand Down
46 changes: 39 additions & 7 deletions IMPLEMENTATION.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Stress, vibration and heat analysis for mechanical parts, on your own computer.

Open a STEP file, pick a material, click the faces that hold the part and the faces that carry load, and solve. Sprung FEA meshes the geometry, runs the open-source CalculiX solver locally, and shows you where the part is stressed, how far it moves, how it vibrates and how hot it gets.

It is free software (GPL-3.0) for macOS, Windows and Linux.
It runs on macOS, Windows and Linux. Its source code is free software (GPL-3.0-or-later). The downloadable builds also include separately licensed components (see [License](#license)).

![Setting up a study: open the bracket, choose aluminum, click the two bolt holes as fixed supports, put 500 N on the base, and solve](docs/media/setup.gif)

Expand Down Expand Up @@ -109,4 +109,10 @@ Development setup, packaging, tests and the internals are in [IMPLEMENTATION.md]

## License

GPL-3.0-or-later. See [LICENSE](LICENSE). Third-party components and their licenses are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
The Sprung FEA source code is GPL-3.0-or-later (see [LICENSE](LICENSE)), except the small `sprung-solve` program in `native/sprung-solve`, which is MIT.

The prebuilt downloads include separately licensed third-party components, each under its own license:
- CalculiX, the solver, is GPL-2.0-only and runs as a separate program.
- The Windows and Linux builds include Intel oneMKL, a proprietary library under the Intel Simplified Software License. It sits inside `sprung-solve`, a separate program that runs the fast PARDISO solver for CalculiX.

All components, their licenses and how they fit together are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md), and the license texts ship with the app.
36 changes: 30 additions & 6 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Third-party software

Sprung FEA is GPL-3.0-or-later. Its original interface and integration code are in this repository. No SolidWorks code, assets, or proprietary UI components are used. Official SolidWorks documentation informed the workflow research recorded in `docs/interaction-design.md`.
The Sprung FEA source code in this repository is GPL-3.0-or-later, except `native/sprung-solve`, which is MIT. Prebuilt distributions (the macOS DMG, Windows installer and Linux AppImage) are mixed-license: they bundle separately licensed third-party components, each under its own license, listed below. Most are free and open-source software. The Linux and Windows builds also contain Intel oneMKL, which is proprietary, distributed in binary form under the Intel Simplified Software License.

The distribution contains separate programs that communicate only through files, command-line arguments and pipes, each in its own process:

- **The Sprung FEA application** (Electron interface, local service and Python engine): GPL-3.0-or-later.
- **CalculiX CrunchiX (`ccx`)**: GPL-2.0-only, as CalculiX itself is (below). The engine writes a CalculiX input file, runs `ccx` on it, and reads its result files. Only libraries whose licenses are compatible with GPL-2.0 are linked into `ccx`.
- **`sprung-solve`** (Linux and Windows): MIT source, linked statically with Intel oneMKL. It solves sparse linear systems sent to it through a pipe, by the documented protocol in `docs/solver-protocol.md`, and it can also be run on its own. `ccx` sends its PARDISO solves there and falls back to its built-in SPOOLES solver when `sprung-solve` is absent. Neither MKL nor `sprung-solve` is linked into `ccx` or into the Sprung FEA application. Packaged builds keep it in its own folder (`runtime/solver/sprung-solve`), with its MIT license, Intel's license, and Intel's third-party notices.

No SolidWorks code, assets, or proprietary UI components are used. Official SolidWorks documentation informed the workflow research recorded in `docs/interaction-design.md`.

| Component | Purpose | License | Upstream/source |
|---|---|---|---|
| CalculiX CrunchiX 2.23 | Structural solver | GPL-2.0-or-later | https://www.dhondt.de/ and https://github.com/Dhondtguido/CalculiX |
| CalculiX CrunchiX 2.23 | Structural solver, a separate program (`ccx`) | GPL-2.0-only: its source files are licensed under "the GNU General Public License as published by the Free Software Foundation (version 2)", without "or any later version" (a few headers allow later versions) | https://www.dhondt.de/ and https://github.com/Dhondtguido/CalculiX |
| Gmsh 4.15.2 | STEP/OpenCASCADE import and meshing | GPL-2.0-or-later with exception | https://gmsh.info and https://gitlab.onelab.info/gmsh/gmsh |
| OpenCASCADE (within Gmsh) | CAD kernel | LGPL-2.1 with exception | https://dev.opencascade.org/ |
| NumPy 2.2.6 | Mesh and result calculations | BSD-3-Clause; bundled notices included | https://github.com/numpy/numpy |
Expand All @@ -19,14 +27,30 @@ Sprung FEA is GPL-3.0-or-later. Its original interface and integration code are
| Vite | Frontend build and development | MIT | https://github.com/vitejs/vite |
| Express / Multer | Local service and file import | MIT | https://github.com/expressjs |
| Inter / JetBrains Mono | Bundled offline fonts | SIL OFL-1.1 | https://github.com/rsms/inter and https://github.com/JetBrains/JetBrainsMono |
| SPOOLES 2.2 | CalculiX direct solver (statically linked) | Public domain | https://www.netlib.org/linalg/spooles/ |
| conda-forge spooles-feedstock patches (build 1006) | SPOOLES threading fixes, in `native/calculix/spooles-patches` | BSD-3-Clause | https://github.com/conda-forge/spooles-feedstock |
| Apple Accelerate | Sparse direct solver behind CalculiX's PARDISO interface on macOS | macOS system library (GPL-2.0's system library exception), not redistributed | https://developer.apple.com/documentation/accelerate/sparse_solvers |
| sprung-solve | Separate program that runs CalculiX's PARDISO solves on Linux and Windows | MIT (`licenses/sprung-solve.txt`) | `native/sprung-solve` in this repository |
| Intel oneMKL 2026 | PARDISO sparse direct solver, linked statically into `sprung-solve` only (Linux and Windows builds) | Intel Simplified Software License (October 2022), `licenses/Intel-oneMKL.txt`; proprietary, binary only; its third-party notices are in `licenses/Intel-oneMKL-third-party-programs.txt` | https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html (conda-forge `mkl-static`) |
| ARPACK-NG | CalculiX linear algebra dependency | BSD-3-Clause | https://github.com/opencollab/arpack-ng |
| OpenBLAS | Linear algebra | BSD-3-Clause | https://github.com/OpenMathLib/OpenBLAS |
| GCC runtime | Fortran, OpenMP, quadmath | GPL-3.0 with GCC Runtime Library Exception where applicable; LGPL for quadmath | https://gcc.gnu.org/ |
| Open MPI / PMIx / hwloc / libevent | Transitive native dependencies | BSD licenses; see individual notices | https://www.open-mpi.org/ and https://libevent.org/ |
| LLVM OpenMP | Transitive native dependency | Apache-2.0 with LLVM exception | https://llvm.org/ |
| LLVM OpenMP | OpenMP runtime: CalculiX's on macOS; MKL's threads in `sprung-solve` on Windows (as `libiomp5md.dll`) | Apache-2.0 with LLVM exception | https://llvm.org/ |

The VTK.wasm runtime is Kitware's unmodified prebuilt package `vtk-wasm32-emscripten` 9.7.20260927 from the VTK package registry (https://gitlab.kitware.com/vtk/vtk/-/packages), SHA-256 `63252b799e8c44dfb149f329c94f9f6715c78b654292f18cce067c9d080a2e92`. `scripts/fetch-vtk-wasm.mjs` downloads and verifies it; it is not committed to this repository.

The native solver is the existing Homebrew build, with dynamic-library install names changed only to use adjacent bundled libraries. The build recipe is `costerwi/homebrew-calculix` commit `57711a3e00dec3128664260a9f58e69fbe874dca`, source archive SHA-256 `9c88385c10fb04f5dc6c4e98027a51bebdd8aee3920e05190d6c1dd08357d6e7`. The recipe incorporates SPOOLES 2.2, https://www.netlib.org/linalg/spooles/. The Gmsh wheel includes its upstream CAD/mesher implementation unchanged. Windows and Linux builds bundle the unmodified conda-forge `calculix` 2.23 package (https://github.com/conda-forge/calculix-feedstock) and the conda-forge ARPACK, BLAS/LAPACK and GCC runtime libraries it links; on Linux only their library search path is changed, to the solver's own folder. Windows builds also include the MinGW-w64 winpthreads runtime (MIT-style license, https://www.mingw-w64.org/).
The solver is built on every platform by `scripts/build-solver.py` from the CalculiX 2.23 source archive (SHA-256 `9c88385c10fb04f5dc6c4e98027a51bebdd8aee3920e05190d6c1dd08357d6e7`) and SPOOLES 2.2 (SHA-256 `a84559a0e987a1e423055ef4fdf3035d55b65bbe4bf915efaa1a35bef7f8c5dd`), with compilers and libraries from conda-forge (`native/calculix/solver-env-*.yml`). The build checks CalculiX's license notices and stops if they are no longer the GPL version 2 ones described here. Its modifications to CalculiX are all in this repository:

- the SPOOLES patches in `native/calculix/spooles-patches`;
- two small compile fixes: a void function's return value (also fixed in Homebrew's `costerwi/homebrew-calculix` formula), and a Windows-only call outside any function that only affected the old msvcrt;
- `native/calculix/accelerate_pardiso.c`, which answers CalculiX's PARDISO calls with Apple Accelerate on macOS;
- `native/calculix/pardiso_client.c`, which hands them to `sprung-solve` on Linux and Windows;
- `native/calculix/mkl_service.h`, which stands in for MKL's header so that CalculiX compiles without MKL.

These additions are GPL-2.0-or-later. CalculiX's PaStiX interface is not built. `ccx` links the unmodified conda-forge ARPACK, OpenBLAS and GCC (or, on macOS, LLVM OpenMP) runtime libraries.

`sprung-solve` is built by the same script from `native/sprung-solve` and the unmodified static libraries of Intel oneMKL (conda-forge `mkl-static`), with GCC and GNU OpenMP on Linux, and on Windows with Microsoft's C compiler and LLVM OpenMP. Intel's license permits redistributing MKL without modification, provided its copyright notice and terms are reproduced; they ship beside `sprung-solve` and in `licenses/`.

Bundling changes only the libraries' search paths (Linux) or install names (macOS), to each program's own folder. Windows builds also include the MinGW-w64 winpthreads runtime (MIT-style license, https://www.mingw-w64.org/), and Microsoft's Visual C++ runtime library `vcruntime140.dll`, which conda-forge's OpenBLAS and `sprung-solve` need, under Microsoft's terms for redistributable Visual C++ runtime files. The Gmsh wheel includes its upstream CAD/mesher implementation unchanged.

License texts in `licenses/` are included in packaged builds. Electron additionally includes Chromium's own third-party notices. Build scripts collect the installed native and JavaScript dependency notices. This repository currently produces a local developer build; a public binary release must also provide corresponding source for GPL/LGPL components and their build modifications, alongside the binary distribution. Upstream source URLs alone are not a replacement for that source distribution.
License texts in `licenses/` are included in packaged builds. Electron additionally includes Chromium's own third-party notices. Build scripts collect the installed native and JavaScript dependency notices. This repository currently produces a local developer build. A public binary release must also provide the corresponding source for the GPL and LGPL components and their build modifications, alongside the binary distribution. Intel oneMKL has no source to provide; it is not a GPL component. Upstream source URLs alone are not a replacement for that source distribution.
Loading
Loading