Skip to content

Commit

Permalink
put fillphysbc in level loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn committed Sep 3, 2024
1 parent 893f467 commit bf7b836
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions amr-wind/equation_systems/AdvOp_Godunov.H
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ struct AdvectionOp<
auto& den_nph = density.state(amr_wind::FieldState::NPH);

for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
// Fill physical boundaries of nph field
dof_nph.fillphysbc(lev, time + 0.5 * dt, dof_nph(lev), 1);
if (PDE::multiply_rho) {
// Fill physical boundaries of nph density
den_nph.fillphysbc(lev, time + 0.5 * dt, den_nph(lev), 1);
}

amrex::MFItInfo mfi_info;
if (amrex::Gpu::notInLaunchRegion()) {
mfi_info.EnableTiling(amrex::IntVect(1024, 1024, 1024))
Expand All @@ -132,13 +139,7 @@ struct AdvectionOp<
amrex::FArrayBox rhotrac_nph_fab;
amrex::Array4<amrex::Real> rhotrac_nph;

// Fill physical boundaries of nph field
dof_nph.fillphysbc(lev, time + 0.5 * dt, dof_nph(lev), 1);

if (PDE::multiply_rho) {
// Fill physical boundaries of nph density
den_nph.fillphysbc(lev, time + 0.5 * dt, den_nph(lev), 1);

auto rhotrac_box =
amrex::grow(bx, fvm::Godunov::nghost_state);
rhotracfab.resize(rhotrac_box, PDE::ndim);
Expand Down

0 comments on commit bf7b836

Please sign in to comment.