HNBody
Version 1.0.10
|
Core user-visible package declarations for the HNBody library. More...
#include <mutils/util.h>
Go to the source code of this file.
Data Structures | |
struct | hnb_data_struct |
Main HNBody system data structure. More... | |
Typedefs | |
typedef enum hnb_integcoord_enum | hnb_integcoord_t |
Symplectic integration scheme variations (bit-mask layout). | |
typedef enum hnb_integ_enum | hnb_integ_t |
Integration scheme choices. | |
typedef enum LWP_enum | hnb_LWP_t |
Choices for LWP perturbations type. | |
typedef double(* | hnb_vector_t )[3] |
System particle 3-vector type. | |
typedef 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. | |
typedef 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. | |
typedef 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. | |
typedef 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. | |
typedef struct hnb_data_struct | hnb_data_t |
Main HNBody system data structure. | |
Enumerations | |
enum | hnb_integcoord_enum { Origin =1+2, Barycentric =0, Bodycentric =1, Jacobi =2, Regularized =4, TWform =Regularized, RegBarycentric =Regularized+Barycentric, RegJacobi =Regularized+Jacobi, ModBodycentric =TWform+Bodycentric, Coordinates =Origin+Regularized, Splitting =8+16, Kick_Drift =0, Drift_Kick =8, Shift_Drift =16, Order =32+64, Order2 =0, Order4 =32, ModKick =64, Order4mk =Order4+ModKick, Integrator =Coordinates+Splitting+Order, Corrected =128+256+512, Reverse =1024, Uncorrected =0, Corrected2 =128, Corrected4 =256, Corrected6 =512, Corrector =Reverse+Corrected, Gravity =2048, Newtonian =0, PostNewtonian =Gravity, Kernel =4096, PolyKernel =0, TanhKernel =Kernel, SplitI =8192 } |
Symplectic integration scheme variations (bit-mask layout). More... | |
enum | hnb_integ_enum { Symplectic, BulirschStoer, RungeKutta } |
Integration scheme choices. More... | |
enum | LWP_enum { LWP_NONE, LWP_ZWP } |
Choices for LWP perturbations type. More... | |
Functions | |
DLLSPEC void | hnb_angmom (double L[], hnb_vector_t x, hnb_vector_t v, hnb_data_t *sys) |
DLLSPEC void | hnb_calcCoord (hnb_vector_t xNew, hnb_vector_t vNew, hnb_integcoord_t newFrame, const hnb_data_t *sys) |
DLLSPEC void | hnb_checkpoint (hnb_data_t *sys, const char *file, int halt) |
DLLSPEC void | hnb_free_data (hnb_data_t *sys) |
DLLSPEC void | hnb_write (hnb_data_t *sys, const char *file) |
DLLSPEC void | hnb_util_version (FILE *f, const char *name, const char *revision, const char *prefix) |
DLLSPEC void | hnb_print_info (FILE *f, void(*custom)(FILE *f, const char *prefix), const char *prefix) |
DLLSPEC void | hnb_step (hnb_data_t *sys) |
DLLSPEC const char * | hnb_contact (void) |
DLLSPEC const char * | hnb_version (void) |
DLLSPEC const char * | hnb_website (void) |
DLLSPEC const int * | hnb_idtags (const hnb_data_t *sys) |
DLLSPEC const int * | hnb_jacmap (const hnb_data_t *sys) |
DLLSPEC int | hnb_N (const hnb_data_t *sys) |
DLLSPEC int | hnb_hwp_N (const hnb_data_t *sys) |
DLLSPEC int | hnb_lwp_N (const hnb_data_t *sys) |
DLLSPEC int | hnb_zwp_N (const hnb_data_t *sys) |
DLLSPEC int | hnb_save (const char *save, double key, hnb_data_t *sys) |
DLLSPEC int | hnb_restore (double *key, const char *save, hnb_data_t *sys) |
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. More... | |
DLLSPEC hnb_integcoord_t | hnb_integcoord (const hnb_data_t *sys) |
DLLSPEC hnb_integcoord_t | hnb_zwp_integcoord (const hnb_data_t *sys) |
DLLSPEC const double * | hnb_masses (const hnb_data_t *sys) |
DLLSPEC const double * | hnb_enc_radii (const hnb_data_t *sys) |
DLLSPEC const double * | hnb_capt_radii (const hnb_data_t *sys) |
DLLSPEC double | hnb_G (const hnb_data_t *sys) |
DLLSPEC double | hnb_c (const hnb_data_t *sys) |
DLLSPEC double | hnb_Msun (const hnb_data_t *sys) |
DLLSPEC double | hnb_M (const hnb_data_t *sys) |
DLLSPEC double | hnb_tinit (const hnb_data_t *sys) |
DLLSPEC double | hnb_stepsize (const hnb_data_t *sys) |
DLLSPEC double | hnb_zwp_stepsize (const hnb_data_t *sys) |
DLLSPEC double | hnb_eff_stepsize (const hnb_data_t *sys) |
DLLSPEC double | hnb_output (double *t, double(**x)[3], double(**v)[3], hnb_data_t *sys) |
DLLSPEC hnb_data_t * | hnb_read (const char *file) |
DLLSPEC hnb_data_t * | hnb_init_file (const char *hnbfile, FILE *logfile) |
DLLSPEC hnb_data_t * | hnb_init_extra (const char *hnbfile, FILE *logfile, hnb_extra_t extra_kick, hnb_extra_t extra_shift, hnb_drift_t extra_drift, hnb_derivs_t extra_derivs, hnb_energy_t extra_energy) |
DLLSPEC hnb_data_t * | hnb_ode_init (double tinit, const double xinit[][3], const double vinit[][3], const double m[], const int id[], int nH, int nL, int nZ, hnb_LWP_t ltype, int fixedH, int enc, const double rcapt[], double G, double c, double Msun, double J2, double J4, double J6, double obRadius, double dt, double eps, hnb_integ_t integ, hnb_integcoord_t icoord, hnb_derivs_t extra_derivs, hnb_energy_t extra_energy, int nthreads) |
DLLSPEC hnb_data_t * | hnb_init (double tinit, const double xinit[][3], const double vinit[][3], const double m[], const int id[], const int jindex[], int nH, int nL, int nZ, hnb_LWP_t ltype, int fixedH, int enc, int prune, const double renc[], const double rcapt[], double G, double c, double Msun, double J2, double J4, double J6, double obRadius, double dm, double dzH, double dzZ, hnb_integcoord_t itH, hnb_integcoord_t itZ, hnb_extra_t extra_kick, hnb_extra_t extra_shift, hnb_drift_t extra_drift, hnb_energy_t extra_energy, int nthreads) |
enum hnb_integ_enum |
enum hnb_integcoord_enum |
enum LWP_enum |
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(*)(FILE *f, const char *prefix) | custom | ||
) |
This routine sets up and then executes an integration defined by the input command line arguments.
argc | is the number of command line arguments supplied. |
argv | is the array of argument strings; argv[0] should contain the name of the driver. |
kick | is an optional extra_kick() term to include in the integration; use NULL if none (Symplectic only). |
shift | is an optional extra_shift() term to include in the integratio; use NULL if none (Symplectic only). |
drift | is an optional extra_drift() term to include in the integratio; use NULL if none (Symplectic only). |
derivs | is an optional extra_derivs() term to include in the integration; use NULL if none (ODE only). |
energy | is an optional extra_energy() term to include in the integration; use NULL if none. |
custom | is an optional custom driver version/information writer whose output is prepended to help messages and log files; use NULL if none. |
References hnb_free_options(), hnb_interface(), hnb_opts_driver(), hnb_cli_struct::log, and hnb_cli_struct::logfile.
DLLSPEC const char * hnb_website | ( | void | ) |
Returns website URL.