1 #ifndef HNBODY_KERNEL_H
2 #define HNBODY_KERNEL_H
117 double G, c, Msun, dm, J2, J4, J6, obRad, dzH, dzZ, eps, tinit,
118 tH[2], dtH[2], tZ[2], dtZ[2];
119 int nH, nHL, n, fixedH, enc, prune;
121 double *m, *rcapt, *renc;
125 int *id, *imap, *jindex, *prune_ctrl;
150 double dzODE, *tmpODE;
151 double *deta, *ieta, *dsZ, *E0, *E1, *t, *tt;
153 int iZ0, ntab, maxtab, itmax;
157 hnb_vector_t xh0, xh1, xha, xhb, vh0, vh1, vha, vhb, xa, xb, va, vb;
169 hnb_util_version(FILE *f,
const char *name,
const char *revision,
171 hnb_print_info(FILE *f,
void (*custom)(FILE *f,
const char *prefix),
175 DLLSPEC
extern const char
176 *hnb_contact(
void), *hnb_version(
void), *
hnb_website(
void);
178 DLLSPEC
extern const int
187 hnb_save(
const char *save,
double key,
hnb_data_t *sys),
188 hnb_restore(
double *key,
const char *save,
hnb_data_t *sys),
191 hnb_energy_t energy,
void (*custom)(FILE *f,
const char *prefix));
197 DLLSPEC
extern const double
202 DLLSPEC
extern double
209 hnb_output(
double *t,
double (**x)[3],
double (**v)[3],
hnb_data_t *sys);
213 *hnb_read(
const char *file),
214 *hnb_init_file(
const char *hnbfile, FILE *logfile),
215 *hnb_init_extra(
const char *hnbfile, FILE *logfile,
hnb_extra_t extra_kick,
219 *hnb_ode_init(
double tinit,
const double xinit[][3],
const double vinit[][3],
220 const double m[],
const int id[],
221 int nH,
int nL,
int nZ,
hnb_LWP_t ltype,
int fixedH,
222 int enc,
const double rcapt[],
double G,
double c,
double Msun,
223 double J2,
double J4,
double J6,
double obRadius,
224 double dt,
double eps,
228 *hnb_init(
double tinit,
const double xinit[][3],
const double vinit[][3],
229 const double m[],
const int id[],
const int jindex[],
230 int nH,
int nL,
int nZ,
hnb_LWP_t ltype,
int fixedH,
232 const double renc[],
const double rcapt[],
double G,
double c,
double Msun,
233 double J2,
double J4,
double J6,
double obRadius,
234 double dm,
double dzH,
double dzZ,
hnb_integcoord_enum
Symplectic integration scheme variations (bit-mask layout).
Definition: kernel.h:22
void(* hnb_drift_t)(hnb_vector_t dx, hnb_vector_t dv, double t, hnb_vector_t x, hnb_vector_t v, const double m[], int nHL, int n, double dt, const struct hnb_data_struct *sys)
Prototype for extra_drift() functions.
Definition: kernel.h:100
double(* hnb_energy_t)(double t, hnb_vector_t x, hnb_vector_t v, const double m[], int nHL, const struct hnb_data_struct *sys)
Prototype for extra_energy() functions.
Definition: kernel.h:105
enum LWP_enum hnb_LWP_t
Choices for LWP perturbations type.
enum hnb_integcoord_enum hnb_integcoord_t
Symplectic integration scheme variations (bit-mask layout).
void hnb_checkpoint(hnb_data_t *sys, const char *file, int halt)
Sets on-demand checkpointing of an integration.
Definition: driver.c:55
struct hnb_data_struct hnb_data_t
Main HNBody system data structure.
DLLSPEC const char * hnb_website(void)
Definition: version.c:41
Header file for library management and other miscellaneous utilities.
int(* hnb_derivs_t)(hnb_vector_t dxdt, hnb_vector_t dvdt, double t, hnb_vector_t x, hnb_vector_t v, const double m[], int nHL, int n, const struct hnb_data_struct *sys)
Prototype for extra_derivs() functions.
Definition: kernel.h:109
LWP_enum
Choices for LWP perturbations type.
Definition: kernel.h:83
void(* hnb_extra_t)(hnb_vector_t, double t, hnb_vector_t, const double m[], int nHL, int n, double dt, const struct hnb_data_struct *sys)
Prototype for extra_kick() and extra_shift() functions.
Definition: kernel.h:96
hnb_integ_enum
Integration scheme choices.
Definition: kernel.h:76
Main HNBody system data structure.
Definition: kernel.h:115
double(* hnb_vector_t)[3]
System particle 3-vector type.
Definition: kernel.h:89
DLLSPEC int hnb_argv_driver(int argc, char *argv[], hnb_extra_t kick, hnb_extra_t shift, hnb_drift_t drift, hnb_derivs_t derivs, hnb_energy_t energy, void(*custom)(FILE *f, const char *prefix))
Performs an integration given a set of command line arguments.
Definition: driver.c:337
enum hnb_integ_enum hnb_integ_t
Integration scheme choices.