Skip to main content

compas_lmgc90

Python bindings for LMGC90 discrete element solver.

Installation

Conda

With conda alreay installed, create a conda environment from the yaml file

conda env create -f environment.yml

Then activate it and install the module inside it:

conda activate compas_lmgc90-dev
python -m pip install .

Linux

# Install dependencies
sudo apt update
sudo apt install -y gfortran libopenblas-dev liblapack-dev cmake

# Clone and install
git clone https://github.com/BlockResearchGroup/compas_lmgc90.git
cd compas_lmgc90
conda create -n lmgc90 python=3.12 -y
conda activate lmgc90
conda install -c conda-forge libstdcxx-ng=14
pip install -r requirements-dev.txt
pip install --no-build-isolation -ve .

Note: The libstdcxx-ng=14 is required because the module is compiled with GCC 13.3+ and needs GLIBCXX_3.4.32.

macOS

# Install dependencies
brew install gcc openblas cmake

# Clone and install
git clone https://github.com/BlockResearchGroup/compas_lmgc90.git
cd compas_lmgc90
conda create -n lmgc90 python=3.12 -y
conda activate lmgc90
pip install -r requirements-dev.txt
pip install --no-build-isolation -ve .

Note: CMake will auto-detect Homebrew GCC/gfortran. If detection fails, set compilers manually:

export FC=$(brew --prefix gcc)/bin/gfortran-14
export CC=$(brew --prefix gcc)/bin/gcc-14  
export CXX=$(brew --prefix gcc)/bin/g++-14

Windows

Windows is not currently supported. The package requires Fortran compilers and POSIX-style build tools.

Usage

from compas_dem.models import BlockModel
from compas_dem.templates import ArchTemplate
from compas_lmgc90.solver import Solver

# Create model
template = ArchTemplate(rise=3, span=10, thickness=0.5, depth=0.5, n=20)
model = BlockModel.from_boxes(template.blocks())

# Run simulation
solver = Solver()
solver.geometry_from_model(model)
solver.set_supports(z_threshold=0.4)
solver.contact_law("IQS_CLB", 0.35)  # required as soon as blocks touch
solver.preprocess()
solver.run(nb_steps=100)
solver.finalize()

