Assertion macros used across AMReX for runtime consistency checks.
In debug builds (or when AMREX_USE_ASSERTION is defined) the macros expand to runtime checks that call amrex::Assert if they fail. In release builds without assertion support, the non-*_ALWAYS variants become no-ops.
- AMREX_ASSERT(expr) evaluates
expr and aborts on failure, emitting the expression, file, and line number.
- AMREX_ASSERT_WITH_MESSAGE(expr,msg) behaves the same but also forwards the user-provided
msg to amrex::Assert, allowing custom diagnostics.
- The _ALWAYS_ variants (AMREX_ALWAYS_ASSERT, etc.) remain active even in non-debug builds.
- AMREX_GPU_ASSERT provides the same semantics inside GPU code paths when AMREX_USE_GPU is defined and either AMREX_DEBUG or AMREX_USE_ASSERTION is enabled; otherwise it is a no-op.