From c3594ef033658c5f402d806a8bb5e21ec35702bd Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 31 Aug 2023 10:14:29 -0400 Subject: [PATCH] fix some warnings from clang-tidy in the MOL code --- .../bubble_convergence/problem_initialize_state_data.H | 2 -- Source/hydro/Castro_mol_hydro.cpp | 6 ++---- Source/hydro/fourth_center_average.H | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H b/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H index 8eefe82ed6..2296b64eb3 100644 --- a/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H +++ b/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H @@ -12,8 +12,6 @@ void problem_initialize_state_data (int i, int j, int k, Array4 const& state, const GeometryData& geomdata) { - int coord_type = geomdata.Coord(); - const Real* dx = geomdata.CellSize(); const Real* problo = geomdata.ProbLo(); diff --git a/Source/hydro/Castro_mol_hydro.cpp b/Source/hydro/Castro_mol_hydro.cpp index f12a5a2493..5cfa4741fe 100644 --- a/Source/hydro/Castro_mol_hydro.cpp +++ b/Source/hydro/Castro_mol_hydro.cpp @@ -36,8 +36,6 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update) } - const Real *dx = geom.CellSize(); - MultiFab& S_new = get_new_data(State_Type); int coord = geom.Coord(); @@ -560,12 +558,12 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update) }); } // end do_hydro +#ifdef DIFFUSION // add a diffusive flux cond.resize(obx, 1); Elixir elix_cond = cond.elixir(); auto cond_arr = cond.array(); -#ifdef DIFFUSION fill_temp_cond(obx, Sborder.array(mfi), cond_arr); const Box& nbx = amrex::surroundingNodes(bx, idir); @@ -573,8 +571,8 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update) mol_diffusive_flux(nbx, idir, uin_arr, cond_arr, flux[idir].array()); - #endif + } // end idir loop #ifndef AMREX_USE_GPU diff --git a/Source/hydro/fourth_center_average.H b/Source/hydro/fourth_center_average.H index 78b4bd7d10..4020851521 100644 --- a/Source/hydro/fourth_center_average.H +++ b/Source/hydro/fourth_center_average.H @@ -1,5 +1,5 @@ -#ifndef _FOURTH_CENTER_AVERAGE_H_ -#define _FOURTH_CENTER_AVERAGE_H_ +#ifndef FOURTH_CENTER_AVERAGE_H +#define FOURTH_CENTER_AVERAGE_H AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real