Add more runtime NGHOST checks (especially for SMR/AMR) #163
Labels
bug
Broken functionality or unexpected result
documentation
Relating to the Wiki, Website, or Markdown files
good first issue
Ideal for developers looking to dive into the Athena++ codebase
SMR/AMR
Relating to static and adaptive mesh refinement
Projects
Milestone
As I was adding a myriad of runtime checks to
reconstruction.cpp
for ensuring compatibility with the 4th order solver in #157, it occurred to me that there are few traps on the selectedNGHOST
value because it was assumed thatNGHOST=2
for most of the history of Athena++.NGHOST
was generalized to a compile-time parameter andconfigure.py
flag--nghost
in 5721084 on 2018-03-03 in order to support PPM and other high-order solver components.Here are the following cases I have encountered or envisioned that could benefit from a safety check:
block_size.nx1 >= NGHOST/2
in all MeshBlocks regardless of the algorithm.NGHOST=4
for PPM with MHD with small MeshBlocks withmeshblock/nx2=6
, for example.NGHOST % 2 == 0
when using SMR/AMR.NGHOST=3
minimum requirement for PPM for R-T instability simulations with AMR in Fix asymmetry of Coordinates x1f for multiple MeshBlock grids #112, but I believe that should have been forbidden / rounded up toNGHOST=4
.NGHOST>2
change, so they should probably be updated.In the interest of protecting the users from themselves, I think we should add these conditions to the
Reconstruction
class constructor (or somewhere else) and document the requirements in the Wiki.The text was updated successfully, but these errors were encountered: