aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/WarpX_picsar.F9072
1 files changed, 4 insertions, 68 deletions
diff --git a/Source/WarpX_picsar.F90 b/Source/WarpX_picsar.F90
index d3d7be39e..6dfb16250 100644
--- a/Source/WarpX_picsar.F90
+++ b/Source/WarpX_picsar.F90
@@ -1,6 +1,7 @@
#if (BL_SPACEDIM == 3)
#define WRPX_PXR_GETEB_ENERGY_CONSERVING geteb3d_energy_conserving
+#define WRPX_PXR_CURRENT_DEPOSITION depose_jxjyjz_generic
#elif (BL_SPACEDIM == 2)
@@ -232,74 +233,9 @@ subroutine warpx_charge_deposition(rho,np,xp,yp,zp,w,q,xmin,ymin,zmin,dx,dy,dz,n
! Dimension 3
#if (BL_SPACEDIM==3)
-
- SELECT CASE(current_depo_algo)
-
- ! Scalar classical current deposition subroutines
- CASE(3)
-
- IF ((nox.eq.1).and.(noy.eq.1).and.(noz.eq.1)) THEN
- CALL depose_jxjyjz_scalar_1_1_1(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE IF ((nox.eq.2).and.(noy.eq.2).and.(noz.eq.2)) THEN
- CALL depose_jxjyjz_scalar_2_2_2(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE IF ((nox.eq.3).and.(noy.eq.3).and.(noz.eq.3)) THEN
- CALL depose_jxjyjz_scalar_3_3_3(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE
- CALL pxr_depose_jxjyjz_esirkepov_n(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ENDIF
-
- ! Optimized classical current deposition
- CASE(2)
-
- IF ((nox.eq.1).and.(noy.eq.1).and.(noz.eq.1)) THEN
- CALL depose_jxjyjz_vecHVv2_1_1_1(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE IF ((nox.eq.2).and.(noy.eq.2).and.(noz.eq.2)) THEN
- CALL depose_jxjyjz_vecHVv2_2_2_2(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE IF ((nox.eq.3).and.(noy.eq.3).and.(noz.eq.3)) THEN
- CALL depose_jxjyjz_vecHVv3_3_3_3(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard)
- ELSE
- CALL pxr_depose_jxjyjz_esirkepov_n(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ENDIF
-
- ! Esirkepov non optimized
- CASE(1)
-
- CALL pxr_depose_jxjyjz_esirkepov_n(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
-
- ! Optimized Esirkepov
- CASE DEFAULT
-
- IF ((nox.eq.1).and.(noy.eq.1).and.(noz.eq.1)) THEN
- CALL depose_jxjyjz_esirkepov_1_1_1(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ELSE IF ((nox.eq.2).and.(noy.eq.2).and.(noz.eq.2)) THEN
- CALL depose_jxjyjz_esirkepov_2_2_2(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ELSE IF ((nox.eq.3).and.(noy.eq.3).and.(noz.eq.3)) THEN
- CALL depose_jxjyjz_esirkepov_3_3_3(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ELSE
- CALL pxr_depose_jxjyjz_esirkepov_n(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
- dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
- nox,noy,noz,.TRUE._c_long,.FALSE._c_long)
- ENDIF
-
- END SELECT
+ CALL WRPX_PXR_CURRENT_DEPOSITION(jx,jy,jz,np,xp,yp,zp,uxp,uyp,uzp,gaminv,w,q,xmin,ymin,zmin, &
+ dt,dx,dy,dz,nx,ny,nz,nxguard,nyguard,nzguard, &
+ nox,noy,noz,current_depo_algo)
! Dimension 2
#elif (BL_SPACEDIM==2)