35 char str1[128], str2[128], str3[128], sline[512];
40 print1(
" ___ __ __ ____________ \n");
41 print1(
" / _ \\/ / / / / /_ __/ __ \\ \n");
42 print1(
" / ___/ /__/ /_/ / / / / /_/ / \n");
43 print1(
"/_/ /____/\\____/ /_/ \\____/ \n");
46 print1 (
"\n> System:\n\n");
48 if ( (fp = fopen(
"sysconf.out",
"r")) != NULL){
50 while (fscanf (fp,
"%s %s %s\n", str1, str2, str3) != EOF) {
51 if (!strcmp(str1,
"USER"))
52 print1 (
" %s: %s\n",str1, str3);
53 else if (!strcmp(str1,
"WORKING_g_dir"))
54 print1 (
" %s: %s\n",str1, str3);
55 else if (!strcmp(str1,
"SYSTEM_NAME"))
56 print1 (
" %s: %s\n",str1, str3);
57 else if (!strcmp(str1,
"NODE_NAME"))
58 print1 (
" %s: %s\n",str1, str3);
59 else if (!strcmp(str1,
"ARCH"))
60 print1 (
" %s: %s\n",str1, str3);
61 else if (!strcmp(str1,
"BYTE_ORDER"))
62 print1 (
" %s: %s\n\n",str1, str3);
67 print1 (
"! sysconf.out file not found \n\n");
71 print1(
"> Local time: %s\n",asctime(localtime(&time_now)));
74 print1 (
"Sorry, but the number of vector components can\n");
75 print1 (
"not be less than the dimension number.\n");
76 print1 (
"Please edit definitions.h and fix this.\n");
82 print1 (
"> Cmd line args: ");
83 for (n = 1; n < argc; n++)
print1 (
"%s ",argv[n]);
88 print1 (
"> Header configuration:\n\n");
95 #if PHYSICS == MHD || PHYSICS == RMHD
96 #if DIVB_CONTROL == NO
98 #elif DIVB_CONTROL == EIGHT_WAVES
99 print1 (
"Powell's 8wave]\n");
100 #elif DIVB_CONTROL == DIV_CLEANING
101 #if GLM_EXTENDED == NO
102 print1 (
"Divergence Cleaning (GLM)]\n");
103 #elif GLM_EXTENDED == YES
104 print1 (
"Divergence Cleaning (Extended GLM)]\n");
107 #elif DIVB_CONTROL == CONSTRAINED_TRANSPORT
109 #if CT_EMF_AVERAGE == ARITHMETIC
110 print1 (
"Ar. average]\n");
111 #elif CT_EMF_AVERAGE == UCT_CONTACT
112 print1 (
"UCT_CONTACT]\n");
113 #elif CT_EMF_AVERAGE == UCT0
115 #elif CT_EMF_AVERAGE == UCT_HLL
133 print1 (
" RECONSTRUCTION: ");
134 #ifndef FINITE_DIFFERENCE
143 else print1 (
" (Primitive lim)\n");
147 #ifdef FINITE_DIFFERENCE
161 print1 (
" LOADED MODULES:\n");
164 print1 (
"\n o [SHEARINGBOX]\n");
166 print1 (
" - Sym Hydro Flux: %s\n",
168 print1 (
" - Sym Ey: %s\n",
170 print1 (
" - Sym Ez: %s\n",
172 print1 (
" - Force EMF periods: %s\n",
177 print1 (
"\n o [FARGO]\n");
179 print1 (
" - Average Speed: %s\n",
197 print1 (
" TIME INTEGRATOR: ");
202 print1 (
"Characteristic Tracing\n");
205 print1 (
" DIM. SPLITTING: ");
210 #if PARABOLIC_FLUX != NO
211 print1 (
" DIFFUSION TERMS:");
212 #if (RESISTIVITY == EXPLICIT)
213 print1 (
" Resistivity [EXPLICIT]\n");
214 #elif (RESISTIVITY == SUPER_TIME_STEPPING)
215 print1 (
" Resistivity [STS]\n");
218 #if (THERMAL_CONDUCTION == EXPLICIT)
219 print1 (
" Thermal Conduction [EXPLICIT]\n");
220 #elif (THERMAL_CONDUCTION == SUPER_TIME_STEPPING)
221 print1 (
" Thermal Conduction [STS]\n");
224 #if (VISCOSITY == EXPLICIT)
225 print1 (
" Viscosity [EXPLICIT]\n");
226 #elif (VISCOSITY == SUPER_TIME_STEPPING)
227 print1 (
" Viscosity [STS]\n");
247 print1 (
"> Runtime configuration (%s):\n\n", ini_file);
248 print1 (
" +----------------------------------------------------------\n");
249 fp = fopen(ini_file,
"r");
250 while ( fgets(sline, 512, fp) != NULL ) {
254 print1 (
" +---------------------------------------------------------\n");
269 print1 (
"> Cooling Module: ");
276 print1 (
"> Normalization Units:\n\n");
277 print1 (
" [Density]: %8.3e (gr/cm^3), %8.3e (1/cm^3)\n",
279 print1 (
" [Pressure]: %8.3e (dyne/cm^2)\n",
281 print1 (
" [Velocity]: %8.3e (cm/s)\n",UNIT_VELOCITY);
283 print1 (
" [Temperature]: %8.3e X (p/rho*mu) (K)\n",
KELVIN);
284 print1 (
" [Time]: %8.3e (sec), %8.3e (yrs) \n",
286 #if PHYSICS == MHD || PHYSICS == RMHD
287 print1 (
" [Mag Field]: %8.3e (Gauss)\n",
307 int ib, ie, jb, je, kb, ke;
309 int nghx, nghy, nghz;
311 static int *ib_proc, *ie_proc;
312 static int *jb_proc, *je_proc;
313 static int *kb_proc, *ke_proc;
315 double xb, xe, yb, ye, zb, ze;
317 double *xb_proc, *xe_proc;
318 double *yb_proc, *ye_proc;
319 double *zb_proc, *ze_proc;
349 xb = Gx->
xl[ib]; xe = Gx->
xr[ie];
350 yb = Gy->
xl[jb]; ye = Gy->
xr[je];
351 zb = Gz->
xl[kb]; ze = Gz->
xr[ke];
354 MPI_Gather (&xb, 1, MPI_DOUBLE, xb_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
355 MPI_Gather (&xe, 1, MPI_DOUBLE, xe_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); ,
357 MPI_Gather (&yb, 1, MPI_DOUBLE, yb_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
358 MPI_Gather (&ye, 1, MPI_DOUBLE, ye_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); ,
360 MPI_Gather (&zb, 1, MPI_DOUBLE, zb_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
361 MPI_Gather (&ze, 1, MPI_DOUBLE, ze_proc, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
366 ib = Gx->
beg; ie += Gx->
beg - nghx;
367 jb = Gy->
beg; je += Gy->
beg - nghy;
368 kb = Gz->
beg; ke += Gz->
beg - nghz;
371 MPI_Gather (&ib, 1, MPI_INT, ib_proc, 1, MPI_INT, 0, MPI_COMM_WORLD);
372 MPI_Gather (&ie, 1, MPI_INT, ie_proc, 1, MPI_INT, 0, MPI_COMM_WORLD); ,
374 MPI_Gather (&jb, 1, MPI_INT, jb_proc, 1, MPI_INT, 0, MPI_COMM_WORLD);
375 MPI_Gather (&je, 1, MPI_INT, je_proc, 1, MPI_INT, 0, MPI_COMM_WORLD); ,
377 MPI_Gather (&kb, 1, MPI_INT, kb_proc, 1, MPI_INT, 0, MPI_COMM_WORLD);
378 MPI_Gather (&ke, 1, MPI_INT, ke_proc, 1, MPI_INT, 0, MPI_COMM_WORLD);
381 print1 (
"> Domain Decomposition (%d procs):\n\n", nprocs);
383 for (p = 0; p < nprocs; p++){
385 print1 (
" - Proc # %d, X1: [%f, %f], i: [%d, %d], NX1: %d\n",
386 p, xb_proc[p], xe_proc[p],
387 ib_proc[p], ie_proc[p],
388 ie_proc[p]-ib_proc[p]+1); ,
389 print1 (
" X2: [%f, %f], j: [%d, %d]; NX2: %d\n",
390 yb_proc[p], ye_proc[p],
391 jb_proc[p], je_proc[p],
392 je_proc[p]-jb_proc[p]+1); ,
393 print1 (
" X3: [%f, %f], k: [%d, %d], NX3: %d\n\n",
394 zb_proc[p], ze_proc[p],
395 kb_proc[p], ke_proc[p],
396 ke_proc[p]-kb_proc[p]+1);
400 MPI_Barrier (MPI_COMM_WORLD);
428 #if GEOMETRY == CYLINDRICAL
429 print1 (
"\n! Cylindrical coordinates are only 2D.\n");
430 print1 (
"! Use polar instead.\n");
434 #if GEOMETRY == SPHERICAL
435 #if (TIME_STEPPING == HANCOCK) || (TIME_STEPPING == CHARACTERISTIC_TRACING)
436 print1 (
"\n ! Spherical 3D only works with RK integrators\n");
443 #if DIMENSIONAL_SPLITTING == NO && DIMENSIONS == 1
445 print1 (
"! CheckConfig(): Cannot integrate a 1-D problem with an unsplit method \n");
450 #if (defined STAGGERED_MHD) && (DIMENSIONAL_SPLITTING == YES)
451 print1 (
"! CheckConfig(): CT requires dimensional unsplit scheme.\n");
void FreeArray1D(void *v)
#define DIMENSIONAL_SPLITTING
#define UNIT_DENSITY
Unit density in gr/cm^3.
void print1(const char *fmt,...)
void ShowConfig(int argc, char *argv[], char *ini_file)
void ShowDomainDecomposition(int nprocs, Grid *GXYZ)
static void CheckConfig()
#define CONST_mp
Proton mass.
#define FARGO_NSTEP_AVERAGE
#define UNIT_VELOCITY
Unit velocity in cm/sec.
#define SB_FORCE_EMF_PERIODS
Force periodicity at y- and z- boundaries.
int beg
Global start index for the local array.
#define UNIT_LENGTH
Unit Length in cm.
#define FARGO_ORDER
Set the order of interpolation during the linear transport step.
int nghost
Number of ghost zones.
#define CHARACTERISTIC_TRACING
#define FARGO_AVERAGE_VELOCITY
#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;)
#define SB_SYMMETRIZE_HYDRO
Symmetrize the hydrodynamical fluxes at the left and right x-boundaries in order to enforce conservat...
void BACKGROUND_FIELD(real x1, real x2, real x3, real *B0)
#define SB_SYMMETRIZE_EY
Symmetrize the y-component of the electric field at the left and right x-boundaries to enforce conser...
int np_tot
Total number of points in the local domain (boundaries included).
#define SB_SYMMETRIZE_EZ
Symmetrize the z-component of electric field at the left and right x-boundaries to enforce conservati...
#define QUIT_PLUTO(e_code)
int np_int
Total number of points in the local domain (boundaries excluded).