HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
defs.general.h
Go to the documentation of this file.
1 
14 
16 
17 
18 
19 #include "mpidefs.h"
20 
21 
22 #include "kazfulleos.defsglobalprivate.h" // put here so OpenMP private globals are defined before global.nondepmnemonics.h sets up thread private pragma's
23 
24 
25 
26 
27 #include "rancdefs.h"
28 
29 FTYPE Xmetricnew[NDIM],Xmetricold[NDIM]; // used to store time of latest and oldest metric
30 
32 
34 
36 
38 
39 
42 /* physics parameters */
44 
45 /* numerical parameters */
48 FTYPE Rin_array[NDIM], Rout_array[NDIM]; //atch -- arrays for a more general way of handling the grid dimensions
58 
61 
62 
64 #if(SIMULBCCALC!=-1)
65 int isc,iec,jsc,jec;
69 int ise,iee,jse,jee;
70 int isf1ct,ief1ct,jsf1ct,jef1ct;// GODMARK: other stage type requires more
75 #endif
76 
78 long nstep;
80 
82 
83 int gocont; // used to continue running(runtype, directinput, timereenter)
84 int runtype;
85 
86 /* output parameters */
87 FILE *log_file;
88 FILE *fail_file;
90 FILE *logdt_file;
96 
99 
101 
105 //SFTYPE DTd;
106 //SFTYPE DTavg;
107 //SFTYPE DTener;
108 //SFTYPE DTi;
109 //SFTYPE DTdebug;
110 long DTr;
111 long DTfake;
112 //long dump_cnt;
113 //long avg_cnt;
114 //long debug_cnt;
115 //long image_cnt;
117 //long fieldline_cnt; // assumed to keep track with images (as in diag.c), so no need to include in restart()
118 
119 int nstroke; // OPENMPMARK: Bad in some inversion codes
120 
121 
124 int global_enerregiondef[NUMENERREGIONS][NUMUPDOWN][NDIM];
125 
126 
127 
128 
129 /* global flags */
130 int failed;
137 
138 /* diagnostics */
142 CTYPE failfloorcountlocal[2][NUMTSCALES][NUMFAILFLOORFLAGS]; // don't track this separately in jet
143 CTYPE failfloorcountlocal_tot[2][NUMTSCALES][NUMFAILFLOORFLAGS]; // don't track this separately in jet
144 
168 //SFTYPE horizonflux[NPR];
169 //SFTYPE horizoncum[NPR];
170 //SFTYPE horizonflux_tot[NPR];
171 //SFTYPE horizoncum_tot[NPR];
172 
177 
181 int *doflux;
182 int *enerpos;
189 SFTYPE (*pcum)[NPR];
190 SFTYPE (*pcum_tot)[NPR];
191 SFTYPE (*pdot)[NPR];
198 SFTYPE *diss_tot;
199 
201 SFTYPE (*pdot_tot)[NPR];
203 
204 
206 
207 
208 /* Jon's addition */
217 int whocalleducon; // OPENMPNOTE: Ensure those are set as threadprivate [noted only called outside parallel regions]
221 long restartsteps[2];
222 long fakesteps[2];
227 
229 
231 int ifail,jfail,kfail; // OPENMPNOTE: Ensure those are set as private [noted only for diagnostics outside parallel regions]
232 int dofailmap,dofaildump,restartonfail;
238 int rescaletype;
252 int debugfail;
253 FTYPE uttdiscr; // OPENMPNOTE: Ensure those are set as threadprivate [noted only for WHICHVEL==VEL3]
260 int docolsplit; // global var for now CHANGINGMARK
266 
267 /* physical consts */
276 
278 
280 
284 int nprstart,nprend; // normally 0 and NPR-1
285 int nprlist[MAXNPR]; // maximum is NPR elements
286 
288 int npr2interpstart,npr2interpend; // normally 0 and NPR2INTERP-1
289 int npr2interplist[MAXNPR]; // maximum is NPR2INTERP elements
290 
292 int npr2notinterpstart,npr2notinterpend; // normally 0 and -1
293 int npr2notinterplist[MAXNPR]; // maximum is NPR2INTERP elements
294 
296 int nprboundstart,nprboundend; // normally 0 and NPRBOUND-1
297 int nprboundlist[MAXNPR]; // maximum is NPRBOUND elements
298 
300 int nprfluxboundstart,nprfluxboundend; // normally 0 and NPRFLUXBOUND-1
301 int nprfluxboundlist[MAXNPR]; // maximum is NPRFLUXBOUND elements
302 
304 int nprdumpstart,nprdumpend; // normally 0 and NPRDUMP-1
305 int nprdumplist[MAXNPR]; // maximum is NPRDUMP elements
306 
308 int nprinvertstart,nprinvertend; // normally 0 and NPRINVERT-1
309 int nprinvertlist[MAXNPR]; // maximum is NPRINVERT elements
310 
311 
312 
313 int nogdetlist[MAXNPR]; // holds result for WHICHEOM stuff
314 
315 
325 
326 
328 //int dirglobal,locglobal,iglobal,jglobal,kglobal,iterglobal,interporfluxglobal;
329 
333 
346 FTYPE global_fracphi; //phi-extent measured in units of 2*PI, i.e. 0.25 means PI/2; only used if dofull2pi == 0
347 
348 
349 
350 int numbercpu[ 3+1 ];
351 
354 
355 
358 FTYPE (*ptr_compute_u_from_entropy[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE entropy);
359 FTYPE (*ptr_u_rho0_p[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE p);
360 FTYPE (*ptr_u_rho0_T[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE T);
361 FTYPE (*ptr_dpdu_rho0_u[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE u);
363 FTYPE (*ptr_cs2_compute[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE u);
364 
367 FTYPE (*ptr_compute_dSdu[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE u);
368 
372 
373 FTYPE (*ptr_pressure_wmrho0[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE wmrho0);
374 FTYPE (*ptr_compute_idwmrho0dp[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE wmrho0);
375 FTYPE (*ptr_compute_idrho0dp[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE wmrho0);
376 FTYPE (*ptr_compute_qdot[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE u);
377 int (*ptr_compute_sources_EOS[NUMEOSS])(FTYPE *EOSextra, FTYPE *pr, struct of_geom *geom, struct of_state *q, FTYPE *Ui, FTYPE *dUother, FTYPE(*dUcomp)[NPR]);
378 void (*ptr_compute_allextras[NUMEOSS])(int justnum, FTYPE *EOSextra, FTYPE rho0, FTYPE u, int *numextrasreturn, FTYPE *extras);
379 int (*ptr_get_extrasprocessed[NUMEOSS])(int doall, FTYPE *EOSextra, FTYPE *pr, FTYPE *extras, FTYPE *processed);
380 FTYPE (*ptr_compute_temp[NUMEOSS])(FTYPE *EOSextra, FTYPE rho0, FTYPE u);
381 void (*ptr_compute_EOS_parms[NUMEOSS])(FTYPE (*EOSextra)[NSTORE2][NSTORE3][NUMEOSGLOBALS], FTYPE (*prim)[NSTORE2][NSTORE3][NPR]);
382 void (*ptr_compute_EOS_parms_full[NUMEOSS])(FTYPE (*EOSextra)[NSTORE2][NSTORE3][NUMEOSGLOBALS], FTYPE (*prim)[NSTORE2][NSTORE3][NPR]);
383 void (*ptr_store_EOS_parms[NUMEOSS])(int numparms, FTYPE *EOSextra, FTYPE *parlist);
384 void (*ptr_get_EOS_parms[NUMEOSS])(int*numparms, FTYPE *EOSextra, FTYPE *parlist);
386 void (*ptr_getall_forinversion[NUMEOSS])(int eomtype, int whichd, FTYPE *EOSextra, FTYPE quant1, FTYPE quant2, FTYPE *fun, FTYPE *dfunofrho, FTYPE *dfunofu);
387 
389 
391 
394 
395 
396 #include "defs.user.h"
397 
398 
399 
400 int crapdebug;
401 
402 
403 
406 
407 
408 #pragma omp threadprivate(OPENMPGLOBALPRIVATELIST)