From e431761859b8d9baaa136ac5446493cfde2a9478 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 21 Sep 2023 06:48:09 -0400 Subject: [PATCH] fix some unused vars in true SDC (#2562) --- Exec/reacting_tests/bubble_convergence/initial_model.H | 5 ----- .../bubble_convergence/problem_initialize_state_data.H | 2 +- Source/driver/Castro.cpp | 2 -- Source/driver/Castro_advance.cpp | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Exec/reacting_tests/bubble_convergence/initial_model.H b/Exec/reacting_tests/bubble_convergence/initial_model.H index c9b5ac0797..86b7e3890e 100644 --- a/Exec/reacting_tests/bubble_convergence/initial_model.H +++ b/Exec/reacting_tests/bubble_convergence/initial_model.H @@ -134,7 +134,6 @@ generate_initial_model(const int nx, const Real xmin, const Real xmax, // call the EOS to get the remainder of the thermodynamics - eos_t eos_state; eos_state.T = T; // initial guess eos_state.rho = rho; // initial guess for (int n = 0; n < NumSpec; n++) { @@ -183,7 +182,6 @@ generate_initial_model(const int nx, const Real xmin, const Real xmax, Real pnew = p + (1.0_rt/6.0_rt) * h * (k1 + 2.0_rt*k2 + 2.0_rt*k3 + k4); //! call the EOS to get the remainder of the thermodynamics - eos_t eos_state; eos_state.T = T; // initial guess eos_state.rho = rho; // initial guess for (int n = 0; n < NumSpec; n++) { @@ -220,7 +218,6 @@ generate_initial_model(const int nx, const Real xmin, const Real xmax, model::profile(0).state(i, model::ipres) = p + 0.5_rt * dx * model_params.dens_base * gravity::const_grav; - eos_t eos_state; eos_state.rho = model::profile(0).state(i, model::idens); eos_state.T = model_params.dens_base; eos_state.p = model::profile(0).state(i, model::ipres); @@ -244,7 +241,6 @@ generate_initial_model(const int nx, const Real xmin, const Real xmax, bool converged_hse = false; Real p_want; - eos_t eos_state; for (int iter = 0; iter < MAX_ITER; iter++) { @@ -300,7 +296,6 @@ generate_initial_model(const int nx, const Real xmin, const Real xmax, bool converged_hse = false; Real p_want; - eos_t eos_state; for (int iter = 0; iter < MAX_ITER; iter++) { 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 2296b64eb3..0400e1b1fb 100644 --- a/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H +++ b/Exec/reacting_tests/bubble_convergence/problem_initialize_state_data.H @@ -22,8 +22,8 @@ void problem_initialize_state_data (int i, int j, int k, y = problo[1] + dx[1] * (static_cast(j) + 0.5_rt); #endif - Real z = 0.0; #if AMREX_SPACEDIM == 3 + Real z = 0.0; z = problo[2] + dx[2] * (static_cast(k) + 0.5_rt); #endif diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 44c75144ad..12ed01ab64 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -3961,7 +3961,6 @@ Castro::computeTemp( for (MFIter mfi(Stemp); mfi.isValid(); ++mfi) { const Box& bx = mfi.growntilebox(1); const Box& bx0 = mfi.tilebox(); - const int idx = mfi.tileIndex(); compute_lap_term(bx0, Stemp.array(mfi), Eint_lap.array(mfi), UEINT, domain_lo, domain_hi); @@ -4082,7 +4081,6 @@ Castro::computeTemp( for (MFIter mfi(Stemp); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - const int idx = mfi.tileIndex(); tmp.resize(bx, 1); Elixir elix_tmp = tmp.elixir(); diff --git a/Source/driver/Castro_advance.cpp b/Source/driver/Castro_advance.cpp index b87b8fbcf1..4a6c8c898b 100644 --- a/Source/driver/Castro_advance.cpp +++ b/Source/driver/Castro_advance.cpp @@ -497,7 +497,6 @@ Castro::initialize_advance(Real time, Real dt, int amr_iteration) if (time_integration_method == SpectralDeferredCorrections) { - MultiFab& S_old = get_old_data(State_Type); k_new.resize(SDC_NODES); k_new[0].reset(new MultiFab(S_old, amrex::make_alias, 0, NUM_STATE));