desc.integrals.Bounce1D.points
- Bounce1D.points(pitch_inv, num_well=None)Source
Compute bounce points.
- Parameters:
pitch_inv (jnp.ndarray) – Shape (num ρ, num pitch). 1/λ values to compute the bounce integrals. 1/λ(ρ) is specified by
pitch_inv[ρ]where in the latter the labels are interpreted as the indices that correspond to that field line.num_well (int) –
Specify to return the first
num_wellpairs of bounce points for each pitch and field line. Choosing-1will detect all wells, but due to current limitations in JAX this will have worse performance. Specifying a number that tightly upper bounds the number of wells will increase performance. In general, an upper bound on the number of wells per toroidal transit isAι+CwhereA,Care the poloidal and toroidal Fourier resolution of B, respectively, in straight-field line PEST coordinates, and ι is the rotational transform normalized by 2π. A tighter upper bound thannum_well=(Aι+C)*num_transitis preferable. Thecheck_pointsorplotmethod is useful to select a reasonable value.If there were fewer wells detected along a field line than the size of the last axis of the returned arrays, then that axis is padded with zero.
- Returns:
z1, z2 (tuple[jnp.ndarray]) – Shape (num ρ, num α, num pitch, num well). Tuple of length two (z1, z2) that stores ζ coordinates of bounce points. The points are ordered and grouped such that the straight line path between
z1andz2resides in the epigraph of B.If there were less than
num_wellwells detected along a field line, then the last axis, which enumerates bounce points for a particular field line and pitch, is padded with zero.