OPERATORS: Convert allocatable arrays into authomatic ones.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
55b8e2f073
commit
905004951e
@ -198,13 +198,13 @@ module operators
|
|||||||
real(kind=8), dimension(:,:,:,:), intent(in) :: u
|
real(kind=8), dimension(:,:,:,:), intent(in) :: u
|
||||||
real(kind=8), dimension(:,:,:) , intent(out) :: v
|
real(kind=8), dimension(:,:,:) , intent(out) :: v
|
||||||
|
|
||||||
! local arrays
|
|
||||||
!
|
|
||||||
real(kind=8), dimension(:,:,:), allocatable :: w
|
|
||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: dir
|
integer :: dir
|
||||||
|
|
||||||
|
! local arrays
|
||||||
|
!
|
||||||
|
real(kind=8), dimension(size(u,2), size(u,3), size(u,4)) :: w
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -214,10 +214,6 @@ module operators
|
|||||||
call start_timer(imd)
|
call start_timer(imd)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
! allocate temporary array
|
|
||||||
!
|
|
||||||
allocate(w(size(u,2), size(u,3), size(u,4)))
|
|
||||||
|
|
||||||
! reset the output array
|
! reset the output array
|
||||||
!
|
!
|
||||||
v(:,:,:) = 0.0d+00
|
v(:,:,:) = 0.0d+00
|
||||||
@ -236,10 +232,6 @@ module operators
|
|||||||
|
|
||||||
end do ! directions
|
end do ! directions
|
||||||
|
|
||||||
! deallocate temporary array
|
|
||||||
!
|
|
||||||
deallocate(w)
|
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for the divergence operator calculation
|
! stop accounting time for the divergence operator calculation
|
||||||
!
|
!
|
||||||
@ -347,7 +339,7 @@ module operators
|
|||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(:,:,:), allocatable :: w
|
real(kind=8), dimension(size(u,2), size(u,3), size(u,4)) :: w
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -357,10 +349,6 @@ module operators
|
|||||||
call start_timer(imc)
|
call start_timer(imc)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
! allocate temporary array
|
|
||||||
!
|
|
||||||
allocate(w(size(u,2), size(u,3), size(u,4)))
|
|
||||||
|
|
||||||
! === calculate Vx component ===
|
! === calculate Vx component ===
|
||||||
!
|
!
|
||||||
! contribution from the Y derivative of Uz
|
! contribution from the Y derivative of Uz
|
||||||
@ -427,10 +415,6 @@ module operators
|
|||||||
!
|
!
|
||||||
v(3,:,:,:) = v(3,:,:,:) - w(:,:,:)
|
v(3,:,:,:) = v(3,:,:,:) - w(:,:,:)
|
||||||
|
|
||||||
! deallocate temporary array
|
|
||||||
!
|
|
||||||
deallocate(w)
|
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for the rotation operator calculation
|
! stop accounting time for the rotation operator calculation
|
||||||
!
|
!
|
||||||
@ -472,7 +456,7 @@ module operators
|
|||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(:,:,:), allocatable :: w
|
real(kind=8), dimension(size(u,1), size(u,2), size(u,3)) :: w
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -482,10 +466,6 @@ module operators
|
|||||||
call start_timer(iml)
|
call start_timer(iml)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
! allocate temporary array
|
|
||||||
!
|
|
||||||
allocate(w(size(u,1), size(u,2), size(u,3)))
|
|
||||||
|
|
||||||
! calculate the second derivative of U along the X direction
|
! calculate the second derivative of U along the X direction
|
||||||
!
|
!
|
||||||
call derivative_2nd(1, dh(1), u(:,:,:), w(:,:,:))
|
call derivative_2nd(1, dh(1), u(:,:,:), w(:,:,:))
|
||||||
@ -512,10 +492,6 @@ module operators
|
|||||||
v(:,:,:) = v(:,:,:) + w(:,:,:)
|
v(:,:,:) = v(:,:,:) + w(:,:,:)
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! deallocate temporary array
|
|
||||||
!
|
|
||||||
deallocate(w)
|
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for the laplace operator calculation
|
! stop accounting time for the laplace operator calculation
|
||||||
!
|
!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user