PLUTO
analysis.c File Reference

Go to the source code of this file.

Functions

 if (divB==NULL)
 
 DOM_LOOP (k, j, i)
 
 D_EXPAND (tot/[n]=(double) grid[IDIR].np_int_glob;, tot/[n]=(double) grid[JDIR].np_int_glob;, tot/[n]=(double) grid[KDIR].np_int_glob;)
 

Variables

int i
 
int j
 
int k
 
static int n = 1
 
double *** divB = GLM_GetDivB()
 
double dB
 
double tot [2048] = 0.0
 
double max = 0.0
 
double atot
 
double gtot
 
double gmax
 
FILE * fp
 

Function Documentation

D_EXPAND ( tot [n] = (double)grid[IDIR].np_int_glob;,
tot [n] = (double)grid[JDIR].np_int_glob;,
tot [n] = (double)grid[KDIR].np_int_glob; 
)

Definition at line 27 of file analysis.c.

48  {
49  printf ("> writing divB to disk (%d)\n",n);
50  fp = fopen("divb.dat","a");
51  fprintf (fp, "%f %f %f %f\n",g_time, tot[n], atot, max);
52  fclose(fp);
53  }
static int n
Definition: analysis.c:3
double atot
Definition: analysis.c:6
double g_time
The current integration time.
Definition: globals.h:117
FILE * fp
Definition: analysis.c:7
double tot[2048]
Definition: analysis.c:5
double max
Definition: analysis.c:5

Here is the caller graph for this function:

DOM_LOOP ( k  ,
j  ,
i   
)

Definition at line 22 of file analysis.c.

22  {
23  dB = fabs(divB[k][j][i]);
24  tot[n] += dB;
25  max = MAX(dB, max);
26  }
#define MAX(a, b)
Definition: macros.h:101
static int n
Definition: analysis.c:3
double dB
Definition: analysis.c:4
int j
Definition: analysis.c:2
int k
Definition: analysis.c:2
double *** divB
Definition: analysis.c:4
int i
Definition: analysis.c:2
double tot[2048]
Definition: analysis.c:5
double max
Definition: analysis.c:5

Here is the caller graph for this function:

if ( divB  = = NULL)

Definition at line 10 of file analysis.c.

10  {
11  if (prank == 0){
12  fp = fopen("divb.dat","w");
13  fprintf (fp,"# \n");
14  fprintf (fp,"# time tot(t) av_tot(t) max\n");
15  fprintf (fp,"# ------------------------------------\n");
16  fclose(fp);
17  }
18  return;
19  }
int prank
Processor rank.
Definition: globals.h:33
FILE * fp
Definition: analysis.c:7

Here is the caller graph for this function:

Variable Documentation

double atot

Definition at line 6 of file analysis.c.

double dB

Definition at line 4 of file analysis.c.

divB = GLM_GetDivB()

Definition at line 4 of file analysis.c.

FILE* fp

Definition at line 7 of file analysis.c.

double gmax

Definition at line 6 of file analysis.c.

double gtot

Definition at line 6 of file analysis.c.

int i

Definition at line 2 of file analysis.c.

int j

Definition at line 2 of file analysis.c.

int k

Definition at line 2 of file analysis.c.

max = 0.0

Definition at line 5 of file analysis.c.

n = 1
static

Definition at line 3 of file analysis.c.

tot[n] = 0.0

Definition at line 5 of file analysis.c.