desc.integrals.Bounce2D.get_pitch_inv_quad
- static Bounce2D.get_pitch_inv_quad(min_B, max_B, num_pitch, simp=True)Source
Return 1/λ values and weights for quadrature between
min_Bandmax_B.- Parameters:
min_B (jnp.ndarray) – Minimum B value.
max_B (jnp.ndarray) – Maximum B value.
num_pitch (int) – Number of values.
simp (bool) – If
True, then the pitch angles are chosen so that the quadrature over the velocity coordinate of 1/λ is done with Simpson’s 1/3 in the interior completed by an open midpoint scheme near the boundary such that an accuracy of fourth order is preserved. IfFalse, then an open midpoint scheme is returned, which is only recommended for plotting purposes.
- Returns:
x, w (tuple[jnp.ndarray]) – Shape (min_B.shape, num pitch). 1/λ values and weights.