Skip to content

Commit

Permalink
make coverity happy (#2998)
Browse files Browse the repository at this point in the history
the original intention is to not execute the loop when spacedim=2, but coverity complains that its dead code.
  • Loading branch information
zhichen3 authored Nov 21, 2024
1 parent 1a22b17 commit 8b3196a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,13 @@ Castro::buildMetrics ()
dLogArea[dir].clear();
geom.GetDLogA(dLogArea[dir],grids,dmap,dir,NUM_GROW);
}
for (int dir = AMREX_SPACEDIM; dir < 2; dir++)
{
dLogArea[dir].clear();
dLogArea[dir].define(grids, dmap, 1, 0);
dLogArea[dir].setVal(0.0);
}

#if (AMREX_SPACEDIM == 1)
dLogArea[1].clear();
dLogArea[1].define(grids, dmap, 1, 0);
dLogArea[1].setVal(0.0);
#endif

#endif

wall_time_start = 0.0;
Expand Down

0 comments on commit 8b3196a

Please sign in to comment.