Functions | Variables

dump_history.c File Reference

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

Detailed Description

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 Documentation

void dump_history ( MeshS pM,
OutputS pOut 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

ConsFun_t phst_fun[MAX_USR_H_COUNT] [static]

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().