From e1c1c8bac405069440bfa393dfb7197a6be3ffbc Mon Sep 17 00:00:00 2001 From: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Date: Fri, 24 Sep 2021 10:03:51 -0700 Subject: Stochastic particle reflection from absorbing domain boundaries (#2281) * added tunable particle reflection from absorbing domain boundaries * extended picmi.py to allow setting boundary reflection coefficients and added a CI test for the reflection implementation * allow R(E) to be specified, except for embedded boundaries * changed approach for particle reflection, now the ParticleBoundaries object will hold the reflection coefficient; reflection from EBs not implemented * added functionality to reflect from EB; still needs to be tested for accuracy * added support for energy dependent reflection models for domain boundaries * fixed at least one issue causing CI fails - building reflection model parsers for not physical particle containers * switched reflection coefficients to be functions of the velocity component perpendicular to the boundary rather than energy * reverted initial work on reflecting from EBs * changed naming convention for new CI test for particle reflection * switched useMPI back to 1 in test * breaking changes while trying to sort out GPU issue * fixed issue with CUDA compilation - hopefully :) * various code improvements from PR review suggestions * fix of major issues * no need to parse the reflection models at every step * skip particles that are already flagged for removal in ApplyBoundaryConditions --- Source/Particles/MultiParticleContainer.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'Source/Particles/MultiParticleContainer.cpp') diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index 549358f30..3868442c5 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -357,22 +357,6 @@ MultiParticleContainer::ReadParameters () "ERROR: use_fdtd_nci_corr is not supported in RZ"); #endif - // The boundary conditions are read in in ReadBCParams - m_boundary_conditions.SetBoundsX(WarpX::particle_boundary_lo[0], WarpX::particle_boundary_hi[0]); -#ifdef WARPX_DIM_3D - m_boundary_conditions.SetBoundsY(WarpX::particle_boundary_lo[1], WarpX::particle_boundary_hi[1]); - m_boundary_conditions.SetBoundsZ(WarpX::particle_boundary_lo[2], WarpX::particle_boundary_hi[2]); -#else - m_boundary_conditions.SetBoundsZ(WarpX::particle_boundary_lo[1], WarpX::particle_boundary_hi[1]); -#endif - - { - ParmParse pp_boundary("boundary"); - bool flag = false; - pp_boundary.query("reflect_all_velocities", flag); - m_boundary_conditions.Set_reflect_all_velocities(flag); - } - ParmParse pp_lasers("lasers"); pp_lasers.queryarr("names", lasers_names); @@ -613,7 +597,7 @@ void MultiParticleContainer::ApplyBoundaryConditions () { for (auto& pc : allcontainers) { - pc->ApplyBoundaryConditions(m_boundary_conditions); + pc->ApplyBoundaryConditions(); } } -- cgit v1.2.3