HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
diag.c File Reference

diagnostics subroutine More...

#include "decs.h"
Include dependency graph for diag.c:

Go to the source code of this file.

Macros

#define DIAGREPORT   {trifprintf("t=%21.15g to do: tener=%21.15g (dt=%21.15g): dump_cnt=%ld @ t=%21.15g (dt=%21.15g) : avg_cnt=%ld @ t=%21.15g (dt=%21.15g) : debug_cnt=%ld @ t=%21.15g (dt=%21.15g) : image_cnt=%ld @ t=%21.15g (dt=%21.15g): restart=%d @ nstep=%ld (dt=%ld) dtfake=%ld\n",t,tdumpgen[ENERDUMPTYPE],DTdumpgen[ENERDUMPTYPE],dumpcntgen[MAINDUMPTYPE],tdumpgen[MAINDUMPTYPE],DTdumpgen[MAINDUMPTYPE],dumpcntgen[AVG1DUMPTYPE],tdumpgen[AVG1DUMPTYPE],DTdumpgen[AVG1DUMPTYPE],dumpcntgen[DEBUGDUMPTYPE],tdumpgen[DEBUGDUMPTYPE],DTdumpgen[DEBUGDUMPTYPE],dumpcntgen[IMAGEDUMPTYPE],tdumpgen[IMAGEDUMPTYPE],DTdumpgen[IMAGEDUMPTYPE],whichrestart,nrestart,DTr,DTfake);}
 
#define JETBSQORHO   (3.162)
 
#define JETBSQORHO   (3.162)
 
#define DEBUGFRLOOP   1
 
#define AVOIDFULLINVERSION   1
 

Functions

static int get_dodumps (int call_code, int firsttime, SFTYPE localt, long localnstep, long localrealnstep, FTYPE *tdumpgen, FTYPE *tlastgen, FTYPE tlastareamap, long long int nlastrestart, long long int nrestart, long long int nlastfake, long long int nfake, int *doareamap, int *dodumpgen)
 setup whether do each dump type More...
 
static int pre_dump (int whichDT, FTYPE tt, FTYPE localt, FTYPE *DTdumpgenvar, long int *dumpcntgenvar, long long int *dumpcgen, FTYPE *tdumpgen, FILE **dumpcnt_filegen, FTYPE *tlastgen,int whichrestartvar, long long int restartc, long long int localrealnstep, long long int nrestart, long DTrvar, long long int nlastrestart,int whichfakevar, long long int fakec, long long int nfake, long DTfakevar, long long int nlastfake)
 do stuff before dumping More...
 
static int post_dump (int whichDT, FTYPE localt, FTYPE *DTdumpgenvar, long int *dumpcntgenvar, long long int *dumpcgen, FTYPE *tdumpgen, FILE **dumpcnt_filegen, FTYPE *tlastgen,long *restartstepsvar, int *whichrestartvar, long long int *restartc, long localrealnstep, long long int *nrestart, long DTrvar, long long int *nlastrestart,long *fakestepsvar, int *whichfakevar, long long int *fakec, long long int *nfake, long DTfakevar, long long int *nlastfake)
 do stuff after dumping More...
 
int diag (int call_code, FTYPE localt, long localnstep, long localrealnstep)
 main diag() call for diagnostics OPENMPNOTE: Assume diag() not called by multiple threads, so static's are ok (including firsttime) More...
 
int area_map (int call_code, int type, int size, int i, int j, int k, FTYPE(*prim)[NSTORE2][NSTORE3][NPR])
 2D only for now since really only useful for 2D imaging map out region around failure point OPENMPNOTE: Assume area_map() not called by multiple threads, so static's are ok (including firsttime) More...
 
void frdotout (void)
 OPENMPNOTE: Assume frdotout() not called by multiple threads, so static's are ok (including firsttime) write the flux vs. More...
 
void init_varstavg (void)
 get various vars vs. time and average them in time More...
 
void final_varstavg (FTYPE IDT)
 final vars averaged in time More...
 
int set_varstavg (FTYPE tfrac)
 set var to be averaged in time More...
 
int average_calc (int doavg)
 if doavg==1, then assume this is call before dumping More...
 

Detailed Description

diagnostics subroutine

Definition in file diag.c.

Macro Definition Documentation

#define AVOIDFULLINVERSION   1

Definition at line 2203 of file diag.c.

#define DEBUGFRLOOP   1

Definition at line 1656 of file diag.c.

