1 #ifndef HNBODY_OUTPUT_H
2 #define HNBODY_OUTPUT_H
22 #define HNB_MAGIC 462639
37 hnb_coord_t coord,
double epoch,
double G,
double c,
double M,
38 double E0,
const double L0[],
double tinit,
double stepsize,
double rate,
39 int id,
int digits,
const double offset[],
43 hnb_read_file(
double *ddata[],
float *fdata[],
size_t *nalloc,
44 size_t nkeep,
size_t nrec,
size_t nresv,
int raw,
46 hnb_write_file(
double *
const ddata[],
float *
const fdata[],
size_t nrec,
50 hnb_read_dataline(
double data[],
hnb_format_t format,
int ncol,
int size,
51 const double offset[], FILE *f),
53 hnb_seek_file(
size_t rec, FILE *f),
55 hnb_trim_file(
const char *datafile,
size_t nrec),
56 hnb_write_binary(
const double data[],
int nelem,
int dprec, FILE *f),
57 hnb_write_dataline(
const double data[],
hnb_class_t fclass,
58 hnb_format_t format,
int ncol,
int digits,
const double offset[], FILE *f),
60 hnb_write_text(
const double data[],
int nelem,
int digits, FILE *f);
63 hnb_ctype2tag(
int ctype);
66 *
hnb_fopen(
const char *file,
const char *mode);
enum hnb_option_enum hnb_option_tag
Input (a.k.a. option) file tags.
enum hnb_coord_enum hnb_coord_t
Output file coordinate systems.
Enumerations and functions related to HNBody input and output files.
enum hnb_class_enum hnb_class_t
Output file classes.
DLLSPEC FILE * hnb_fopen(const char *file, const char *mode)
Opens an HNBody output file in a standardized manner.
Definition: output.c:228
#define HNB_ORDER_MAX
Maximum number of columns allowed in InputOrder, OutputOrder, etc.
Definition: opts.h:28
struct hnb_header_struct hnb_header_t
Output file header data structure.
enum hnb_format_enum hnb_format_t
Output file formats.
DLLSPEC size_t hnb_write_file(double *const ddata[], float *const fdata[], size_t nrec, int header, int raw, const hnb_header_t *h, FILE *f)
Writes data arrays to an HNBody output file.
Definition: output.c:1591
DLLSPEC void hnb_fill_header(hnb_header_t *h, hnb_class_t fclass, hnb_format_t format, hnb_coord_t coord, double epoch, double G, double c, double M, double E0, const double L0[], double tinit, double stepsize, double rate, int id, int digits, const double offset[], const hnb_option_tag order[], int ncol)
Fills a header structure with specific values.
Definition: output.c:464