diff options
author | 2020-01-31 10:13:04 -0800 | |
---|---|---|
committer | 2020-01-31 10:13:04 -0800 | |
commit | 58e64aafe0103b6644048d7480a3e62fe01bd5cb (patch) | |
tree | 8f0d7ed234d780b929d493d7a217fa504647fa8c /Source/Particles/WarpXParticleContainer.cpp | |
parent | e45710b641c01970a1cc9eb2eae244899091106b (diff) | |
parent | 3f5bcb4a798862e0a5aa604e5dce162bb0e291b3 (diff) | |
download | WarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.tar.gz WarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.tar.zst WarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.zip |
Merge branch 'dev' into elementary_process
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 15a6cff9b..7628cfd85 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Jean-Luc Vay, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao, levinem + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include <limits> #include <MultiParticleContainer.H> @@ -16,9 +25,6 @@ using namespace amrex; -int WarpXParticleContainer::do_not_push = 0; -int WarpXParticleContainer::do_not_deposit = 0; - WarpXParIter::WarpXParIter (ContainerType& pc, int level) : ParIter(pc, level, MFItInfo().SetDynamic(WarpX::do_dynamic_scheduling)) { @@ -113,6 +119,7 @@ WarpXParticleContainer::WarpXParticleContainer (AmrCore* amr_core, int ispecies) m_xp.resize(num_threads); m_yp.resize(num_threads); m_zp.resize(num_threads); + } void @@ -129,7 +136,6 @@ WarpXParticleContainer::ReadParameters () do_tiling = true; #endif pp.query("do_tiling", do_tiling); - pp.query("do_not_push", do_not_push); initialized = true; } @@ -737,37 +743,6 @@ Real WarpXParticleContainer::maxParticleVelocity(bool local) { } void -WarpXParticleContainer::PushXES (Real dt) -{ - BL_PROFILE("WPC::PushXES()"); - - const int num_levels = finestLevel() + 1; - - for (int lev = 0; lev < num_levels; ++lev) { - const auto& gm = m_gdb->Geom(lev); - const RealBox& prob_domain = gm.ProbDomain(); - for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) { - auto& particles = pti.GetArrayOfStructs(); - int nstride = particles.dataShape().first; - const long np = pti.numParticles(); - - auto& attribs = pti.GetAttribs(); - auto& uxp = attribs[PIdx::ux]; - auto& uyp = attribs[PIdx::uy]; - auto& uzp = attribs[PIdx::uz]; - - WRPX_PUSH_LEAPFROG_POSITIONS(particles.dataPtr(), nstride, np, - uxp.dataPtr(), uyp.dataPtr(), -#if AMREX_SPACEDIM == 3 - uzp.dataPtr(), -#endif - &dt, - prob_domain.lo(), prob_domain.hi()); - } - } -} - -void WarpXParticleContainer::PushX (amrex::Real dt) { const int nLevels = finestLevel(); |