Skip to main content

simgeometry

Geometry primitives for numerical simulations: bounded domains, structured grids, MPI domain decomposition, and 1D, 2D, and 3D shapes. Box, ball, and polygon containment have NumPy, Pyccel, CUDA, and Metal implementations. Originally developed for Picnic.

Install

pip install simgeometry

For development, install this checkout with pip install -e '.[test]'. NumPy, cunumpy, maybempi, and mpiarray are runtime dependencies. Matplotlib is optional. Install simgeometry[plot] for plotting, labelled evaluation and surface meshing, or simgeometry[interactive] for interactive 3D clipping with PyVista. Install simgeometry[mpi] for MPI, simgeometry[pyccel] for compiled CPU containment kernels, or simgeometry[gpu] for CUDA.

Example

from simgeometry.grid import Grid
from simgeometry.objects import Circle

boundary = Circle(midpoint=(0.5, 0.5), radius=0.25)
grid = Grid(ndim=2, lower_bound=(0, 0), upper_bound=(1, 1), num_gridpoints=(32, 32))
mask = boundary.node_mask(grid)

SimulationDomain accepts field and particle boundary objects through their get_bc(dir=..., side=...).bc_type interface. Applications may supply a seeded random function with BoundingBox.random and an accelerated particle boundary implementation with SimulationDomain.boundary_kernel.

Inspect, slice, and compose

from simgeometry import Sphere

shell = Sphere((0, 0, 0), 1) - Sphere((0, 0, 0), 0.4)
shell.show_3d(opacity=0.6)
shell.slice(z=0.2).show()
inside = shell.evaluate(x=[0, 0.8], y=0, z=0)

Shapes support named collections, Boolean operations, affine transforms, surface queries, point sampling, mesh export, cut-edge geometry and approximate cell/face fractions. See the executed tutorials and API guide for examples and the accuracy limits of sampled operations.

Development

pytest src/simgeometry/tests

Documentation: https://max-models.github.io/simgeometry/

Metadata

Release files for simgeometry 0.1.1

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

Source distribution (sdist)

Source distribution for simgeometry 0.1.1
File Size Uploaded Provenance Actions
simgeometry-0.1.1.tar.gz 73.2 kB With provenance Details for simgeometry-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simgeometry 0.1.1
File Interpreter ABI Platform Actions
simgeometry-0.1.1-py3-none-any.whl Python 3 none any Details for simgeometry-0.1.1-py3-none-any.whl

Total release size: 173.7 kB

Release files / simgeometry-0.1.1.tar.gz

Download URL simgeometry-0.1.1.tar.gz
Size 73.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f9cbc6cdc964912934f38a2f982e7be7cf5cd5af171792ccfb325e2f478bbdab
BLAKE2b-256 checksum
How to use checksums
294beaa988cab37b0e61e108e0eb64f2ab0566629f0bdd969a1d11e774801c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 20, 2026.

Transparency log

Release files / simgeometry-0.1.1-py3-none-any.whl

Download URL simgeometry-0.1.1-py3-none-any.whl
Size 100.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5fb60428d380d7c4b2aead81856497485de412b2673ad8d66b82702986f747d
BLAKE2b-256 checksum
How to use checksums
40bf08380619e38b5351bb288a362f3cb39c69e2573456e597622337144c76b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 20, 2026.

Transparency log

Security for simgeometry 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simgeometry-0.1.1.tar.gz

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 Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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