Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing a warning if particle_shape>1 with EB #2592

Merged
merged 8 commits into from
Nov 30, 2021
Merged
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
19 changes: 17 additions & 2 deletions Source/Initialization/WarpXInitData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,21 @@ void WarpX::CheckGuardCells(amrex::MultiFab const& mf)
}
}

void WarpX::InitializeEBGridData(int lev)
void WarpX::InitializeEBGridData (int lev)
{
if(lev==maxLevel()) {
#ifdef AMREX_USE_EB
if (lev == maxLevel()) {

// Throw a warning if EB is on and particle_shape > 1
bool flag_eb_on = not fieldEBFactory(lev).isAllRegular();

if ((nox > 1 or noy > 1 or noz > 1) and flag_eb_on)
{
this->RecordWarning("Particles",
"when algo.particle_shape > 1, numerical artifacts will be present when\n"
"particles are close to embedded boundaries");
}

if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::Yee ||
WarpX::maxwell_solver_id == MaxwellSolverAlgo::CKC ||
WarpX::maxwell_solver_id == MaxwellSolverAlgo::ECT) {
Expand Down Expand Up @@ -900,4 +912,7 @@ void WarpX::InitializeEBGridData(int lev)
ComputeDistanceToEB();

}
#else
amrex::ignore_unused(lev);
#endif
}