IASNN DD-Prec#

An experimental module implementing an IAS15-style integrator using an arbitrary number of substep acceleration evaluations.

Built on a custom JAX pytree named DoubleDouble that stores the high and low bits of a double-double number in two separate arrays, and uses the DoubleDouble class to overload the basic arithmetic operations.

Everything here should be considered experimental and subject to change.

jorbit.integrators.iasnn_dd_prec.acceleration_func(x)[source]#

A dummy acceleration function for testing purposes, unit central potential.

Parameters:

x (Array) – (n_particles, 3) array of positions

Returns:

(n_particles, 3) array of accelerations

Return type:

Array

jorbit.integrators.iasnn_dd_prec.refine_intermediate_g(substep_num, g, r, at, a0)[source]#

After evaluating the acceleration at a certain substep, refine the estimate of the g coefficients.

Parameters:
  • substep_num (int) – The substep number.

  • g (DoubleDouble) – The g coefficients.

  • r (DoubleDouble) – The R array from setup_iasnn_integrator.

  • at (DoubleDouble) – The acceleration at the current substep.

  • a0 (DoubleDouble) – The initial acceleration.

Returns:

The refined g coefficients.

Return type:

DoubleDouble

jorbit.integrators.iasnn_dd_prec.setup_iasnn_integrator(n_internal_points)[source]#

Precompute the constants needed for an arbitrary-order IASNN-style integrator.

This creates the H, C, R, D arrays you see in the REBOUND source, and some precomputed denominators for the Taylor expansion coefficients. Not jittable, but should be called once per integrator instance.

Parameters:

n_internal_points (int) – The number of internal evaluations to use when estimating the acceleration across a given step. IAS15 uses 7.

Returns:

b_x_denoms (DoubleDouble):

The denominators for the Taylor expansion of the position.

b_v_denoms (DoubleDouble):

The denominators for the Taylor expansion of the velocity.

h (DoubleDouble):

The H array from REBOUND, a list of the roots of the Chebyshev polynomial.

r (DoubleDouble):

The R array from REBOUND, a list of the coefficients for the Taylor expansion of the acceleration.

c (DoubleDouble):

The C array from REBOUND, a list of the coefficients for the Taylor expansion of the acceleration.

d (DoubleDouble):

The D array from REBOUND, a matrix of coefficients for the Taylor expansion of the acceleration.

Return type:

tuple

jorbit.integrators.iasnn_dd_prec.step(x0, v0, b, dt, precomputed_setup, convergence_threshold=DoubleDouble(1e-40, 7.070712060011986e-57))[source]#

Take a single step with an IASNN-style integrator.

This does all of the same predictor-corrector iteration as the default IAS15 integrator, but does not do any of the time validity checking, and currently does not accept actual acceleration functions (need to write DoubleDouble versions of those).

Parameters:
  • x0 (DoubleDouble) – The initial position.

  • v0 (DoubleDouble) – The initial velocity.

  • b (DoubleDouble) – The b coefficients.

  • dt (DoubleDouble) – The timestep.

  • precomputed_setup (tuple) – The precomputed constants from setup_iasnn_integrator.

  • convergence_threshold (DoubleDouble) – The convergence threshold for the predictor-corrector iteration.

Returns:

The new position, velocity, and b coefficients.

Return type:

tuple