Low memory simplicial complex structures via hypercube triangulations and sub-triangulations.
- Dynamic meshes with changing topologies: The library is based on efficiently tracking vertex-vertex connections only which avoids the computational expense of storing simplexes while still allowing many important operations that are applied on simplicial complex structures. Generation-based refinement lets you locally refine and split simplices without rebuilding the entire complex.
- Computing homologies of very high-dimensional spaces: the hypercube triangulation scales to hundreds of dimensions while symmetric space reduction cuts complexity by up to O(n!).
- Working with connectivity of high-dimensional data: the simplicial complex exposes vertex adjacency, cell membership, and dual mesh structure directly.
If you need fast conventional computational geometry in low dimensions, dedicated libraries will outperform hyperct:
- Delaunay / Voronoi tessellations: SciPy spatial, CGAL (via scikit-geometry), Qhull
- Unstructured mesh generation: Gmsh, pygmsh, TetGen (via tetgen), MeshPy
- Surface meshing & remeshing: PyMesh, trimesh, libigl (via igl)
- FEM / simulation meshes: FEniCS/DOLFINx, Firedrake
- Topological data analysis: GUDHI, Ripser, giotto-tda
- Triangulates high-dimensional domains (10D+)
- Symmetry constraints to reduce complexity by O(n!)
- Scalar and vector field associations
- Inequality constraints for non-convex domains
- Multiple refinement strategies (local, global, generation-based)
- Optional GPU acceleration via PyTorch
pip install hypercthyperct[gpu]— PyTorch backend for GPU-accelerated field evaluation and batch vertex processing. Auto-detects CUDA; falls back to CPU when unavailable.hyperct[plotting]— Matplotlib-based visualization of triangulations, scalar fields, and dual meshes (1D/2D/3D). Includes Polyscope for interactive 3D dual mesh visualization.hyperct[dev]— pytest, coverage, and benchmark tooling.
pip install hyperct[gpu]
pip install hyperct[plotting]
pip install hyperct[gpu,plotting]from hyperct import Complex
# Triangulate a 3D unit hypercube
C = Complex(3)
C.triangulate()
C.split_generation()
C.split_generation()from hyperct import Complex
def my_field(x):
return sum(xi**2 for xi in x)
C = Complex(3, func=my_field, backend='gpu')
C.triangulate()
C.split_generation()- Python >= 3.7
- NumPy >= 1.16.0
- Optional: PyTorch >= 2.0 (GPU backend)
- Optional: matplotlib >= 3.0, polyscope (plotting)
MIT