Re-running this in the same Python process (Rhino's ScriptEditor, Jupyter) is supported; finalize() is optional, the next Solver() resets LMGC90's state. LMGC90 holds exactly one simulation per process, so only the most recently created Solver is usable — an older one raises RuntimeError instead of crashing. Keep results (solver.trimeshes, solver.get_contacts()) around, not the solver itself.

Examples

python temp/dem_of_an_arch.py
python temp/dem_of_a_wall.py
python temp/dem_of_a_dome.py
python temp/contacts.py

Troubleshooting

ImportError: libmatlib.so not found

Make sure you installed the package with pip install -e . in the correct conda environment. The LMGC90 libraries are bundled during installation.

GLIBCXX version error (Linux)

Install the required libstdc++:

conda install -c conda-forge libstdcxx-ng=14

macOS: Compiler not found

If CMake can't find gfortran, manually set the compilers before building:

export FC=$(brew --prefix gcc)/bin/gfortran-14
export CC=$(brew --prefix gcc)/bin/gcc-14
export CXX=$(brew --prefix gcc)/bin/g++-14
pip install --no-build-isolation -ve .

macOS: Compiler not found

If CMake can't find gfortran, manually set the compilers before building:

export FC=$(brew --prefix gcc)/bin/gfortran-14
export CC=$(brew --prefix gcc)/bin/gcc-14
export CXX=$(brew --prefix gcc)/bin/g++-14
pip install --no-build-isolation -ve .

Contributing

Testing a Pull Request

# Fetch the PR branch (replace PR_NUMBER with the actual number)
git fetch upstream pull/PR_NUMBER/head:pr-branch-name
git checkout pr-branch-name

# Build and test
pip install --no-build-isolation -ve .
python temp/contacts.py

Pushing changes to a PR

# Add the PR author's fork as a remote
git remote add author https://github.com/AUTHOR/compas_lmgc90.git

# Push your changes to their branch
git push author branch-name

Note: This requires the PR author to have enabled "Allow edits from maintainers" on their PR.

Release files for compas-lmgc90 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compas-lmgc90 0.1.11
File Size Uploaded
compas_lmgc90-0.1.11.tar.gz 266.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for compas-lmgc90 0.1.11
File
compas_lmgc90-0.1.11-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
compas_lmgc90-0.1.11-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
compas_lmgc90-0.1.11-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
compas_lmgc90-0.1.11-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
compas_lmgc90-0.1.11-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
compas_lmgc90-0.1.11-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
compas_lmgc90-0.1.11-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
compas_lmgc90-0.1.11-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
compas_lmgc90-0.1.11-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
compas_lmgc90-0.1.11-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
compas_lmgc90-0.1.11-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
compas_lmgc90-0.1.11-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details
compas_lmgc90-0.1.11-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
compas_lmgc90-0.1.11-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details
compas_lmgc90-0.1.11-cp39-cp39-macosx_14_0_arm64.whl CPython 3.9 CPython 3.9 macOS 14.0+ ARM64 Details

Total release size: 182.2 MB

Release files / compas_lmgc90-0.1.11.tar.gz

Download URL compas_lmgc90-0.1.11.tar.gz
Size 266.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4f906cb70cf4f9adbf32dbe9dfdd01cb7fe8574ef2006bb070c797839a478187
BLAKE2b-256 checksum
How to use checksums
9571bc8a9948f530fc771ac9fc711248d7f116a194cdf17e30e494db18634660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp313-cp313-win_amd64.whl

Download URL compas_lmgc90-0.1.11-cp313-cp313-win_amd64.whl
Size 17.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a70a2b15f89097c4ce130aaa1b5ac9baa83ed8dd0cf6f11b25ec788b6029512e
BLAKE2b-256 checksum
How to use checksums
df29d58f2e66410ddef14e8419178a0e119aca9277e8ae8c7be920816b6eb5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL compas_lmgc90-0.1.11-cp313-cp313-manylinux_2_28_x86_64.whl
Size 14.5 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6b2c3e7da004c170f2635225ab8f96a34f7c81116ce3eb495a008d655395c1c2
BLAKE2b-256 checksum
How to use checksums
6441b02f6f1a5d805d0b3bad7af7239a3ad87f40e7ad61ae4d901b0bd938f18e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp313-cp313-macosx_14_0_arm64.whl

Download URL compas_lmgc90-0.1.11-cp313-cp313-macosx_14_0_arm64.whl
Size 4.1 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
34dfe3914453f35b2072d6435678fd4cff3c63b1a69b090666037a55cddd9a94
BLAKE2b-256 checksum
How to use checksums
b9a9a77313bc5d8f6d26c19e6cb3c4cc5821ecd4b1f2c5887e47660ddb95f4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp312-cp312-win_amd64.whl

Download URL compas_lmgc90-0.1.11-cp312-cp312-win_amd64.whl
Size 17.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
3a9fd7b114e964f62c64d23c3de4fd79b04e7b44998486f743892718e6ae6ae9
BLAKE2b-256 checksum
How to use checksums
3d3fdfb18e486d6c64555716a6c4bcd47e30f80fc576a407066878710d1f0a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL compas_lmgc90-0.1.11-cp312-cp312-manylinux_2_28_x86_64.whl
Size 14.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
947e1885a4f7d233074979346923b599c1ea0c775cf58ab317ea59818660b58e
BLAKE2b-256 checksum
How to use checksums
5f45f957cf99f6c2ba5051a65ec9079522f05e21b2fe978f445bcdcaff004ce4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp312-cp312-macosx_14_0_arm64.whl

Download URL compas_lmgc90-0.1.11-cp312-cp312-macosx_14_0_arm64.whl
Size 4.1 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
0765b0cbe7fae6ac54dfee916117b6344e3d6a48eb22731b8d7fb3a8b193774a
BLAKE2b-256 checksum
How to use checksums
7925888580e5b28ec15d027e595bf6bd28650d83e46214cb7a3af14ccd02ed27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp311-cp311-win_amd64.whl

Download URL compas_lmgc90-0.1.11-cp311-cp311-win_amd64.whl
Size 17.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
455034601194e2c734a0bd37ae05a083cd9ce93d8e53757632e436a4bd0337c6
BLAKE2b-256 checksum
How to use checksums
af5f4d02cf618d4aeaf444b73c88027adcc21f22054bdaf3a9338a0e8b7386d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL compas_lmgc90-0.1.11-cp311-cp311-manylinux_2_28_x86_64.whl
Size 14.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6c4970c9a6aef30a62bfc4cfc9564e07ae8187001db8fc663173758d3e8ed1ee
BLAKE2b-256 checksum
How to use checksums
44c90f1fd640ec85457cc0e46604a821136a7d451ec9adc9c6da6a3027373c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp311-cp311-macosx_14_0_arm64.whl

Download URL compas_lmgc90-0.1.11-cp311-cp311-macosx_14_0_arm64.whl
Size 4.1 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
6d3e0ed9bab37e6b57eb6eca245f2bfb0ab998eaebaf01fe81769c08905521f9
BLAKE2b-256 checksum
How to use checksums
af44a67a93de3ea500c137c0349ef0635b9a6ef1f16c122e79ad3eabfc244cd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp310-cp310-win_amd64.whl

Download URL compas_lmgc90-0.1.11-cp310-cp310-win_amd64.whl
Size 17.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
d3453a0528c71e14feab7eff6ea29f0adbf6d8dabb8c864d0064172eb569ed14
BLAKE2b-256 checksum
How to use checksums
cf25ed7cfef6b24465747584a1542288859afe9c63fa52cbf77886367bef1494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL compas_lmgc90-0.1.11-cp310-cp310-manylinux_2_28_x86_64.whl
Size 14.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c0cd7c75528172dc8e16a3167f2de2e8baaa1914bf85f234ad1e9e7e49d89776
BLAKE2b-256 checksum
How to use checksums
efca2171404bafa6ccfe7e1fd78560e29c68ad4e5ad92332c215ac61c837a43f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp310-cp310-macosx_14_0_arm64.whl

Download URL compas_lmgc90-0.1.11-cp310-cp310-macosx_14_0_arm64.whl
Size 4.1 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
be60bb50b6d9f9cf46bbe1493309f0747e3958f1d12c32b9f58a953701114cbe
BLAKE2b-256 checksum
How to use checksums
84c2b4bf62a39b2eae9506faa59e0afee6b3e4aa5228b2f8ae26217b02d5b14f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp39-cp39-win_amd64.whl

Download URL compas_lmgc90-0.1.11-cp39-cp39-win_amd64.whl
Size 17.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
d3c1182da26e3b4941a672c0e6f53e9f1e45402f9fcdc345a94ee1fa594dffde
BLAKE2b-256 checksum
How to use checksums
bd5501d55da8ccf96b0328c7bca853d6398af88ac96d07f80f88bff6294d4cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL compas_lmgc90-0.1.11-cp39-cp39-manylinux_2_28_x86_64.whl
Size 14.5 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6f800f05017119236956a177b471bd6dea54c011f8a9c5ae43670ce803435575
BLAKE2b-256 checksum
How to use checksums
76f32ef340743909b03e5aa62fb437c1447a92f821c2eef67148f09402363dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / compas_lmgc90-0.1.11-cp39-cp39-macosx_14_0_arm64.whl

Download URL compas_lmgc90-0.1.11-cp39-cp39-macosx_14_0_arm64.whl
Size 4.1 MB
Tags CPython 3.9 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
bb31990005f140c01b1e3098600457930e6d184ccd1fd06bc30045f0a00b9d15
BLAKE2b-256 checksum
How to use checksums
7da8873e675a608891915c5f97dc43ba0cfb0de8bc157ebe2006179a42ca2833
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.11 This release

16 release files

0.1.8

16 release files

0.1.7

11 release files

0.1.6

3 release files

0.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page