Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
Make use of Vector<Real> MultiFab::norm0(). This will use one
parallel reduction vs ncomp.
  • Loading branch information
cgilet committed Aug 11, 2022
1 parent 5a2e8bb commit a8241d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/NavierStokesBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4683,7 +4683,7 @@ NavierStokesBase::predict_velocity (Real dt)
//
// Compute "grid cfl number" based on cell-centered time-n velocities
//
auto umax = VectorMaxAbs({&Umf},FabArrayBase::mfiter_tile_size,0,AMREX_SPACEDIM,Umf.nGrow());
auto umax = Umf.norm0({AMREX_D_DECL(0,1,2)},Umf.nGrow(), /*local = */false, /*ignore_covered = */true);
Real cflmax = dt*umax[0]/dx[0];
for (int d=1; d<AMREX_SPACEDIM; ++d) {
cflmax = std::max(cflmax,dt*umax[d]/dx[d]);
Expand Down

0 comments on commit a8241d5

Please sign in to comment.