From a483d441f029a745132850780ec42f4eb577cb77 Mon Sep 17 00:00:00 2001 From: zhi Date: Thu, 14 Nov 2024 00:22:23 -0500 Subject: [PATCH] fix compiler warning --- Source/hydro/Castro_ctu.cpp | 6 ++++++ Source/hydro/Castro_hydro.H | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Source/hydro/Castro_ctu.cpp b/Source/hydro/Castro_ctu.cpp index 5274e422af..18756b0b71 100644 --- a/Source/hydro/Castro_ctu.cpp +++ b/Source/hydro/Castro_ctu.cpp @@ -102,6 +102,8 @@ Castro::ctu_ppm_states(const Box& bx, const Box& vbx, #endif #if AMREX_SPACEDIM < 3 Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 Array4 const& dlogaY, #endif const Real dt) { @@ -175,6 +177,8 @@ Castro::ctu_ppm_rad_states(const Box& bx, const Box& vbx, #endif #if AMREX_SPACEDIM < 3 Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 Array4 const& dlogaY, #endif const Real dt) { @@ -246,6 +250,8 @@ Castro::ctu_plm_states(const Box& bx, const Box& vbx, #endif #if AMREX_SPACEDIM < 3 Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 Array4 const& dlogaY, #endif const Real dt) { diff --git a/Source/hydro/Castro_hydro.H b/Source/hydro/Castro_hydro.H index 5642445a04..dbf3a5c9a4 100644 --- a/Source/hydro/Castro_hydro.H +++ b/Source/hydro/Castro_hydro.H @@ -240,6 +240,8 @@ #endif #if AMREX_SPACEDIM < 3 amrex::Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 amrex::Array4 const& dlogaY, #endif const amrex::Real dt); @@ -283,6 +285,8 @@ #endif #if AMREX_SPACEDIM < 3 amrex::Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 amrex::Array4 const& dlogaY, #endif const amrex::Real dt); @@ -326,8 +330,10 @@ amrex::Array4 const& qzp, #endif #if AMREX_SPACEDIM < 3 - amrex::Array4 const& dlogaX, - amrex::Array4 const& dlogaY, + amrex::Array4 const& dlogaX, +#endif +#if AMREX_SPACEDIM == 2 + amrex::Array4 const& dlogaY, #endif const amrex::Real dt); #endif