Functions to write dumps of particle "history" variables in a formatted table. More...
Go to the source code of this file.
Functions | |
Real | expr_dpar (const Grid *pG, const int i, const int j, const int k) |
Wrapper for particle density. | |
void | dump_particle_history (Grid *pGrid, Domain *pD, Output *pOut) |
Writes particle variables as formatted table. | |
void | dump_parhistory_enroll (const Parfun_t pfun, const char *label, const int set) |
Set: global variable (0) or particle type dependent variable (1). | |
Variables | |
static char * | usr_label_scal [MAX_USR_SCAL] |
static char * | usr_label_aray [MAX_USR_ARAY] |
static Parfun_t | phst_scalfun [MAX_USR_SCAL] |
static Parfun_t | phst_arayfun [MAX_USR_ARAY] |
static int | usr_scal_cnt = 0 |
static int | usr_aray_cnt = 0 |
Functions to write dumps of particle "history" variables in a formatted table.
PURPOSE: Functions to write dumps of particle "history" variables in a formatted table. "History" dumps are scalars (usually volume averages) written periodically, giving the time-evolution of that quantitity.
The particle history dump has two sets. The first set is global, particle type independent quantities, including the following:
The second set is particle type dependent quantities, which contains
More variables can be hardwired by increasing NSCAL=number of variables, and adding calculation of desired quantities below.
Alternatively, up to MAX_USR_H_COUNT new history variables can be added using dump_parhistory_enroll() in the problem generator.
CONTAINS PUBLIC FUNCTIONS:
Definition in file dump_particle_history.c.
void dump_parhistory_enroll | ( | const Parfun_t | pfun, | |
const char * | label, | |||
const int | set | |||
) |
Set: global variable (0) or particle type dependent variable (1).
Definition at line 426 of file dump_particle_history.c.
References ath_error(), ath_strdup(), phst_arayfun, phst_scalfun, usr_aray_cnt, usr_label_aray, usr_label_scal, and usr_scal_cnt.
void dump_particle_history | ( | Grid * | pGrid, | |
Domain * | pD, | |||
Output * | pOut | |||
) |
Writes particle variables as formatted table.
Definition at line 87 of file dump_particle_history.c.
References ath_perr(), calloc_1d_array(), calloc_2d_array(), expr_dpar(), free_2d_array(), n, particle_to_grid(), phst_arayfun, phst_scalfun, property_all(), rho, usr_aray_cnt, usr_label_aray, usr_label_scal, and usr_scal_cnt.
Real expr_dpar | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
Wrapper for particle density.
Definition at line 291 of file output_particle.c.
Parfun_t phst_arayfun[MAX_USR_ARAY] [static] |
Definition at line 74 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().
Parfun_t phst_scalfun[MAX_USR_SCAL] [static] |
Definition at line 73 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().
int usr_aray_cnt = 0 [static] |
Definition at line 77 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().
char* usr_label_aray[MAX_USR_ARAY] [static] |
Definition at line 70 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().
char* usr_label_scal[MAX_USR_SCAL] [static] |
Definition at line 69 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().
int usr_scal_cnt = 0 [static] |
Definition at line 76 of file dump_particle_history.c.
Referenced by dump_parhistory_enroll(), and dump_particle_history().