torus_solver.poisson

torus_solver.poisson.area_mean(surface, f)[source]

Area-weighted mean of a scalar field on the surface.

Return type:

Array

Parameters:
torus_solver.poisson.laplace_beltrami_torus(surface, V)[source]

Laplace–Beltrami operator on a circular torus using spectral derivatives.

Return type:

Array

Parameters:
torus_solver.poisson.solve_current_potential(surface, source_density, *, tol=1e-10, maxiter=2000, use_preconditioner=False)[source]

Solve -∇²V = source_density for V on the torus (gauge fixed to ⟨V⟩=0).

Note: use_preconditioner=True enables a simple spectral preconditioner based on a constant-coefficient approximation. It is experimental and may or may not improve convergence depending on the right-hand side and resolution.

Return type:

Tuple[Array, int]

Parameters:
  • surface (TorusSurface)

  • source_density (Array)

  • tol (float)

  • maxiter (int)

  • use_preconditioner (bool)

torus_solver.poisson.surface_current_from_potential(surface, V, *, sigma_s=1.0)[source]

Surface current density K (A/m) from electric potential V: K = -σ_s ∇_s V.

Return type:

Array

Parameters: