aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX_boosted_frame.F90
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpX_boosted_frame.F90')
-rw-r--r--Source/WarpX_boosted_frame.F9034
1 files changed, 29 insertions, 5 deletions
diff --git a/Source/WarpX_boosted_frame.F90 b/Source/WarpX_boosted_frame.F90
index cf0f8d0bb..3f8f0607c 100644
--- a/Source/WarpX_boosted_frame.F90
+++ b/Source/WarpX_boosted_frame.F90
@@ -57,10 +57,10 @@ contains
end subroutine warpx_lorentz_transform_z
- subroutine warpx_copy_slice(lo, hi, tmp, tlo, thi, &
+ subroutine warpx_copy_slice_3d(lo, hi, tmp, tlo, thi, &
buf, blo, bhi, ncomp, &
i_boost, i_lab) &
- bind(C, name="warpx_copy_slice")
+ bind(C, name="warpx_copy_slice_3d")
use amrex_fort_module, only : amrex_real
@@ -68,8 +68,8 @@ contains
integer , intent(in) :: lo(3), hi(3)
integer , intent(in) :: tlo(3), thi(3)
integer , intent(in) :: blo(3), bhi(3)
- real(amrex_real), intent(inout) :: tmp(tlo(1):thi(1),tlo(2):thi(2),tlo(3):thi(3), ncomp)
- real(amrex_real), intent(inout) :: buf(blo(1):bhi(1),blo(2):bhi(2),blo(3):bhi(3), ncomp)
+ real(amrex_real), intent(inout) :: tmp(tlo(1):thi(1),tlo(2):thi(2),tlo(3):thi(3),ncomp)
+ real(amrex_real), intent(inout) :: buf(blo(1):bhi(1),blo(2):bhi(2),blo(3):bhi(3),ncomp)
integer n, i, j, k
@@ -81,6 +81,30 @@ contains
end do
end do
- end subroutine warpx_copy_slice
+ end subroutine warpx_copy_slice_3d
+
+ subroutine warpx_copy_slice_2d(lo, hi, tmp, tlo, thi, &
+ buf, blo, bhi, ncomp, &
+ i_boost, i_lab) &
+ bind(C, name="warpx_copy_slice_2d")
+
+ use amrex_fort_module, only : amrex_real
+
+ integer , intent(in) :: ncomp, i_boost, i_lab
+ integer , intent(in) :: lo(2), hi(2)
+ integer , intent(in) :: tlo(2), thi(2)
+ integer , intent(in) :: blo(2), bhi(2)
+ real(amrex_real), intent(inout) :: tmp(tlo(1):thi(1),tlo(2):thi(2),ncomp)
+ real(amrex_real), intent(inout) :: buf(blo(1):bhi(1),blo(2):bhi(2),ncomp)
+
+ integer n, i, j, k
+
+ do n = 1, ncomp
+ do i = lo(1), hi(1)
+ buf(i, i_lab, n) = tmp(i, i_boost, n)
+ end do
+ end do
+
+ end subroutine warpx_copy_slice_2d
end module warpx_boosted_frame_module