From baa122d44a3e005492f805ad1ea925dc4981e139 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Fri, 16 Jul 2021 01:24:54 -0700 Subject: 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 --- Source/Particles/MultiParticleContainer.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Source/Particles/MultiParticleContainer.cpp') 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 @@ -1594,4 +1599,15 @@ void MultiParticleContainer::CheckQEDProductSpecies() } +void MultiParticleContainer::ScrapeParticles (const amrex::Vector& 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 -- cgit v1.2.3