Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,9 @@ ERF::restart ()

ReadCheckpointFile();

// Force regrid on level 0 if more procs than boxes are requested
regrid_level_0_on_restart = ( regrid_level_0_on_restart ||
grids[0].size() < ParallelDescriptor::NProcs() );
if (regrid_level_0_on_restart) {
//
// Coarsening before we split the grids ensures that each resulting
Expand Down
8 changes: 8 additions & 0 deletions Source/ERF_MakeNewArrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ ERF::remake_zphys (int lev, std::unique_ptr<MultiFab>& temp_zphys_nd)

std::swap(temp_zphys_nd, z_phys_nd[lev]);
} // lev > 0
else {
temp_zphys_nd->ParallelCopy(*z_phys_nd[lev], 0, 0, 1, z_phys_nd[lev]->nGrowVect(), z_phys_nd[lev]->nGrowVect());
std::swap(temp_zphys_nd, z_phys_nd[lev]);
}
} else {
if (lev > 0)
{
Expand All @@ -819,6 +823,10 @@ ERF::remake_zphys (int lev, std::unique_ptr<MultiFab>& temp_zphys_nd)

std::swap(temp_zphys_nd, z_phys_nd[lev]);
} // lev > 0
else {
temp_zphys_nd->ParallelCopy(*z_phys_nd[lev], 0, 0, 1, z_phys_nd[lev]->nGrowVect(), z_phys_nd[lev]->nGrowVect());
std::swap(temp_zphys_nd, z_phys_nd[lev]);
}
}

if (solverChoice.terrain_type == TerrainType::ImmersedForcing ||
Expand Down
2 changes: 1 addition & 1 deletion Source/Utils/ERF_TerrainMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ make_zcc (const Geometry& geom,
Array4<Real > z_cc = z_phys_cc.array(mfi);
ParallelFor(gbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
z_cc(i, j, k) = Real(.125) * ( z_nd(i,j,k ) + z_nd(i+1,j,k ) + z_nd(i,j+1,k ) + z_nd(i+1,j+1,k )
+z_nd(i,j,k+1) + z_nd(i+1,j,k+1) + z_nd(i,j+1,k+1) + z_nd(i+1,j+1,k+1) );
+ z_nd(i,j,k+1) + z_nd(i+1,j,k+1) + z_nd(i,j+1,k+1) + z_nd(i+1,j+1,k+1) );
});
}
z_phys_cc.FillBoundary(geom.periodicity());
Expand Down
Loading