periodic2 の画像シフト値を作成する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
||
| real(kind=dp), | intent(out) | :: | shift_axis1(:) | |||
| real(kind=dp), | intent(out) | :: | shift_axis2(:) | |||
| integer(kind=i32), | intent(out) | :: | nshift |
シフト数。 |
subroutine build_periodic_shift_values(plan, shift_axis1, shift_axis2, nshift) type(fmm_plan_type), intent(in) :: plan real(dp), intent(out) :: shift_axis1(:), shift_axis2(:) integer(i32), intent(out) :: nshift integer(i32) :: s, img nshift = 1_i32 shift_axis1(1) = 0.0d0 shift_axis2(1) = 0.0d0 if (.not. plan%options%use_periodic2) return nshift = 2_i32*plan%options%periodic_image_layers + 1_i32 if (size(shift_axis1) < nshift .or. size(shift_axis2) < nshift) then error stop 'periodic shift buffer is too small.' end if do s = 1_i32, nshift img = s - plan%options%periodic_image_layers - 1_i32 shift_axis1(s) = real(img, dp)*plan%options%periodic_len(1) shift_axis2(s) = real(img, dp)*plan%options%periodic_len(2) end do end subroutine build_periodic_shift_values