Skip to content

MhmdEsml/Two-Point-Correlation-GPU-TPU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TPC: High-Performance Two-Point Correlation Function Computation in JAX/PyTorch (GPU/TPU)

TPCFLib Banner

📖 Overview

TPCFLib is a high-performance Python library for computing the Two-Point Correlation Function (TPCF) $S_2(r)$ of 3D porous materials and binary microstructures. The library provides accelerated computation using both PyTorch and JAX backends, offering significant speedups over conventional implementations.

The two-point correlation function $S_2(r)$ is defined as:

$$ S_2(r) = \langle I(\mathbf{x}) I(\mathbf{x} + \mathbf{r}) \rangle $$

where $I(\mathbf{x})$ is the indicator function of the phase of interest at position $\mathbf{x}$, and $\langle \cdot \rangle$ denotes ensemble averaging.

🚀 Features

  • Multi-Backend Support: Choose between PyTorch and JAX for optimal performance
  • Batch Processing: Efficient computation on multiple 3D volumes simultaneously
  • Porous Media Datasets: Built-in access to standard porous media datasets
  • GPU/TPU Acceleration: Automatic GPU/TPU utilization when available (using JAX for TPU)

📦 Installation

Installation

git clone https://github.com/MhmdEsml/TPC.git
cd TPC
pip install -e .

About

TPC is a specialized Python library for accelerated computation of Two-Point Correlation Functions (TPC) in 3D porous materials and microstructures. It provides significant performance improvements over conventional implementations through multi-backend support (PyTorch and JAX) and GPU/TPU acceleration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors