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.0

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.0
File Size Uploaded Provenance Actions
simgeometry-0.1.0.tar.gz 71.3 kB With provenance Details for simgeometry-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 170.0 kB

Release files / simgeometry-0.1.0.tar.gz

Download URL simgeometry-0.1.0.tar.gz
Size 71.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c964839c2d98624c9ff0d05254c7b6f5df76ba13e5c7e04755dfac968614d4e6
BLAKE2b-256 checksum
How to use checksums
bde6d62d336630c3eb0720faf7b731169a4da1386ad7eb61036187546f1ae861
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 Oct 20, 2026.

Transparency log

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

Download URL simgeometry-0.1.0-py3-none-any.whl
Size 98.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
979fe6d480973788c28785b3ad2c8609a0980d9f7d5cc0a0841faf01cd4515aa
BLAKE2b-256 checksum
How to use checksums
0a8bbb41043d114b5d01f9b204cd76da57d4961606c0d871d1e7c6073f91df2d
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 Oct 20, 2026.

Transparency log

Security for simgeometry 0.1.0

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.0.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.0 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