Compile-time options¶
Compile-time options are set in the case’s GNUmakefile (Setting up a case) or on
the make command line, for example make -j4 DIM=3 USE_OMP=TRUE. Changing one requires a
rebuild. Everything else is chosen at run time (Run-time options).
Model¶
The model is fixed at compile time because the number of state variables differs between
models. Each option is a line DEFINES += -D<NAME>=<value> in the GNUmakefile. When a line is
absent, the default in include/Macros.H applies.
Option |
Values |
Default |
Meaning |
|---|---|---|---|
|
|
|
multiphase model (Models and equations) |
|
integer |
|
number of phases for the N-phase models |
|
|
|
hyperbolic fluxes |
|
|
|
viscous and conductive fluxes |
|
|
|
non-conservative terms of the model |
ADVECTION and NONCONSERVATIVE are normally left true. DIFFUSION=true applies to every
model; the six-equation models give each phase its own stress and heat flux
(Viscous and conductive fluxes in the six-equation models).
NPHASE is used by FIVEEQS_NPHASE and SIXEQS_IE_NPHASE. The two-phase models ignore
it.
The number of state variables in \(d\) dimensions is
|
State variables |
Count |
|---|---|---|
|
\(\alpha_1\rho_1,\ \alpha_2\rho_2,\ \rho\vec u,\ \rho E,\ \alpha_1\) |
\(4+d\) |
|
\(\alpha_k\rho_k\ (k=1..N),\ \rho\vec u,\ \rho E,\ \alpha_k\ (k=1..N)\) |
\(2N+d+1\) |
|
\(\alpha_1\rho_1,\ \alpha_2\rho_2,\ \rho\vec u,\ \alpha_1\rho_1E_1,\ \alpha_2\rho_2E_2,\ \alpha_1\) |
\(5+d\) |
|
\(\alpha_k,\ \alpha_k\rho_k,\ \alpha_k\rho_ke_k\ (k=1..N),\ \rho\vec u,\ \rho E\) |
\(3N+d+1\) |
The names of these variables in plotfiles and refinement criteria are listed under Output variables.
Build¶
These are AMReX build options, set as NAME = value lines in the GNUmakefile.
Option |
Values |
Meaning |
|---|---|---|
|
|
spatial dimension |
|
|
parallel backends |
|
|
GPU backend |
|
|
debug build with assertions and array bounds checks, run with checkpoints off ( |
The case GNUmakefiles also set COMP = gnu, PRECISION = DOUBLE and PROFILE = FALSE, which
are passed to the AMReX build system unchanged. How the executable name records these options is
described under The executable name.
Paths¶
exec/Make.exec, which every case includes, sets two paths.
Variable |
Default |
Meaning |
|---|---|---|
|
the repository that contains |
COMPAS source tree |
|
|
AMReX source tree |
Both can be set in the environment or on the make line. A case kept outside the repository
includes $(COMPAS_HOME)/exec/Make.exec and is built with make COMPAS_HOME=/path/to/COMPAS
(Starting a new case).
Macros in the case files¶
Some options are macros defined in the case’s prob/ProblemICBC.H instead of the
GNUmakefile. They enable the optional hooks for source terms, boundary conditions,
refinement and output, described under Optional hooks, and the
error norms of a convergence study (CONVERGENCE), described under
Convergence studies.