aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index 89f233b2c..1cbcee75e 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -47,7 +47,7 @@ WarpXParIter::SetPosition (const Cuda::ManagedDeviceVector<Real>& x, const Cuda:
#ifdef WARPX_RZ
auto& attribs = GetAttribs();
auto& theta = attribs[PIdx::theta];
- Cuda::DeviceVector<Real> r(x.size());
+ Cuda::ManagedDeviceVector<Real> r(x.size());
for (unsigned int i=0 ; i < x.size() ; i++) {
theta[i] = std::atan2(y[i], x[i]);
r[i] = std::sqrt(x[i]*x[i] + y[i]*y[i]);
@@ -503,7 +503,8 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti,
Real* AMREX_RESTRICT yp = m_yp[thread_num].dataPtr() + offset;
// Lower corner of tile box physical domain
- const std::array<Real, 3>& xyzmin = WarpX::LowerCorner(tilebox, depos_lev);;
+ // Note that this includes guard cells since it is after tilebox.ngrow
+ const std::array<Real, 3>& xyzmin = WarpX::LowerCorner(tilebox, depos_lev);
// xyzmin is built on pti.tilebox(), so it does
// not include staggering, so the stagger_shift has to be done by hand.
// Alternatively, we could define xyzminx from tbx (and the same for 3