Skip to content

Commit

Permalink
Fix some warnings (#3398)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Jul 3, 2023
1 parent e80199a commit 2589f26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Src/Base/AMReX_NFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ void NFilesIter::SetDynamic(int deciderproc)
if(currentDeciderIndex >= availableDeciders.size() || currentDeciderIndex < 0) {
currentDeciderIndex = 0;
}
#if 0
// The following has no effect because WhichSetPostion is a pure function and
// its return type is not used. So not sure why this is here in the first place.
if(myProc == deciderProc) {
NFilesIter::WhichSetPosition(myProc, nProcs, nOutFiles, groupSets);
}
#endif

deciderTag = ParallelDescriptor::SeqNum();
coordinatorTag = ParallelDescriptor::SeqNum();
Expand Down
2 changes: 1 addition & 1 deletion Src/Base/AMReX_VisMF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ VisMF::Header::CalculateMinMax (const FabArray<FArrayBox>& mf,

BL_ASSERT(ioffset == nmtags[ParallelDescriptor::MyProc(comm)]);

Vector<Real> recvdata(mf.size()*2*m_ncomp);
Vector<Real> recvdata(std::size_t(mf.size())*2*m_ncomp);

BL_COMM_PROFILE(BLProfiler::Gatherv, recvdata.size() * sizeof(Real),
ParallelDescriptor::MyProc(comm), BLProfiler::BeforeCall());
Expand Down
15 changes: 3 additions & 12 deletions Src/EB/AMReX_EB_FluxRedistribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,20 @@ amrex_flux_redistribute (
int level_mask_not_covered,
int icomp, int ncomp, Real dt)
{
// if (as_crse == 0 && as_fine == 0) {
// amrex::Print() << "In amrex_flux_redistribution on neither side" << std::endl;
// } else if (as_crse == 0 && as_fine == 1) {
// amrex::Print() << "In amrex_flux_redistribution on fine side" << std::endl;
// } else if (as_crse == 1 && as_fine == 0) {
// amrex::Print() << "In amrex_flux_redistribution on coarse side" << std::endl;
// } else if (as_crse == 1 && as_fine == 1) {
// amrex::Print() << "In amrex_flux_redistribution on both sides" << std::endl;
// }
//
// Check that grid is uniform
//
const Real* dx = geom.CellSize();

#if (AMREX_SPACEDIM == 2)
if (! amrex::almostEqual(dx[0], dx[1]))
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
#elif (AMREX_SPACEDIM == 3)
if( ! amrex::almostEqual(dx[0],dx[1]) ||
! amrex::almostEqual(dx[0],dx[2]) ||
! amrex::almostEqual(dx[1],dx[2]) )
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
#endif
{
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
}

const Box dbox = geom.growPeriodicDomain(2);
const Box& grown1_bx = amrex::grow(bx,1);
Expand Down

0 comments on commit 2589f26

Please sign in to comment.