A Fortran library for scalar and vector spherical harmonics (VSH), Legendre functions, and angular-momentum coupling coefficients, built for spectral MHD applications in geophysics and astrophysics.
Find us on…
FORTVSH is a lightweight, physics-first Fortran library for computing scalar spherical harmonics (SSH), two complementary vector spherical harmonic (VSH) bases, and the Legendre functions and angular-momentum coupling coefficients (Clebsch-Gordan, Wigner 3-j, and Geppert-Wiebicke) that underlie them.
Both VSH bases are built from the same underlying scalar spherical harmonic :
Every routine has a single-point form (one mode at one point) and a
batch _ALL form (every mode at one point, in a single call).
_ALL routines
and naive per-mode loops.src/examples/ -- six worked examples, from a basic magnetic-dipole
synthesis through arbitrary-field spectral decomposition (both radial
and toroidal) and a Geppert-Wiebicke coupling-coefficient sweep.cmake -B build
cmake --build build
cd build && ctest --output-on-failure
See README.md in the repository root for the full build, installation,
and usage guide, including the optional benchmark (VSH_BUILD_BENCHMARK)
and example (VSH_BUILD_EXAMPLES) targets.