Go to the documentation of this file.
11 #define ORDERSTORAGE 5
14 #define NEWMETRICSTORAGE 1
17 #define ASYMDIAGCHECK 0
20 #define ACCURATEDIAG 1
21 #define FLUXDIAGPARTS 0 // whether to compute parts of fluxes
29 #define ACCURATESOURCEDIAG 1
30 #define DIAGSOURCECOMPSTEP 4 // how many fullsteps to wait to compute diag_source_comp() that is somewhat expensive but just diagnostics and not incredibly needed compared to diag_source_all()
35 #define ACCURATESINCOS 1
45 #define ENTROPY2COLD 1
49 #define ENTROPY2FFDE 1
54 #define BADENERGYMAC(ugenergy,ugentropy) ((ugenergy) < 0.5*(ugentropy))
55 #define BADENERGY2MAC(ugenergy,ugentropy) ((ugenergy) < (ugentropy))
58 #define DIVMETHODPREFLUX 0
59 #define DIVMETHODPOSTFLUX 1
61 #define DIVERGENCEMETHOD 1 // choose, but normally 1 for best results.
74 #define GETGEOMUSEPOINTER 0
80 #define ANALYTICMEMORY 1
86 #define HIGHERORDERMEM 1
92 #define SPLITMAEMMEM (0) // CHANGINGMARK
96 #define DOMONOINTERP SMONOINTERP
100 #define SPLITPRESSURETERMINFLUXMA 0 // CHANGINGMARK
102 #define SPLITPRESSURETERMINFLUXEM 0 // CHANGINGMARK
107 #define MERGEDC2EA2CMETHODMA 0
108 #define MERGEDC2EA2CMETHODEM 0
109 #define MERGEDC2EA2CMETHOD (MERGEDC2EA2CMETHODMA || MERGEDC2EA2CMETHODEM)
112 #define HIGHERORDERROUGH 0
113 #define HIGHERORDERSMOOTH 1
114 #define HIGHERORDERVERYSMOOTH 2
121 #define HIGHERORDERTYPE HIGHERORDERROUGH // original method
126 #if(HIGHERORDERTYPE==HIGHERORDERROUGH)// non-smooth version:
132 #define DO_SPLITC2E NOSPLITA2C
133 #define DO_SPLITA2C ENERGY_CONTROLS_ALL_WEIGHTS // c2a and a2c for conserved quants
134 #define DO_SPLITA2CSMOOTH DO_SPLITA2C
135 #define DO_SPLITA2C4FLUX DO_SPLITA2C // more generally
136 #define DO_SPLITA2C4MAFLUX MASSENERGYMOMENTUM_IS_COUPLED_WEIGHTS // couples weights together
137 #define DO_SPLITA2C4SMOOTHFLUX DO_SPLITA2C
138 #define DO_SPLITSOURCE NOSPLITA2C // c2a for ENOSOURCETERM
140 #define EMFLUXFIELDTERMTYPE ENOFLUX
141 #define FIELDTERMTYPE ENOFLUX
142 #define FIELDFVTYPE ENOCONSERVED
146 #elif(HIGHERORDERTYPE==HIGHERORDERSMOOTH) // smooth version
152 #define DO_SPLITC2E NOSPLITA2C
153 #define DO_SPLITA2C ENERGY_CONTROLS_ALL_WEIGHTS // c2a and a2c for conserved quants
154 #define DO_SPLITA2CSMOOTH CONSTANT_ALL_WEIGHTS
161 #define DO_SPLITA2C4FLUX MASSENERGYMOMENTUM_IS_COUPLED_WEIGHTS
162 #define DO_SPLITA2C4MAFLUX DO_SPLITA2C4FLUX
164 #define DO_SPLITA2C4SMOOTHFLUX CONSTANT_ALL_WEIGHTS
165 #define DO_SPLITSOURCE NOSPLITA2C // c2a for ENOSOURCETERM
167 #define EMFLUXFIELDTERMTYPE ENOSMOOTHFLUX
168 #define FIELDTERMTYPE ENOSMOOTHFLUX
169 #define FIELDFVTYPE ENOSMOOTHCONSERVED
173 #elif(HIGHERORDERTYPE==HIGHERORDERVERYSMOOTH) // supersmooth version
178 #define DO_SPLITC2E NOSPLITA2C
179 #define DO_SPLITA2C CONSTANT_ALL_WEIGHTS
180 #define DO_SPLITA2CSMOOTH CONSTANT_ALL_WEIGHTS
181 #define DO_SPLITA2C4FLUX CONSTANT_ALL_WEIGHTS
182 #define DO_SPLITA2C4MAFLUX CONSTANT_ALL_WEIGHTS
183 #define DO_SPLITA2C4SMOOTHFLUX CONSTANT_ALL_WEIGHTS
184 #define DO_SPLITSOURCE NOSPLITA2C
186 #define EMFLUXFIELDTERMTYPE ENOSMOOTHFLUX
187 #define FIELDTERMTYPE ENOSMOOTHFLUX
188 #define FIELDFVTYPE ENOSMOOTHCONSERVED
199 #define VELTERMSMINIMIZE(pl) (pl==RHO || pl==UU || pl==UU+dir)
200 #define ORTHOVEL1TERMSMINIMIZE(pl) (pl==UU+odir1)
201 #define ORTHOVEL2TERMSMINIMIZE(pl) (pl==UU+odir2)
202 #define PRESSUREMINIMIZE(pl) (pl==FLUXSPLITPMA(dir)) // pressure term when splitmaem==1 and doing MA term
203 #define EMFTERMS(pl) (pl>=B1 && pl<=B3) // only used if splitmaem==0
208 #define ALLOTHERSMINIMIZE(pl) (! (VELTERMSMINIMIZE(pl) || ORTHOVEL1TERMSMINIMIZE(pl) || ORTHOVEL2TERMSMINIMIZE(pl) || PRESSUREMINIMIZE(pl) || ((emffixedstencil==1)&&EMFTERMS(pl)) ) )
214 #define FIELDSTAGMEM 1
217 #define STOREFLUXSTATE 1
220 #define STORESHOCKINDICATOR 1
224 #define FIELDTOTHMEM 1 // CHANGINGMARK
233 #define EVOLVEWITHVPOT TRACKVPOT // choice
236 #define MODIFYEMFORVPOT MODIFYVPOT
240 #define CORNGDETVERSION 1
248 #define N1 64 // number of zones in 1-direction
249 #define N2 64 // number of zones in 2-direction
250 #define N3 1 // number of zones in 3-direction
260 #define MCOORD KSCOORDS
268 #define MAXWELL PRIMMAXWELL
272 #define UD0PLUS1FIX 1
275 #define DO_VORTICITY_IMAGE 0
293 #define MAILWHENDONE 1
294 #define MAILFROMREMOTE 0
295 #define REMOTEHOST "ki-rh42.slac.stanford.edu"
296 #define REMOTEUSER "jon"
297 #define EMAILADDRESS "jmckinne@stanford.edu"
298 #define EMAILMESSAGE "Done with GRMHD run DEFAULT"
303 #define SUPERLONGDOUBLE 0
311 #define DOAVGDUMP (DOAVG)
321 #define DOAVG2 0 // only make 1 if DOAVG 1 above
335 #define DOMAINDUMPDIAG (DOMAINDUMP)
339 #define DODEBUGDUMP 1
347 #define DOFLOORDUMP 1
348 #define DOFLOORDIAG (DOFLOORDUMP)
352 #define DODISSMEASUREDUMP 0
353 #define DODISSMEASUREDIAG (DODISSMEASUREDUMP)
358 #define DOEOSDIAG (DOEOSDUMP)
363 #define DORADDIAG (DORADDUMP)
369 #define DOVPOTDUMP (1 && TRACKVPOT)
371 #define DOIMAGEDUMP (1)
373 #define DOAREAMAPDUMP (1)
382 #define DOGRIDSECTIONING 0
388 #define WENO_USE_PRIM_REDUCTION 1
394 #define WENO_EXTRA_A2C_MINIMIZATION 0 // CHANGINGMARK
396 #define WENO_REDUCE_A2C_LOOK_OTHER_DIRECTIONS 1
401 #define LIMIT_FLUXC2A_PRIM_CHANGE 0
405 #define DO_WENO_DEBUG 0
408 #define DOSUPERDEBUG 0
415 #define ALLOWMETRICROT 0
423 #define DOMIXTHETAPHI 1 // for g_{\theta\phi} // no choice
425 #define DOMIXTHETAPHI 0 // choice
433 #define DOEVOLVEMETRIC 0
438 #define EVOLVEMETRICSUBSTEP 0
441 #define LIMITDTWITHSOURCETERM 0
444 #define LIMITSOURCES 0
448 #define USEGRAVITYDTINDTLIMIT 0
454 #define RESTRICTDTSETTINGINSIDEHORIZON 1
459 #define DODISSMEASURE 0
470 #define WHICHENTROPYEVOLVE EVOLVESIMPLEENTROPY
475 #define DOSELFGRAVVSR 0
477 #define DOFIELDLINE 1
482 #define ROEAVERAGEDWAVESPEED 0
489 #define STOREWAVESPEEDS 0
496 #define USESTOREDSPEEDSFORFLUX (STOREWAVESPEEDS) // choice really independent of STOREWAVESPEEDS, but generall normally want to couple them
498 #define VCHARTYPE VERYLOCALVCHAR
506 #define FORCESOLVEL 0
508 #define FORCESOLVELFLUX 0
513 #define CHECKONINVERSION 1
514 #define CHECKONINVERSIONRAD 0 // check on radiation inversion. Default 0 because generally limiters on |v| mean not the same, so only use for debugging.
516 #define PRECISEINVERSION 1
519 #define WHICHVEL VELREL4
529 #define REMOVERESTMASSFROMUU 1
531 #define RELTYPE RELEOM
533 #define EOMTYPE EOMGRMHD
536 #define EOMRADTYPE EOMRADNONE // EOMRADM1CLOSURE
537 #define EVOLVENRAD 0 // whether to evolve number density of radiation
539 #define WHICHRADSOURCEMETHOD SOURCEMETHODNONE
547 #define UTOPRIMTRYAGAIN 0
551 #define WHICHEOS IDEALGAS
559 #define DOENTROPY DONOENTROPY // normal total energy equation
562 #define FIXUPAFTERINIT 1
565 #define FIXUPAFTERRESTART 1
571 #define CHECKSOLUTION 0
576 #define GAMMAPERCDIFFMAX 2.0
577 #define UPERCDIFFMAX 10.0
581 #define DOEXTRAINTERP 0
593 #define LIMADJUST LIMITERFIXED
597 #define HYDROLIMADJUSTONLY 1
600 #define FLUXADJUST FLUXFIXED
604 #define HYDROFLUXADJUSTONLY 1
608 #define STEPOVERNEGU NEGDENSITY_FIXONFULLSTEP
611 #define STEPOVERNEGRHO NEGDENSITY_FIXONFULLSTEP
613 #define STEPOVERNEGURHO NEGDENSITY_FIXONFULLSTEP
619 #define UTOPRIMADJUST UTOPRIMAVG
621 #define UTOPRIMFIXMPICONSISTENT 1
625 #define UTOPRIMFAILRETURNTYPE UTOPRIMRETURNADJUSTED
630 #define COORDSINGFIXCYL 0 //whether perform the same fix for CYLMINKMETRIC's z axis
632 #define COORDSINGFIX 1
640 #define SINGSMALL (1000*NUMEPSILON) // must be larger than machine precision to work for outer M_PI boundary!. 1E-14 works, but need some insurance so use 1E-13
647 #define DOSTOREPOSITIONDATA 1
651 #define STORETLAB2ORTHO 0
655 #define CONNDERTYPE DIFFNUMREC // improved now and much more accurate then DIFFGAMMIE in general. However this is too slow to be used when time-dependent metric is cycling near substeps.
660 #define CONNMACHINEBODY 1
665 #define CONNAXISYMM 1
669 #define WHICHEOM WITHGDET
674 #define GDETVOLDIFF 0
677 #define FIXGDETSPC_WHEN_1DRADIAL 1
680 #define FORCEGDETPOSITIVE 0
682 #define MINDT 1.e-20 // minimum dt
684 #define JONCHECKS 1 // for vel=3 extra checks (standard things)
685 #define JONCHECKS2 1 // check_pr() crazy thing for vel3 (crazy u^t check and fix -- 2D only)
688 #define FLOORDIAGS 1 // whether to compute floor diagnostics
691 #define ANALYTICGCON 0
693 #define ANALYTICCONNECTION 0 // whether to use analytic connection
696 #define ANALYTICSOURCE 0 // whether to use analytic source function
701 #define OUTFLOWAVOIDBC 0
703 #define FLUXDIMENSPLIT PERFECTUNSPLIT
704 #define A2CDIMENSPLIT PERFECTUNSPLIT
707 #define BOUNDFLUXRECON 0
718 #define BOUNDARYINTERPADJUST 0
722 #define COMPUTEFRDOT 0
725 #define CALCFARADAYANDCURRENTS 0 // FUCK: Some memory leak maybe because Kraken crashes if this is 1. Didn't crash before, so unsure what's wrong. core dump gives some info, but not much.
727 #define WHICHCURRENTCALC CURRENTCALC1
738 #define NOFLUXCTONX1DN 0
748 #define FIXEDOUTFLOW 5 // means fixed inflow but allows outflow -- basically outflow if no inflow, but if inflow then set values to fixed quantities
749 #define NSSURFACE 6 // whatever in bounds.c for NS surface
750 #define PERIODIC 7 // periodic boundary conditions
751 #define OUTFLOWNOINFLOW 8 //copy if velocity directed outward; force velocity to zero and copy if directed inward (into the grid from the boundary)
752 #define RAMESHOUTFLOW 9 //OUTFLOW quantities according the Ramesh's power-law solution
753 #define HORIZONOUTFLOW 10
755 #define BCEXTRAP 100 //atch: extrapolation into the boundary with high order (can be specified)
756 #define CYLAXIS 101 //atch: cylindrical axis BC
757 #define BCEXTRAP_VEL3 102 //atch: the same as BCEXTRAP but extrapolates 3-velocity rather than 4-velocity; important for Hubble flow
758 #define JETINJECTION 103 //Fixed boundary condition for jet injection surrounded by an outflow condition
759 #define BCU1EXTRAPOTHERFIXED 104
760 #define BCEXTRAPCONSTRAINED 105
761 #define RESCALEOUTFLOW 106
762 #define RESCALEFIXEDALLOUTFLOWU1 107
763 #define FIXED_RESCALEOUTFLOWU1 108
764 #define BONDIMDOTOUTFLOW 109
765 #define BONDIINTOUTFLOW 110
766 #define DISKSURFACE 111
767 #define FREEOUTFLOW 112
769 #define FIXEDUSEPANALYTIC 200
772 #define EVOLVECHECKS 0
776 #define FIXUPZONES FIXUP1ZONE
780 #define HLLBOUNDARY 0
790 #define ZEROOUTFLOWFLUX 0
803 #define ZEROPOLEFLUX 0
816 #define FLIPGDETAXIS 1
842 #define DOPOLEDEATH 0
843 #define DOPOLESMOOTH 0 // can choose 1, but probably not necessary and generally won't treat flow correctly near pole even if possibly more robust.
844 #define DOPOLEGAMMADEATH 0
849 #define IF3DSPCTHENMPITRANSFERATPOLE 1 // working fine now that wavespeed bug in fluxctstag.c was fixed, extrapfunc B1,B2 bug fixed, and extrap gdet B3 instead of Bd3 that exaggerates extrapolation near poles and inconsistent with interpolation. Also using VARTOINTERPFIELD GDETVERSION.
855 #define RESCALEINTERP 0
859 #define RESCALEINTERPFLUXCTSTAG 0
872 #define HORIZONSUPERFAST 0
884 #define VARTOINTERP PRIMTOINTERP
887 #define VARTOINTERPFIELD GDETVERSION // most consistent with fluxctstag.c and standard extrapfunc in bounds.tools.c
898 #define VLINEWITHGDETRHO 1
901 #define PLINEWITHFIELD 1
904 #define PARALINEUSESMONO 0
909 #define USEAVGPRIMITIVEFORWENOFLAT 1
915 #define USEPRIMITIVEFROMAVGCONSERVED 0
919 #define CONTACTINDICATOR 0
922 #define COMPUTEDRHODP 1
926 #define SUPERFASTDIVREDUCE 0 //atch
929 #define MINPREFORDER 3
932 #define SHOCKINDICATOR 1
935 #define WHICHPARA PARA4
938 #define BONDI_BOUNDARY_SET_PL_PR 0 //do not analytically set p_l & p_r at the outer boundary for the Bondi problem
943 #define NUMPANALYTICOTHER 0
944 #define DODUMPOTHER 0 // whether to dump other stuff
970 #if((REALTYPE==DOUBLETYPE)||(REALTYPE==FLOATTYPE))
972 #define CONNDELTA (MY1EM5) // default -- seems to work pretty good generally to reduce max error
975 #elif(REALTYPE==LONGDOUBLETYPE)
977 #define CONNDELTA (MY1EM5) // based on min of error for specific case
984 #define USERERSETREGION 0
988 #define BCSIGMACONSTATPOLE 0
992 #define DOONESTEPDUACCOUNTING 1
994 #define FIELDLINEGDETB 0
1012 #define ADJUSTFLUXCT 0 // whether to adjust fluxCT
1014 #define ADJUSTFLUX 0 // whether to adjust normal flux
1018 #define DEBUGINOUTLOOPS 0
1020 #define OUTEREXTRAP 3
1027 #define HORIZONEXTRAP 3
1032 #define NUMITERVPHI 5
1041 #define POLEDEATH (MIN(DOPOLEDEATH,N2BND)) // with expansion by 1 point if detects jumps in densities or Lorentz factor (see poldeath())
1043 #define MAXPOLEDEATH (MIN(DOPOLEDEATH+1,N2BND)) // can't be larger than N2BND
1044 #define DEATHEXPANDAMOUNT 0
1046 #define POLEINTERPTYPE 3 // 0=set uu2=bu2=0, 1=linearly interpolate uu2,bu2 2=interpolate B_\phi into pole 3 =linearly for uu2 unless sucking on pole
1056 #define POLEGAMMADEATH (MIN(DOPOLEGAMMADEATH,N2BND))
1060 #define GAMMAPOLEOUTGOING 1.1 // keep low
1061 #define GAMMAPOLEINGOINGOUT 1.3 // keep low
1062 #define GAMMAPOLEOUTGOINGPOWER 0.1 // keep low unless know will grow alot
1063 #define GAMMAPOLEOUTGOINGRADIUS 6.0 // very model dependent
1064 #define GAMMAPOLEOUTGOINGRADIUSIN 4.0 // very model dependent
1065 #define GAMMAPOLEOUTGOINGMAX (5.0)
1066 #define GAMMAPOLEINGOING GAMMAMAX
1068 #define GAMMARADPOLEOUTGOING 1.3 // keep low
1069 #define GAMMARADPOLEINGOINGOUT 1.7 // keep low
1070 #define GAMMARADPOLEOUTGOINGPOWER 0.5
1071 #define GAMMARADPOLEOUTGOINGRADIUS 6.0 // very model dependent
1072 #define GAMMARADPOLEOUTGOINGRADIUSIN 4.0 // very model dependent
1073 #define GAMMARADPOLEOUTGOINGMAX (3.0)
1074 #define GAMMARADPOLEINGOING GAMMAMAXRAD
1077 #define POLEDENSITYDROPFACTOR 5.0
1078 #define POLEGAMMAJUMPFACTOR 2.0
1080 #define RADIUSMOREDEATH (300.0)
1084 #define AVERAGEINRADIUS 0 // not correct across MPI boundaries since have to shift near boundary yet need that last cell to be consistent with as if no MPI boundary // OPENNPMARK: Also not correct for OpenMP
1085 #define RADIUSTOSTARTAVERAGING 7 // should be beyond horizon so doesn't diffuse across horizon
1086 #define RADIUSTOAVOIDRADIALSUCK (2.0*Rhor)
1094 #define IFLIMITPOLEDEATH 0
1097 #define LIMITEDPOLEDEATHINRADIUS 1
1101 #define RADIUSLIMITPOLEDEATHIN (3.0) // choose r=3M since always close to BH but always slightly outside horizon to help control stability.
1104 #define IFLIMITPOLEDEATHIOUT (-100)
1110 #define POLESMOOTH (MIN(DOPOLESMOOTH,N2BND))
1113 #define OUTERDEATH 0
1114 #define OUTERDEATHRADIUS (1E3)
1115 #define OUTERDEATHGAMMAMAX (6.0)
1116 #define OUTERDEATHGAMMAMAXRAD (GAMMAMAXRAD)
1119 #define OLDNONCONT 0
1122 #define OUTERRADIALSUPERFAST 0
1127 #define ENFORCEMHDCONS2RADCONS 0
1128 #define DOPERF 0 // whether to enable performance opts, including enforcing only QTYPMHD method.
1129 #define ENSURECONS 0 // when done with full step, whether to ensure energy conservation by modifying rad result if possible
1130 #define BORROWENTROPY 0 // whether to try borrowing energy/entropy from radiation to get total energy conservation with entropy method