19 int CheckNaN (
double **u,
int is,
int ie,
int id)
28 for (ii = is; ii <= ie; ii++) {
29 for (nv = 0; nv <
NVAR; nv++) {
30 if (u[ii][nv] != u[ii][nv]) {
31 print (
" > NaN found (%d), |",
id);
47 return *(
char*)&TestEndian;
100 state->
vL = state->
vp;
101 state->
vR = state->
vm + 1;
103 state->
uL = state->
up;
104 state->
uR = state->
um + 1;
106 #if (TIME_STEPPING == HANCOCK) || (TIME_STEPPING == CHARACTERISTIC_TRACING)
109 state->
vh = state->
v;
121 char *str_err=
"! Error: ";
157 D_SELECT(
print (
" (%d)> ", ix); ,
158 print (
" (%d,%d)> ", ix, iy); ,
159 print (
" (%d,%d,%d)> ", ix, iy, iz); )
162 for (nv = 0; nv <
NVAR; nv++) {
163 print (
"%12.6e ", a[ip][nv]);
177 for (k = 0; k <
n; k++)
print (
"%12.6e ", v[k]);
192 print (
"----------------------------------------------------------------\n");
193 for (k1 = 0; k1 <
n; k1++){
194 for (k2 = 0; k2 <
n; k2++){
195 print (
"%12.3e ", fabs(A[k1][k2]) > eps ? A[k1][k2]:0.0);
199 print (
"----------------------------------------------------------------\n");
213 static char Swapped[16];
218 for (k = nbytes; k--; ) Swapped[k] = *(c + nbytes - 1 - k);
219 for (k = nbytes; k--; ) c[k] = Swapped[k];
231 printf (
"Trace ------> %f , %d\n", xx, ++ik);
247 int ii=0, jj=0, kk=0;
249 static Grid *grid1, *grid2, *grid3;
284 print (
"zone [x1(%d) = %f]",
287 print (
"zone [x1(%d) = %f, x2(%d) = %f]",
291 print (
"zone [x1(%d) = %f, x2(%d) = %f, x3(%d) = %f]",
318 static char log_file_name[512];
320 /* ********************************************************************* */
331 #if PRINT_TO_FILE == YES
356 printf (
"! SetLogFile: pluto.log cannot be written.\n");
379 #if PRINT_TO_FILE == YES
381 vfprintf(fl, fmt, args);
402 #if PRINT_TO_FILE == YES
405 vfprintf(fl,fmt, args);
409 if (
prank == 0) vprintf(fmt, args);
423 static char old_file[64] =
"\0";
431 if (strcmp (fname,old_file) == 0){
432 fp = fopen(fname,
"a");
434 fp = fopen(fname,
"w");
435 sprintf (old_file,
"%s",fname);
438 for (n = 0; n < nvar; n++) fprintf (fp,
"%12.6e ",q[n]);
int level
The current refinement level (chombo only).
double ** v
Cell-centered primitive varables at the base time level, v[i] = .
double * lmax
Define the maximum k-characteristic speed over the domain.
double ** vh
Primitive state at n+1/2 (only for one step method)
double ** flux
upwind flux computed with the Riemann solver
double ** visc_src
Viscosity source term.
double ** rhs
Conservative right hand side.
int g_intStage
Gives the current integration stage of the time stepping method (predictor = 0, 1st corrector = 1...
double * SR
Rightmost velocity in the Riemann fan at i+1/2.
double ** res_flux
Resistive flux (current)
double ** vR
Primitive variables to the right of the interface, .
#define ARRAY_3D(nx, ny, nz, type)
double ** visc_flux
Viscosity flux.
double ** vp
prim vars at i+1/2 edge, vp[i] = vL(i+1/2)
int g_i
x1 grid index when sweeping along the x2 or x3 direction.
int g_dir
Specifies the current sweep or direction of integration.
int g_j
x2 grid index when sweeping along the x1 or x3 direction.
double * SL
Leftmost velocity in the Riemann fan at i+1/2.
double ** lambda
Characteristic speed associated to Lp and Rp.
double ** tc_flux
Thermal conduction flux.
int g_k
x3 grid index when sweeping along the x1 or x2 direction.
double ** vm
prim vars at i-1/2 edge, vm[i] = vR(i-1/2)
double ** uR
same as vR, in conservative vars
#define ARRAY_1D(nx, type)
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;)
long int NMAX_POINT
Maximum number of points among the three directions, boundaries excluded.
double * bn
Face magentic field, bn = bx(i+1/2)
double ** um
same as vm, in conservative vars
double ** vL
Primitive variables to the left of the interface, .
double * a2
Sound speed squared.
double * press
Upwind pressure term computed with the Riemann solver.
double ** up
same as vp, in conservative vars
#define ARRAY_2D(nx, ny, type)
double *** Rp
Left and right primitive eigenvectors.
#define QUIT_PLUTO(e_code)
double ** uL
same as vL, in conservative vars