2nd derivative implemented

This commit is contained in:
ignis 2019-04-21 06:59:32 +09:00
parent 30eb2549cd
commit 4ae6c1e95c
3 changed files with 60 additions and 3 deletions

View file

@ -26,6 +26,8 @@ contains
! allocate(work(nxp, nyp, nzp, 3), stat=ierr)
call ludcmp(nxp,nyp,nzp,1,0,0) ! 1,1,0
allocate(xsrc(nyp, nxp), stat=ierr)
allocate(xdst(nyp, nxp), stat=ierr)
@ -103,6 +105,62 @@ contains
end subroutine ddz
subroutine d2dx(dst, src)
real*8, dimension(nxp,nyp,nzp) :: src, dst
integer :: i, j ,k
do k = 1,nzp
call tp2(xsrc, src(:,:,k), nyp, nxp)
call d2fnonp(nxp, hxp, xsrc, xdst, nyp, 1)
call tp2(dst(:,:,k), xdst, nxp, nyp)
end do
end subroutine d2dx
subroutine d2dy(dst, src)
real*8, dimension(nxp,nyp,nzp) :: src, dst
integer :: i, j ,k
do k = 1,nzp
call d2fp(nyp, hyp, src(:,:,k), dst(:,:,k), nxp, 2)
end do
end subroutine d2dy
subroutine d2dz(dst, src)
real*8, dimension(nxp,nyp,nzp) :: src, dst
integer :: i, j ,k
call tp2(zsrc, src, nyp, nzp*nxp)
do k = 1,nzp
call d2fp(nzp, hzp, zsrc, zdst, nyp, 3)
end do
call tp2(dst, zdst, nxp, nyp*nzp)
end subroutine d2dz
subroutine tp(a, b, nx)
! a(nb,nx) = transpose(b(nx,nb))

View file

@ -141,8 +141,7 @@ subroutine read_intro
CLOSE(first_file)
! hyp=l_0*pi/REAL(nyp)
hyp=l_0*pi/REAL(nyp-1) ! kwon
hyp=l_0*pi/REAL(nyp)
hxp=hyp
hzp=hyp

View file

@ -1555,7 +1555,7 @@
WRITE(*,'(a6,i3,a8,i3,a8,i3)') ' NX = ',nxp,' / NY = ',nyp,' / NZ = ',nzp
WRITE(*,*) ' Preparing memory space for COMPACT SCHEME'
CALL ludcmp(nxp,nyp,nzp,1,0,0) ! 1,1,0
! CALL ludcmp(nxp,nyp,nzp,1,0,0) ! 1,1,0
WRITE(*,'(a22,i3,a3,i3,a4,i3)') ' Grid number range : ',syp,' ~ ',eyp,' of ',nyp
WRITE(*,*)