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. If the integrand is not sufficiently smooth then quadrature accuracy reduces to third order. IfFalse, then an open midpoint scheme is returned.
- Returns:
x, w (tuple[jnp.ndarray]) – Shape (min_B.shape, num pitch). 1/λ values and weights.