aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers@lbl.gov> 2021-07-16 01:24:54 -0700
committerGravatar GitHub <noreply@github.com> 2021-07-16 01:24:54 -0700
commitbaa122d44a3e005492f805ad1ea925dc4981e139 (patch)
tree0623276d5de6e7687c1dc0df0f2ba54e4effb4dc /Source/Particles/MultiParticleContainer.cpp
parent0e1c407e98531e50ac22a5790399247e491b2614 (diff)
downloadWarpX-baa122d44a3e005492f805ad1ea925dc4981e139.tar.gz
WarpX-baa122d44a3e005492f805ad1ea925dc4981e139.tar.zst
WarpX-baa122d44a3e005492f805ad1ea925dc4981e139.zip
Infrastructure for interacting particles with embedded boundary walls (#2069)
* Infrastructure for interacting particles with embedded boundary walls * remove debug prints * protect with AMREX_USE_EB * fix for 2D XZ * also update level set when regridding * rename level set to 'DistanceToEB' * add docstring for scrape particles. * add assertion on maxLevel() since EB does not work with mesh refinement right now. * m_eb_if_parser no longer exists * add test for particle aborption at embedded boundaries * fix bug I introduced refactoring * add new test to suite * fix test names * fix 2D * rookie python error * fix filename in test * fix script * fix unused * make sure we turn EB on in test
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index c1b462168..6297b1ccb 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -33,6 +33,11 @@
#include "SpeciesPhysicalProperties.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXProfilerWrapper.H"
+#ifdef AMREX_USE_EB
+# include "EmbeddedBoundary/ParticleScraper.H"
+# include "EmbeddedBoundary/ParticleBoundaryProcess.H"
+#endif
+
#include "WarpX.H"
#include <AMReX.H>
@@ -1594,4 +1599,15 @@ void MultiParticleContainer::CheckQEDProductSpecies()
}
+void MultiParticleContainer::ScrapeParticles (const amrex::Vector<const amrex::MultiFab*>& distance_to_eb)
+{
+#if AMREX_USE_EB
+ for (auto& pc : allcontainers) {
+ scrapeParticles(*pc, distance_to_eb, ParticleBoundaryProcess::Absorb());
+ }
+#else
+ amrex::ignore_unused(distance_to_eb);
+#endif
+}
+
#endif