IAS15#

class IAS15(dt: float, min_dt: float, dynamics: Callable[[float, list[float]], list[float]])#

Bases: object

Implicit integrator with Adaptive timeStepping, 15th order (IAS15).

This is a Rust implementation of the “IAS15” algorithm [[1]] that interfaces with Python.

Parameters:
  • dt (float) – Time step given in seconds

  • min_dt (float) – Minimum allowed time step in seconds.

  • dynamics (callable) – Dynamics function describing the equations of motion of the object to be integrated.

  • n_state (int, optional) – The number of rows in the propagated state vector. Defaults to 6.

SAFETY_FACTOR#

Factor to ensure time steps taken within the integrator are not too small. Default value is 0.25.

Type:

float

EPSILON#

Allowable error to consider the predictor-corrector converged. Default value is 1e-10.

Type:

float

events#

The IntegrationEvent objects that IAS15 will search for during the integration.

Type:

list[IntegrationEvent]

logged_events#

Detected events, saved as a tuple of the form (time, state).

Type:

list[(float, list)]

event_tol#

Allowable error to consider an event has occured. Default value is 1e-3.

Type:

float

References

[1]

H. Rein and D. S. Spiegel, “IAS15: a fast, adaptive, high-order integrator for gravitational dynamics, accurate to machine precision over a billion orbits,” Monthly Notices of the Royal Astronomical Society, vol. 446, no. 2, pp. 1424-1437, 2015. Available: https://doi.org/10.1093/mnras/stu2164

Methods

add_event(event)

Add an event to search for during integration.

integrate(interval, y0)

Perform integration with the propagator.

set_event_tol(tolerance)

Set the event detection tolerance.

add_event(event: IntegrationEvent) None#

Add an event to search for during integration.

Parameters:

event (IntegrationEvent) – Event to search for during integration.

integrate(interval: TypeAliasForwardRef('numpy.ndarray') | tuple[float, float], y0: list) tuple[list[float], list[float]]#

Perform integration with the propagator.

Parameters:
  • interval (numpy.ndarray or tuple of two floats) – The interval to integrate over. If a numpy.ndarray is given, solve for states at each time within the array. If a tuple of of floats is given, solve for states at times determined by the predictor-corrector along the interval and exactly at the start and end times.

  • y0 (list) – Initial state vector.

Returns:

  • t (ndarray of shape (n_points)) – Time points.

  • y (ndarray of shape (n, n_points)) – Solution states at times t.

set_event_tol(tolerance: float) None#

Set the event detection tolerance.

Parameters:

tolerance (float) – The new event tolerance.