Grids and tiles
Grids
The following inputs are defined using the prefix amr:
Description |
Type |
Default |
|
|---|---|---|---|
max_grid_size_x |
Maximum number of cells at level 0 in each grid in X |
Ints |
32 |
max_grid_size_y |
Maximum number of cells at level 0 in each grid in Y |
Ints |
32 |
max_grid_size_z |
Maximum number of cells at level 0 in each grid in Z |
Ints |
32 |
blocking_factor_x |
Each grid in X must be divisible by |
Ints |
8 |
blocking_factor_y |
Each grid in Y must be divisible by |
Ints |
8 |
blocking_factor_z |
Each grid in Z must be divisible by |
Ints |
8 |
refine_grid_layout |
If true, AMReX will attempt to chop new grids into smaller chunks ensuring at least one grid per MPI process, provided this does not violate the blocking factor constraint. |
Bool |
true |
Note, the default for max_grid_size is 64 for GPU runs.
The domain is decomposed into grids by dividing the number of cells by the max grid size
for each direction (e.g., n_cells[0]/max_grid_size_x). The blocking factor ensures that
the grids will be sufficiently coarsenable for good multigrid performance; therefore, the
max_grid_size must be divisible by the corresponding blocking_factor.
Note
The AMReX documentation contains a significant amount of information on grid creation and load balancing. Users are strongly encouraged to read the relevant sections.
Tiles
The following inputs are defined using the prefix fabarray:
Description |
Type |
Default |
|
|---|---|---|---|
mfiter_tile_size |
Maximum number of cells in each direction for (logical) tiles. |
Ints<3> |
1024000 8 8 |
The following inputs are defined using the prefix particles:
Description |
Type |
Default |
|
|---|---|---|---|
tile_size |
Maximum number of cells in each direction for (logical) tiles
in the ParticleBoxArray if |
Ints<3> |
1024000 8 8 |
When running on shared memory machines using an OpenMP enabled executable, grids are subdivided into tiles and iterated over to improve data locality by cache blocking.
Note
MFIX-Exa disables tiling when using GPU accelerators.
Mesh refinement
The following inputs are defined using the prefix amr. These inputs control the automatic
mesh refinement algorithm and are only applicable when amr.max_level > 0.
Description |
Type |
Default |
|
|---|---|---|---|
max_level |
Maximum level of refinement. The default value, 0, means that there is one cell size covering the entire domain (i.e., single-level). |
Int |
0 |
grid_eff |
Threshold value to ensure grids do not contain too large a fraction of untagged cells. |
Real |
0.7 |
n_error_buf |
Controls the number of tagged cells before grids are defined. Used to ensure coarse/fine boundaries are not too close to tagged cells. |
Ints |
0 |
Caution
Mesh refinement limitations:
MFIX-Exa simulations with particles currently do not support mesh refinement.
See the AMReX documentation for details on the adaptive mesh refinement algorithms.
The following inputs are defined using the prefix mfix. These inputs control the automatic
mesh refinement algorithm and are only applicable when amr.max_level > 0.
Description |
Type |
Default |
|
|---|---|---|---|
regrid_int |
How often to regrid (in number of steps at level 0). If regrid_int <= 0 then no regridding will occur. |
Int |
0 |
Tagging for refinement
The following inputs are defined using the prefix mfix.tag. They control how cells are tagged
for the mesh refinement algorithm and are only applicable when amr.max_level > 0.
Cells intersected by the embedded boundary are always tagged for refinement, regardless of these settings.
Description |
Type |
Default |
|
|---|---|---|---|
rho |
Tag cells for refinement when the fluid density is greater than the specified value.
|
Reals |
None |
rho.less_than |
Tag cells for refinement when the fluid density is less than the specified value. |
Bool |
false |
grad_rho |
Tag cells for refinement when the difference in fluid density between two adjacent cells is greater than the specified value.
|
Reals |
None |
grad_rho.less_than |
Tag cells for refinement when the difference in fluid density between two adjacent cells is less than the specified value. |
Bool |
false |
vel |
Tag cells for refinement when the magnitude of fluid velocity is greater than the specified value.
|
Reals |
None |
vel.less_than |
Tag cells for refinement when fluid velocity magnitude is less than the specified value. |
Bool |
false |
grad_vel |
Tag cells for refinement when the difference in any fluid velocity component between two adjacent cells is greater than the specified value.
|
Reals |
None |
grad_vel.less_than |
Tag cells for refinement when the difference in any fluid velocity component between two adjacent cells is less than the specified value. |
Bool |
false |
regions |
A list of predefined regions used to identify sections of the domain for mesh refinement. |
Strings |
None |