diff options
author | 2019-08-30 09:58:50 -0700 | |
---|---|---|
committer | 2019-08-30 09:58:50 -0700 | |
commit | 32eaffdaab38e2e8e65799a14fbc7398fe852957 (patch) | |
tree | 5817cac07e3bca9bef952a7ecd2a9d459bfa55c9 /Source/FieldSolver/WarpXPushFieldsEM.cpp | |
parent | e1f4b7df59aa070f2c4970a0f950cf5e25413da0 (diff) | |
download | WarpX-32eaffdaab38e2e8e65799a14fbc7398fe852957.tar.gz WarpX-32eaffdaab38e2e8e65799a14fbc7398fe852957.tar.zst WarpX-32eaffdaab38e2e8e65799a14fbc7398fe852957.zip |
Use single kernel synthax
Diffstat (limited to 'Source/FieldSolver/WarpXPushFieldsEM.cpp')
-rw-r--r-- | Source/FieldSolver/WarpXPushFieldsEM.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/Source/FieldSolver/WarpXPushFieldsEM.cpp b/Source/FieldSolver/WarpXPushFieldsEM.cpp index 9a8f996d8..70378565f 100644 --- a/Source/FieldSolver/WarpXPushFieldsEM.cpp +++ b/Source/FieldSolver/WarpXPushFieldsEM.cpp @@ -529,21 +529,16 @@ WarpX::EvolveE (int lev, PatchType patch_type, amrex::Real a_dt) auto const& pml_Byfab = pml_B[1]->array(mfi); auto const& pml_Bzfab = pml_B[2]->array(mfi); - amrex::ParallelFor(tex, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + amrex::ParallelFor(tex, tey, tez, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ex_yee(i,j,k,pml_Exfab,pml_Byfab,pml_Bzfab, dtsdy_c2,dtsdz_c2); - }); - amrex::ParallelFor(tey, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + }, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ey_yee(i,j,k,pml_Eyfab,pml_Bxfab,pml_Bzfab, dtsdx_c2,dtsdz_c2); - }); - amrex::ParallelFor(tez, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + }, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ez_yee(i,j,k,pml_Ezfab,pml_Bxfab,pml_Byfab, dtsdx_c2,dtsdy_c2); }); @@ -593,19 +588,14 @@ WarpX::EvolveE (int lev, PatchType patch_type, amrex::Real a_dt) if (WarpX::maxwell_fdtd_solver_id == 0) { - amrex::ParallelFor(tex, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + amrex::ParallelFor(tex, tey, tez, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ex_f_yee(i,j,k,pml_Exfab,pml_F_fab,dtsdx_c2); - }); - amrex::ParallelFor(tey, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + }, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ey_f_yee(i,j,k,pml_Eyfab,pml_F_fab,dtsdy_c2); - }); - amrex::ParallelFor(tez, - [=] AMREX_GPU_DEVICE (int i, int j, int k) - { + }, + [=] AMREX_GPU_DEVICE (int i, int j, int k) { warpx_push_pml_ez_f_yee(i,j,k,pml_Ezfab,pml_F_fab,dtsdz_c2); }); |