Skip to main content

stream

Function stream 

Source
pub fn stream(
    q: f64,
    step: f64,
    n_points: usize,
) -> Result<(Vec<f64>, Vec<f64>), RocheError>
Expand description

stream works by integrating the equations of motion for the Roche potential using Burlisch-Stoer integration. Every time the distance from the last point exceeds step, it interpolates and stores a new point. This allows one not to spend loads of points on regions where nothing is happening.

Arguments:

  • q: mass ratio = M2/M1. Stream flows from star 2 to 1.
  • step: step between points (units of separation).
  • n_points: number of points to compute.

Returns:

  • x: array of x values returned.
  • y: array of y values returned.