From 6b57a14dfd84853e8c066b82b2925e4683d7d0e2 Mon Sep 17 00:00:00 2001 From: Zhi Date: Tue, 10 Sep 2024 16:00:18 -0400 Subject: [PATCH] use amrex::ignore_unused rather than [[maybe_unused]] --- Source/sources/Castro_geom.cpp | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Source/sources/Castro_geom.cpp b/Source/sources/Castro_geom.cpp index 5d01776f53..334672edbc 100644 --- a/Source/sources/Castro_geom.cpp +++ b/Source/sources/Castro_geom.cpp @@ -10,12 +10,14 @@ using namespace amrex; /// void -Castro::construct_old_geom_source([[maybe_unused]]MultiFab& source, - [[maybe_unused]]MultiFab& state_in, - [[maybe_unused]]Real time, - [[maybe_unused]]Real dt) +Castro::construct_old_geom_source(MultiFab& source, MultiFab& state_in, Real time, Real dt) { + amrex::ignore_unused(source); + amrex::ignore_unused(state_in); + amrex::ignore_unused(time); + amrex::ignore_unused(dt); + if (geom.Coord() == 0) { return; } @@ -63,13 +65,16 @@ Castro::construct_old_geom_source([[maybe_unused]]MultiFab& source, void -Castro::construct_new_geom_source([[maybe_unused]]MultiFab& source, - [[maybe_unused]]MultiFab& state_old, - [[maybe_unused]]MultiFab& state_new, - [[maybe_unused]]Real time, - [[maybe_unused]]Real dt) +Castro::construct_new_geom_source(MultiFab& source, MultiFab& state_old, + MultiFab& state_new, Real time, Real dt) { + amrex::ignore_unused(source); + amrex::ignore_unused(state_old); + amrex::ignore_unused(state_new); + amrex::ignore_unused(time); + amrex::ignore_unused(dt); + if (geom.Coord() == 0) { return; } @@ -134,14 +139,16 @@ Castro::construct_new_geom_source([[maybe_unused]]MultiFab& source, void -Castro::fill_RZ_geom_source ([[maybe_unused]] Real time, [[maybe_unused]] Real dt, - MultiFab& cons_state, MultiFab& geom_src) +Castro::fill_RZ_geom_source (Real time, Real dt, MultiFab& cons_state, MultiFab& geom_src) { // Compute the geometric source for axisymmetric coordinates (R-Z) // resulting from taking the divergence of (rho U U) in cylindrical // coordinates. See the paper by Bernard-Champmartin + amrex::ignore_unused(time); + amrex::ignore_unused(dt); + auto dx = geom.CellSizeArray(); auto prob_lo = geom.ProbLoArray(); @@ -176,13 +183,15 @@ Castro::fill_RZ_geom_source ([[maybe_unused]] Real time, [[maybe_unused]] Real d void -Castro::fill_RTheta_geom_source ([[maybe_unused]] Real time, [[maybe_unused]] Real dt, - MultiFab& cons_state, MultiFab& geom_src) +Castro::fill_RTheta_geom_source (Real time, Real dt, MultiFab& cons_state, MultiFab& geom_src) { // Compute the geometric source resulting from taking the divergence of (rho U U) // in Spherical 2D (R-Theta) coordinate. + amrex::ignore_unused(time); + amrex::ignore_unused(dt); + auto dx = geom.CellSizeArray(); auto prob_lo = geom.ProbLoArray();