diff options
author | 2019-04-18 11:26:51 -0700 | |
---|---|---|
committer | 2019-04-18 11:26:51 -0700 | |
commit | 5ed1a16ace5ed9d32e18e25b23ef87996679b4dc (patch) | |
tree | 110be73bd454bf2a673e2aa73b26b16cea29865c /Source/Particles/PhysicalParticleContainer.cpp | |
parent | be0cbe26c1914f14e059be84b546934a3933ab85 (diff) | |
parent | ae239587668bbadc742ce5992afc6d6f814c5a3c (diff) | |
download | WarpX-5ed1a16ace5ed9d32e18e25b23ef87996679b4dc.tar.gz WarpX-5ed1a16ace5ed9d32e18e25b23ef87996679b4dc.tar.zst WarpX-5ed1a16ace5ed9d32e18e25b23ef87996679b4dc.zip |
Merge branch 'dev' into RZgeometry
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 07468a85d..e31d43204 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -984,7 +984,7 @@ PhysicalParticleContainer::FieldGather (int lev, #pragma omp parallel #endif { - Cuda::DeviceVector<Real> xp, yp, zp; + Cuda::ManagedDeviceVector<Real> xp, yp, zp; for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) { @@ -1105,10 +1105,6 @@ PhysicalParticleContainer::Evolve (int lev, #else int thread_num = 0; #endif - if (local_rho[thread_num] == nullptr) local_rho[thread_num].reset( new amrex::FArrayBox()); - if (local_jx[thread_num] == nullptr) local_jx[thread_num].reset( new amrex::FArrayBox()); - if (local_jy[thread_num] == nullptr) local_jy[thread_num].reset( new amrex::FArrayBox()); - if (local_jz[thread_num] == nullptr) local_jz[thread_num].reset( new amrex::FArrayBox()); FArrayBox filtered_Ex, filtered_Ey, filtered_Ez; FArrayBox filtered_Bx, filtered_By, filtered_Bz; @@ -1501,7 +1497,7 @@ PhysicalParticleContainer::SplitParticles(int lev) { auto& mypc = WarpX::GetInstance().GetPartContainer(); auto& pctmp_split = mypc.GetPCtmp(); - Cuda::DeviceVector<Real> xp, yp, zp; + Cuda::ManagedDeviceVector<Real> xp, yp, zp; RealVector psplit_x, psplit_y, psplit_z, psplit_w; RealVector psplit_ux, psplit_uy, psplit_uz; long np_split_to_add = 0; @@ -1650,10 +1646,10 @@ PhysicalParticleContainer::SplitParticles(int lev) void PhysicalParticleContainer::PushPX(WarpXParIter& pti, - Cuda::DeviceVector<Real>& xp, - Cuda::DeviceVector<Real>& yp, - Cuda::DeviceVector<Real>& zp, - Cuda::DeviceVector<Real>& giv, + Cuda::ManagedDeviceVector<Real>& xp, + Cuda::ManagedDeviceVector<Real>& yp, + Cuda::ManagedDeviceVector<Real>& zp, + Cuda::ManagedDeviceVector<Real>& giv, Real dt) { |