Skip to content

Commit

Permalink
fix a copy of the mask in the reaction code
Browse files Browse the repository at this point in the history
highlighted by coverity
  • Loading branch information
zingale committed Apr 26, 2024
1 parent 9338c82 commit 10d322c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/reactions/Castro_react.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra
auto U = s.array(mfi);
auto reactions = r.array(mfi);
auto weights = store_burn_weights ? burn_weights.array(mfi) : Array4<Real>{};
const auto mask = mask_covered_zones ? mask_mf.array(mfi) : Array4<Real>{};
Array4<Real> empty_arr{};
const auto& mask = mask_covered_zones ? mask_mf.array(mfi) : empty_arr;

const auto dx = geom.CellSizeArray();
#ifdef MODEL_PARSER
Expand Down Expand Up @@ -550,7 +551,8 @@ Castro::react_state(Real time, Real dt)
auto I = SDC_react.array(mfi);
auto react_src = reactions.array(mfi);
auto weights = store_burn_weights ? burn_weights.array(mfi) : Array4<Real>{};
const auto mask = mask_covered_zones ? mask_mf.array(mfi) : Array4<Real>{};
Array4<Real> empty_arr{};
const auto& mask = mask_covered_zones ? mask_mf.array(mfi) : empty_arr;

int lsdc_iteration = sdc_iteration;

Expand Down

0 comments on commit 10d322c

Please sign in to comment.