HNBody Version 1.0.10

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Data Structures | Typedefs | Enumerations | Functions
kernel.h File Reference

Core user-visible package declarations for the HNBody library. More...

`#include <mutils/util.h>`
Include dependency graph for kernel.h:
This graph shows which files directly or indirectly include this file:

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)

## Detailed Description

Id
  kernel.h,v 1.24 2014/08/18 21:57:36 rauch Exp

Author
  Kevin P. Rauch

## Enumeration Type Documentation

enum hnb_integ_enum

Enumerator
Symplectic | Symplectic integration scheme (any variant).
BulirschStoer | Bulirsh-Stoer ODE integration scheme.
RungeKutta | Runge-Kutta ODE integration scheme.

enum hnb_integcoord_enum

Enumerator
Origin | Coordinate system origin bit-mask.
Barycentric | Barycentric coordinates.
Bodycentric | Bodycentric coordinates.
Jacobi | Jacobi coordinates.
Regularized | Regularized coordinate system bit-mask.
TWform | Touma-Wisdom bodycentric variant.
RegBarycentric | Regularized barycentric.
RegJacobi | Regularized Jacobi.
ModBodycentric | Modified (Touma-Wisdom form) bodycentric coordinates.
Coordinates | Overall coordinate system bit-mask.
Splitting | Hamiltonian splitting bit-mask.
Kick_Drift | K/2-S/2-D-S/2-K/2 splitting.
Drift_Kick | D/2-S/2-K-S/2-D/2 splitting.
Shift_Drift | S/2-K/2-D-K/2-S/2 splitting.
Order | Integration convergence order bit-mask.
Order2 | Second order integration step.
Order4 | Fourth order (via composition) integration step.
ModKick | Modified kick indicator.
Order4mk | Fourth order (via modified kick) integration step.
Integrator | Overall symplectic integration scheme bit-mask.
Corrected | Symplectic correction bit-mask.
Reverse | "Reversed" correction formalism indicator.
Uncorrected | No symplectic correction applied.
Corrected2 | Second order symplectic correction.
Corrected4 | Fourth order symplectic correction.
Corrected6 | Sixth order symplectic correction.
Corrector | Overall symplectic corrector bit-mask.
Gravity | Gravitational theory bit-mask.
Newtonian | Newtonian gravity.
PostNewtonian | First-order post-Newtonian gravity.
Kernel | Potential-splitting kernel bit-mask.
PolyKernel | Polynomial kernel.
TanhKernel | Hyperbolic tangent kernel.
SplitI | Indirect-kick potential splitting indicator.

enum LWP_enum

Enumerator
LWP_NONE | LWPs do not perturb ZWPs.
LWP_ZWP | LWPs perturb ZWPs.

## Function Documentation

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.

Parameters

  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.

Returns
  EXIT_SUCCESS on success, else EXIT_FAILURE.

See also
  hnb_interface(), hnb_opts_driver()

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.