Skip to content

Latest commit

 

History

144 Commits

Folders and files

Repository files navigation

SpheroidalWaves.jl

Julia Registry GitHub Version Yggdrasil Julia Compatibility GitHub last commit DOI

Documentation (stable) Documentation (latest) License: GPL-3.0

CI codecov Downloads Downloads

Fast, vectorized computation of prolate and oblate spheroidal wave functions using native Fortran kernels.

The package supports real and complex spheroidal parameters, double and quad precision, angular and radial functions, eigenvalues, accuracy estimates, derivatives, and inverse eigenvalue calculations.

Installation

import Pkg
Pkg.add("SpheroidalWaves")

Prebuilt backends are downloaded automatically on supported platforms.

Quick start

using SpheroidalWaves

# Angular function and derivative at several points
angular = smn(1, 2, 1.5, [-0.5, 0.0, 0.5])
angular.value
angular.derivative

# Radial function of the first kind
radial = rmn(1, 2, 1.5, [1.1, 1.2, 1.3]; kind=1)

# Oblate geometry
oblate = smn(1, 2, 1.5, [-0.5, 0.0, 0.5]; spheroid=:oblate)

# Complex spheroidal parameter
complex_result = smn(1, 2, 1.5 + 0.5im, [-0.5, 0.0, 0.5])

# Quad-precision backend
quad_result = rmn(1, 2, 1.5, [1.1, 1.2]; precision=:quad)

# Characteristic value
lambda = eigenvalue(1, 2, 1.5)

Pass arrays to smn and rmn for batch evaluation. Calls are thread-safe.

Main API

  • smn: angular function and derivative
  • rmn: radial function and derivative
  • eigenvalue and eigenvalue_sweep: characteristic values
  • accuracy: estimated numerical accuracy
  • radial_wronskian: radial Wronskian
  • jacobian_eigen, jacobian_smn, and jacobian_rmn: derivatives with respect to parameters
  • find_c_for_eigenvalue: inverse characteristic-value calculation

The main options are spheroid=:prolate or :oblate, precision=:double or :quad, and radial kind=1:4.

For basis conversion and connection formulas, dmn, kmn, and amn provide expansion and normalization quantities.

See the documentation for definitions, argument restrictions, normalization, and complete examples.

Attribution

The numerical kernels are based on the spheroidal-wave-function implementations by Arnie Lee Van Buren and Jeffrey Boisvert:

Citation and license

Use the Zenodo record to cite SpheroidalWaves.jl. The package is available under the GPL-3.0 License. The logo artwork incorporates Julia's dots and is licensed separately under CC BY-NC-SA 4.0.

Releases

Used by

Contributors

Languages