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_well pairs of bounce points for each pitch and field line. Choosing -1 will 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 is Aι+C where A, C are 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 than num_well=(Aι+C)*num_transit is preferable. The check_points or plot method 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 z1 and z2 resides in the epigraph of B.

If there were less than num_well wells detected along a field line, then the last axis, which enumerates bounce points for a particular field line and pitch, is padded with zero.