Symmetric and symplectic integrator for ODEs. More...
#include "libgravix2/linalg.h"

Go to the source code of this file.
Classes | |
| struct | GrvxQP |
| Phase space representation of state. More... | |
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... | |
Symmetric and symplectic integrator for ODEs.
| 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. |
