From f9df3a7ed3f1cf44cb7a110f3dff3dacf95e837a Mon Sep 17 00:00:00 2001 From: Zhi Date: Wed, 11 Sep 2024 18:41:09 -0400 Subject: [PATCH] add preprocessor to ensure we're in 2d or more --- Source/hydro/Castro_ctu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/hydro/Castro_ctu.cpp b/Source/hydro/Castro_ctu.cpp index 7e69b4696b..9948748880 100644 --- a/Source/hydro/Castro_ctu.cpp +++ b/Source/hydro/Castro_ctu.cpp @@ -71,12 +71,13 @@ Castro::consup_hydro(const Box& bx, U_new(i,j,k,UMX) += - dt * (qx(i+1,j,k,GDPRES) - qx(i,j,k,GDPRES)) / geomdata.CellSize()[0]; +#if AMREX_SPACEDIM >= 2 } else if (n == UMY && !mom_flux_has_p(1, 1, geomdata.Coord())) { // Add gradp term to polar(theta) momentum equation for Spherical 2D geometry Real r = geom.ProbLoArray()[0] + (static_cast(i) + 0.5_rt) * geomdata.CellSize()[0]; U_new(i,j,k,UMY) += - dt * (qy(i,j+1,k,GDPRES) - qy(i,j,k,GDPRES)) / (r * geomdata.CellSize()[1]); - +#endif } }); }