simgeometry
Install from GitHub with
pip install git+https://github.com/max-models/simgeometryGeometry primitives for numerical simulations: bounded domains, structured grids, MPI domain decomposition, multipatch geometry, and 1D, 2D and 3D shapes. Box, ball and polygon containment have NumPy, Pyccel, CUDA and Metal implementations.
from simgeometry.grid import Gridfrom 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)Shapes support Boolean operations, affine transforms, slicing, surface queries, point sampling and mesh export.
You can find the documentation and tutorials here.
