torus_solver.torus

class torus_solver.torus.TorusSurface(R0, a, theta, phi, dtheta, dphi, k_theta, k_phi, R, sqrt_g, G, r, r_theta, r_phi, area_weights)[source]

Bases: object

A circular torus surface discretized on a (θ, φ) grid.

Parameters:
  • R0 (float)

  • a (float)

  • theta (Array)

  • phi (Array)

  • dtheta (float)

  • dphi (float)

  • k_theta (Array)

  • k_phi (Array)

  • R (Array)

  • sqrt_g (Array)

  • G (Array)

  • r (Array)

  • r_theta (Array)

  • r_phi (Array)

  • area_weights (Array)

G: Array
R: Array
R0: float
a: float
area_weights: Array
dphi: float
dtheta: float
k_phi: Array
k_theta: Array
phi: Array
r: Array
r_phi: Array
r_theta: Array
sqrt_g: Array
theta: Array
tree_flatten()[source]
classmethod tree_unflatten(aux, children)[source]
torus_solver.torus.make_torus_surface(*, R0, a, n_theta, n_phi, dtype=<class 'jax.numpy.float64'>)[source]

Construct a circular torus surface on a uniform periodic (θ, φ) grid.

Return type:

TorusSurface

Parameters:
  • R0 (float)

  • a (float)

  • n_theta (int)

  • n_phi (int)