From 7b035557fe354d315815886216e1e5f0e5080623 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Mon, 10 Aug 2026 09:21:30 -0700 Subject: [PATCH] Make the ccproj guard in ApplyProjection a real condition. AMREX_ALWAYS_ASSERT was given a string literal, which is always true, so the guard never fired and a use_cc_proj run reached ApplyNodalProjection and wrote through the undefined p_nd. Fixes #180. --- src/incflo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/incflo.cpp b/src/incflo.cpp index 782ab83b..78e4749e 100644 --- a/src/incflo.cpp +++ b/src/incflo.cpp @@ -224,7 +224,7 @@ incflo::ApplyProjection (Vector const& density, Real time, Real scaling_factor, bool incremental, bool set_inflow_bc) { - AMREX_ALWAYS_ASSERT("This is not yet coded for ccproj!"); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE(!m_use_cc_proj, "This is not yet coded for ccproj!"); ApplyNodalProjection(density, vel, divu_Source, time, scaling_factor, incremental, set_inflow_bc);