AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
503 stars 336 forks source link

Fix assertions involving IntVect #3919

Closed WeiqunZhang closed 2 months ago

WeiqunZhang commented 2 months ago

A MultiFab used to have the same number of ghost cells in all directions. This has no longer been the case for many years. But many assertions have not been updated for this change. This commit fixes various assertions to make it more appropriate.

Also added are overloaded functions for element-wise comparison between an IntVect and an integer. This makes the code cleaner.

asalmgren commented 2 months ago

BTW -- in cleaning up code, it would be good at some point to do an all-search-and-replace in amrex for BL_ASSERT --> AMREX_ASSERT.