Skip to content

Commit

Permalink
fix regridding with terrain (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Feb 7, 2025
1 parent c674543 commit 50424a3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Source/ERF_MakeNewArrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ ERF::init_zphys (int lev, Real time)
}
}
make_terrain_fitted_coords(lev,geom[lev],*z_phys_nd[lev],zlevels_stag[lev],phys_bc_type);
z_phys_nd[lev]->FillBoundary(geom[lev].periodicity());
}

if (solverChoice.terrain_type == TerrainType::ImmersedForcing) {
Expand All @@ -534,10 +535,6 @@ ERF::init_zphys (int lev, Real time)
}
} // lev == 0

if (z_phys_nd[lev]) {
z_phys_nd[lev]->FillBoundary(geom[lev].periodicity());
}

} // init_type
}

Expand All @@ -561,7 +558,7 @@ ERF::remake_zphys (int lev, Real /*time*/, std::unique_ptr<MultiFab>& temp_zphys

// This recomputes the fine values using the bottom terrain at the fine resolution,
// and also fills values of z_phys_nd outside the domain
make_terrain_fitted_coords(lev,geom[lev],*z_phys_nd[lev],zlevels_stag[lev],phys_bc_type);
make_terrain_fitted_coords(lev,geom[lev],*temp_zphys_nd,zlevels_stag[lev],phys_bc_type);

std::swap(temp_zphys_nd, z_phys_nd[lev]);

Expand All @@ -575,7 +572,6 @@ ERF::remake_zphys (int lev, Real /*time*/, std::unique_ptr<MultiFab>& temp_zphys
MultiFab::Subtract(*terrain_blanking[lev], EBFactory(lev).getVolFrac(), 0, 0, 1, 0);
}
}

void
ERF::update_terrain_arrays (int lev)
{
Expand Down

0 comments on commit 50424a3

Please sign in to comment.