16 #define getopt mu_getopt
17 #define optarg mu_optarg
18 #define optind mu_optind
19 #define optopt mu_optopt
28 #define HNB_ORDER_MAX 32
63 val_true, val_yes, val_false, val_no,
65 name_integ, val_symp, val_BS, val_RK,
66 name_integcoord, name_coordzwp,
67 val_jac, val_regular, val_baryc, val_bodyc, val_modified,
68 val_kd, val_dk, val_sd,
69 name_corr, val_O2, val_O4, val_O6, val_rev,
70 name_tiptoe, name_enc, name_prune,
71 name_thread, name_thrtiming,
73 name_dzH, name_dzZ, name_M, name_dM,
74 name_N, name_nH, name_nL, name_nZ, val_auto,
75 name_aunit, val_deg, val_rad,
76 name_munit, val_g, val_Msun,
77 name_lunit, val_m, val_AU, val_ua, val_pc,
78 name_tunit, val_s, val_h, val_d, val_yr,
80 name_incoord, name_iorder, val_mass, val_rcapt, val_renc,
81 val_semi, val_peridist, val_ecc, val_incl,
82 val_longasc, val_longperi, val_argperi,
83 val_meanlong, val_truelong, val_meanlati, val_truelati,
84 val_meananom, val_trueanom, val_time, val_epoch, val_timeperi,
85 val_x1, val_x2, val_x3, val_v1, val_v2, val_v3,
86 val_idtag, val_jindex,
88 name_J2, name_J4, name_J6, name_obRadius, name_postn,
90 name_ptype, name_ltype, val_hwps, val_lwps, val_zwps,
91 name_hwp, name_lwp, name_zwp, name_fixhwp,
93 name_tinit, name_tfinal,
95 name_outfile, name_outhead, name_outint, name_outcoord, name_outdig,
96 name_outdata, name_outtype, name_outorder,
97 name_stfile, name_sthead, name_stint, name_stcoord, name_stdig,
98 name_stdata, name_sttype, name_storder,
99 name_savfile, name_savint, name_savlimit,
100 name_ergfile, name_erghead, name_ergint, name_ergdata,
101 val_steps, val_double, val_float, val_smart, val_text,
103 name_infile, name_include, NOPTAGS, MULTITAGS, FLOATVAL
112 int ltype, fixedh, tiptoe, enc, prune, postn;
113 int nthreads, lcycle, lmax, wcycle, wmax;
114 double acc, dzH, dzZ;
116 double M, dm, J2, J4, J6, obRad;
118 double rad, Msun, AU, d;
122 int nitags, icart, imass, N, nH, nL, nZ, nhtot, nltot, nztot, ncap, setM;
123 int *idtag, kid, *jindex, kindex;
126 char *infile, *outfile, *stfile, *savfile, *ergfile;
129 int notags, nstags, outhead, sthead, erghead, outdig, stdig;
130 int tfsteps, outsteps, ststeps, savsteps, ergsteps;
131 double tinit, tfinal, outint, stint, savint, savlimit, ergint;
152 const char *array[],FILE *logfile);
154 const char *file, FILE *logfile);
156 FILE *logfile,
const char *save);
160 void (*custom)(FILE *f,
const char *prefix));
166 DLLSPEC
extern double
enum hnb_option_enum hnb_option_tag
Input (a.k.a. option) file tags.
DLLSPEC void hnb_read_option_file(hnb_options_t *opts, const char *file, FILE *logfile)
Parses an HNBody input file.
Definition: parse.c:1940
DLLSPEC void hnb_exec(hnb_data_t *sys, const hnb_options_t *opts, FILE *logfile, const char *save)
Executes a pre-initialized integration.
Definition: output.c:1080
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
enum hnb_coord_enum hnb_coord_t
Output file coordinate systems.
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
Core user-visible package declarations for the HNBody library.
FILE * log
-l LOGFILE file pointer.
Definition: opts.h:143
Option values data structure.
Definition: opts.h:108
enum hnb_class_enum hnb_class_t
Output file classes.
enum hnb_integcoord_enum hnb_integcoord_t
Symplectic integration scheme variations (bit-mask layout).
DLLSPEC void hnb_read_option_array(hnb_options_t *opts, const char *array[], FILE *logfile)
Parses an HNBody option string array.
Definition: parse.c:1968
#define HNB_ORDER_MAX
Maximum number of columns allowed in InputOrder, OutputOrder, etc.
Definition: opts.h:28
struct hnb_option_struct hnb_options_t
Option values data structure.
DLLSPEC int hnb_opts_driver(hnb_options_t *opts, const hnb_cli_t *cli, hnb_extra_t kick, hnb_extra_t shift, hnb_drift_t drift, hnb_derivs_t derivs, hnb_energy_t energy)
Performs an integration given a complete set of defining options.
Definition: driver.c:416
HNBody Command Line Interface options.
Definition: opts.h:139
DLLSPEC double hnb_benchmark(const hnb_options_t *opts, hnb_extra_t kick, hnb_extra_t shift, hnb_drift_t drift, hnb_derivs_t derivs, double maxcpu)
Estimates CPU time per step of an integration.
Definition: driver.c:89
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
DLLSPEC void hnb_blank_cli(hnb_cli_t *cli)
Clears command line interface options.
Definition: driver.c:177
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_coord_enum
Output file coordinate systems.
Definition: opts.h:53
hnb_format_enum
Output file formats.
Definition: opts.h:44
Main HNBody system data structure.
Definition: kernel.h:115
const char * savefile
-s SAVEFILE File name for restarting integration.
Definition: opts.h:140
enum hnb_format_enum hnb_format_t
Output file formats.
double tcpu
-t TCPU Max effort to estimate CPU time per step.
Definition: opts.h:142
hnb_option_enum
Input (a.k.a. option) file tags.
Definition: opts.h:62
DLLSPEC hnb_data_t * hnb_opts_init(hnb_options_t *opts, hnb_extra_t ekick, hnb_extra_t eshift, hnb_drift_t edrift, hnb_derivs_t ederivs, hnb_energy_t energy)
Initializes an HNBody integration.
Definition: parse.c:2051
int version
-v Display version information only.
Definition: opts.h:141
struct hnb_cli_struct hnb_cli_t
HNBody Command Line Interface options.
enum hnb_integ_enum hnb_integ_t
Integration scheme choices.
DLLSPEC int hnb_interface(hnb_options_t *opts, hnb_cli_t *cli, int argc, char *argv[], void(*custom)(FILE *f, const char *prefix))
Parses the standard HNBody driver command line interface.
Definition: driver.c:211
hnb_class_enum
Output file classes.
Definition: opts.h:32
DLLSPEC void hnb_free_options(hnb_options_t *opts)
Frees allocated options memory.
Definition: parse.c:2234