Functions to write dumps of scalar "history" variables in a formatted table. More...
Go to the source code of this file.
Functions | |
void | dump_history (MeshS *pM, OutputS *pOut) |
Function to write dumps of scalar "history" variables in a formatted table. | |
void | dump_history_enroll (const ConsFun_t pfun, const char *label) |
Adds new user-defined history variables. | |
Variables | |
static char * | usr_label [MAX_USR_H_COUNT] |
static ConsFun_t | phst_fun [MAX_USR_H_COUNT] |
static int | usr_hst_cnt = 0 |
Functions to write dumps of scalar "history" variables in a formatted table.
PURPOSE: Functions to write dumps of scalar "history" variables in a formatted table. "History" variables are mostly VOLUME AVERAGES, e.g.
although other quantities like time and dt are also output. To compute TOTAL, VOLUME INTEGRATED quantities, just multiply by the Domain volume, which is output in the first line of the history file. History data is written periodically, giving the time-evolution of that quantitity. Default (hardwired) values are:
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_history_enroll() in the problem generator.
With SMR, data is averaged over each Domain separately, and dumped to separate files with the level and domain number encoded in the filename. Dumps are always made for all levels and domains, and are written in lev# directories of the root (rank=0) process FOR THAT DOMAIN COMMUNICATOR.
With SR, the default (hardwired) variables are:
CONTAINS PUBLIC FUNCTIONS:
Definition in file dump_history.c.
Function to write dumps of scalar "history" variables in a formatted table.
Definition at line 94 of file dump_history.c.
References ath_fname(), ath_perr(), ConsS::B1c, ConsS::B2c, ConsS::B3c, cc_pos(), DomainS::Comm_Domain, Cons_to_Prim(), ConsS::d, d1, OutputS::dat_fmt, MeshS::Domain, MeshS::DomainsPerLevel, MeshS::dt, GridS::dx1, GridS::dx2, GridS::dx3, ConsS::E, DomainS::Grid, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, ConsS::M1, ConsS::M2, ConsS::M3, DomainS::MaxX, DomainS::MinX, myID_Comm_world, n, MeshS::NLevels, OutputS::num, DomainS::Nx, MeshS::outfilename, GridS::Phi, phst_fun, ConsS::s, MeshS::time, GridS::U, usr_hst_cnt, usr_label, and W.
void dump_history_enroll | ( | const ConsFun_t | pfun, | |
const char * | label | |||
) |
Adds new user-defined history variables.
Definition at line 475 of file dump_history.c.
References ath_error(), ath_strdup(), phst_fun, usr_hst_cnt, and usr_label.
Referenced by initialize(), problem(), and problem_read_restart().
Definition at line 85 of file dump_history.c.
Referenced by dump_history(), and dump_history_enroll().
int usr_hst_cnt = 0 [static] |
Definition at line 87 of file dump_history.c.
Referenced by dump_history(), and dump_history_enroll().
char* usr_label[MAX_USR_H_COUNT] [static] |
Definition at line 82 of file dump_history.c.
Referenced by dump_history(), and dump_history_enroll().