High-Performance Spherical Harmonic Transforms in Julia
SHTnsKit.jl provides a comprehensive, pure-Julia implementation of spherical harmonic transforms with parallel computing support for scalable scientific computing.
- Pure Julia: No C dependencies, seamless Julia ecosystem integration
- Multi-threading: Optimized with Julia threads and FFTW parallelization
- MPI Parallel: Distributed computing with MPI + PencilArrays + PencilFFTs
- SIMD Optimized: Vectorization with LoopVectorization.jl support
- Extensible: Modular architecture for CPU/GPU/distributed computing
- Transform Types: Scalar, vector, and complex field transforms
- Grid Support: Gauss-Legendre and regular (equiangular) grids
- Vector Analysis: Spheroidal-toroidal decomposition for flow fields
- Differential Operators: Laplacian, gradient, divergence, vorticity
- Spectral Analysis: Power spectra, correlation functions, filtering
- Automatic Differentiation: Native ForwardDiff.jl and Zygote.jl support
- Field Rotations: Wigner D-matrix rotations and coordinate transforms
- Matrix Operators: Efficient spectral differential operators
- Performance Tuning: Comprehensive benchmarking and optimization tools
using Pkg
Pkg.add("SHTnsKit")For high-performance parallel computing on clusters:
using Pkg
Pkg.add(["SHTnsKit", "MPI", "PencilArrays", "PencilFFTs", "LoopVectorization"])MPI Setup (for parallel computing):
# Ubuntu/Debian
sudo apt-get install libopenmpi-dev
# macOS
brew install open-mpi
# Configure Julia MPI
julia -e 'using Pkg; Pkg.build("MPI")'If you use SHTnsKit.jl in your research, please cite:
@article{schaeffer2013efficient,
title={Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations},
author={Schaeffer, Nathana{\"e}l},
journal={Geochemistry, Geophysics, Geosystems},
volume={14},
number={3},
pages={751--758},
year={2013},
publisher={Wiley Online Library}
}SHTnsKit.jl is released under the GNU General Public License v3.0 (GPL-3.0), ensuring compatibility with the underlying SHTns library.
- SHTns Documentation: Original C library
- Spherical Harmonics Theory: Mathematical background