FLASH-X
Doxygen Generated Documentation From Interface Source Code
constants.h
Go to the documentation of this file.
1#if 0
2MASTER_PE is the designated master processor in a run.
3 The other are some general definitions for convenience.
4#endif
5
6#define MASTER_PE 0
7#define MAX_STRING_LENGTH 80
8#define OUTPUT_PROP_LENGTH 24
9#define REAL_FORMAT "(ES20.13)"
10#define NO -10
11#define NONEXISTENT -1
12#define UNKNOWN -2
13#define LOST -3
14#define DUMP_IOFILE_NUM 9999
15
16#define TAB_CHAR ACHAR(9)
17#define REALSIZE 8
18
19
20#if 0
21 This section defines real numeric constants that are so ubiquitous
22 that it is worth having a shared definition of the values.
23#endif
24
25#define PI 3.1415926535897932384
26
27
28#if 0
29 This section defines the Grid geometries, which will be
30 supported in future release. The first four are definitions
31 for the whole grid, the last six define the geometries of
32 individual axes.
33#endif
34
35#define CARTESIAN 1
36#define POLAR 2
37#define CYLINDRICAL 3
38#define SPHERICAL 4
39#define XYZ 0
40#define RAD_CYL 1
41#define RAD_SPH 2
42#define PHI_CYL 3
43#define THETA 4
44#define PHI_SPH 5
45
46
47#if 0
48 This section defines the boundary conditions. Not all
49 have implementations in the current release.
50 The integer values must lie in the range -50..-20 in order
51 to be fully usable as Grid boundary condition types that
52 can be combined with each other.
53 PARAMESH_PHYSICAL_BOUNDARY should only be used when testing
54 for the presence of a boundary, as in
55 if (block_neighbor <= PARAMESH_PHYSICAL_BOUNDARY) then ...
56 The last constant in the group is used in some places to indicate
57 a surface that is not on a physical boundary.
58#endif
59
60#define REFLECTING -31
61#define OUTFLOW -32
62#define PERIODIC -135
63#define USER_DEFINED -38
64#define ISOLATED -133
65#define HYDROSTATIC -34
66#define DIRICHLET -36
67#define PNEUMAN -37
68
69#define NEUMANN_INS -23
70#define NOSLIP_INS -21
71#define SLIP_INS -22
72#define INFLOW_INS -24
73#define MOVLID_INS -25
74#define OUTFLOW_INS -26
75
76#define DIODE -39
77#define GRIDBC_MG_EXTRAPOLATE -40
78#define HYDROSTATIC_NVDIODE -41
79#define HYDROSTATIC_NVREFL -42
80#define HYDROSTATIC_NVOUT -43
81#define HYDROSTATIC_NVZERO -44
82#define HYDROSTATIC_F2 -45
83#define HYDROSTATIC_F2_NVDIODE -46
84#define HYDROSTATIC_F2_NVREFL -47
85#define HYDROSTATIC_F2_NVOUT -48
86#define MARSHAK -49
87#define VACUUM -50
88#define OUTSTREAM -54
89
90#define EQTSYMMETRIC -51
91#define AXISYMMETRIC -52
92#define GRIDBC_ZERO -53
93#define GRIDBC_EXTRAPOLATE_NSC -56
94
95#define PARAMESH_PHYSICAL_BOUNDARY -20
96#define GRIDBC_GIMME_WORK -19
97#define NOT_BOUNDARY -10
98
99#if 0
100 The first three constants in this group are used to specify the edges of
101 cells or blocks, where for cell they have the obvious meaning. When used
102 in connection with blocks, LEFT_EDGE
103 indicates guard cells to the left of the block, RIGHT_EDGE indicates
104 guard cells to the right of the block and CENTER indicates the interior
105 of the block. The fourth and fifth constants in this group are used only
106 in connection with blocks, "WHOLE_VECTOR" is used
107 when the interior as well as the guard cells on
108 both sides are referenced together, and ALLVARS is used when referencing
109 all the physical variables in the Grid data structures such as "unk"
110#endif
111
112#define LEFT_EDGE 1
113#define CENTER 2
114#define RIGHT_EDGE 3
115#define WHOLE_VECTOR 4
116#define NO_VEC 5
117#define ALLVARS -1
118#define NOBOUNDARY -456
119#define VIRTUAL 876
120#define NOVIRTUAL 786
121#define VP_LEAVE 4
122
123#if 0
124 This group has definition related to dimensions. The first three
125 are names of the axes. When referring to all the dimensions at once,
126 ALLDIR is used, and MDIM defines the maximum number of dimensions
127 supported in the code.
128#endif
129
130#define IAXIS 1
131#define JAXIS 2
132#define KAXIS 3
133#define ALLDIR -1
134#define MDIM 3
135
136
137#if 0
138 The next two constants are used in connection of integer block boundaries
139 LOW refers to the lowest index and HIGH refers to the highest index of the
140 block. These can be used interchangeably for either the whole block
141 including guardcells or for the interior only.
142#endif
143
144#define LOW 1
145#define HIGH 2
146
147
148#if 0
149 The next two constants are used as an argument to some subroutines that are
150 called like brackets around some code, to distinguish between "preparation"
151 and "cleanup" calls.
152#endif
153
154#define BEFORE 1
155#define AFTER 2
156
157
158#if 0
159 The next two constants are used to indicate whether variables need to
160 change from one form to another around guard cell exchange. If using
161 conservative variables with some Grid implementations, it may be necessary to
162 convert them to per-mass form before filling guard cells at fine-coarse boundaries
163 to get the interpolation right. If NO_MAPPER is specified no conversions
164 are done.
165 These symbols are obsolete and not used in any code that is currently supported
166 by the FLASH Center. They should not be used by new code.
167#endif
168
169#define NO_MAPPER 0
170#define CONS_TO_PRIM 1
171
172#if 0
173 This group of constants defines options for getting a list of blocks. The
174 four refer to blocks that are on the physical boundary along the respective
175 axis. ACTIVE_BLKS refers to all blocks on which the solution is being
176 advanced. The last three are specific to Paramesh and indicate the position
177 of the block in the tree.
178#endif
179
180#define IBDRY_BLKS 200
181#define JBDRY_BLKS 201
182#define KBDRY_BLKS 202
183#define ANY_BDRY_BLKS 203
184#define ACTIVE_BLKS 204
185#define ALL_BLKS 205
186#define LEAF 1
187#define PARENT_BLK 2
188#define ANCESTOR 3
189#define REFINEMENT 321
190#define TRAVERSED 254
191#define TRAVERSED_AND_ACTIVE 278
192#define INREGION 296
193
194#if 0
195 These five constants are used in get/put data functions, The first
196 two are used to indicate whether to count the offset from the edge
197 that includes guardcells, or from the first interior cell. The last
198 indicate the plane for the Grid_get/putPlaneData functions.
199#endif
200
201#define INTERIOR 10
202#define EXTERIOR 11
203#define XYPLANE 55
204#define XZPLANE 66
205#define YZPLANE 77
206
207#if 0
208 Some more constant expressions for use in get/put data functions and other
209 functions that may support several indexing conventions.
210 GLOBALIDX1 - Cells at a given refinement level are identified by global
211 indexes, starting at 1 for the lowermost leftmost cell of the domain.
212#endif
213
214#define GLOBALIDX1 (-2)
215#define DEFAULTIDX 88
216
217#if 0
218 This group refers to Grid data strucures, to store cell centered, face
219 centered or scratch data for the physical domain. To indicate cell centered
220 data we use CENTER which is defined in one of the earlier groups. WORK
221 is specific to Paramesh and is used to manage a subset of cell centered
222 variables. This group also has constants that can identify specific
223 neighbor blocks in paramesh. MAX_GRID_DATA_STRUCT is the count of all
224 all currently supported data structures
225#endif
226
227#if 0
228 eventually, when we have all scratch structures in place MAX_GRID_DATA_STRUCT
229 will be 9, for now it is 5
230#endif
231
232#define MAX_GRID_DATA_STRUCT 5
233#define MAX_GRID_DATA_STRUCT_TMP 9
234#define FACEX 3
235#define FACEY 4
236#define FACEZ 5
237#define SCRATCH 1
238#define SCRATCH_CTR 6
239#define SCRATCH_FACEX 7
240#define SCRATCH_FACEY 8
241#define SCRATCH_FACEZ 9
242#define SCRATCH_FACES 301
243#define WORK 350
244#define FACES 375
245#define CENTER_FACES 380
246#define CELL_VOLUME 382
247#define CELL_FACEAREA 383
248#define FLUXX 401
249#define FLUXY 402
250#define FLUXZ 403
251
252#if 0
253 Variable descriptors are used in some interfaces to identify
254 sets of variables in UNK or other data structures.
255 Each variable descriptor consists of (up to?) VARDESC_SIZE integers.
256#endif
257
258#define VARDESC_SIZE 4
259
260#define VARDESC_VAR 1
261#define VARDESC_NUM 2
262#define VARDESC_GDS 3
263#define VARDESC_DURATION 4
264
265#if 0
266 Different families of variables are identified by their "duration":
267 Variables in UNK etc. are permanent, others only live while certain
268 code units are active; GASC for Grid allocatable scratches,
269 HASC for Hydro (private) allocatable scratch buffers.
270#endif
271
272#define VD_DUR_PERM 1
273#define VD_DUR_GASC 2
274#define VD_DUR_HASC 3
275
276#if 0
277 These constants define the grid variables that a given particle
278 property maps to through Simulation_mapParticlesVar()
279#endif
280
281#define PARTICLEMAP_UNK 1
282#define PARTICLEMAP_SCRATCH 2
283#define PARTICLEMAP_FACEX 3
284#define PARTICLEMAP_FACEY 4
285#define PARTICLEMAP_FACEZ 5
286#define PARTICLEMAP_SCRATCH_CTR 6
287#define PARTICLEMAP_SCRATCH_FACEX 7
288#define PARTICLEMAP_SCRATCH_FACEY 8
289#define PARTICLEMAP_SCRATCH_FACEZ 9
290
291#if 0
292 This constant defines the current maximum number of variables that
293 Paramesh will refine on.
294#endif
295#define MAXREFVARS 4
296
297
298#if 0
299 This group defines the supported EOS modes. MODE_RT, MODE_RP,
300 and MODE_RE are for future use.
301#endif
302#define MODE_DENS_TEMP 101
303#define MODE_DENS_EI 102
304#define MODE_DENS_PRES 103
305#define MODE_RT 105
306#define MODE_RP 106
307#define MODE_RE 107
308#define MODE_EOS_NOP 55
309#define MODE_EOS_WRAPPERONLY 67
310#define MODE_DENS_ENTR 1207
311
312#define MODE_DENS_TEMP_ION 30101
313#define MODE_DENS_TEMP_ELE 30201
314#define MODE_DENS_TEMP_RAD 30301
315#define MODE_DENS_TEMP_MAT_EQUI 32401
316#define MODE_DENS_TEMP_COMP 31101
317#define MODE_DENS_TEMP_ALL 31201
318#define MODE_DENS_TEMP_EQUI 31301
319#define MODE_DENS_TEMP_GATHER 31501
320
321#define MODE_DENS_EI_ION 30102
322#define MODE_DENS_EI_ELE 30202
323#define MODE_DENS_EI_RAD 30302
324#define MODE_DENS_EI_MAT_GATHER 32402
325#define MODE_DENS_EI_MAT_EQUI 32412
326#define MODE_DENS_EI_MAT_GATHER_PRADSCALE 22402
327#define MODE_DENS_EI_COMP 31102
328#define MODE_DENS_EI_ALL 31202
329#define MODE_DENS_EI_EQUI 31302
330#define MODE_DENS_EI_SCATTER 31402
331#define MODE_DENS_EI_GATHER 31502
332#define MODE_DENS_EI_RECAL_GATHER 31602
333
334#define MODE_DENS_EI_SELE_GATHER 32522
335#define MODE_DENS_EI_SHOCKSELE_GATHER 33522
336
337#define MODE_DENS_PRES_ION 30103
338#define MODE_DENS_PRES_ELE 30203
339#define MODE_DENS_PRES_RAD 30303
340#define MODE_DENS_PRES_COMP 31103
341#define MODE_DENS_PRES_ALL 31203
342
343#define MODE_DENS_ENTR_ELE 30204
344#define MODE_DENS_ENTR_RAD 30304
345
346#define MODE_DENS_EI_SELERAD_GATHER 32562
347
348#if 0
349These three constants define the sweep directions in the PPM algorithm.
350They are also used in other directionally split solvers as well.
351#endif
352
353#define SWEEP_X 1
354#define SWEEP_Y 2
355#define SWEEP_Z 3
356#define SWEEP_ALL 0
357#define SWEEP_XYZ 1
358#define SWEEP_ZYX 2
359#define SWEEP_XZY 3
360#define SWEEP_YZX 4
361#define SWEEP_YXZ 5
362#define SWEEP_ZXY 6
363
364
365#if 0
366 This group of constants is meant to be used with the specialized
367 refinement routines provided as reference with this release. The type
368 of refinement is an argument in the routine, and these constants are
369 the only valid values for that argument.
370#endif
371
372#define RECTANGLE 334
373#define ELLIPSOID 335
374#define THRESHOLD 336
375#define INRADIUS 337
376#define WITHRADIUS 338
377
378#if 0
379 These constants are used by the utilities that convert strings to
380 integer and vice-versa in the Simulation unit to map the components
381 of the Grid data strucutures
382#endif
383#define MAPBLOCKSIZE 5000
384#define MAPBLOCK_UNK 0
385#define MAPBLOCK_FLUX 1
386#define MAPBLOCK_PART 2
387#define MAPBLOCK_SCRATCH 3
388#define MAPBLOCK_FACES 4
389#define MAPBLOCK_SCRATCH_CENTER 5
390#define MAPBLOCK_SCRATCH_FACEX 6
391#define MAPBLOCK_SCRATCH_FACEY 7
392#define MAPBLOCK_SCRATCH_FACEZ 8
393
394#if 0
395 Symbols for Variable Types
396#endif
397#define VARTYPE_ERROR 0
398#define VARTYPE_GENERIC 1
399#define VARTYPE_PER_VOLUME 2
400#define VARTYPE_PER_MASS 3
401
402#if 0
403 The following constants clarify the specification of boundaries
404 in domains that are not clean boxes, or in any way need physical
405 boundaries somewhere inside the domain. The faces can also be combined
406 with the last two constants to specify neighbors in paramesh.
407#endif
408#define ILO_FACE 1
409#define JLO_FACE 3
410#define KLO_FACE 5
411#define IHI_FACE 2
412#define JHI_FACE 4
413#define KHI_FACE 6
414
415#if 0
416 These three number represent the fields in the surrblks datastructure of
417 Paramesh. PROCNO and BLKNO is also the common way of uniquely identifying
418 a block globally in Paramesh
419#endif
420#define BLKNO 1
421#define PROCNO 2
422#define TYPENO 3
423#define ABSMAXNEGH 4
424
425
426#if 0
427 The next few constants are to facilitate the support for face centered
428 variables. The first one is used by various Grid implementations.
429 the remaining ones are used only in Uniform Grid implementations.
430#endif
431
432#define NDATATYPES 5
433#define CENTER_DATATYPE 1
434#define FACEX_DATATYPE 2
435#define FACEY_DATATYPE 3
436#define FACEZ_DATATYPE 4
437
438
439#if 0
440 This group is constants is for use in applying boundary conditions.
441 They define the indices for the array that stores the region of the
442 block that has been extracted to apply boundary conditions.
443#endif
444
445#define BC_DIR 1
446#define SECOND_DIR 2
447#define THIRD_DIR 3
448#define STRUCTSIZE 4
449#define REGION_DIM 4
450
451
452#if 0
453 These constants are error codes for linked list get subroutines.
454#endif
455
456#define NORMAL 0
457#define NOTFOUND -1
458#define BADVALUE -2
459
460#if 0
461 These constants are used sometimes in place of a refinement level.
462#endif
463
464#define UNSPEC_LEVEL -1
465#define INVALID_LEVEL -5
466
467#if 0
468 IO_output has an argument that takes an integer quantity that denotes
469 the type(s) of output files requested at that particular call.
470#endif
471
472#define CHECKPOINT_FILE_ONLY 1
473#define PLOTFILE_ONLY 2
474#define PARTICLE_FILE_ONLY 4
475#define CHECKPOINT_AND_PLOTFILE (CHECKPOINT_FILE_ONLY + PLOTFILE_ONLY)
476#define CHECKPOINT_AND_PARTICLEFILE (CHECKPOINT_FILE_ONLY + PARTICLE_FILE_ONLY)
477#define PLOTFILE_AND_PARTICLEFILE (PLOTFILE_ONLY + PARTICLE_FILE_ONLY)
478#define ALL_FILES (CHECKPOINT_FILE_ONLY + PLOTFILE_ONLY + PARTICLE_FILE_ONLY)
479
480#ifndef PT_MAX_ATTRIBUTES
481#define PT_MAX_ATTRIBUTES 10
482#endif
483#define PT_VAR 1
484#define PT_MAP 2
485
486#if 0
487 These constants represent different methods for smoothing variables.
488#endif
489
490#define SMOOTH_NONE 0
491#define SMOOTH_3POINT 1
492#define SMOOTH_3CPOINT 2
493#define SMOOTH_SOR 3
494#define SMOOTH_HARMONIC_SOR 4
495
496#if 0
497 These constants represent different modes for the flux limiter
498#endif
499
500#define FL_NONE 0
501#define FL_HARMONIC 1
502#define FL_MINMAX 2
503#define FL_LARSEN 3
504#define FL_LEVPOM 81
505
506#if 0
507These constants identify the type of communicators in use
508They can either be the communicator that allows duplication of mesh
509 in a simulation, or they can be directional as needed by the UG
510The ones that allow duplication of the mesh have two dimensions
511 one for the all processors that together have the copy of the mesh,
512 and another that includes all processors that have identical rank in the
513 first set of communicators.
514#endif
515
516#define GLOBAL_COMM 546
517#define MESH_COMM 987
518#define MESH_ACROSS_COMM 768
519#define AXIS_COMM 854
520#define NO_COMM 0
521
522#if 0
523 These constants represent different solvers and preconditioners for MG FLD
524#endif
525
526#define HYPRE_AMG 0
527#define HYPRE_ILU 1
528#define HYPRE_PCG 2
529#define HYPRE_BICGSTAB 3
530#define HYPRE_GMRES 4
531#define HYPRE_SPLIT 5
532#define HYPRE_PARASAILS 6
533#define HYPRE_HYBRID 7
534#define HYPRE_NONE 8
535
536
537#if 0
538 These constants indicate the method for entering the radiation
539 energy group boundaries for MGD. There is currently only one
540 method of input supported - manual entry of the energy group
541 boundaries.
542#endif
543#define GRBD_MANUAL 0
544
545
546#if 0
547 Opacity method types
548#endif
549#define OP_UNDEFINED 0
550#define OP_TABULAR_PA 10
551#define OP_TABULAR_PE 20
552#define OP_TABULAR_RO 30
553#define OP_CONSTANT 40
554#define OP_CONSTCM2G 50
555
556
557
558#if 0
559 These constants indicate the type of 3T hydrodynamics being used
560#endif
561#define HY3T_NONE 0
562#define HY3T_RAGELIKE 1
563#define HY3T_CRASHLIKE 2
564#define HY3T_ENTROPY 3
565#define HY3T_CASTROLIKE 4
566
567
568#if 0
569 This is for the DRIFT mechanism
570#endif
571#define DRIFT_NO_PARENTS 1
572
573
574#define XBUS_POSITION 1
575#define YBUS_POSITION 2
576#define XB_POSITION 3
577#define YB_POSITION 4
578#define UBD_POSITION 5
579#define VBD_POSITION 6
580#define UBDD_POSITION 7
581#define VBDD_POSITION 8
582#define NXL_POSITION 9
583#define NYL_POSITION 10
584
585#if N_DIM == 2
586#define SB_POSITION 11
587#define NUM_VERT_VARS 11
588#elif N_DIM == 3
589#define ZBUS_POSITION 12
590#define ZB_POSITION 13
591#define WBD_POSITION 14
592#define WBDD_POSITION 15
593#define NZL_POSITION 16
594#define NUM_VERT_VARS 16
595#endif
596
597#define AEL_POSITION 1
598
599#if 0
600 Options for a function that lets the user select an operation
601#endif
602#define GRIDOP_ADD 1
603#define GRIDOP_SUB 2
604#define GRIDOP_MLT 3
605#define GRIDOP_DIV 4
606#define GRIDOP_AVG 5
607#define GRIDOP_MAX 6
608#define GRIDOP_MIN 7
609#define GRIDOP_SET 8
include mpif h integer
Definition: Flashx_mpi.h:2
subroutine Hydro(simTime, dt, dtOld, sweeporder)
Definition: Hydro.F90:32
subroutine IO_output(simTime, dt, nstep, nbegin, endRun, outputType)
Definition: IO_output.F90:114
subroutine Simulation_mapParticlesVar(part_key, var_key, var_type)
#define ALLDIR
Definition: constants.h:133
#define ACTIVE_BLKS
Definition: constants.h:184
#define NO_MAPPER
Definition: constants.h:169
#define GLOBALIDX1
Definition: constants.h:214
#define ALLVARS
Definition: constants.h:117
#define PARAMESH_PHYSICAL_BOUNDARY
Definition: constants.h:95
#define HIGH
Definition: constants.h:145
#define MODE_RE
Definition: constants.h:307
#define MODE_RT
Definition: constants.h:305
#define CENTER
Definition: constants.h:113
#define LEFT_EDGE
Definition: constants.h:112
#define PROCNO
Definition: constants.h:421
#define MASTER_PE
Definition: constants.h:6
#define MAX_GRID_DATA_STRUCT
Definition: constants.h:232
#define WORK
Definition: constants.h:243
#define VARDESC_SIZE
Definition: constants.h:258
#define LOW
Definition: constants.h:144
#define BLKNO
Definition: constants.h:420
#define MODE_RP
Definition: constants.h:306
#define RIGHT_EDGE
Definition: constants.h:114
#define MDIM
Definition: constants.h:134