1 #ifndef HNBODY_KEPLER_H
2 #define HNBODY_KEPLER_H
27 kepler_eccanom_base(
double *M0,
double M,
double e),
28 kepler_eccanom(
double M,
double e),
29 kepler_hypanom(
double M,
double e),
30 kepler_paranom(
double M),
31 kepler_meanconic(
double *C,
double r,
double rv,
double rv2,
double GM),
33 kepler_conicanom_mean(
double M,
double e),
34 kepler_conicanom_true(
double nu,
double e),
35 kepler_trueanom_conic(
double C,
double e),
36 kepler_trueanom_mean(
double M,
double e),
37 kepler_meananom_conic(
double C,
double e),
38 kepler_meananom_true(
double nu,
double e),
40 kepler_L2(
const double x[],
const double v[]),
41 kepler_ds(
double dt,
double GM,
double r0,
double v2,
42 double beta,
double eta),
43 kepler_x_nu(
double *nu,
double M,
double e),
45 kepler_kinenergy(
double v[][3],
const double m[],
int n),
46 kepler_potenergy(
double x[][3],
const double m[],
double G,
int nh,
int n),
47 kepler_energy(
double x[][3],
double v[][3],
const double m[],
double G,
52 kepler_Tmatrix(
double T[][3],
double i,
double om,
double psi),
54 kepler_xv_gr(
double x[],
double v[],
double M,
double dM,
55 double a,
double e,
double T[][3],
double GM),
56 kepler_xv_mean(
double x[],
double v[],
double M,
double a,
double e,
57 double T[][3],
double GM),
58 kepler_xv_true(
double x[],
double v[],
double nu,
double a,
double e,
59 double T[][3],
double GM),
61 kepler_invplane(
double *i,
double *psi,
const double L[]),
62 kepler_angmom(
double L[],
double x[][3],
double v[][3],
const double m[],
65 kepler_cmass(
double xcm[],
double x[][3],
const double m[],
int n),
67 kepler_inert2bary(
double y[][3],
double x[][3],
const double m[],
69 kepler_bary2body(
double y[][3],
double x[][3],
const double m[],
int n),
70 kepler_body2bary(
double y[][3],
double x[][3],
const double m[],
int n),
72 kepler_etas(
double eta[],
double ieta[],
double deta[],
const double m[],
73 const int imap[],
int n),
74 kepler_body2jac(
double y[][3],
double x[][3],
const double m[],
75 const double ieta[],
const int imap[],
int n),
76 kepler_jac2body(
double y[][3],
double dy[][3],
double x[][3],
77 const double m[],
const double ieta[],
const int imap[],
int n),
79 kepler_inert2body(
double y[][3],
double x[][3],
int n),
80 kepler_inert2jac(
double y[][3],
double x[][3],
const double m[],
81 const double ieta[],
const int imap[],
int n),
83 kepler_dbody2djac(
double djac[][3],
double dbod[][3],
const double m[],
84 const double ieta[],
const int imap[],
int n),
85 kepler_djac2dbody(
double djac[][3],
double dbod[][3],
const double m[],
86 const double ieta[],
const int imap[],
int n),
88 kepler_canbody2jac(
double x[][3],
double v[][3],
const double m[],
89 const double ieta[],
const int imap[],
int n),
90 kepler_jac2canbody(
double x[][3],
double v[][3],
const double m[],
91 const double ieta[],
const int imap[],
int n),
93 kepler_ranorb(
double *a,
double *e,
double *i,
double amin,
double amax,
94 double n,
double p,
double q);
98 kepler_inert2baryPN(
double xPN[][3],
double vPN[][3],
double mPN[],
99 double x[][3],
double v[][3],
const double m[],
int n,
double G,
double c),
101 kepler_orbels(
double *M,
double *a,
double *e,
double *i,
double *om,
102 double *psi,
const double x[],
const double v[],
double GM);
110 kepler_step(
double x[],
double v[],
double GM,
double dt),
111 kepler_pnstep(
double x[],
double v[],
double GM,
double ic2,
double dt),
112 kepler_mmstep(
double x[],
double v[],
double *rmin,
double *rmax,
113 double GM,
double dt),
115 kepler_delstep(
double x[],
double dx[],
double v[],
double dv[],
double GM,
117 kepler_delpnstep(
double x[],
double dx[],
double v[],
double dv[],
double GM,
118 double ic2,
double dt),
119 kepler_delmmstep(
double x[],
double dx[],
double v[],
double dv[],
120 double *rmin,
double *rmax,
double GM,
double dt),
122 kepler_dstep(
double x[],
double v[],
double dx[],
double dv[],
double GM,
125 kepler_regstep(
double x[],
double v[],
double *dt,
double GM,
double ds),
126 kepler_Eregstep(
double x[],
double v[],
double *dt,
double E,
double ds),
127 kepler_dregstep(
double x[],
double v[],
double dx[],
double dv[],
double *dt,
128 double GM,
double ds),
130 kepler_lcstep(
double x[],
double v[],
double *rmin,
double dt,
double domega),
131 kepler_grstep(
double x[],
double v[],
double *rmin,
double dt,
double domega);
140 double semi, peridist, ecc;
142 double longasc, longperi, argperi;
143 double meanlong, truelong, meanlati, truelati, meananom, trueanom,
149 kepler_elems_xv(
kepler_elems *elems,
const double x[],
const double v[],
150 double GM,
int phase);
154 kepler_xv_elems(
double x[],
double v[],
kepler_elems *elems,
double GM);
162 enum kepler_radial_orbit_t { bound_radial=-1, unbound_radial=-2 };