From 2a04d65aa4ed9378deee7e5b70f3ccc97291bcf7 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 18 Mar 2024 11:53:29 -0400 Subject: [PATCH] fix mismatch between fill_hybrid_hydro_source prototype and implementation we have arguments swapped also mark the incoming state const --- Source/hydro/Castro_hybrid.cpp | 4 ++-- Source/hydro/Castro_hydro.H | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/hydro/Castro_hybrid.cpp b/Source/hydro/Castro_hybrid.cpp index afff6949b3..b1bdabc4f9 100644 --- a/Source/hydro/Castro_hybrid.cpp +++ b/Source/hydro/Castro_hybrid.cpp @@ -84,7 +84,7 @@ Castro::construct_new_hybrid_source(MultiFab& source, MultiFab& state_old, Multi void -Castro::fill_hybrid_hydro_source(MultiFab& sources, MultiFab& state_in, Real mult_factor) +Castro::fill_hybrid_hydro_source(MultiFab& sources, const MultiFab& state_in, Real mult_factor) { BL_PROFILE("Castro::fill_hybrid_hydro_source()"); @@ -97,7 +97,7 @@ Castro::fill_hybrid_hydro_source(MultiFab& sources, MultiFab& state_in, Real mul { const Box& bx = mfi.tilebox(); - auto u = state_in.array(mfi); + const auto u = state_in.array(mfi); auto src = sources.array(mfi); amrex::ParallelFor(bx, diff --git a/Source/hydro/Castro_hydro.H b/Source/hydro/Castro_hydro.H index 94093c6392..95cb91dda1 100644 --- a/Source/hydro/Castro_hydro.H +++ b/Source/hydro/Castro_hydro.H @@ -856,7 +856,7 @@ /// @param source MultiFab to save source to /// @param mult_factor /// - void fill_hybrid_hydro_source(amrex::MultiFab& state, amrex::MultiFab& source, const amrex::Real mult_factor); + void fill_hybrid_hydro_source(amrex::MultiFab& source, const amrex::MultiFab& state, const amrex::Real mult_factor); ///