#include "libgravix2/integrators.h"#include <assert.h>#include <math.h>#include "libgravix2/config.h"#include "libgravix2/helpers.h"#include "libgravix2/pot.h"
Functions | |
| void | grvx_integration_step (struct GrvxQP *qp, struct GrvxQP *e, double h, const struct GrvxPlanets *planets) |
| Single integration step. More... | |
| unsigned | grvx_integration_loop (struct GrvxQP *qp, double h, unsigned n, const struct GrvxPlanets *planets) |
| Multiple integration steps. More... | |
| unsigned grvx_integration_loop | ( | struct GrvxQP * | qp, |
| double | h, | ||
| unsigned | n, | ||
| const struct GrvxPlanets * | planets | ||
| ) |
Multiple integration steps.
qp is advanced by the integrator for a maximum of n steps. The propagation is stopped prematurely if the distance to a planet becomes too small. (The threshold is controlled via GrvxConfig.min_dist.)
| qp | Phase space. |
| h | Step size passed to grvx_integration_step(). |
| n | Maximum number of integration steps. |
| planets | Planets handle. |
n if integration was stopped prematurely.) 

| void grvx_integration_step | ( | struct GrvxQP * | qp, |
| struct GrvxQP * | e, | ||
| double | h, | ||
| const struct GrvxPlanets * | planets | ||
| ) |
Single integration step.
qp is advanced by the integrator for a single step. Accumulation errors are compensated by tracking them in e. Initialize e with zeros for the first iteration.
| qp | Phase space. |
| e | Accumulation error. |
| h | Step size. |
| planets | Planets handle. |