#define DIAGREPORT   {trifprintf("t=%21.15g to do: tener=%21.15g (dt=%21.15g): dump_cnt=%ld @ t=%21.15g (dt=%21.15g) : avg_cnt=%ld @ t=%21.15g (dt=%21.15g) : debug_cnt=%ld @ t=%21.15g (dt=%21.15g) : image_cnt=%ld @ t=%21.15g (dt=%21.15g): restart=%d @ nstep=%ld (dt=%ld) dtfake=%ld\n",t,tdumpgen[ENERDUMPTYPE],DTdumpgen[ENERDUMPTYPE],dumpcntgen[MAINDUMPTYPE],tdumpgen[MAINDUMPTYPE],DTdumpgen[MAINDUMPTYPE],dumpcntgen[AVG1DUMPTYPE],tdumpgen[AVG1DUMPTYPE],DTdumpgen[AVG1DUMPTYPE],dumpcntgen[DEBUGDUMPTYPE],tdumpgen[DEBUGDUMPTYPE],DTdumpgen[DEBUGDUMPTYPE],dumpcntgen[IMAGEDUMPTYPE],tdumpgen[IMAGEDUMPTYPE],DTdumpgen[IMAGEDUMPTYPE],whichrestart,nrestart,DTr,DTfake);}

Definition at line 9 of file diag.c.

#define JETBSQORHO   (3.162)

Definition at line 1358 of file diag.c.

#define JETBSQORHO   (3.162)

Definition at line 1358 of file diag.c.

Function Documentation

int area_map ( int  call_code,
int  type,
int  size,
int  i,
int  j,
int  k,
FTYPE(*)  prim[NSTORE2][NSTORE3][NPR] 
)

2D only for now since really only useful for 2D imaging map out region around failure point OPENMPNOTE: Assume area_map() not called by multiple threads, so static's are ok (including firsttime)

Definition at line 956 of file diag.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int average_calc ( int  doavg)

if doavg==1, then assume this is call before dumping

Definition at line 2040 of file diag.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int diag ( int  call_code,
FTYPE  localt,
long  localnstep,
long  localrealnstep 
)

main diag() call for diagnostics OPENMPNOTE: Assume diag() not called by multiple threads, so static's are ok (including firsttime)

Definition at line 29 of file diag.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void final_varstavg ( FTYPE  IDT)

final vars averaged in time

Definition at line 1792 of file diag.c.

Here is the caller graph for this function:

void frdotout ( void  )

OPENMPNOTE: Assume frdotout() not called by multiple threads, so static's are ok (including firsttime) write the flux vs.

radius

Definition at line 1660 of file diag.c.

Here is the caller graph for this function:

static int get_dodumps ( int  call_code,
int  firsttime,
SFTYPE  localt,
long  localnstep,
long  localrealnstep,
FTYPE tdumpgen,
FTYPE tlastgen,
FTYPE  tlastareamap,
long long int  nlastrestart,
long long int  nrestart,
long long int  nlastfake,
long long int  nfake,
int *  doareamap,
int *  dodumpgen 
)
static

setup whether do each dump type

Definition at line 631 of file diag.c.

Here is the caller graph for this function:

void init_varstavg ( void  )

get various vars vs. time and average them in time

Definition at line 1752 of file diag.c.

Here is the caller graph for this function:

static int post_dump ( int  whichDT,
FTYPE  localt,
FTYPE DTdumpgen,
long int *  dumpcntgen,
long long int *  dumpcgen,
FTYPE tdumpgen,
FILE **  dumpcnt_filegen,
FTYPE tlastgen,
long *  restartsteps,
int *  whichrestart,
long long int *  restartc,
long  localrealnstep,
long long int *  nrestart,
long  DTr,
long long int *  nlastrestart,
long *  fakesteps,
int *  whichfakevar,
long long int *  fakec,
long long int *  nfake,
long  DTfakevar,
long long int *  nlastfake 
)
static

do stuff after dumping

Definition at line 571 of file diag.c.

Here is the caller graph for this function:

static int pre_dump ( int  whichDT,
FTYPE  t,
FTYPE  localt,
FTYPE DTdumpgen,
long int *  dumpcntgen,
long long int *  dumpcgen,
FTYPE tdumpgen,
FILE **  dumpcnt_filegen,
FTYPE tlastgen,
int  whichrestart,
long long int  restartc,
long long int  localrealnstep,
long long int  nrestart,
long  DTr,
long long int  nlastrestart,
int  whichfakevar,
long long int  fakec,
long long int  nfake,
long  DTfakevar,
long long int  nlastfake 
)
static

do stuff before dumping

Definition at line 550 of file diag.c.

Here is the caller graph for this function:

int set_varstavg ( FTYPE  tfrac)

set var to be averaged in time

Definition at line 1831 of file diag.c.

Here is the call graph for this function:

Here is the caller graph for this function: