Skip to content

Commit

Permalink
fix handling of particle creation outside of domain boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Feb 16, 2024
1 parent 97cec10 commit 0e147ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions src_deankow/multilevel/AmrCoreAdv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,22 +226,7 @@ void AmrCoreAdv::MakeFBA(const BoxArray& ba)
BoxList com_bl_fixed;
for (auto& b : com_bl) {
Box bx(b);
if (!domain.contains(bx)) {
Geom(1).periodicShift(domain, bx, pshifts);
for (const auto& iv : pshifts)
{
Box new_bx(b); new_bx.shift(iv); new_bx &= domain;
if (new_bx.ok()) {
com_bl_fixed.push_back(new_bx);
}
}
Box b_itself(b); b_itself &= domain;
if (b_itself.ok()) {
com_bl_fixed.push_back((b&domain));
}
} else {
com_bl_fixed.push_back(b);
}
com_bl_fixed.push_back(b);
}
com_bl_fixed.catenate(valid_bl);
grown_fba.define(com_bl_fixed);
Expand Down
2 changes: 1 addition & 1 deletion src_deankow/multilevel/StochasticPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ StochasticPC:: AddParticles (MultiFab& phi_fine, const BoxArray& ba_to_exclude)
#endif
for (MFIter mfi(phi_fine); mfi.isValid(); ++mfi)
{
const Box& tile_box = mfi.tilebox();
Box tile_box = mfi.tilebox() & Geom(lev).Domain();

if (ba_to_exclude.contains(tile_box)) {continue;}

Expand Down

0 comments on commit 0e147ef

Please sign in to comment.