aboutsummaryrefslogtreecommitdiff
path: root/Source/Laser/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-04-07 16:14:30 -0700
committerGravatar GitHub <noreply@github.com> 2020-04-07 16:14:30 -0700
commite60aea24a6f45a88e2da4df786c867b37147bc18 (patch)
tree1a457306831c704f7dee5fe2a0477cfda88c8110 /Source/Laser/LaserParticleContainer.cpp
parent3c2efa2731439c5edfe5bd101357b226a50b6f34 (diff)
downloadWarpX-e60aea24a6f45a88e2da4df786c867b37147bc18.tar.gz
WarpX-e60aea24a6f45a88e2da4df786c867b37147bc18.tar.zst
WarpX-e60aea24a6f45a88e2da4df786c867b37147bc18.zip
Make sure single-precision compiles on GPU (#898)
* make sure single-precision compiles on GPU * add single-precision regression test on Garuda
Diffstat (limited to '')
-rw-r--r--Source/Laser/LaserParticleContainer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp
index 4ce626132..a8847c79a 100644
--- a/Source/Laser/LaserParticleContainer.cpp
+++ b/Source/Laser/LaserParticleContainer.cpp
@@ -235,13 +235,13 @@ LaserParticleContainer::InitData (int lev)
position[2] + (S_X*(Real(i)+0.5_rt))*u_X[2] + (S_Y*(Real(j)+0.5_rt))*u_Y[2] };
#else
# if (defined WARPX_DIM_RZ)
- return { position[0] + (S_X*(Real(i)+0.5)),
- 0.0,
+ return { position[0] + (S_X*(Real(i)+0.5_rt)),
+ 0.0_rt,
position[2]};
# else
- return { position[0] + (S_X*(Real(i)+0.5))*u_X[0],
- 0.0,
- position[2] + (S_X*(Real(i)+0.5))*u_X[2] };
+ return { position[0] + (S_X*(Real(i)+0.5_rt))*u_X[0],
+ 0.0_rt,
+ position[2] + (S_X*(Real(i)+0.5_rt))*u_X[2] };
# endif
#endif
};
@@ -253,9 +253,9 @@ LaserParticleContainer::InitData (int lev)
u_Y[0]*(pos[0]-position[0])+u_Y[1]*(pos[1]-position[1])+u_Y[2]*(pos[2]-position[2])};
#else
# if (defined WARPX_DIM_RZ)
- return {pos[0]-position[0], 0.0};
+ return {pos[0]-position[0], 0.0_rt};
# else
- return {u_X[0]*(pos[0]-position[0])+u_X[2]*(pos[2]-position[2]), 0.0};
+ return {u_X[0]*(pos[0]-position[0])+u_X[2]*(pos[2]-position[2]), 0.0_rt};
# endif
#endif
};