You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Cello/Enzo-E does not enforce any constraints on the block size based on the ghost depth. This can cause the simulation to silently break. An explicit check should be added to cause the simulation to fail at startup with an informative error message.
This should be easy to address and would be a great first issue!
In case this is somebody's first issue, I wanted to briefly outline how I I would approach this (but feel free to do something different). The easiest way to accomplish this is to add ~2 ASSERT or ERROR statements to Config::read_mesh_ in src/Cello/parameters_Config.cpp. Here are a couple of notes:
The dimensions of the active zone on each block need to be computed. They are given by mesh_root_blocks[i]/mesh_root_size[i]. Note that i=0, i=1, and i=2 correspond to the x, y, and z axes, respectively.
When AMR is being used (mesh_max_level > 0), you need to confirm that the dimensions of the active zone on each block are at least double the size of the ghost depth.
For unigrid simulations (mesh_max_level = 0), the dimensions of the active zone on each block must be at least as large as the ghost depth.
Some care needs to be taken to properly handle 1D and 2D simulations (the dimensionality is stored in mesh_root_rank). In these cases, the number of cells along the extra dimensions are set to 1
There are a couple of optional, additional checks that might also be nice to have. These are not necessary (other error handling will catch these problems eventually), but it might be nice to provide more explicit error messages for new users.
the dimensions of the active zone on each block is should each be even when AMR is being used (they can be odd for unigrid simulations). Again, care needs to be taken for handling 1D/2D simulations
The parameter "Adapt:min_level" (stored in the mesh_min_level variable) should be less than or equal to zero.
The text was updated successfully, but these errors were encountered:
Currently, Cello/Enzo-E does not enforce any constraints on the block size based on the ghost depth. This can cause the simulation to silently break. An explicit check should be added to cause the simulation to fail at startup with an informative error message.
This should be easy to address and would be a great first issue!
In case this is somebody's first issue, I wanted to briefly outline how I I would approach this (but feel free to do something different). The easiest way to accomplish this is to add ~2
ASSERT
orERROR
statements toConfig::read_mesh_
insrc/Cello/parameters_Config.cpp
. Here are a couple of notes:mesh_root_blocks[i]/mesh_root_size[i]
. Note thati=0
,i=1
, andi=2
correspond to the x, y, and z axes, respectively.mesh_max_level > 0
), you need to confirm that the dimensions of the active zone on each block are at least double the size of the ghost depth.mesh_max_level = 0
), the dimensions of the active zone on each block must be at least as large as the ghost depth.mesh_root_rank
). In these cases, the number of cells along the extra dimensions are set to1
There are a couple of optional, additional checks that might also be nice to have. These are not necessary (other error handling will catch these problems eventually), but it might be nice to provide more explicit error messages for new users.
"Adapt:min_level"
(stored in themesh_min_level
variable) should be less than or equal to zero.The text was updated successfully, but these errors were encountered: