Skip to main content

hyperct

Low memory simplicial complex structures via hypercube triangulations and sub-triangulations.

When to use hyperct

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

When not to use hyperct

If you need fast conventional computational geometry in low dimensions, dedicated libraries will outperform hyperct:

Features

  • 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

Installation

pip install hyperct

Optional dependencies

  • hyperct[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]

Quick start

from hyperct import Complex

# Triangulate a 3D unit hypercube
C = Complex(3)
C.triangulate()
C.split_generation()
C.split_generation()

GPU-accelerated field evaluation

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()

Requirements

  • Python >= 3.7
  • NumPy >= 1.16.0
  • Optional: PyTorch >= 2.0 (GPU backend)
  • Optional: matplotlib >= 3.0, polyscope (plotting)

License

MIT

Metadata

Release files for hyperct 0.4.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 hyperct 0.4.0
File Size Uploaded
hyperct-0.4.0.tar.gz 2.1 MB Details

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / hyperct-0.4.0.tar.gz

Download URL hyperct-0.4.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
95e6e7772c24265d9519097f5b84970f9611a54f7a827a3cb591e1f2bdac04b4
BLAKE2b-256 checksum
How to use checksums
b56755a5e32b1ccd80a8e03104ae271d9e15051e7f9cc563fcaf7364b2cbbc1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / hyperct-0.4.0-py3-none-any.whl

Download URL hyperct-0.4.0-py3-none-any.whl
Size 138.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddeed3a8f205e235155a1c6f1e41498b35817606385550ae42c8a698a65d0b7d
BLAKE2b-256 checksum
How to use checksums
15236dd55e46b7b9989379bcc0e0db95bb1eae07de93af64dac6f4b6bc7b39a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.1

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