30 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
wd,
p,
pd, &
31 &
rlv,
rlvd,
rev,
revd,
radi,
radid,
radj,
radjd,
radk,
radkd,
si,
sid&
32 & ,
sj,
sjd,
sk,
skd,
sfacei,
sfaceid,
sfacej,
sfacejd,
sfacek, &
47 logical,
intent(in) :: onlyradii
51 real(kind=realtype),
parameter :: b=2.0_realtype
55 integer(kind=inttype) :: i, j, k, ii
56 real(kind=realtype) :: plim, rlim, clim2
57 real(kind=realtype) :: plimd, clim2d
58 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
60 real(kind=realtype) :: uuxd, uuyd, uuzd, cc2d, qsid, qsjd, qskd, sxd&
62 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
63 real(kind=realtype) :: rid, rjd, rkd, rijd, rjkd, rkid
64 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
65 real(kind=realtype) :: vsid, vsjd, vskd, rfld, dpid, dpjd, dpkd
66 real(kind=realtype) :: sface, tmp
67 real(kind=realtype) :: sfaced
68 logical :: radiineeded, doscaling
72 real(kind=realtype) :: abs0
73 real(kind=realtype) :: abs0d
74 real(kind=realtype) :: abs1
75 real(kind=realtype) :: abs1d
76 real(kind=realtype) :: abs2
77 real(kind=realtype) :: abs2d
78 real(kind=realtype) :: abs3
79 real(kind=realtype) :: abs3d
80 real(kind=realtype) :: abs4
81 real(kind=realtype) :: abs4d
82 real(kind=realtype) :: abs5
83 real(kind=realtype) :: abs5d
84 real(kind=realtype) :: arg1
85 real(kind=realtype) :: arg1d
86 real(kind=realtype) :: result1
87 real(kind=realtype) :: result1d
88 real(kind=realtype) :: temp
89 real(kind=realtype) :: temp0
96 if (onlyradii .and. (.not.radiineeded))
then
104 rlim = 0.001_realtype*
rhoinf
125 uuxd =
wd(i, j, k,
ivx)
126 uux =
w(i, j, k,
ivx)
127 uuyd =
wd(i, j, k,
ivy)
128 uuy =
w(i, j, k,
ivy)
129 uuzd =
wd(i, j, k,
ivz)
130 uuz =
w(i, j, k,
ivz)
131 temp =
w(i, j, k,
irho)
132 temp0 =
p(i, j, k)/temp
135 cc2 =
gamma(i, j, k)*temp0
136 if (cc2 .lt. clim2)
then
151 sxd =
sid(i-1, j, k, 1) +
sid(i, j, k, 1)
152 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
153 syd =
sid(i-1, j, k, 2) +
sid(i, j, k, 2)
154 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
155 szd =
sid(i-1, j, k, 3) +
sid(i, j, k, 3)
156 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
157 qsid = sx*uuxd + uux*sxd + sy*uuyd + uuy*syd + sz*uuzd + &
159 qsi = uux*sx + uuy*sy + uuz*sz - sface
160 if (qsi .ge. 0.)
then
167 temp0 = sx*sx + sy*sy + sz*sz
168 arg1d = temp0*cc2d + cc2*(2*sx*sxd+2*sy*syd+2*sz*szd)
171 if (arg1 .eq. 0.0_8)
then
174 result1d = arg1d/(2.0*temp0)
185 sxd =
sjd(i, j-1, k, 1) +
sjd(i, j, k, 1)
186 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
187 syd =
sjd(i, j-1, k, 2) +
sjd(i, j, k, 2)
188 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
189 szd =
sjd(i, j-1, k, 3) +
sjd(i, j, k, 3)
190 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
191 qsjd = sx*uuxd + uux*sxd + sy*uuyd + uuy*syd + sz*uuzd + &
193 qsj = uux*sx + uuy*sy + uuz*sz - sface
194 if (qsj .ge. 0.)
then
201 temp0 = sx*sx + sy*sy + sz*sz
202 arg1d = temp0*cc2d + cc2*(2*sx*sxd+2*sy*syd+2*sz*szd)
205 if (arg1 .eq. 0.0_8)
then
208 result1d = arg1d/(2.0*temp0)
219 sxd =
skd(i, j, k-1, 1) +
skd(i, j, k, 1)
220 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
221 syd =
skd(i, j, k-1, 2) +
skd(i, j, k, 2)
222 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
223 szd =
skd(i, j, k-1, 3) +
skd(i, j, k, 3)
224 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
225 qskd = sx*uuxd + uux*sxd + sy*uuyd + uuy*syd + sz*uuzd + &
227 qsk = uux*sx + uuy*sy + uuz*sz - sface
228 if (qsk .ge. 0.)
then
235 temp0 = sx*sx + sy*sy + sz*sz
236 arg1d = temp0*cc2d + cc2*(2*sx*sxd+2*sy*syd+2*sz*szd)
239 if (arg1 .eq. 0.0_8)
then
242 result1d = arg1d/(2.0*temp0)
248 if (.not.onlyradii)
then
249 dtld(i, j, k) = rid + rjd + rkd
250 dtl(i, j, k) = ri + rj + rk
257 if (ri .lt.
eps)
then
263 if (rj .lt.
eps)
then
269 if (rk .lt.
eps)
then
278 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis &
279 & .ne. int(
adis)))
then
282 rijd =
adis*temp0**(
adis-1)*(rid-temp0*rjd)/rj
286 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis &
287 & .ne. int(
adis)))
then
290 rjkd =
adis*temp0**(
adis-1)*(rjd-temp0*rkd)/rk
294 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis &
295 & .ne. int(
adis)))
then
298 rkid =
adis*temp0**(
adis-1)*(rkd-temp0*rid)/ri
306 radid(i, j, k) = (
one+temp0+rki)*rid + ri*(rkid-temp0*&
308 radi(i, j, k) = ri*(
one+temp0+rki)
310 radjd(i, j, k) = (
one+temp0+rij)*rjd + rj*(rijd-temp0*&
312 radj(i, j, k) = rj*(
one+temp0+rij)
314 radkd(i, j, k) = (
one+temp0+rjk)*rkd + rk*(rjkd-temp0*&
316 radk(i, j, k) = rk*(
one+temp0+rjk)
330 &
'turkel preconditioner not implemented yet')
333 &
'choi merkle preconditioner not implemented yet')
337 if (.not.onlyradii)
then
358 rmud = rmud +
revd(i, j, k)
359 rmu = rmu +
rev(i, j, k)
361 temp0 =
w(i, j, k,
irho)
362 temp = temp0*
vol(i, j, k)
364 & temp0*
vold(i, j, k))/temp)/temp
365 rmu =
half*(rmu/temp)
368 sxd =
sid(i, j, k, 1) +
sid(i-1, j, k, 1)
369 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
370 syd =
sid(i, j, k, 2) +
sid(i-1, j, k, 2)
371 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
372 szd =
sid(i, j, k, 3) +
sid(i-1, j, k, 3)
373 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
374 temp0 = sx*sx + sy*sy + sz*sz
375 vsid = temp0*rmud + rmu*(2*sx*sxd+2*sy*syd+2*sz*szd)
377 dtld(i, j, k) =
dtld(i, j, k) + vsid
378 dtl(i, j, k) =
dtl(i, j, k) + vsi
381 sxd =
sjd(i, j, k, 1) +
sjd(i, j-1, k, 1)
382 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
383 syd =
sjd(i, j, k, 2) +
sjd(i, j-1, k, 2)
384 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
385 szd =
sjd(i, j, k, 3) +
sjd(i, j-1, k, 3)
386 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
387 temp0 = sx*sx + sy*sy + sz*sz
388 vsjd = temp0*rmud + rmu*(2*sx*sxd+2*sy*syd+2*sz*szd)
390 dtld(i, j, k) =
dtld(i, j, k) + vsjd
391 dtl(i, j, k) =
dtl(i, j, k) + vsj
394 sxd =
skd(i, j, k, 1) +
skd(i, j, k-1, 1)
395 sx =
sk(i, j, k, 1) +
sk(i, j, k-1, 1)
396 syd =
skd(i, j, k, 2) +
skd(i, j, k-1, 2)
397 sy =
sk(i, j, k, 2) +
sk(i, j, k-1, 2)
398 szd =
skd(i, j, k, 3) +
skd(i, j, k-1, 3)
399 sz =
sk(i, j, k, 3) +
sk(i, j, k-1, 3)
400 temp0 = sx*sx + sy*sy + sz*sz
401 vskd = temp0*rmud + rmu*(2*sx*sxd+2*sy*syd+2*sz*szd)
403 dtld(i, j, k) =
dtld(i, j, k) + vskd
404 dtl(i, j, k) =
dtl(i, j, k) + vsk
420 dtl(i, j, k) =
dtl(i, j, k) + tmp*
vol(i, j, k)
431 if (
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k) .ge. 0.) &
433 abs3d =
pd(i+1, j, k) -
two*
pd(i, j, k) +
pd(i-1, j, k)
434 abs3 =
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k)
436 abs3d =
two*
pd(i, j, k) -
pd(i+1, j, k) -
pd(i-1, j, k)
437 abs3 = -(
p(i+1, j, k)-
two*
p(i, j, k)+
p(i-1, j, k))
439 temp0 =
p(i+1, j, k) +
two*
p(i, j, k) +
p(i-1, j, k) + &
441 dpid = (abs3d-abs3*(
pd(i+1, j, k)+
two*
pd(i, j, k)+
pd(i-1, &
442 & j, k)+plimd)/temp0)/temp0
444 if (
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k) .ge. 0.) &
446 abs4d =
pd(i, j+1, k) -
two*
pd(i, j, k) +
pd(i, j-1, k)
447 abs4 =
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k)
449 abs4d =
two*
pd(i, j, k) -
pd(i, j+1, k) -
pd(i, j-1, k)
450 abs4 = -(
p(i, j+1, k)-
two*
p(i, j, k)+
p(i, j-1, k))
452 temp0 =
p(i, j+1, k) +
two*
p(i, j, k) +
p(i, j-1, k) + &
454 dpjd = (abs4d-abs4*(
pd(i, j+1, k)+
two*
pd(i, j, k)+
pd(i, j-&
455 & 1, k)+plimd)/temp0)/temp0
457 if (
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1) .ge. 0.) &
459 abs5d =
pd(i, j, k+1) -
two*
pd(i, j, k) +
pd(i, j, k-1)
460 abs5 =
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1)
462 abs5d =
two*
pd(i, j, k) -
pd(i, j, k+1) -
pd(i, j, k-1)
463 abs5 = -(
p(i, j, k+1)-
two*
p(i, j, k)+
p(i, j, k-1))
465 temp0 =
p(i, j, k+1) +
two*
p(i, j, k) +
p(i, j, k-1) + &
467 dpkd = (abs5d-abs5*(
pd(i, j, k+1)+
two*
pd(i, j, k)+
pd(i, j&
468 & , k-1)+plimd)/temp0)/temp0
470 temp0 =
one/(
one+b*(dpi+dpj+dpk))
471 rfld = -(temp0*b*(dpid+dpjd+dpkd)/(
one+b*(dpi+dpj+dpk)))
473 temp0 = rfl/
dtl(i, j, k)
474 dtld(i, j, k) = (rfld-temp0*
dtld(i, j, k))/
dtl(i, j, k)
493 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
p,
rlv,
rev, &
494 &
radi,
radj,
radk,
si,
sj,
sk,
sfacei,
sfacej,
sfacek,
dtl,
gamma, &
509 logical,
intent(in) :: onlyradii
513 real(kind=realtype),
parameter :: b=2.0_realtype
517 integer(kind=inttype) :: i, j, k, ii
518 real(kind=realtype) :: plim, rlim, clim2
519 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
521 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
522 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
523 real(kind=realtype) :: sface, tmp
524 logical :: radiineeded, doscaling
528 real(kind=realtype) :: abs0
529 real(kind=realtype) :: abs1
530 real(kind=realtype) :: abs2
531 real(kind=realtype) :: abs3
532 real(kind=realtype) :: abs4
533 real(kind=realtype) :: abs5
534 real(kind=realtype) :: arg1
535 real(kind=realtype) :: result1
542 if (onlyradii .and. (.not.radiineeded))
then
549 rlim = 0.001_realtype*
rhoinf
567 uux =
w(i, j, k,
ivx)
568 uuy =
w(i, j, k,
ivy)
569 uuz =
w(i, j, k,
ivz)
571 if (cc2 .lt. clim2)
then
583 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
584 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
585 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
586 qsi = uux*sx + uuy*sy + uuz*sz - sface
587 if (qsi .ge. 0.)
then
592 arg1 = cc2*(sx**2+sy**2+sz**2)
599 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
600 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
601 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
602 qsj = uux*sx + uuy*sy + uuz*sz - sface
603 if (qsj .ge. 0.)
then
608 arg1 = cc2*(sx**2+sy**2+sz**2)
615 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
616 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
617 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
618 qsk = uux*sx + uuy*sy + uuz*sz - sface
619 if (qsk .ge. 0.)
then
624 arg1 = cc2*(sx**2+sy**2+sz**2)
628 if (.not.onlyradii)
dtl(i, j, k) = ri + rj + rk
634 if (ri .lt.
eps)
then
639 if (rj .lt.
eps)
then
644 if (rk .lt.
eps)
then
671 &
'turkel preconditioner not implemented yet')
674 &
'choi merkle preconditioner not implemented yet')
678 if (.not.onlyradii)
then
701 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
702 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
703 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
704 vsi = rmu*(sx*sx+sy*sy+sz*sz)
705 dtl(i, j, k) =
dtl(i, j, k) + vsi
708 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
709 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
710 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
711 vsj = rmu*(sx*sx+sy*sy+sz*sz)
712 dtl(i, j, k) =
dtl(i, j, k) + vsj
715 sx =
sk(i, j, k, 1) +
sk(i, j, k-1, 1)
716 sy =
sk(i, j, k, 2) +
sk(i, j, k-1, 2)
717 sz =
sk(i, j, k, 3) +
sk(i, j, k-1, 3)
718 vsk = rmu*(sx*sx+sy*sy+sz*sz)
719 dtl(i, j, k) =
dtl(i, j, k) + vsk
734 dtl(i, j, k) =
dtl(i, j, k) + tmp*
vol(i, j, k)
745 if (
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k) .ge. 0.) &
747 abs3 =
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k)
749 abs3 = -(
p(i+1, j, k)-
two*
p(i, j, k)+
p(i-1, j, k))
751 dpi = abs3/(
p(i+1, j, k)+
two*
p(i, j, k)+
p(i-1, j, k)+plim)
752 if (
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k) .ge. 0.) &
754 abs4 =
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k)
756 abs4 = -(
p(i, j+1, k)-
two*
p(i, j, k)+
p(i, j-1, k))
758 dpj = abs4/(
p(i, j+1, k)+
two*
p(i, j, k)+
p(i, j-1, k)+plim)
759 if (
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1) .ge. 0.) &
761 abs5 =
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1)
763 abs5 = -(
p(i, j, k+1)-
two*
p(i, j, k)+
p(i, j, k-1))
765 dpk = abs5/(
p(i, j, k+1)+
two*
p(i, j, k)+
p(i, j, k-1)+plim)
766 rfl =
one/(
one+b*(dpi+dpj+dpk))
767 dtl(i, j, k) = rfl/
dtl(i, j, k)
815 integer(kind=inttype),
intent(in) :: sps, nn
816 logical,
intent(in) :: useoldcoor
817 real(kind=realtype),
dimension(*),
intent(in) :: t
821 integer(kind=inttype) :: mm
822 integer(kind=inttype) :: i, j, k, ii, iie, jje, kke
823 real(kind=realtype) :: oneover4dt, oneover8dt
824 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
825 real(kind=realtype) :: velxgridd, velygridd, velzgridd, ainfd
826 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
827 real(kind=realtype) :: velxgrid0d, velygrid0d, velzgrid0d
828 real(kind=realtype),
dimension(3) :: sc, xc, xxc
829 real(kind=realtype),
dimension(3) :: scd, xcd, xxcd
830 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
831 real(kind=realtype),
dimension(3) :: rotcenterd, rotrated
832 real(kind=realtype),
dimension(3) :: rotationpoint
833 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
834 & derivrotationmatrix
835 real(kind=realtype),
dimension(3, 3) :: derivrotationmatrixd
836 real(kind=realtype) :: tnew, told
837 real(kind=realtype),
dimension(:, :),
pointer :: sface
838 real(kind=realtype),
dimension(:, :, :),
pointer :: xx, ss
839 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xxold
840 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
842 real(kind=realtype),
dimension(3) :: veldir
843 real(kind=realtype),
dimension(3) :: refdirection
845 real(kind=realtype) :: arg1
846 real(kind=realtype) :: arg1d
847 real(kind=realtype) :: temp
848 real(kind=realtype) :: temp0
849 real(kind=realtype) :: temp1
856 if (arg1 .eq. 0.0_8)
then
859 ainfd = arg1d/(2.0*temp)
875 derivrotationmatrixd = 0.0_8
877 & derivrotationmatrixd, rotationpoint, t(1))
882 if (.not.useoldcoor)
then
894 velxgridd = velxgrid0d
896 velygridd = velygrid0d
898 velzgridd = velzgrid0d
913 xcd(1) = eighth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j-&
914 & 1, k-1, 1)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1&
915 & , 1)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
916 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
917 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
918 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1)+&
919 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
921 xc(1) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
922 & , k-1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
923 & 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
924 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+flowdoms(&
925 & nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+flowdoms(nn, &
929 xcd(2) = eighth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j-&
930 & 1, k-1, 2)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1&
931 & , 2)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
932 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
933 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
934 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2)+&
935 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
937 xc(2) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
938 & , k-1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
939 & 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
940 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+flowdoms(&
941 & nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+flowdoms(nn, &
945 xcd(3) = eighth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j-&
946 & 1, k-1, 3)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1&
947 & , 3)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
948 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
949 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
950 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3)+&
951 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
953 xc(3) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
954 & , k-1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
955 & 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
956 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+flowdoms(&
957 & nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+flowdoms(nn, &
964 xxc(1) = xc(1) - rotcenter(1)
966 xxc(2) = xc(2) - rotcenter(2)
968 xxc(3) = xc(3) - rotcenter(3)
971 scd(1) = xxc(3)*rotrated(2) + rotrate(2)*xxcd(3) - xxc(2)*&
972 & rotrated(3) - rotrate(3)*xxcd(2)
973 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
974 scd(2) = xxc(1)*rotrated(3) + rotrate(3)*xxcd(1) - xxc(3)*&
975 & rotrated(1) - rotrate(1)*xxcd(3)
976 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
977 scd(3) = xxc(2)*rotrated(1) + rotrate(1)*xxcd(2) - xxc(1)*&
978 & rotrated(2) - rotrate(2)*xxcd(1)
979 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
983 xxc(1) = xc(1) - rotationpoint(1)
985 xxc(2) = xc(2) - rotationpoint(2)
987 xxc(3) = xc(3) - rotationpoint(3)
991 sd(i, j, k, 1) = scd(1) + velxgridd + xxc(1)*&
992 & derivrotationmatrixd(1, 1) + derivrotationmatrix(1, 1)*&
993 & xxcd(1) + xxc(2)*derivrotationmatrixd(1, 2) + &
994 & derivrotationmatrix(1, 2)*xxcd(2) + xxc(3)*&
995 & derivrotationmatrixd(1, 3) + derivrotationmatrix(1, 3)*&
997 s(i, j, k, 1) = sc(1) + velxgrid + derivrotationmatrix(1, &
998 & 1)*xxc(1) + derivrotationmatrix(1, 2)*xxc(2) + &
999 & derivrotationmatrix(1, 3)*xxc(3)
1000 sd(i, j, k, 2) = scd(2) + velygridd + xxc(1)*&
1001 & derivrotationmatrixd(2, 1) + derivrotationmatrix(2, 1)*&
1002 & xxcd(1) + xxc(2)*derivrotationmatrixd(2, 2) + &
1003 & derivrotationmatrix(2, 2)*xxcd(2) + xxc(3)*&
1004 & derivrotationmatrixd(2, 3) + derivrotationmatrix(2, 3)*&
1006 s(i, j, k, 2) = sc(2) + velygrid + derivrotationmatrix(2, &
1007 & 1)*xxc(1) + derivrotationmatrix(2, 2)*xxc(2) + &
1008 & derivrotationmatrix(2, 3)*xxc(3)
1009 sd(i, j, k, 3) = scd(3) + velzgridd + xxc(1)*&
1010 & derivrotationmatrixd(3, 1) + derivrotationmatrix(3, 1)*&
1011 & xxcd(1) + xxc(2)*derivrotationmatrixd(3, 2) + &
1012 & derivrotationmatrix(3, 2)*xxcd(2) + xxc(3)*&
1013 & derivrotationmatrixd(3, 3) + derivrotationmatrix(3, 3)*&
1015 s(i, j, k, 3) = sc(3) + velzgrid + derivrotationmatrix(3, &
1016 & 1)*xxc(1) + derivrotationmatrix(3, 2)*xxc(2) + &
1017 & derivrotationmatrix(3, 3)*xxc(3)
1034 xcd(1) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1035 & , k-1, 1)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1&
1036 & )+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1)+&
1038 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1039 & -1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1040 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(&
1042 xcd(2) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1043 & , k-1, 2)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2&
1044 & )+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2)+&
1046 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1047 & -1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1048 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(&
1050 xcd(3) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1051 & , k-1, 3)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3&
1052 & )+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3)+&
1054 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1055 & -1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1056 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(&
1060 & rotrate, rotrated, velxgrid, velxgridd&
1061 & , velygrid, velygridd, velzgrid, &
1062 & velzgridd, derivrotationmatrix, &
1063 & derivrotationmatrixd, sc, scd)
1066 temp =
si(i, j, k, 1)
1067 temp0 =
si(i, j, k, 2)
1068 temp1 =
si(i, j, k, 3)
1069 sfaceid(i, j, k) = temp*scd(1) + sc(1)*
sid(i, j, k, 1) + &
1070 & temp0*scd(2) + sc(2)*
sid(i, j, k, 2) + temp1*scd(3) + sc&
1071 & (3)*
sid(i, j, k, 3)
1072 sfacei(i, j, k) = sc(1)*temp + sc(2)*temp0 + sc(3)*temp1
1082 xcd(1) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j&
1083 & , k, 1)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1084 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1086 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1087 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1088 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1090 xcd(2) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j&
1091 & , k, 2)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1092 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1094 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1095 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1096 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1098 xcd(3) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i-1, j&
1099 & , k, 3)+flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1100 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1102 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1103 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1104 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1108 & rotrate, rotrated, velxgrid, velxgridd&
1109 & , velygrid, velygridd, velzgrid, &
1110 & velzgridd, derivrotationmatrix, &
1111 & derivrotationmatrixd, sc, scd)
1114 temp1 =
sj(i, j, k, 1)
1115 temp0 =
sj(i, j, k, 2)
1116 temp =
sj(i, j, k, 3)
1117 sfacejd(i, j, k) = temp1*scd(1) + sc(1)*
sjd(i, j, k, 1) + &
1118 & temp0*scd(2) + sc(2)*
sjd(i, j, k, 2) + temp*scd(3) + sc(&
1119 & 3)*
sjd(i, j, k, 3)
1120 sfacej(i, j, k) = sc(1)*temp1 + sc(2)*temp0 + sc(3)*temp
1130 xcd(1) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1131 & , k, 1)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
1132 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
1134 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1135 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
1136 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
1138 xcd(2) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1139 & , k, 2)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
1140 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
1142 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1143 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
1144 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
1146 xcd(3) = fourth*(flowdomsd(nn,
groundlevel, sps)%x(i, j-1&
1147 & , k, 3)+flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
1148 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
1150 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1151 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
1152 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
1156 & rotrate, rotrated, velxgrid, velxgridd&
1157 & , velygrid, velygridd, velzgrid, &
1158 & velzgridd, derivrotationmatrix, &
1159 & derivrotationmatrixd, sc, scd)
1162 temp1 =
sk(i, j, k, 1)
1163 temp0 =
sk(i, j, k, 2)
1164 temp =
sk(i, j, k, 3)
1165 sfacekd(i, j, k) = temp1*scd(1) + sc(1)*
skd(i, j, k, 1) + &
1166 & temp0*scd(2) + sc(2)*
skd(i, j, k, 2) + temp*scd(3) + sc(&
1167 & 3)*
skd(i, j, k, 3)
1168 sfacek(i, j, k) = sc(1)*temp1 + sc(2)*temp0 + sc(3)*temp
1204 integer(kind=inttype),
intent(in) :: sps, nn
1205 logical,
intent(in) :: useoldcoor
1206 real(kind=realtype),
dimension(*),
intent(in) :: t
1210 integer(kind=inttype) :: mm
1211 integer(kind=inttype) :: i, j, k, ii, iie, jje, kke
1212 real(kind=realtype) :: oneover4dt, oneover8dt
1213 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
1214 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
1215 real(kind=realtype),
dimension(3) :: sc, xc, xxc
1216 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
1217 real(kind=realtype),
dimension(3) :: rotationpoint
1218 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
1219 & derivrotationmatrix
1220 real(kind=realtype) :: tnew, told
1221 real(kind=realtype),
dimension(:, :),
pointer :: sface
1222 real(kind=realtype),
dimension(:, :, :),
pointer :: xx, ss
1223 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xxold
1224 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
1226 real(kind=realtype),
dimension(3) :: veldir
1227 real(kind=realtype),
dimension(3) :: refdirection
1229 real(kind=realtype) :: arg1
1248 if (.not.useoldcoor)
then
1259 velxgrid = velxgrid0
1260 velygrid = velygrid0
1261 velzgrid = velzgrid0
1272 xc(1) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1273 & , k-1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1274 & 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1275 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+flowdoms(&
1276 & nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+flowdoms(nn, &
1277 &
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(nn, &
1278 &
groundlevel, sps)%x(i-1, j, k, 1)+flowdoms(nn, &
1280 xc(2) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1281 & , k-1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1282 & 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1283 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+flowdoms(&
1284 & nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+flowdoms(nn, &
1285 &
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(nn, &
1286 &
groundlevel, sps)%x(i-1, j, k, 2)+flowdoms(nn, &
1288 xc(3) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1289 & , k-1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1290 & 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1291 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+flowdoms(&
1292 & nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+flowdoms(nn, &
1293 &
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(nn, &
1294 &
groundlevel, sps)%x(i-1, j, k, 3)+flowdoms(nn, &
1298 xxc(1) = xc(1) - rotcenter(1)
1299 xxc(2) = xc(2) - rotcenter(2)
1300 xxc(3) = xc(3) - rotcenter(3)
1303 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
1304 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
1305 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
1308 xxc(1) = xc(1) - rotationpoint(1)
1309 xxc(2) = xc(2) - rotationpoint(2)
1310 xxc(3) = xc(3) - rotationpoint(3)
1314 s(i, j, k, 1) = sc(1) + velxgrid + derivrotationmatrix(1, &
1315 & 1)*xxc(1) + derivrotationmatrix(1, 2)*xxc(2) + &
1316 & derivrotationmatrix(1, 3)*xxc(3)
1317 s(i, j, k, 2) = sc(2) + velygrid + derivrotationmatrix(2, &
1318 & 1)*xxc(1) + derivrotationmatrix(2, 2)*xxc(2) + &
1319 & derivrotationmatrix(2, 3)*xxc(3)
1320 s(i, j, k, 3) = sc(3) + velzgrid + derivrotationmatrix(3, &
1321 & 1)*xxc(1) + derivrotationmatrix(3, 2)*xxc(2) + &
1322 & derivrotationmatrix(3, 3)*xxc(3)
1339 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1340 & -1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1341 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(&
1343 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1344 & -1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1345 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(&
1347 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1348 & -1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1349 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(&
1352 & velygrid, velzgrid, derivrotationmatrix&
1356 sfacei(i, j, k) = sc(1)*
si(i, j, k, 1) + sc(2)*
si(i, j, k&
1357 & , 2) + sc(3)*
si(i, j, k, 3)
1367 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1368 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1369 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1371 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1372 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1373 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1375 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1376 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1377 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1380 & velygrid, velzgrid, derivrotationmatrix&
1384 sfacej(i, j, k) = sc(1)*
sj(i, j, k, 1) + sc(2)*
sj(i, j, k&
1385 & , 2) + sc(3)*
sj(i, j, k, 3)
1395 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1396 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
1397 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
1399 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1400 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
1401 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
1403 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1404 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
1405 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
1408 & velygrid, velzgrid, derivrotationmatrix&
1412 sfacek(i, j, k) = sc(1)*
sk(i, j, k, 1) + sc(2)*
sk(i, j, k&
1413 & , 2) + sc(3)*
sk(i, j, k, 3)
1429 & rotrate, rotrated, velxgrid, velxgridd, velygrid, velygridd, &
1430 & velzgrid, velzgridd, derivrotationmatrix, derivrotationmatrixd, sc, &
1440 real(kind=realtype),
dimension(3),
intent(in) :: xc, rotcenter, &
1442 real(kind=realtype),
dimension(3),
intent(in) :: xcd, rotcenterd, &
1444 real(kind=realtype),
intent(in) :: velxgrid, velygrid, velzgrid
1445 real(kind=realtype),
intent(in) :: velxgridd, velygridd, velzgridd
1446 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
1447 & derivrotationmatrix
1448 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
1449 & derivrotationmatrixd
1450 real(kind=realtype),
dimension(3),
intent(out) :: sc
1451 real(kind=realtype),
dimension(3),
intent(out) :: scd
1455 real(kind=realtype),
dimension(3) :: rotationpoint, xxc
1456 real(kind=realtype),
dimension(3) :: xxcd
1460 xxcd(1) = xcd(1) - rotcenterd(1)
1461 xxc(1) = xc(1) - rotcenter(1)
1462 xxcd(2) = xcd(2) - rotcenterd(2)
1463 xxc(2) = xc(2) - rotcenter(2)
1464 xxcd(3) = xcd(3) - rotcenterd(3)
1465 xxc(3) = xc(3) - rotcenter(3)
1468 scd(1) = xxc(3)*rotrated(2) + rotrate(2)*xxcd(3) - xxc(2)*rotrated(3&
1469 & ) - rotrate(3)*xxcd(2)
1470 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
1471 scd(2) = xxc(1)*rotrated(3) + rotrate(3)*xxcd(1) - xxc(3)*rotrated(1&
1472 & ) - rotrate(1)*xxcd(3)
1473 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
1474 scd(3) = xxc(2)*rotrated(1) + rotrate(1)*xxcd(2) - xxc(1)*rotrated(2&
1475 & ) - rotrate(2)*xxcd(1)
1476 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
1480 xxc(1) = xc(1) - rotationpoint(1)
1482 xxc(2) = xc(2) - rotationpoint(2)
1484 xxc(3) = xc(3) - rotationpoint(3)
1488 scd(1) = scd(1) + velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
1489 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*derivrotationmatrixd(1&
1490 & , 2) + derivrotationmatrix(1, 2)*xxcd(2) + xxc(3)*&
1491 & derivrotationmatrixd(1, 3) + derivrotationmatrix(1, 3)*xxcd(3)
1492 sc(1) = sc(1) + velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1493 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1, 3)*xxc(3&
1495 scd(2) = scd(2) + velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
1496 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*derivrotationmatrixd(2&
1497 & , 2) + derivrotationmatrix(2, 2)*xxcd(2) + xxc(3)*&
1498 & derivrotationmatrixd(2, 3) + derivrotationmatrix(2, 3)*xxcd(3)
1499 sc(2) = sc(2) + velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1500 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2, 3)*xxc(3&
1502 scd(3) = scd(3) + velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
1503 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*derivrotationmatrixd(3&
1504 & , 2) + derivrotationmatrix(3, 2)*xxcd(2) + xxc(3)*&
1505 & derivrotationmatrixd(3, 3) + derivrotationmatrix(3, 3)*xxcd(3)
1506 sc(3) = sc(3) + velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1507 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3, 3)*xxc(3&
1512 & velygrid, velzgrid, derivrotationmatrix, sc)
1521 real(kind=realtype),
dimension(3),
intent(in) :: xc, rotcenter, &
1523 real(kind=realtype),
intent(in) :: velxgrid, velygrid, velzgrid
1524 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
1525 & derivrotationmatrix
1526 real(kind=realtype),
dimension(3),
intent(out) :: sc
1530 real(kind=realtype),
dimension(3) :: rotationpoint, xxc
1533 xxc(1) = xc(1) - rotcenter(1)
1534 xxc(2) = xc(2) - rotcenter(2)
1535 xxc(3) = xc(3) - rotcenter(3)
1538 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
1539 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
1540 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
1543 xxc(1) = xc(1) - rotationpoint(1)
1544 xxc(2) = xc(2) - rotationpoint(2)
1545 xxc(3) = xc(3) - rotationpoint(3)
1549 sc(1) = sc(1) + velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1550 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1, 3)*xxc(3&
1552 sc(2) = sc(2) + velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1553 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2, 3)*xxc(3&
1555 sc(3) = sc(3) + velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1556 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3, 3)*xxc(3&
1595 integer(kind=inttype),
intent(in) :: sps, nn
1596 logical,
intent(in) :: useoldcoor
1597 real(kind=realtype),
dimension(*),
intent(in) :: t
1601 integer(kind=inttype) :: mm, i, j, level, ii
1602 real(kind=realtype) :: oneover4dt
1603 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
1604 real(kind=realtype) :: velxgridd, velygridd, velzgridd, ainfd
1605 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
1606 real(kind=realtype) :: velxgrid0d, velygrid0d, velzgrid0d
1607 real(kind=realtype),
dimension(3) :: xc, xxc
1608 real(kind=realtype),
dimension(3) :: xcd, xxcd
1609 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
1610 real(kind=realtype),
dimension(3) :: rotrated
1611 real(kind=realtype),
dimension(3) :: rotationpoint
1612 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
1613 & derivrotationmatrix
1614 real(kind=realtype),
dimension(3, 3) :: derivrotationmatrixd
1615 real(kind=realtype) :: tnew, told
1616 real(kind=realtype),
dimension(:, :, :),
pointer :: uslip
1617 real(kind=realtype),
dimension(:, :, :),
pointer :: xface
1618 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xfaceold
1619 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
1621 real(kind=realtype),
dimension(3) :: veldir
1622 real(kind=realtype),
dimension(3) :: refdirection
1624 real(kind=realtype) :: arg1
1625 real(kind=realtype) :: arg1d
1626 real(kind=realtype) :: temp
1628 if (.not.useoldcoor)
then
1638 if (arg1 .eq. 0.0_8)
then
1641 ainfd = arg1d/(2.0*temp)
1657 derivrotationmatrixd = 0.0_8
1659 & derivrotationmatrixd, rotationpoint, t(1&
1674 velxgridd = velxgrid0d
1675 velxgrid = velxgrid0
1676 velygridd = velygrid0d
1677 velygrid = velygrid0
1678 velzgridd = velzgrid0d
1679 velzgrid = velzgrid0
1692 & , 1)+flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
1693 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 1)+&
1694 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 1))
1696 & 1)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
1697 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 1)+flowdoms(&
1700 & , 2)+flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
1701 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 2)+&
1702 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 2))
1704 & 2)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
1705 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 2)+flowdoms(&
1708 & , 3)+flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
1709 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 3)+&
1710 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 3))
1712 & 3)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
1713 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 3)+flowdoms(&
1718 xxc(1) = xc(1) - rotcenter(1)
1720 xxc(2) = xc(2) - rotcenter(2)
1722 xxc(3) = xc(3) - rotcenter(3)
1725 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
1726 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
1727 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1729 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
1730 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
1731 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1733 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
1734 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
1735 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1740 xxc(1) = xc(1) - rotationpoint(1)
1742 xxc(2) = xc(2) - rotationpoint(2)
1744 xxc(3) = xc(3) - rotationpoint(3)
1749 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
1750 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
1751 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
1752 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
1753 & derivrotationmatrix(1, 3)*xxcd(3)
1754 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1755 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1756 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1759 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
1760 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
1761 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
1762 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
1763 & derivrotationmatrix(2, 3)*xxcd(3)
1764 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1765 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1766 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1769 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
1770 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
1771 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
1772 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
1773 & derivrotationmatrix(3, 3)*xxcd(3)
1774 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1775 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1776 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1814 xxc(1) = xc(1) - rotcenter(1)
1816 xxc(2) = xc(2) - rotcenter(2)
1818 xxc(3) = xc(3) - rotcenter(3)
1821 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
1822 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
1823 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1825 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
1826 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
1827 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1829 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
1830 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
1831 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1836 xxc(1) = xc(1) - rotationpoint(1)
1838 xxc(2) = xc(2) - rotationpoint(2)
1840 xxc(3) = xc(3) - rotationpoint(3)
1845 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
1846 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
1847 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
1848 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
1849 & derivrotationmatrix(1, 3)*xxcd(3)
1850 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1851 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1852 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1855 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
1856 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
1857 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
1858 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
1859 & derivrotationmatrix(2, 3)*xxcd(3)
1860 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1861 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1862 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1865 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
1866 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
1867 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
1868 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
1869 & derivrotationmatrix(3, 3)*xxcd(3)
1870 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1871 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1872 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1884 & , 1)+flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
1885 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+&
1886 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 1))
1888 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
1889 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+flowdoms(&
1892 & , 2)+flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
1893 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+&
1894 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 2))
1896 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
1897 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+flowdoms(&
1900 & , 3)+flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
1901 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+&
1902 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 3))
1904 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
1905 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+flowdoms(&
1910 xxc(1) = xc(1) - rotcenter(1)
1912 xxc(2) = xc(2) - rotcenter(2)
1914 xxc(3) = xc(3) - rotcenter(3)
1917 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
1918 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
1919 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1921 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
1922 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
1923 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1925 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
1926 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
1927 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1932 xxc(1) = xc(1) - rotationpoint(1)
1934 xxc(2) = xc(2) - rotationpoint(2)
1936 xxc(3) = xc(3) - rotationpoint(3)
1941 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
1942 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
1943 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
1944 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
1945 & derivrotationmatrix(1, 3)*xxcd(3)
1946 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1947 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1948 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1951 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
1952 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
1953 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
1954 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
1955 & derivrotationmatrix(2, 3)*xxcd(3)
1956 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1957 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1958 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1961 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
1962 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
1963 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
1964 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
1965 & derivrotationmatrix(3, 3)*xxcd(3)
1966 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1967 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1968 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2006 xxc(1) = xc(1) - rotcenter(1)
2008 xxc(2) = xc(2) - rotcenter(2)
2010 xxc(3) = xc(3) - rotcenter(3)
2013 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
2014 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
2015 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2017 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
2018 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
2019 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2021 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
2022 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
2023 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2028 xxc(1) = xc(1) - rotationpoint(1)
2030 xxc(2) = xc(2) - rotationpoint(2)
2032 xxc(3) = xc(3) - rotationpoint(3)
2037 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
2038 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
2039 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
2040 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
2041 & derivrotationmatrix(1, 3)*xxcd(3)
2042 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2043 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2044 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2047 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
2048 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
2049 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
2050 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
2051 & derivrotationmatrix(2, 3)*xxcd(3)
2052 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2053 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2054 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2057 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
2058 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
2059 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
2060 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
2061 & derivrotationmatrix(3, 3)*xxcd(3)
2062 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2063 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2064 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2076 & , 1)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
2077 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+&
2078 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 1))
2080 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
2081 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+flowdoms(&
2084 & , 2)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
2085 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+&
2086 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 2))
2088 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
2089 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+flowdoms(&
2092 & , 3)+flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
2093 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+&
2094 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 3))
2096 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
2097 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+flowdoms(&
2102 xxc(1) = xc(1) - rotcenter(1)
2104 xxc(2) = xc(2) - rotcenter(2)
2106 xxc(3) = xc(3) - rotcenter(3)
2109 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
2110 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
2111 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2113 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
2114 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
2115 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2117 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
2118 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
2119 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2124 xxc(1) = xc(1) - rotationpoint(1)
2126 xxc(2) = xc(2) - rotationpoint(2)
2128 xxc(3) = xc(3) - rotationpoint(3)
2133 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
2134 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
2135 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
2136 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
2137 & derivrotationmatrix(1, 3)*xxcd(3)
2138 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2139 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2140 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2143 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
2144 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
2145 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
2146 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
2147 & derivrotationmatrix(2, 3)*xxcd(3)
2148 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2149 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2150 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2153 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
2154 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
2155 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
2156 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
2157 & derivrotationmatrix(3, 3)*xxcd(3)
2158 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2159 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2160 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2198 xxc(1) = xc(1) - rotcenter(1)
2200 xxc(2) = xc(2) - rotcenter(2)
2202 xxc(3) = xc(3) - rotcenter(3)
2205 bcdatad(mm)%uslip(i, j, 1) = xxc(3)*rotrated(2) + rotrate(&
2206 & 2)*xxcd(3) - xxc(2)*rotrated(3) - rotrate(3)*xxcd(2)
2207 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2209 bcdatad(mm)%uslip(i, j, 2) = xxc(1)*rotrated(3) + rotrate(&
2210 & 3)*xxcd(1) - xxc(3)*rotrated(1) - rotrate(1)*xxcd(3)
2211 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2213 bcdatad(mm)%uslip(i, j, 3) = xxc(2)*rotrated(1) + rotrate(&
2214 & 1)*xxcd(2) - xxc(1)*rotrated(2) - rotrate(2)*xxcd(1)
2215 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2220 xxc(1) = xc(1) - rotationpoint(1)
2222 xxc(2) = xc(2) - rotationpoint(2)
2224 xxc(3) = xc(3) - rotationpoint(3)
2229 & velxgridd + xxc(1)*derivrotationmatrixd(1, 1) + &
2230 & derivrotationmatrix(1, 1)*xxcd(1) + xxc(2)*&
2231 & derivrotationmatrixd(1, 2) + derivrotationmatrix(1, 2)*&
2232 & xxcd(2) + xxc(3)*derivrotationmatrixd(1, 3) + &
2233 & derivrotationmatrix(1, 3)*xxcd(3)
2234 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2235 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2236 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2239 & velygridd + xxc(1)*derivrotationmatrixd(2, 1) + &
2240 & derivrotationmatrix(2, 1)*xxcd(1) + xxc(2)*&
2241 & derivrotationmatrixd(2, 2) + derivrotationmatrix(2, 2)*&
2242 & xxcd(2) + xxc(3)*derivrotationmatrixd(2, 3) + &
2243 & derivrotationmatrix(2, 3)*xxcd(3)
2244 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2245 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2246 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2249 & velzgridd + xxc(1)*derivrotationmatrixd(3, 1) + &
2250 & derivrotationmatrix(3, 1)*xxcd(1) + xxc(2)*&
2251 & derivrotationmatrixd(3, 2) + derivrotationmatrix(3, 2)*&
2252 & xxcd(2) + xxc(3)*derivrotationmatrixd(3, 3) + &
2253 & derivrotationmatrix(3, 3)*xxcd(3)
2254 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2255 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2256 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2292 integer(kind=inttype),
intent(in) :: sps, nn
2293 logical,
intent(in) :: useoldcoor
2294 real(kind=realtype),
dimension(*),
intent(in) :: t
2298 integer(kind=inttype) :: mm, i, j, level, ii
2299 real(kind=realtype) :: oneover4dt
2300 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
2301 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
2302 real(kind=realtype),
dimension(3) :: xc, xxc
2303 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
2304 real(kind=realtype),
dimension(3) :: rotationpoint
2305 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
2306 & derivrotationmatrix
2307 real(kind=realtype) :: tnew, told
2308 real(kind=realtype),
dimension(:, :, :),
pointer :: uslip
2309 real(kind=realtype),
dimension(:, :, :),
pointer :: xface
2310 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xfaceold
2311 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
2313 real(kind=realtype),
dimension(3) :: veldir
2314 real(kind=realtype),
dimension(3) :: refdirection
2316 real(kind=realtype) :: arg1
2318 if (.not.useoldcoor)
then
2346 velxgrid = velxgrid0
2347 velygrid = velygrid0
2348 velzgrid = velzgrid0
2361 & 1)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
2362 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 1)+flowdoms(&
2365 & 2)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
2366 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 2)+flowdoms(&
2369 & 3)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
2370 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 3)+flowdoms(&
2374 xxc(1) = xc(1) - rotcenter(1)
2375 xxc(2) = xc(2) - rotcenter(2)
2376 xxc(3) = xc(3) - rotcenter(3)
2379 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2381 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2383 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2387 xxc(1) = xc(1) - rotationpoint(1)
2388 xxc(2) = xc(2) - rotationpoint(2)
2389 xxc(3) = xc(3) - rotationpoint(3)
2393 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2394 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2395 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2397 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2398 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2399 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2401 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2402 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2403 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2428 xxc(1) = xc(1) - rotcenter(1)
2429 xxc(2) = xc(2) - rotcenter(2)
2430 xxc(3) = xc(3) - rotcenter(3)
2433 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2435 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2437 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2441 xxc(1) = xc(1) - rotationpoint(1)
2442 xxc(2) = xc(2) - rotationpoint(2)
2443 xxc(3) = xc(3) - rotationpoint(3)
2447 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2448 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2449 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2451 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2452 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2453 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2455 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2456 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2457 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2469 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
2470 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+flowdoms(&
2473 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
2474 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+flowdoms(&
2477 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
2478 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+flowdoms(&
2482 xxc(1) = xc(1) - rotcenter(1)
2483 xxc(2) = xc(2) - rotcenter(2)
2484 xxc(3) = xc(3) - rotcenter(3)
2487 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2489 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2491 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2495 xxc(1) = xc(1) - rotationpoint(1)
2496 xxc(2) = xc(2) - rotationpoint(2)
2497 xxc(3) = xc(3) - rotationpoint(3)
2501 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2502 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2503 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2505 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2506 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2507 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2509 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2510 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2511 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2536 xxc(1) = xc(1) - rotcenter(1)
2537 xxc(2) = xc(2) - rotcenter(2)
2538 xxc(3) = xc(3) - rotcenter(3)
2541 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2543 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2545 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2549 xxc(1) = xc(1) - rotationpoint(1)
2550 xxc(2) = xc(2) - rotationpoint(2)
2551 xxc(3) = xc(3) - rotationpoint(3)
2555 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2556 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2557 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2559 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2560 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2561 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2563 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2564 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2565 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2577 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
2578 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+flowdoms(&
2581 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
2582 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+flowdoms(&
2585 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
2586 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+flowdoms(&
2590 xxc(1) = xc(1) - rotcenter(1)
2591 xxc(2) = xc(2) - rotcenter(2)
2592 xxc(3) = xc(3) - rotcenter(3)
2595 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2597 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2599 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2603 xxc(1) = xc(1) - rotationpoint(1)
2604 xxc(2) = xc(2) - rotationpoint(2)
2605 xxc(3) = xc(3) - rotationpoint(3)
2609 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2610 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2611 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2613 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2614 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2615 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2617 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2618 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2619 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2644 xxc(1) = xc(1) - rotcenter(1)
2645 xxc(2) = xc(2) - rotcenter(2)
2646 xxc(3) = xc(3) - rotcenter(3)
2649 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
2651 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
2653 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
2657 xxc(1) = xc(1) - rotationpoint(1)
2658 xxc(2) = xc(2) - rotationpoint(2)
2659 xxc(3) = xc(3) - rotationpoint(3)
2663 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
2664 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2665 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
2667 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
2668 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2669 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
2671 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
2672 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2673 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
2705 integer(kind=inttype),
intent(in) :: sps
2709 integer(kind=inttype) :: mm
2710 integer(kind=inttype) :: i, j
2711 real(kind=realtype) :: weight, mult
2712 real(kind=realtype) :: weightd
2713 real(kind=realtype),
dimension(:, :),
pointer :: sface
2714 real(kind=realtype),
dimension(:, :, :),
pointer :: ss
2715 intrinsic associated
2717 real(kind=realtype) :: arg1
2718 real(kind=realtype) :: arg1d
2719 real(kind=realtype) :: temp
2720 real(kind=realtype) :: temp0
2721 real(kind=realtype) :: temp1
2739 if (
associated(
bcdata(mm)%rface))
then
2750 arg1d = 2*
si(1, i, j, 1)*
sid(1, i, j, 1) + 2*
si(1, i, j&
2751 & , 2)*
sid(1, i, j, 2) + 2*
si(1, i, j, 3)*
sid(1, i, j, 3&
2753 arg1 =
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si(1, i, &
2756 if (arg1 .eq. 0.0_8)
then
2759 weightd = arg1d/(2.0*temp)
2762 if (weight .gt.
zero)
then
2763 weightd = -(mult*weightd/weight**2)
2764 weight = mult/weight
2779 temp =
si(
il, i, j, 1)
2780 temp0 =
si(
il, i, j, 2)
2781 temp1 =
si(
il, i, j, 3)
2782 arg1d = 2*temp*
sid(
il, i, j, 1) + 2*temp0*
sid(
il, i, j, &
2783 & 2) + 2*temp1*
sid(
il, i, j, 3)
2784 arg1 = temp*temp + temp0*temp0 + temp1*temp1
2786 if (arg1 .eq. 0.0_8)
then
2789 weightd = arg1d/(2.0*temp1)
2792 if (weight .gt.
zero)
then
2793 weightd = -(mult*weightd/weight**2)
2794 weight = mult/weight
2809 arg1d = 2*
sj(i, 1, j, 1)*
sjd(i, 1, j, 1) + 2*
sj(i, 1, j&
2810 & , 2)*
sjd(i, 1, j, 2) + 2*
sj(i, 1, j, 3)*
sjd(i, 1, j, 3&
2812 arg1 =
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj(i, 1, &
2815 if (arg1 .eq. 0.0_8)
then
2818 weightd = arg1d/(2.0*temp1)
2821 if (weight .gt.
zero)
then
2822 weightd = -(mult*weightd/weight**2)
2823 weight = mult/weight
2838 temp1 =
sj(i,
jl, j, 1)
2839 temp0 =
sj(i,
jl, j, 2)
2840 temp =
sj(i,
jl, j, 3)
2841 arg1d = 2*temp1*
sjd(i,
jl, j, 1) + 2*temp0*
sjd(i,
jl, j&
2842 & , 2) + 2*temp*
sjd(i,
jl, j, 3)
2843 arg1 = temp1*temp1 + temp0*temp0 + temp*temp
2845 if (arg1 .eq. 0.0_8)
then
2848 weightd = arg1d/(2.0*temp1)
2851 if (weight .gt.
zero)
then
2852 weightd = -(mult*weightd/weight**2)
2853 weight = mult/weight
2868 arg1d = 2*
sk(i, j, 1, 1)*
skd(i, j, 1, 1) + 2*
sk(i, j, 1&
2869 & , 2)*
skd(i, j, 1, 2) + 2*
sk(i, j, 1, 3)*
skd(i, j, 1, 3&
2871 arg1 =
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk(i, j, &
2874 if (arg1 .eq. 0.0_8)
then
2877 weightd = arg1d/(2.0*temp1)
2880 if (weight .gt.
zero)
then
2881 weightd = -(mult*weightd/weight**2)
2882 weight = mult/weight
2897 temp1 =
sk(i, j,
kl, 1)
2898 temp0 =
sk(i, j,
kl, 2)
2899 temp =
sk(i, j,
kl, 3)
2900 arg1d = 2*temp1*
skd(i, j,
kl, 1) + 2*temp0*
skd(i, j,
kl&
2901 & , 2) + 2*temp*
skd(i, j,
kl, 3)
2902 arg1 = temp1*temp1 + temp0*temp0 + temp*temp
2904 if (arg1 .eq. 0.0_8)
then
2907 weightd = arg1d/(2.0*temp1)
2910 if (weight .gt.
zero)
then
2911 weightd = -(mult*weightd/weight**2)
2912 weight = mult/weight
2928 if (
associated(
bcdata(mm)%rface))
then
2950 integer(kind=inttype),
intent(in) :: sps
2954 integer(kind=inttype) :: mm
2955 integer(kind=inttype) :: i, j
2956 real(kind=realtype) :: weight, mult
2957 real(kind=realtype),
dimension(:, :),
pointer :: sface
2958 real(kind=realtype),
dimension(:, :, :),
pointer :: ss
2959 intrinsic associated
2961 real(kind=realtype) :: arg1
2979 if (
associated(
bcdata(mm)%rface))
then
2990 arg1 =
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si(1, i, &
2993 if (weight .gt.
zero) weight = mult/weight
3005 arg1 =
si(
il, i, j, 1)**2 +
si(
il, i, j, 2)**2 +
si(
il, &
3008 if (weight .gt.
zero) weight = mult/weight
3020 arg1 =
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj(i, 1, &
3023 if (weight .gt.
zero) weight = mult/weight
3035 arg1 =
sj(i,
jl, j, 1)**2 +
sj(i,
jl, j, 2)**2 +
sj(i, &
3038 if (weight .gt.
zero) weight = mult/weight
3050 arg1 =
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk(i, j, &
3053 if (weight .gt.
zero) weight = mult/weight
3065 arg1 =
sk(i, j,
kl, 1)**2 +
sk(i, j,
kl, 2)**2 +
sk(i, j&
3068 if (weight .gt.
zero) weight = mult/weight
real(kind=realtype), dimension(:, :, :), pointer sfacek
real(kind=realtype), dimension(:, :, :), pointer gamma
real(kind=realtype), dimension(:, :, :), pointer radid
logical addgridvelocities
real(kind=realtype), dimension(:, :, :), pointer radk
real(kind=realtype), dimension(:, :, :, :), pointer sjd
real(kind=realtype), dimension(:, :, :, :), pointer wd
integer(kind=inttype) nviscbocos
real(kind=realtype), dimension(:, :, :), pointer vold
real(kind=realtype), dimension(:, :, :), pointer p
real(kind=realtype), dimension(:, :, :), pointer radj
real(kind=realtype), dimension(:, :, :), pointer dtld
real(kind=realtype), dimension(:, :, :, :), pointer w
real(kind=realtype), dimension(:, :, :), pointer sfacei
integer(kind=inttype), dimension(:), pointer cgnssubface
type(bcdatatype), dimension(:), pointer bcdatad
real(kind=realtype), dimension(:, :, :), pointer revd
real(kind=realtype), dimension(:, :, :), pointer radjd
integer(kind=inttype) nbkglobal
real(kind=realtype), dimension(:, :, :, :), pointer skd
real(kind=realtype), dimension(:, :, :), pointer sfacejd
real(kind=realtype), dimension(:, :, :), pointer rlv
integer(kind=inttype), dimension(:), pointer bcfaceid
real(kind=realtype), dimension(:, :, :, :), pointer si
real(kind=realtype), dimension(:, :, :, :), pointer sid
real(kind=realtype), dimension(:, :, :), pointer radkd
integer(kind=inttype) nbocos
real(kind=realtype), dimension(:, :, :, :), pointer sj
integer(kind=inttype) sectionid
real(kind=realtype), dimension(:, :, :, :), pointer s
real(kind=realtype), dimension(:, :, :), pointer rev
real(kind=realtype), dimension(:, :, :, :), pointer sk
real(kind=realtype), dimension(:, :, :), pointer rlvd
real(kind=realtype), dimension(:, :, :), pointer vol
real(kind=realtype), dimension(:, :, :), pointer dtl
real(kind=realtype), dimension(:, :, :), pointer sfacej
real(kind=realtype), dimension(:, :, :), pointer radi
real(kind=realtype), dimension(:, :, :), pointer sfacekd
real(kind=realtype), dimension(:, :, :), pointer sfaceid
real(kind=realtype), dimension(:, :, :, :), pointer sd
real(kind=realtype), dimension(:, :, :), pointer pd
type(cgnsblockinfotype), dimension(:), allocatable cgnsdoms
real(kind=realtype), parameter zero
integer(kind=inttype), parameter imax
integer(kind=inttype), parameter kmin
real(kind=realtype), parameter pi
integer(kind=inttype), parameter jmax
real(kind=realtype), parameter eps
integer(kind=inttype), parameter turkel
integer(kind=inttype), parameter choimerkle
integer(kind=inttype), parameter timespectral
integer(kind=inttype), parameter noprecond
real(kind=realtype), parameter one
real(kind=realtype), parameter half
integer(kind=inttype), parameter imin
real(kind=realtype), parameter two
real(kind=realtype), parameter fourth
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter jmin
subroutine getdirvector(refdirection, alpha, beta, winddirection, liftindex)
subroutine derivativerotmatrixrigid(rotationmatrix, rotationpoint, t)
subroutine derivativerotmatrixrigid_d(rotationmatrix, rotationmatrixd, rotationpoint, t)
real(kind=realtype) gammainf
real(kind=realtype) rhoinfd
real(kind=realtype) pinfcorr
real(kind=realtype) pinfcorrd
real(kind=realtype) pinfd
real(kind=realtype) rhoinf
real(kind=realtype) timeref
real(kind=realtype) timerefd
integer(kind=inttype) currentlevel
integer(kind=inttype) groundlevel
type(sectiontype), dimension(:), allocatable sections
subroutine normalvelocities_block_d(sps)
subroutine gridvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine cellfacevelocities_d(xc, xcd, rotcenter, rotcenterd, rotrate, rotrated, velxgrid, velxgridd, velygrid, velygridd, velzgrid, velzgridd, derivrotationmatrix, derivrotationmatrixd, sc, scd)
subroutine slipvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine cellfacevelocities(xc, rotcenter, rotrate, velxgrid, velygrid, velzgrid, derivrotationmatrix, sc)
subroutine timestep_block(onlyradii)
subroutine slipvelocitiesfinelevel_block_d(useoldcoor, t, sps, nn)
subroutine timestep_block_d(onlyradii)
subroutine normalvelocities_block(sps)
subroutine gridvelocitiesfinelevel_block_d(useoldcoor, t, sps, nn)
subroutine setcoeftimeintegrator()
subroutine getdirangle(freestreamaxis, liftaxis, liftindex, alpha, beta)
subroutine rotmatrixrigidbody(tnew, told, rotationmatrix, rotationpoint)
real(kind=realtype) function tsbeta(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
real(kind=realtype) function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
real(kind=realtype) function tsmach(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)
subroutine terminate(routinename, errormessage)