Skip to main content

Low memory hypercube triangulations and sub-triangulations

Project description

hyperct

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

When to use hyperct

  • Dynamic meshes with changing topologies: 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 10D+ while symmetry reduction cuts complexity by 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).
  • 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 (plotting)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperct-0.3.5.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperct-0.3.5-py3-none-any.whl (152.1 kB view details)

Uploaded Python 3

File details

Details for the file hyperct-0.3.5.tar.gz.

File metadata

  • Download URL: hyperct-0.3.5.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hyperct-0.3.5.tar.gz
Algorithm Hash digest
SHA256 e4deb9386dc80e7927ce63a1e86cccebec5bdcab258cd5a977dc5b19315130b5
MD5 f14e81253db1008faf187b32ddca439c
BLAKE2b-256 12afa586dd646592def59bda34d17547e71aeff5cdf47774af456fdcd8e01f9a

See more details on using hashes here.

File details

Details for the file hyperct-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: hyperct-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 152.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hyperct-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc094589da3e4434061d9ed3011f364fa773239723ee8aed6c025c05e020937b
MD5 d205dfc18ebb86ddbe343733bb84f6fe
BLAKE2b-256 9d2b6617e043648f73fa6e9f2203422359d333a2bd2ac974ae51ef00c04d90d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page