Abstract
Accurate magnetic-field evaluation on and near current-carrying surfaces is a recurring computational bottleneck in magnetic-confinement fusion. As targets approach the source surface, Biot–Savart and virtual-casing kernels become singular, causing standard Gauss–Legendre and upsampled trapezoidal quadratures to lose accuracy. We introduce AMPERe, a quadrature-by-expansion (QBX) evaluator for vector magnetostatic kernels on general three-dimensional, non-axisymmetric tokamak and stellarator geometries. The method develops a spherical-harmonic QBX formulation for the vector Biot–Savart and virtualcasing (Stratton–Chu) fields and expresses the resulting magnetic field as the analytic curl of a regular-solid-harmonic vector potential. This construction yields a divergence-free discrete field at every expansion order, provides analytic derivatives, and enables an a-priori separation of truncation, quadrature, and geometric errors. On the rotating-ellipse benchmark of Malhotra et al. [1], QBX maintains a relative error of 2–5 × 10^{-6} throughout the near-surface regime at distance-independent cost, whereas upsampled trapezoidal quadrature exhibits O(1) errors and requires node counts scaling as (h/d)^2. AMPERe is implemented as a header-only, performance-portable Kokkos library supporting CPU and GPU backends, with target-specific and local-correction accelerations validatedagainst the baseline. The method is further demonstrated on realistic Wendelstein 7-X configurations, including sheet-current and virtual-casing field evaluations.

This publication has 35 references indexed in Scilit: