32 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
wd,
p,
pd, &
33 &
rlv,
rlvd,
rev,
revd,
radi,
radid,
radj,
radjd,
radk,
radkd,
si,
sid&
34 & ,
sj,
sjd,
sk,
skd,
sfacei,
sfaceid,
sfacej,
sfacejd,
sfacek, &
49 logical,
intent(in) :: onlyradii
53 real(kind=realtype),
parameter :: b=2.0_realtype
57 integer(kind=inttype) :: i, j, k, ii
58 real(kind=realtype) :: plim, rlim, clim2
59 real(kind=realtype) :: plimd, clim2d
60 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
62 real(kind=realtype) :: uuxd, uuyd, uuzd, cc2d, qsid, qsjd, qskd, sxd&
64 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
65 real(kind=realtype) :: rid, rjd, rkd, rijd, rjkd, rkid
66 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
67 real(kind=realtype) :: vsid, vsjd, vskd, rfld, dpid, dpjd, dpkd
68 real(kind=realtype) :: sface, tmp
69 real(kind=realtype) :: sfaced
70 logical :: radiineeded, doscaling
75 real(kind=realtype) :: abs0
76 real(kind=realtype) :: abs0d
77 real(kind=realtype) :: abs1
78 real(kind=realtype) :: abs1d
79 real(kind=realtype) :: abs2
80 real(kind=realtype) :: abs2d
81 real(kind=realtype) :: abs3
82 real(kind=realtype) :: abs3d
83 real(kind=realtype) :: abs4
84 real(kind=realtype) :: abs4d
85 real(kind=realtype) :: abs5
86 real(kind=realtype) :: abs5d
87 real(kind=realtype) :: temp
88 real(kind=realtype) :: tempd
89 real(kind=realtype) :: temp0
90 real(kind=realtype) :: temp1
91 real(kind=realtype) :: tempd0
92 real(kind=realtype) :: tempd1
100 if (.not.(onlyradii .and. (.not.radiineeded)))
then
116 call pushreal8(sface)
122 j = mod(ii/
ie,
je) + 1
125 uux =
w(i, j, k,
ivx)
126 uuy =
w(i, j, k,
ivy)
127 uuz =
w(i, j, k,
ivz)
129 if (cc2 .lt. clim2)
then
141 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
142 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
143 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
144 qsi = uux*sx + uuy*sy + uuz*sz - sface
145 if (qsi .ge. 0.)
then
156 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
157 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
158 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
159 qsj = uux*sx + uuy*sy + uuz*sz - sface
160 if (qsj .ge. 0.)
then
171 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
172 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
173 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
174 qsk = uux*sx + uuy*sy + uuz*sz - sface
175 if (qsk .ge. 0.)
then
183 if (.not.onlyradii)
dtl(i, j, k) = ri + rj + rk
189 if (ri .lt.
eps)
then
194 if (rj .lt.
eps)
then
199 if (rk .lt.
eps)
then
222 call pushcontrol2b(1)
224 call pushcontrol2b(2)
226 call pushcontrol2b(3)
228 call pushcontrol2b(0)
232 if (.not.onlyradii)
then
253 rmu = rmu +
rev(i, j, k)
254 call pushcontrol1b(0)
256 call pushcontrol1b(1)
263 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
265 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
267 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
268 vsi = rmu*(sx*sx+sy*sy+sz*sz)
269 dtl(i, j, k) =
dtl(i, j, k) + vsi
272 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
273 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
274 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
275 vsj = rmu*(sx*sx+sy*sy+sz*sz)
276 dtl(i, j, k) =
dtl(i, j, k) + vsj
279 sx =
sk(i, j, k, 1) +
sk(i, j, k-1, 1)
280 sy =
sk(i, j, k, 2) +
sk(i, j, k-1, 2)
281 sz =
sk(i, j, k, 3) +
sk(i, j, k-1, 3)
282 vsk = rmu*(sx*sx+sy*sy+sz*sz)
283 dtl(i, j, k) =
dtl(i, j, k) + vsk
287 call pushcontrol1b(0)
289 call pushcontrol1b(1)
301 dtl(i, j, k) =
dtl(i, j, k) + tmp*
vol(i, j, k)
305 call pushcontrol1b(1)
307 call pushcontrol1b(0)
315 if (
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k) .ge. 0.) &
318 abs3 =
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k)
319 call pushcontrol1b(0)
322 abs3 = -(
p(i+1, j, k)-
two*
p(i, j, k)+
p(i-1, j, k))
323 call pushcontrol1b(1)
326 dpi = abs3/(
p(i+1, j, k)+
two*
p(i, j, k)+
p(i-1, j, k)+plim)
327 if (
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k) .ge. 0.) &
330 abs4 =
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k)
331 call pushcontrol1b(0)
334 abs4 = -(
p(i, j+1, k)-
two*
p(i, j, k)+
p(i, j-1, k))
335 call pushcontrol1b(1)
338 dpj = abs4/(
p(i, j+1, k)+
two*
p(i, j, k)+
p(i, j-1, k)+plim)
339 if (
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1) .ge. 0.) &
342 abs5 =
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1)
343 call pushcontrol1b(0)
346 abs5 = -(
p(i, j, k+1)-
two*
p(i, j, k)+
p(i, j, k-1))
347 call pushcontrol1b(1)
350 dpk = abs5/(
p(i, j, k+1)+
two*
p(i, j, k)+
p(i, j, k-1)+plim)
351 rfl =
one/(
one+b*(dpi+dpj+dpk))
352 call pushreal8(
dtl(i, j, k))
353 dtl(i, j, k) = rfl/
dtl(i, j, k)
361 rfl =
one/(
one+b*(dpi+dpj+dpk))
362 call popreal8(
dtl(i, j, k))
363 tempd0 =
dtld(i, j, k)/
dtl(i, j, k)
364 dtld(i, j, k) = -(rfl*tempd0/
dtl(i, j, k))
366 temp1 =
one + b*(dpi+dpj+dpk)
367 tempd1 = -(b*
one*rfld/temp1**2)
372 temp1 =
p(i, j, k+1) +
two*
p(i, j, k) +
p(i, j, k-1) + &
375 tempd0 = -(abs5*dpkd/temp1**2)
376 pd(i, j, k+1) =
pd(i, j, k+1) + tempd0
377 pd(i, j, k) =
pd(i, j, k) +
two*tempd0
378 pd(i, j, k-1) =
pd(i, j, k-1) + tempd0
379 plimd = plimd + tempd0
380 call popcontrol1b(branch)
381 if (branch .eq. 0)
then
383 pd(i, j, k+1) =
pd(i, j, k+1) + abs5d
384 pd(i, j, k) =
pd(i, j, k) -
two*abs5d
385 pd(i, j, k-1) =
pd(i, j, k-1) + abs5d
388 pd(i, j, k) =
pd(i, j, k) +
two*abs5d
389 pd(i, j, k+1) =
pd(i, j, k+1) - abs5d
390 pd(i, j, k-1) =
pd(i, j, k-1) - abs5d
393 temp1 =
p(i, j+1, k) +
two*
p(i, j, k) +
p(i, j-1, k) + &
396 tempd0 = -(abs4*dpjd/temp1**2)
397 pd(i, j+1, k) =
pd(i, j+1, k) + tempd0
398 pd(i, j, k) =
pd(i, j, k) +
two*tempd0
399 pd(i, j-1, k) =
pd(i, j-1, k) + tempd0
400 plimd = plimd + tempd0
401 call popcontrol1b(branch)
402 if (branch .eq. 0)
then
404 pd(i, j+1, k) =
pd(i, j+1, k) + abs4d
405 pd(i, j, k) =
pd(i, j, k) -
two*abs4d
406 pd(i, j-1, k) =
pd(i, j-1, k) + abs4d
409 pd(i, j, k) =
pd(i, j, k) +
two*abs4d
410 pd(i, j+1, k) =
pd(i, j+1, k) - abs4d
411 pd(i, j-1, k) =
pd(i, j-1, k) - abs4d
414 temp1 =
p(i+1, j, k) +
two*
p(i, j, k) +
p(i-1, j, k) + &
417 tempd0 = -(abs3*dpid/temp1**2)
418 pd(i+1, j, k) =
pd(i+1, j, k) + tempd0
419 pd(i, j, k) =
pd(i, j, k) +
two*tempd0
420 pd(i-1, j, k) =
pd(i-1, j, k) + tempd0
421 plimd = plimd + tempd0
422 call popcontrol1b(branch)
423 if (branch .eq. 0)
then
425 pd(i+1, j, k) =
pd(i+1, j, k) + abs3d
426 pd(i, j, k) =
pd(i, j, k) -
two*abs3d
427 pd(i-1, j, k) =
pd(i-1, j, k) + abs3d
430 pd(i, j, k) =
pd(i, j, k) +
two*abs3d
431 pd(i+1, j, k) =
pd(i+1, j, k) - abs3d
432 pd(i-1, j, k) =
pd(i-1, j, k) - abs3d
437 call popcontrol1b(branch)
438 if (branch .ne. 0)
then
447 call popcontrol1b(branch)
448 if (branch .eq. 0)
then
453 rmud = (sx**2+sy**2+sz**2)*vskd
458 skd(i, j, k, 3) =
skd(i, j, k, 3) + szd
459 skd(i, j, k-1, 3) =
skd(i, j, k-1, 3) + szd
460 skd(i, j, k, 2) =
skd(i, j, k, 2) + syd
461 skd(i, j, k-1, 2) =
skd(i, j, k-1, 2) + syd
462 skd(i, j, k, 1) =
skd(i, j, k, 1) + sxd
463 skd(i, j, k-1, 1) =
skd(i, j, k-1, 1) + sxd
464 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
465 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
466 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
468 rmud = rmud + (sx**2+sy**2+sz**2)*vsjd
473 sjd(i, j, k, 3) =
sjd(i, j, k, 3) + szd
474 sjd(i, j-1, k, 3) =
sjd(i, j-1, k, 3) + szd
475 sjd(i, j, k, 2) =
sjd(i, j, k, 2) + syd
476 sjd(i, j-1, k, 2) =
sjd(i, j-1, k, 2) + syd
477 sjd(i, j, k, 1) =
sjd(i, j, k, 1) + sxd
478 sjd(i, j-1, k, 1) =
sjd(i, j-1, k, 1) + sxd
479 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
480 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
481 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
483 rmud = rmud + (sx**2+sy**2+sz**2)*vsid
489 sid(i, j, k, 3) =
sid(i, j, k, 3) + szd
490 sid(i-1, j, k, 3) =
sid(i-1, j, k, 3) + szd
492 sid(i, j, k, 2) =
sid(i, j, k, 2) + syd
493 sid(i-1, j, k, 2) =
sid(i-1, j, k, 2) + syd
495 sid(i, j, k, 1) =
sid(i, j, k, 1) + sxd
496 sid(i-1, j, k, 1) =
sid(i-1, j, k, 1) + sxd
498 temp =
w(i, j, k,
irho)
499 temp0 = temp*
vol(i, j, k)
500 tempd0 =
half*rmud/temp0
502 tempd1 = -(rmu*tempd0/temp0)
505 vold(i, j, k) =
vold(i, j, k) + temp*tempd1
506 call popcontrol1b(branch)
507 if (branch .eq. 0)
revd(i, j, k) =
revd(i, j, k) + rmud
509 rlvd(i, j, k) =
rlvd(i, j, k) + rmud
517 call popcontrol2b(branch)
518 if (branch .lt. 2)
then
519 if (branch .eq. 0)
then
528 j = mod(ii/
ie,
je) + 1
531 uux =
w(i, j, k,
ivx)
532 uuy =
w(i, j, k,
ivy)
533 uuz =
w(i, j, k,
ivz)
535 if (cc2 .lt. clim2)
then
537 call pushcontrol1b(0)
539 call pushcontrol1b(1)
548 call pushcontrol1b(1)
550 call pushcontrol1b(0)
553 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
554 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
555 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
556 qsi = uux*sx + uuy*sy + uuz*sz - sface
557 if (qsi .ge. 0.)
then
559 call pushcontrol1b(0)
562 call pushcontrol1b(1)
569 call pushcontrol1b(1)
571 call pushcontrol1b(0)
574 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
575 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
576 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
577 qsj = uux*sx + uuy*sy + uuz*sz - sface
578 if (qsj .ge. 0.)
then
580 call pushcontrol1b(0)
583 call pushcontrol1b(1)
590 call pushcontrol1b(1)
592 call pushcontrol1b(0)
595 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
596 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
597 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
598 qsk = uux*sx + uuy*sy + uuz*sz - sface
599 if (qsk .ge. 0.)
then
601 call pushcontrol1b(0)
604 call pushcontrol1b(1)
609 if (.not.onlyradii)
then
610 call pushcontrol1b(0)
612 call pushcontrol1b(1)
619 if (ri .lt.
eps)
then
621 call pushcontrol1b(0)
623 call pushcontrol1b(1)
626 if (rj .lt.
eps)
then
628 call pushcontrol1b(0)
630 call pushcontrol1b(1)
633 if (rk .lt.
eps)
then
635 call pushcontrol1b(0)
637 call pushcontrol1b(1)
651 if (temp1 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne.&
655 tempd0 =
adis*temp1**(
adis-1)*rkid/ri
659 radkd(i, j, k) = 0.0_8
661 rid = (
one+
one/rij+rki)*
radid(i, j, k) - temp1*tempd0
662 radid(i, j, k) = 0.0_8
664 if (temp1 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne.&
668 tempd0 =
adis*temp1**(
adis-1)*rjkd/rk
671 radjd(i, j, k) = 0.0_8
672 rkd = rkd - temp1*tempd0
674 if (temp1 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne.&
678 tempd0 =
adis*temp1**(
adis-1)*rijd/rj
681 rjd = rjd - temp1*tempd0
682 call popcontrol1b(branch)
683 if (branch .eq. 0) rkd = 0.0_8
684 call popcontrol1b(branch)
685 if (branch .eq. 0) rjd = 0.0_8
686 call popcontrol1b(branch)
687 if (branch .eq. 0) rid = 0.0_8
690 radkd(i, j, k) = 0.0_8
692 radjd(i, j, k) = 0.0_8
694 radid(i, j, k) = 0.0_8
696 call popcontrol1b(branch)
697 if (branch .eq. 0)
then
698 rid = rid +
dtld(i, j, k)
699 rjd = rjd +
dtld(i, j, k)
700 rkd = rkd +
dtld(i, j, k)
701 dtld(i, j, k) = 0.0_8
703 temp1 = sx*sx + sy*sy + sz*sz
705 if (cc2*temp1 .eq. 0.0_8)
then
716 call popcontrol1b(branch)
717 if (branch .eq. 0)
then
728 sfaced = sfaced - qskd
729 skd(i, j, k-1, 3) =
skd(i, j, k-1, 3) + szd
730 skd(i, j, k, 3) =
skd(i, j, k, 3) + szd
731 skd(i, j, k-1, 2) =
skd(i, j, k-1, 2) + syd
732 skd(i, j, k, 2) =
skd(i, j, k, 2) + syd
733 skd(i, j, k-1, 1) =
skd(i, j, k-1, 1) + sxd
734 skd(i, j, k, 1) =
skd(i, j, k, 1) + sxd
735 call popcontrol1b(branch)
736 if (branch .ne. 0)
then
741 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
742 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
743 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
744 temp1 = sx*sx + sy*sy + sz*sz
746 if (cc2*temp1 .eq. 0.0_8)
then
752 cc2d = cc2d + temp1*tempd1
757 call popcontrol1b(branch)
758 if (branch .eq. 0)
then
763 uuxd = uuxd + sx*qsjd
765 uuyd = uuyd + sy*qsjd
767 uuzd = uuzd + sz*qsjd
769 sfaced = sfaced - qsjd
770 sjd(i, j-1, k, 3) =
sjd(i, j-1, k, 3) + szd
771 sjd(i, j, k, 3) =
sjd(i, j, k, 3) + szd
772 sjd(i, j-1, k, 2) =
sjd(i, j-1, k, 2) + syd
773 sjd(i, j, k, 2) =
sjd(i, j, k, 2) + syd
774 sjd(i, j-1, k, 1) =
sjd(i, j-1, k, 1) + sxd
775 sjd(i, j, k, 1) =
sjd(i, j, k, 1) + sxd
776 call popcontrol1b(branch)
777 if (branch .ne. 0)
then
782 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
783 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
784 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
785 temp1 = sx*sx + sy*sy + sz*sz
787 if (cc2*temp1 .eq. 0.0_8)
then
793 cc2d = cc2d + temp1*tempd1
798 call popcontrol1b(branch)
799 if (branch .eq. 0)
then
804 uuxd = uuxd + sx*qsid
806 uuyd = uuyd + sy*qsid
808 uuzd = uuzd + sz*qsid
810 sfaced = sfaced - qsid
811 sid(i-1, j, k, 3) =
sid(i-1, j, k, 3) + szd
812 sid(i, j, k, 3) =
sid(i, j, k, 3) + szd
813 sid(i-1, j, k, 2) =
sid(i-1, j, k, 2) + syd
814 sid(i, j, k, 2) =
sid(i, j, k, 2) + syd
815 sid(i-1, j, k, 1) =
sid(i-1, j, k, 1) + sxd
816 sid(i, j, k, 1) =
sid(i, j, k, 1) + sxd
817 call popcontrol1b(branch)
818 if (branch .ne. 0)
then
823 call popcontrol1b(branch)
824 if (branch .eq. 0)
then
825 clim2d = clim2d + cc2d
828 temp1 =
w(i, j, k,
irho)
829 tempd1 =
gamma(i, j, k)*cc2d/temp1
830 pd(i, j, k) =
pd(i, j, k) + tempd1
838 else if (branch .eq. 2)
then
859 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
p,
rlv,
rev, &
860 &
radi,
radj,
radk,
si,
sj,
sk,
sfacei,
sfacej,
sfacek,
dtl,
gamma, &
875 logical,
intent(in) :: onlyradii
879 real(kind=realtype),
parameter :: b=2.0_realtype
883 integer(kind=inttype) :: i, j, k, ii
884 real(kind=realtype) :: plim, rlim, clim2
885 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
887 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
888 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
889 real(kind=realtype) :: sface, tmp
890 logical :: radiineeded, doscaling
895 real(kind=realtype) :: abs0
896 real(kind=realtype) :: abs1
897 real(kind=realtype) :: abs2
898 real(kind=realtype) :: abs3
899 real(kind=realtype) :: abs4
900 real(kind=realtype) :: abs5
907 if (onlyradii .and. (.not.radiineeded))
then
914 rlim = 0.001_realtype*
rhoinf
931 j = mod(ii/
ie,
je) + 1
934 uux =
w(i, j, k,
ivx)
935 uuy =
w(i, j, k,
ivy)
936 uuz =
w(i, j, k,
ivz)
938 if (cc2 .lt. clim2)
then
950 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
951 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
952 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
953 qsi = uux*sx + uuy*sy + uuz*sz - sface
954 if (qsi .ge. 0.)
then
965 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
966 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
967 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
968 qsj = uux*sx + uuy*sy + uuz*sz - sface
969 if (qsj .ge. 0.)
then
980 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
981 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
982 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
983 qsk = uux*sx + uuy*sy + uuz*sz - sface
984 if (qsk .ge. 0.)
then
992 if (.not.onlyradii)
dtl(i, j, k) = ri + rj + rk
998 if (ri .lt.
eps)
then
1003 if (rj .lt.
eps)
then
1008 if (rk .lt.
eps)
then
1033 &
'turkel preconditioner not implemented yet')
1036 &
'choi merkle preconditioner not implemented yet')
1040 if (.not.onlyradii)
then
1063 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
1064 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
1065 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
1066 vsi = rmu*(sx*sx+sy*sy+sz*sz)
1067 dtl(i, j, k) =
dtl(i, j, k) + vsi
1070 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
1071 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
1072 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
1073 vsj = rmu*(sx*sx+sy*sy+sz*sz)
1074 dtl(i, j, k) =
dtl(i, j, k) + vsj
1077 sx =
sk(i, j, k, 1) +
sk(i, j, k-1, 1)
1078 sy =
sk(i, j, k, 2) +
sk(i, j, k-1, 2)
1079 sz =
sk(i, j, k, 3) +
sk(i, j, k-1, 3)
1080 vsk = rmu*(sx*sx+sy*sy+sz*sz)
1081 dtl(i, j, k) =
dtl(i, j, k) + vsk
1096 dtl(i, j, k) =
dtl(i, j, k) + tmp*
vol(i, j, k)
1107 if (
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k) .ge. 0.) &
1109 abs3 =
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k)
1111 abs3 = -(
p(i+1, j, k)-
two*
p(i, j, k)+
p(i-1, j, k))
1113 dpi = abs3/(
p(i+1, j, k)+
two*
p(i, j, k)+
p(i-1, j, k)+plim)
1114 if (
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k) .ge. 0.) &
1116 abs4 =
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k)
1118 abs4 = -(
p(i, j+1, k)-
two*
p(i, j, k)+
p(i, j-1, k))
1120 dpj = abs4/(
p(i, j+1, k)+
two*
p(i, j, k)+
p(i, j-1, k)+plim)
1121 if (
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1) .ge. 0.) &
1123 abs5 =
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1)
1125 abs5 = -(
p(i, j, k+1)-
two*
p(i, j, k)+
p(i, j, k-1))
1127 dpk = abs5/(
p(i, j, k+1)+
two*
p(i, j, k)+
p(i, j, k-1)+plim)
1128 rfl =
one/(
one+b*(dpi+dpj+dpk))
1129 dtl(i, j, k) = rfl/
dtl(i, j, k)
1178 integer(kind=inttype),
intent(in) :: sps, nn
1179 logical,
intent(in) :: useoldcoor
1180 real(kind=realtype),
dimension(*),
intent(in) :: t
1184 integer(kind=inttype) :: mm
1185 integer(kind=inttype) :: i, j, k, ii, iie, jje, kke
1186 real(kind=realtype) :: oneover4dt, oneover8dt
1187 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
1188 real(kind=realtype) :: velxgridd, velygridd, velzgridd, ainfd
1189 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
1190 real(kind=realtype) :: velxgrid0d, velygrid0d, velzgrid0d
1191 real(kind=realtype),
dimension(3) :: sc, xc, xxc
1192 real(kind=realtype),
dimension(3) :: scd, xcd, xxcd
1193 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
1194 real(kind=realtype),
dimension(3) :: rotcenterd, rotrated
1195 real(kind=realtype),
dimension(3) :: rotationpoint
1196 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
1197 & derivrotationmatrix
1198 real(kind=realtype),
dimension(3, 3) :: derivrotationmatrixd
1199 real(kind=realtype) :: tnew, told
1200 real(kind=realtype),
dimension(:, :),
pointer :: sface
1201 real(kind=realtype),
dimension(:, :, :),
pointer :: xx, ss
1202 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xxold
1203 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
1205 real(kind=realtype),
dimension(3) :: veldir
1206 real(kind=realtype),
dimension(3) :: refdirection
1208 real(kind=realtype) :: tempd
1226 if (useoldcoor)
then
1230 derivrotationmatrixd = 0.0_8
1243 velxgrid = velxgrid0
1244 velygrid = velygrid0
1245 velzgrid = velzgrid0
1252 call pushinteger4(j)
1257 xc(1) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1258 & , k-1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1259 & 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1260 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+flowdoms(&
1261 & nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+flowdoms(nn, &
1262 &
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(nn, &
1263 &
groundlevel, sps)%x(i-1, j, k, 1)+flowdoms(nn, &
1265 xc(2) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1266 & , k-1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1267 & 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1268 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+flowdoms(&
1269 & nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+flowdoms(nn, &
1270 &
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(nn, &
1271 &
groundlevel, sps)%x(i-1, j, k, 2)+flowdoms(nn, &
1273 xc(3) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1274 & , k-1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1275 & 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1276 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+flowdoms(&
1277 & nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+flowdoms(nn, &
1278 &
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(nn, &
1279 &
groundlevel, sps)%x(i-1, j, k, 3)+flowdoms(nn, &
1283 call pushreal8(xxc(1))
1284 xxc(1) = xc(1) - rotcenter(1)
1285 call pushreal8(xxc(2))
1286 xxc(2) = xc(2) - rotcenter(2)
1287 call pushreal8(xxc(3))
1288 xxc(3) = xc(3) - rotcenter(3)
1291 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
1292 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
1293 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
1296 call pushreal8(xxc(1))
1297 xxc(1) = xc(1) - rotationpoint(1)
1298 call pushreal8(xxc(2))
1299 xxc(2) = xc(2) - rotationpoint(2)
1300 call pushreal8(xxc(3))
1301 xxc(3) = xc(3) - rotationpoint(3)
1317 call pushinteger4(j)
1322 call pushreal8(xc(1))
1323 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1324 & -1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1325 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(&
1327 call pushreal8(xc(2))
1328 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1329 & -1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1330 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(&
1332 call pushreal8(xc(3))
1333 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1334 & -1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1335 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(&
1337 call pushreal8array(sc, 3)
1339 & velygrid, velzgrid, derivrotationmatrix&
1348 call pushinteger4(j)
1353 call pushreal8(xc(1))
1354 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1355 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1356 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1358 call pushreal8(xc(2))
1359 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1360 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1361 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1363 call pushreal8(xc(3))
1364 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1365 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1366 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1368 call pushreal8array(sc, 3)
1370 & velygrid, velzgrid, derivrotationmatrix&
1379 call pushinteger4(j)
1384 call pushreal8(xc(1))
1385 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1386 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
1387 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
1389 call pushreal8(xc(2))
1390 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1391 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
1392 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
1394 call pushreal8(xc(3))
1395 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1396 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
1397 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
1399 call pushreal8array(sc, 3)
1401 & velygrid, velzgrid, derivrotationmatrix&
1412 derivrotationmatrixd = 0.0_8
1418 scd(1) = scd(1) +
sk(i, j, k, 1)*
sfacekd(i, j, k)
1420 scd(2) = scd(2) +
sk(i, j, k, 2)*
sfacekd(i, j, k)
1422 scd(3) = scd(3) +
sk(i, j, k, 3)*
sfacekd(i, j, k)
1425 call popreal8array(sc, 3)
1427 & rotrate, rotrated, velxgrid, velxgridd&
1428 & , velygrid, velygridd, velzgrid, &
1429 & velzgridd, derivrotationmatrix, &
1430 & derivrotationmatrixd, sc, scd)
1431 call popreal8(xc(3))
1432 tempd = fourth*xcd(3)
1434 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) = &
1435 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) + tempd
1436 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) = &
1437 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) + tempd
1438 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3) = &
1439 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3) + &
1441 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 3) = flowdomsd(&
1443 call popreal8(xc(2))
1444 tempd = fourth*xcd(2)
1446 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) = &
1447 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) + tempd
1448 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) = &
1449 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) + tempd
1450 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2) = &
1451 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2) + &
1453 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 2) = flowdomsd(&
1455 call popreal8(xc(1))
1456 tempd = fourth*xcd(1)
1458 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) = &
1459 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) + tempd
1460 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) = &
1461 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) + tempd
1462 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1) = &
1463 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1) + &
1465 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 1) = flowdomsd(&
1474 scd(1) = scd(1) +
sj(i, j, k, 1)*
sfacejd(i, j, k)
1476 scd(2) = scd(2) +
sj(i, j, k, 2)*
sfacejd(i, j, k)
1478 scd(3) = scd(3) +
sj(i, j, k, 3)*
sfacejd(i, j, k)
1481 call popreal8array(sc, 3)
1483 & rotrate, rotrated, velxgrid, velxgridd&
1484 & , velygrid, velygridd, velzgrid, &
1485 & velzgridd, derivrotationmatrix, &
1486 & derivrotationmatrixd, sc, scd)
1487 call popreal8(xc(3))
1488 tempd = fourth*xcd(3)
1490 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) = &
1491 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) + tempd
1492 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) = &
1493 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) + tempd
1494 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3) = &
1495 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3) + &
1497 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 3) = flowdomsd(&
1499 call popreal8(xc(2))
1500 tempd = fourth*xcd(2)
1502 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) = &
1503 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) + tempd
1504 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) = &
1505 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) + tempd
1506 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2) = &
1507 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2) + &
1509 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 2) = flowdomsd(&
1511 call popreal8(xc(1))
1512 tempd = fourth*xcd(1)
1514 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) = &
1515 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) + tempd
1516 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) = &
1517 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) + tempd
1518 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1) = &
1519 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1) + &
1521 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 1) = flowdomsd(&
1530 scd(1) = scd(1) +
si(i, j, k, 1)*
sfaceid(i, j, k)
1532 scd(2) = scd(2) +
si(i, j, k, 2)*
sfaceid(i, j, k)
1534 scd(3) = scd(3) +
si(i, j, k, 3)*
sfaceid(i, j, k)
1537 call popreal8array(sc, 3)
1539 & rotrate, rotrated, velxgrid, velxgridd&
1540 & , velygrid, velygridd, velzgrid, &
1541 & velzgridd, derivrotationmatrix, &
1542 & derivrotationmatrixd, sc, scd)
1543 call popreal8(xc(3))
1544 tempd = fourth*xcd(3)
1546 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 3) = &
1547 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 3) + &
1549 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) = &
1550 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) + tempd
1551 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) = &
1552 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) + tempd
1553 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 3) = flowdomsd(&
1555 call popreal8(xc(2))
1556 tempd = fourth*xcd(2)
1558 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 2) = &
1559 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 2) + &
1561 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) = &
1562 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) + tempd
1563 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) = &
1564 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) + tempd
1565 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 2) = flowdomsd(&
1567 call popreal8(xc(1))
1568 tempd = fourth*xcd(1)
1570 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 1) = &
1571 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 1) + &
1573 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) = &
1574 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) + tempd
1575 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) = &
1576 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) + tempd
1577 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 1) = flowdomsd(&
1587 scd(3) = scd(3) +
sd(i, j, k, 3)
1588 velzgridd = velzgridd +
sd(i, j, k, 3)
1589 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) + &
1590 & xxc(1)*
sd(i, j, k, 3)
1591 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
sd(i, j, k, &
1593 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) + &
1594 & xxc(2)*
sd(i, j, k, 3)
1595 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
sd(i, j, k, &
1597 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) + &
1598 & xxc(3)*
sd(i, j, k, 3)
1599 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
sd(i, j, k, &
1601 sd(i, j, k, 3) = 0.0_8
1602 scd(2) = scd(2) +
sd(i, j, k, 2)
1603 velygridd = velygridd +
sd(i, j, k, 2)
1604 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) + &
1605 & xxc(1)*
sd(i, j, k, 2)
1606 xxcd(1) = xxcd(1) + derivrotationmatrix(2, 1)*
sd(i, j, k, &
1608 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) + &
1609 & xxc(2)*
sd(i, j, k, 2)
1610 xxcd(2) = xxcd(2) + derivrotationmatrix(2, 2)*
sd(i, j, k, &
1612 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) + &
1613 & xxc(3)*
sd(i, j, k, 2)
1614 xxcd(3) = xxcd(3) + derivrotationmatrix(2, 3)*
sd(i, j, k, &
1616 sd(i, j, k, 2) = 0.0_8
1617 scd(1) = scd(1) +
sd(i, j, k, 1)
1618 velxgridd = velxgridd +
sd(i, j, k, 1)
1619 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) + &
1620 & xxc(1)*
sd(i, j, k, 1)
1621 xxcd(1) = xxcd(1) + derivrotationmatrix(1, 1)*
sd(i, j, k, &
1623 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) + &
1624 & xxc(2)*
sd(i, j, k, 1)
1625 xxcd(2) = xxcd(2) + derivrotationmatrix(1, 2)*
sd(i, j, k, &
1627 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) + &
1628 & xxc(3)*
sd(i, j, k, 1)
1629 xxcd(3) = xxcd(3) + derivrotationmatrix(1, 3)*
sd(i, j, k, &
1631 sd(i, j, k, 1) = 0.0_8
1632 call popreal8(xxc(3))
1633 xcd(3) = xcd(3) + xxcd(3)
1634 xxcd(3) = rotrate(2)*scd(1) - rotrate(1)*scd(2)
1635 call popreal8(xxc(2))
1636 xcd(2) = xcd(2) + xxcd(2)
1637 xxcd(2) = rotrate(1)*scd(3) - rotrate(3)*scd(1)
1638 call popreal8(xxc(1))
1639 xcd(1) = xcd(1) + xxcd(1)
1640 xxcd(1) = rotrate(3)*scd(2) - rotrate(2)*scd(3)
1641 rotrated(1) = rotrated(1) + xxc(2)*scd(3) - xxc(3)*scd(2)
1642 rotrated(2) = rotrated(2) + xxc(3)*scd(1) - xxc(1)*scd(3)
1644 rotrated(3) = rotrated(3) + xxc(1)*scd(2) - xxc(2)*scd(1)
1647 call popreal8(xxc(3))
1648 xcd(3) = xcd(3) + xxcd(3)
1650 call popreal8(xxc(2))
1651 xcd(2) = xcd(2) + xxcd(2)
1653 call popreal8(xxc(1))
1654 xcd(1) = xcd(1) + xxcd(1)
1656 tempd = eighth*xcd(3)
1658 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 3) = &
1659 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 3) + &
1661 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 3) = &
1662 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 3) + &
1664 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3) = &
1665 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 3) + &
1667 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) = &
1668 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 3) + tempd
1669 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3) = &
1670 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 3) + &
1672 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) = &
1673 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 3) + tempd
1674 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) = &
1675 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 3) + tempd
1676 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 3) = flowdomsd(&
1678 tempd = eighth*xcd(2)
1680 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 2) = &
1681 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 2) + &
1683 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 2) = &
1684 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 2) + &
1686 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2) = &
1687 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 2) + &
1689 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) = &
1690 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 2) + tempd
1691 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2) = &
1692 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 2) + &
1694 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) = &
1695 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 2) + tempd
1696 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) = &
1697 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 2) + tempd
1698 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 2) = flowdomsd(&
1700 tempd = eighth*xcd(1)
1702 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 1) = &
1703 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k-1, 1) + &
1705 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 1) = &
1706 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k-1, 1) + &
1708 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1) = &
1709 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k-1, 1) + &
1711 flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) = &
1712 & flowdomsd(nn,
groundlevel, sps)%x(i, j, k-1, 1) + tempd
1713 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1) = &
1714 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, k, 1) + &
1716 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) = &
1717 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, k, 1) + tempd
1718 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) = &
1719 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, k, 1) + tempd
1720 flowdomsd(nn,
groundlevel, sps)%x(i, j, k, 1) = flowdomsd(&
1726 velzgrid0d = velzgridd
1727 velygrid0d = velygridd
1728 velxgrid0d = velxgridd
1735 derivrotationmatrixd = 0.0_8
1739 & derivrotationmatrixd, rotationpoint, t(1))
1789 integer(kind=inttype),
intent(in) :: sps, nn
1790 logical,
intent(in) :: useoldcoor
1791 real(kind=realtype),
dimension(*),
intent(in) :: t
1795 integer(kind=inttype) :: mm
1796 integer(kind=inttype) :: i, j, k, ii, iie, jje, kke
1797 real(kind=realtype) :: oneover4dt, oneover8dt
1798 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
1799 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
1800 real(kind=realtype),
dimension(3) :: sc, xc, xxc
1801 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
1802 real(kind=realtype),
dimension(3) :: rotationpoint
1803 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
1804 & derivrotationmatrix
1805 real(kind=realtype) :: tnew, told
1806 real(kind=realtype),
dimension(:, :),
pointer :: sface
1807 real(kind=realtype),
dimension(:, :, :),
pointer :: xx, ss
1808 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xxold
1809 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
1811 real(kind=realtype),
dimension(3) :: veldir
1812 real(kind=realtype),
dimension(3) :: refdirection
1831 if (.not.useoldcoor)
then
1842 velxgrid = velxgrid0
1843 velygrid = velygrid0
1844 velzgrid = velzgrid0
1855 xc(1) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1856 & , k-1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1857 & 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1858 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+flowdoms(&
1859 & nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+flowdoms(nn, &
1860 &
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(nn, &
1861 &
groundlevel, sps)%x(i-1, j, k, 1)+flowdoms(nn, &
1863 xc(2) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1864 & , k-1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1865 & 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1866 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+flowdoms(&
1867 & nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+flowdoms(nn, &
1868 &
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(nn, &
1869 &
groundlevel, sps)%x(i-1, j, k, 2)+flowdoms(nn, &
1871 xc(3) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
1872 & , k-1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
1873 & 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1874 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+flowdoms(&
1875 & nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+flowdoms(nn, &
1876 &
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(nn, &
1877 &
groundlevel, sps)%x(i-1, j, k, 3)+flowdoms(nn, &
1881 xxc(1) = xc(1) - rotcenter(1)
1882 xxc(2) = xc(2) - rotcenter(2)
1883 xxc(3) = xc(3) - rotcenter(3)
1886 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
1887 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
1888 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
1891 xxc(1) = xc(1) - rotationpoint(1)
1892 xxc(2) = xc(2) - rotationpoint(2)
1893 xxc(3) = xc(3) - rotationpoint(3)
1897 s(i, j, k, 1) = sc(1) + velxgrid + derivrotationmatrix(1, &
1898 & 1)*xxc(1) + derivrotationmatrix(1, 2)*xxc(2) + &
1899 & derivrotationmatrix(1, 3)*xxc(3)
1900 s(i, j, k, 2) = sc(2) + velygrid + derivrotationmatrix(2, &
1901 & 1)*xxc(1) + derivrotationmatrix(2, 2)*xxc(2) + &
1902 & derivrotationmatrix(2, 3)*xxc(3)
1903 s(i, j, k, 3) = sc(3) + velzgrid + derivrotationmatrix(3, &
1904 & 1)*xxc(1) + derivrotationmatrix(3, 2)*xxc(2) + &
1905 & derivrotationmatrix(3, 3)*xxc(3)
1922 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1923 & -1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1924 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(&
1926 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1927 & -1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1928 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(&
1930 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1931 & -1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1932 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(&
1935 & velygrid, velzgrid, derivrotationmatrix&
1939 sfacei(i, j, k) = sc(1)*
si(i, j, k, 1) + sc(2)*
si(i, j, k&
1940 & , 2) + sc(3)*
si(i, j, k, 3)
1950 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1951 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
1952 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
1954 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1955 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
1956 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
1958 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
1959 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
1960 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
1963 & velygrid, velzgrid, derivrotationmatrix&
1967 sfacej(i, j, k) = sc(1)*
sj(i, j, k, 1) + sc(2)*
sj(i, j, k&
1968 & , 2) + sc(3)*
sj(i, j, k, 3)
1978 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1979 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
1980 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
1982 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1983 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
1984 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
1986 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
1987 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
1988 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
1991 & velygrid, velzgrid, derivrotationmatrix&
1995 sfacek(i, j, k) = sc(1)*
sk(i, j, k, 1) + sc(2)*
sk(i, j, k&
1996 & , 2) + sc(3)*
sk(i, j, k, 3)
2013 & rotrate, rotrated, velxgrid, velxgridd, velygrid, velygridd, &
2014 & velzgrid, velzgridd, derivrotationmatrix, derivrotationmatrixd, sc, &
2024 real(kind=realtype),
dimension(3),
intent(in) :: xc, rotcenter, &
2026 real(kind=realtype),
dimension(3) :: xcd, rotcenterd, rotrated
2027 real(kind=realtype),
intent(in) :: velxgrid, velygrid, velzgrid
2028 real(kind=realtype) :: velxgridd, velygridd, velzgridd
2029 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
2030 & derivrotationmatrix
2031 real(kind=realtype),
dimension(3, 3) :: derivrotationmatrixd
2032 real(kind=realtype),
dimension(3) :: sc
2033 real(kind=realtype),
dimension(3) :: scd
2037 real(kind=realtype),
dimension(3) :: rotationpoint, xxc
2038 real(kind=realtype),
dimension(3) :: xxcd
2041 xxc(1) = xc(1) - rotcenter(1)
2042 xxc(2) = xc(2) - rotcenter(2)
2043 xxc(3) = xc(3) - rotcenter(3)
2048 call pushreal8(xxc(1))
2049 xxc(1) = xc(1) - rotationpoint(1)
2050 call pushreal8(xxc(2))
2051 xxc(2) = xc(2) - rotationpoint(2)
2052 call pushreal8(xxc(3))
2053 xxc(3) = xc(3) - rotationpoint(3)
2058 velzgridd = velzgridd + scd(3)
2059 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) + xxc(1)*scd&
2061 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*scd(3) + &
2062 & derivrotationmatrix(2, 1)*scd(2) + derivrotationmatrix(1, 1)*scd(1&
2064 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) + xxc(2)*scd&
2066 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*scd(3) + &
2067 & derivrotationmatrix(2, 2)*scd(2) + derivrotationmatrix(1, 2)*scd(1&
2069 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) + xxc(3)*scd&
2071 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*scd(3) + &
2072 & derivrotationmatrix(2, 3)*scd(2) + derivrotationmatrix(1, 3)*scd(1&
2074 velygridd = velygridd + scd(2)
2075 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) + xxc(1)*scd&
2077 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) + xxc(2)*scd&
2079 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) + xxc(3)*scd&
2081 velxgridd = velxgridd + scd(1)
2082 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) + xxc(1)*scd&
2084 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) + xxc(2)*scd&
2086 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) + xxc(3)*scd&
2088 call popreal8(xxc(3))
2089 xcd(3) = xcd(3) + xxcd(3)
2090 xxcd(3) = rotrate(2)*scd(1) - rotrate(1)*scd(2)
2091 call popreal8(xxc(2))
2092 xcd(2) = xcd(2) + xxcd(2)
2093 xxcd(2) = rotrate(1)*scd(3) - rotrate(3)*scd(1)
2094 call popreal8(xxc(1))
2095 xcd(1) = xcd(1) + xxcd(1)
2096 xxcd(1) = rotrate(3)*scd(2) - rotrate(2)*scd(3)
2097 rotrated(1) = rotrated(1) + xxc(2)*scd(3) - xxc(3)*scd(2)
2098 rotrated(2) = rotrated(2) + xxc(3)*scd(1) - xxc(1)*scd(3)
2100 rotrated(3) = rotrated(3) + xxc(1)*scd(2) - xxc(2)*scd(1)
2104 xcd(3) = xcd(3) + xxcd(3)
2105 rotcenterd(3) = rotcenterd(3) - xxcd(3)
2107 xcd(2) = xcd(2) + xxcd(2)
2108 rotcenterd(2) = rotcenterd(2) - xxcd(2)
2110 xcd(1) = xcd(1) + xxcd(1)
2111 rotcenterd(1) = rotcenterd(1) - xxcd(1)
2115 & velygrid, velzgrid, derivrotationmatrix, sc)
2124 real(kind=realtype),
dimension(3),
intent(in) :: xc, rotcenter, &
2126 real(kind=realtype),
intent(in) :: velxgrid, velygrid, velzgrid
2127 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
2128 & derivrotationmatrix
2129 real(kind=realtype),
dimension(3),
intent(out) :: sc
2133 real(kind=realtype),
dimension(3) :: rotationpoint, xxc
2136 xxc(1) = xc(1) - rotcenter(1)
2137 xxc(2) = xc(2) - rotcenter(2)
2138 xxc(3) = xc(3) - rotcenter(3)
2141 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
2142 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
2143 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
2146 xxc(1) = xc(1) - rotationpoint(1)
2147 xxc(2) = xc(2) - rotationpoint(2)
2148 xxc(3) = xc(3) - rotationpoint(3)
2152 sc(1) = sc(1) + velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
2153 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1, 3)*xxc(3&
2155 sc(2) = sc(2) + velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
2156 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2, 3)*xxc(3&
2158 sc(3) = sc(3) + velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
2159 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3, 3)*xxc(3&
2200 integer(kind=inttype),
intent(in) :: sps, nn
2201 logical,
intent(in) :: useoldcoor
2202 real(kind=realtype),
dimension(*),
intent(in) :: t
2206 integer(kind=inttype) :: mm, i, j, level, ii
2207 real(kind=realtype) :: oneover4dt
2208 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
2209 real(kind=realtype) :: velxgridd, velygridd, velzgridd, ainfd
2210 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
2211 real(kind=realtype) :: velxgrid0d, velygrid0d, velzgrid0d
2212 real(kind=realtype),
dimension(3) :: xc, xxc
2213 real(kind=realtype),
dimension(3) :: xcd, xxcd
2214 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
2215 real(kind=realtype),
dimension(3) :: rotrated
2216 real(kind=realtype),
dimension(3) :: rotationpoint
2217 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
2218 & derivrotationmatrix
2219 real(kind=realtype),
dimension(3, 3) :: derivrotationmatrixd
2220 real(kind=realtype) :: tnew, told
2221 real(kind=realtype),
dimension(:, :, :),
pointer :: uslip
2222 real(kind=realtype),
dimension(:, :, :),
pointer :: xface
2223 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xfaceold
2224 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
2226 real(kind=realtype),
dimension(3) :: veldir
2227 real(kind=realtype),
dimension(3) :: refdirection
2229 real(kind=realtype) :: tempd
2252 integer :: ad_from10
2256 if (useoldcoor)
then
2281 call pushinteger4(ii)
2284 call pushreal8array(rotrate, 3)
2292 ad_from0 =
bcdata(mm)%jcbeg
2293 do j=ad_from0,
bcdata(mm)%jcend
2294 ad_from =
bcdata(mm)%icbeg
2295 do i=ad_from,
bcdata(mm)%icend
2301 & 1)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
2302 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 1)+flowdoms(&
2305 & 2)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
2306 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 2)+flowdoms(&
2309 & 3)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
2310 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 3)+flowdoms(&
2314 call pushreal8(xxc(1))
2315 xxc(1) = xc(1) - rotcenter(1)
2316 call pushreal8(xxc(2))
2317 xxc(2) = xc(2) - rotcenter(2)
2318 call pushreal8(xxc(3))
2319 xxc(3) = xc(3) - rotcenter(3)
2324 call pushreal8(xxc(1))
2325 xxc(1) = xc(1) - rotationpoint(1)
2326 call pushreal8(xxc(2))
2327 xxc(2) = xc(2) - rotationpoint(2)
2328 call pushreal8(xxc(3))
2329 xxc(3) = xc(3) - rotationpoint(3)
2334 call pushinteger4(i - 1)
2335 call pushinteger4(ad_from)
2337 call pushinteger4(j - 1)
2338 call pushinteger4(ad_from0)
2339 call pushcontrol3b(6)
2341 ad_from2 =
bcdata(mm)%jcbeg
2342 do j=ad_from2,
bcdata(mm)%jcend
2343 ad_from1 =
bcdata(mm)%icbeg
2344 do i=ad_from1,
bcdata(mm)%icend
2363 call pushreal8(xxc(1))
2364 xxc(1) = xc(1) - rotcenter(1)
2365 call pushreal8(xxc(2))
2366 xxc(2) = xc(2) - rotcenter(2)
2367 call pushreal8(xxc(3))
2368 xxc(3) = xc(3) - rotcenter(3)
2373 call pushreal8(xxc(1))
2374 xxc(1) = xc(1) - rotationpoint(1)
2375 call pushreal8(xxc(2))
2376 xxc(2) = xc(2) - rotationpoint(2)
2377 call pushreal8(xxc(3))
2378 xxc(3) = xc(3) - rotationpoint(3)
2383 call pushinteger4(i - 1)
2384 call pushinteger4(ad_from1)
2386 call pushinteger4(j - 1)
2387 call pushinteger4(ad_from2)
2388 call pushcontrol3b(5)
2390 ad_from4 =
bcdata(mm)%jcbeg
2391 do j=ad_from4,
bcdata(mm)%jcend
2392 ad_from3 =
bcdata(mm)%icbeg
2393 do i=ad_from3,
bcdata(mm)%icend
2399 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
2400 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+flowdoms(&
2403 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
2404 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+flowdoms(&
2407 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
2408 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+flowdoms(&
2412 call pushreal8(xxc(1))
2413 xxc(1) = xc(1) - rotcenter(1)
2414 call pushreal8(xxc(2))
2415 xxc(2) = xc(2) - rotcenter(2)
2416 call pushreal8(xxc(3))
2417 xxc(3) = xc(3) - rotcenter(3)
2422 call pushreal8(xxc(1))
2423 xxc(1) = xc(1) - rotationpoint(1)
2424 call pushreal8(xxc(2))
2425 xxc(2) = xc(2) - rotationpoint(2)
2426 call pushreal8(xxc(3))
2427 xxc(3) = xc(3) - rotationpoint(3)
2432 call pushinteger4(i - 1)
2433 call pushinteger4(ad_from3)
2435 call pushinteger4(j - 1)
2436 call pushinteger4(ad_from4)
2437 call pushcontrol3b(4)
2439 ad_from6 =
bcdata(mm)%jcbeg
2440 do j=ad_from6,
bcdata(mm)%jcend
2441 ad_from5 =
bcdata(mm)%icbeg
2442 do i=ad_from5,
bcdata(mm)%icend
2461 call pushreal8(xxc(1))
2462 xxc(1) = xc(1) - rotcenter(1)
2463 call pushreal8(xxc(2))
2464 xxc(2) = xc(2) - rotcenter(2)
2465 call pushreal8(xxc(3))
2466 xxc(3) = xc(3) - rotcenter(3)
2471 call pushreal8(xxc(1))
2472 xxc(1) = xc(1) - rotationpoint(1)
2473 call pushreal8(xxc(2))
2474 xxc(2) = xc(2) - rotationpoint(2)
2475 call pushreal8(xxc(3))
2476 xxc(3) = xc(3) - rotationpoint(3)
2481 call pushinteger4(i - 1)
2482 call pushinteger4(ad_from5)
2484 call pushinteger4(j - 1)
2485 call pushinteger4(ad_from6)
2486 call pushcontrol3b(3)
2488 ad_from8 =
bcdata(mm)%jcbeg
2489 do j=ad_from8,
bcdata(mm)%jcend
2490 ad_from7 =
bcdata(mm)%icbeg
2491 do i=ad_from7,
bcdata(mm)%icend
2497 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
2498 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+flowdoms(&
2501 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
2502 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+flowdoms(&
2505 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
2506 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+flowdoms(&
2510 call pushreal8(xxc(1))
2511 xxc(1) = xc(1) - rotcenter(1)
2512 call pushreal8(xxc(2))
2513 xxc(2) = xc(2) - rotcenter(2)
2514 call pushreal8(xxc(3))
2515 xxc(3) = xc(3) - rotcenter(3)
2520 call pushreal8(xxc(1))
2521 xxc(1) = xc(1) - rotationpoint(1)
2522 call pushreal8(xxc(2))
2523 xxc(2) = xc(2) - rotationpoint(2)
2524 call pushreal8(xxc(3))
2525 xxc(3) = xc(3) - rotationpoint(3)
2530 call pushinteger4(i - 1)
2531 call pushinteger4(ad_from7)
2533 call pushinteger4(j - 1)
2534 call pushinteger4(ad_from8)
2535 call pushcontrol3b(2)
2537 ad_from10 =
bcdata(mm)%jcbeg
2538 do j=ad_from10,
bcdata(mm)%jcend
2539 ad_from9 =
bcdata(mm)%icbeg
2540 do i=ad_from9,
bcdata(mm)%icend
2559 call pushreal8(xxc(1))
2560 xxc(1) = xc(1) - rotcenter(1)
2561 call pushreal8(xxc(2))
2562 xxc(2) = xc(2) - rotcenter(2)
2563 call pushreal8(xxc(3))
2564 xxc(3) = xc(3) - rotcenter(3)
2569 call pushreal8(xxc(1))
2570 xxc(1) = xc(1) - rotationpoint(1)
2571 call pushreal8(xxc(2))
2572 xxc(2) = xc(2) - rotationpoint(2)
2573 call pushreal8(xxc(3))
2574 xxc(3) = xc(3) - rotationpoint(3)
2579 call pushinteger4(i - 1)
2580 call pushinteger4(ad_from9)
2582 call pushinteger4(j - 1)
2583 call pushinteger4(ad_from10)
2584 call pushcontrol3b(1)
2586 call pushcontrol3b(0)
2594 derivrotationmatrixd = 0.0_8
2597 call popcontrol3b(branch)
2598 if (branch .lt. 3)
then
2599 if (branch .eq. 0)
then
2604 else if (branch .eq. 1)
then
2609 call popinteger4(ad_from10)
2610 call popinteger4(ad_to10)
2611 do j=ad_to10,ad_from10,-1
2612 call popinteger4(ad_from9)
2613 call popinteger4(ad_to9)
2614 do i=ad_to9,ad_from9,-1
2615 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
2616 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) &
2617 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
2618 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm&
2619 & )%uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(&
2620 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad&
2621 & (mm)%uslip(i, j, 1)
2622 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) &
2623 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
2624 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm&
2625 & )%uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(&
2626 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad&
2627 & (mm)%uslip(i, j, 1)
2628 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) &
2629 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
2630 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm&
2631 & )%uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(&
2632 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad&
2633 & (mm)%uslip(i, j, 1)
2634 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
2635 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) &
2636 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
2637 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) &
2638 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
2639 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) &
2640 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
2641 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
2642 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) &
2643 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
2644 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) &
2645 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
2646 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) &
2647 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
2648 call popreal8(xxc(3))
2649 xcd(3) = xcd(3) + xxcd(3)
2650 call popreal8(xxc(2))
2651 xcd(2) = xcd(2) + xxcd(2)
2652 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
2653 call popreal8(xxc(1))
2654 xcd(1) = xcd(1) + xxcd(1)
2655 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
2656 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, &
2658 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, &
2660 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
2661 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
2662 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, &
2664 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2&
2666 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, &
2668 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
2669 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, &
2671 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1&
2673 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, &
2675 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1&
2677 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
2678 call popreal8(xxc(3))
2679 xcd(3) = xcd(3) + xxcd(3)
2681 call popreal8(xxc(2))
2682 xcd(2) = xcd(2) + xxcd(2)
2684 call popreal8(xxc(1))
2685 xcd(1) = xcd(1) + xxcd(1)
2733 call popinteger4(ad_from8)
2734 call popinteger4(ad_to8)
2735 do j=ad_to8,ad_from8,-1
2736 call popinteger4(ad_from7)
2737 call popinteger4(ad_to7)
2738 do i=ad_to7,ad_from7,-1
2739 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
2740 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) &
2741 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
2742 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm&
2743 & )%uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(&
2744 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad&
2745 & (mm)%uslip(i, j, 1)
2746 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) &
2747 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
2748 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm&
2749 & )%uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(&
2750 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad&
2751 & (mm)%uslip(i, j, 1)
2752 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) &
2753 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
2754 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm&
2755 & )%uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(&
2756 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad&
2757 & (mm)%uslip(i, j, 1)
2758 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
2759 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) &
2760 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
2761 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) &
2762 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
2763 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) &
2764 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
2765 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
2766 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) &
2767 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
2768 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) &
2769 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
2770 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) &
2771 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
2772 call popreal8(xxc(3))
2773 xcd(3) = xcd(3) + xxcd(3)
2774 call popreal8(xxc(2))
2775 xcd(2) = xcd(2) + xxcd(2)
2776 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
2777 call popreal8(xxc(1))
2778 xcd(1) = xcd(1) + xxcd(1)
2779 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
2780 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, &
2782 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, &
2784 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
2785 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
2786 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, &
2788 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2&
2790 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, &
2792 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
2793 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, &
2795 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1&
2797 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, &
2799 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1&
2801 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
2802 call popreal8(xxc(3))
2803 xcd(3) = xcd(3) + xxcd(3)
2805 call popreal8(xxc(2))
2806 xcd(2) = xcd(2) + xxcd(2)
2808 call popreal8(xxc(1))
2809 xcd(1) = xcd(1) + xxcd(1)
2814 & flowdomsd(nn,
groundlevel, sps)%x(i, j, 1, 3) + tempd
2815 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 3) = &
2816 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 3) + &
2818 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 3) = &
2819 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 3) + &
2821 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 3) = &
2822 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 3) + &
2827 & flowdomsd(nn,
groundlevel, sps)%x(i, j, 1, 2) + tempd
2828 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 2) = &
2829 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 2) + &
2831 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 2) = &
2832 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 2) + &
2834 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 2) = &
2835 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 2) + &
2840 & flowdomsd(nn,
groundlevel, sps)%x(i, j, 1, 1) + tempd
2841 flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 1) = &
2842 & flowdomsd(nn,
groundlevel, sps)%x(i, j-1, 1, 1) + &
2844 flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 1) = &
2845 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j, 1, 1) + &
2847 flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 1) = &
2848 & flowdomsd(nn,
groundlevel, sps)%x(i-1, j-1, 1, 1) + &
2853 else if (branch .lt. 5)
then
2854 if (branch .eq. 3)
then
2859 call popinteger4(ad_from6)
2860 call popinteger4(ad_to6)
2861 do j=ad_to6,ad_from6,-1
2862 call popinteger4(ad_from5)
2863 call popinteger4(ad_to5)
2864 do i=ad_to5,ad_from5,-1
2865 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
2866 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) &
2867 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
2868 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm&
2869 & )%uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(&
2870 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad&
2871 & (mm)%uslip(i, j, 1)
2872 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) &
2873 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
2874 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm&
2875 & )%uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(&
2876 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad&
2877 & (mm)%uslip(i, j, 1)
2878 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) &
2879 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
2880 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm&
2881 & )%uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(&
2882 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad&
2883 & (mm)%uslip(i, j, 1)
2884 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
2885 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) &
2886 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
2887 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) &
2888 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
2889 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) &
2890 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
2891 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
2892 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) &
2893 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
2894 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) &
2895 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
2896 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) &
2897 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
2898 call popreal8(xxc(3))
2899 xcd(3) = xcd(3) + xxcd(3)
2900 call popreal8(xxc(2))
2901 xcd(2) = xcd(2) + xxcd(2)
2902 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
2903 call popreal8(xxc(1))
2904 xcd(1) = xcd(1) + xxcd(1)
2905 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
2906 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, &
2908 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, &
2910 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
2911 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
2912 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, &
2914 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2&
2916 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, &
2918 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
2919 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, &
2921 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1&
2923 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, &
2925 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1&
2927 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
2928 call popreal8(xxc(3))
2929 xcd(3) = xcd(3) + xxcd(3)
2931 call popreal8(xxc(2))
2932 xcd(2) = xcd(2) + xxcd(2)
2934 call popreal8(xxc(1))
2935 xcd(1) = xcd(1) + xxcd(1)
2983 call popinteger4(ad_from4)
2984 call popinteger4(ad_to4)
2985 do j=ad_to4,ad_from4,-1
2986 call popinteger4(ad_from3)
2987 call popinteger4(ad_to3)
2988 do i=ad_to3,ad_from3,-1
2989 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
2990 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) &
2991 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
2992 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm&
2993 & )%uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(&
2994 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad&
2995 & (mm)%uslip(i, j, 1)
2996 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) &
2997 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
2998 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm&
2999 & )%uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(&
3000 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad&
3001 & (mm)%uslip(i, j, 1)
3002 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) &
3003 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
3004 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm&
3005 & )%uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(&
3006 & mm)%uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad&
3007 & (mm)%uslip(i, j, 1)
3008 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
3009 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) &
3010 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
3011 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) &
3012 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
3013 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) &
3014 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
3015 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
3016 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) &
3017 & + xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
3018 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) &
3019 & + xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
3020 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) &
3021 & + xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
3022 call popreal8(xxc(3))
3023 xcd(3) = xcd(3) + xxcd(3)
3024 call popreal8(xxc(2))
3025 xcd(2) = xcd(2) + xxcd(2)
3026 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
3027 call popreal8(xxc(1))
3028 xcd(1) = xcd(1) + xxcd(1)
3029 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
3030 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, &
3032 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, &
3034 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
3035 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
3036 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, &
3038 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2&
3040 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, &
3042 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
3043 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, &
3045 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1&
3047 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, &
3049 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1&
3051 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
3052 call popreal8(xxc(3))
3053 xcd(3) = xcd(3) + xxcd(3)
3055 call popreal8(xxc(2))
3056 xcd(2) = xcd(2) + xxcd(2)
3058 call popreal8(xxc(1))
3059 xcd(1) = xcd(1) + xxcd(1)
3064 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j, 3) + tempd
3065 flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 3) = &
3066 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 3) + &
3068 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 3) = &
3069 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 3) + &
3071 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 3) = &
3072 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 3) + &
3077 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j, 2) + tempd
3078 flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 2) = &
3079 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 2) + &
3081 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 2) = &
3082 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 2) + &
3084 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 2) = &
3085 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 2) + &
3090 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j, 1) + tempd
3091 flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 1) = &
3092 & flowdomsd(nn,
groundlevel, sps)%x(i, 1, j-1, 1) + &
3094 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 1) = &
3095 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j, 1) + &
3097 flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 1) = &
3098 & flowdomsd(nn,
groundlevel, sps)%x(i-1, 1, j-1, 1) + &
3103 else if (branch .eq. 5)
then
3108 call popinteger4(ad_from2)
3109 call popinteger4(ad_to2)
3110 do j=ad_to2,ad_from2,-1
3111 call popinteger4(ad_from1)
3112 call popinteger4(ad_to1)
3113 do i=ad_to1,ad_from1,-1
3114 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
3115 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) + &
3116 & xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
3117 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm)%&
3118 & uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(mm)%&
3119 & uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad(mm)%&
3121 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) + &
3122 & xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
3123 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm)%&
3124 & uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(mm)%&
3125 & uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad(mm)%&
3127 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) + &
3128 & xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
3129 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm)%&
3130 & uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(mm)%&
3131 & uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad(mm)%&
3133 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
3134 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) + &
3135 & xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
3136 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) + &
3137 & xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
3138 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) + &
3139 & xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
3140 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
3141 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) + &
3142 & xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
3143 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) + &
3144 & xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
3145 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) + &
3146 & xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
3147 call popreal8(xxc(3))
3148 xcd(3) = xcd(3) + xxcd(3)
3149 call popreal8(xxc(2))
3150 xcd(2) = xcd(2) + xxcd(2)
3151 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
3152 call popreal8(xxc(1))
3153 xcd(1) = xcd(1) + xxcd(1)
3154 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
3155 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, j&
3157 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, j&
3159 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
3160 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
3161 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, j&
3163 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2)
3164 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, j&
3166 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
3167 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, j&
3169 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1)
3170 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, j&
3172 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1)
3173 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
3174 call popreal8(xxc(3))
3175 xcd(3) = xcd(3) + xxcd(3)
3177 call popreal8(xxc(2))
3178 xcd(2) = xcd(2) + xxcd(2)
3180 call popreal8(xxc(1))
3181 xcd(1) = xcd(1) + xxcd(1)
3223 call popinteger4(ad_from0)
3224 call popinteger4(ad_to0)
3225 do j=ad_to0,ad_from0,-1
3226 call popinteger4(ad_from)
3227 call popinteger4(ad_to)
3228 do i=ad_to,ad_from,-1
3229 velzgridd = velzgridd +
bcdatad(mm)%uslip(i, j, 3)
3230 derivrotationmatrixd(3, 1) = derivrotationmatrixd(3, 1) + &
3231 & xxc(1)*
bcdatad(mm)%uslip(i, j, 3)
3232 xxcd(1) = xxcd(1) + derivrotationmatrix(3, 1)*
bcdatad(mm)%&
3233 & uslip(i, j, 3) + derivrotationmatrix(2, 1)*
bcdatad(mm)%&
3234 & uslip(i, j, 2) + derivrotationmatrix(1, 1)*
bcdatad(mm)%&
3236 derivrotationmatrixd(3, 2) = derivrotationmatrixd(3, 2) + &
3237 & xxc(2)*
bcdatad(mm)%uslip(i, j, 3)
3238 xxcd(2) = xxcd(2) + derivrotationmatrix(3, 2)*
bcdatad(mm)%&
3239 & uslip(i, j, 3) + derivrotationmatrix(2, 2)*
bcdatad(mm)%&
3240 & uslip(i, j, 2) + derivrotationmatrix(1, 2)*
bcdatad(mm)%&
3242 derivrotationmatrixd(3, 3) = derivrotationmatrixd(3, 3) + &
3243 & xxc(3)*
bcdatad(mm)%uslip(i, j, 3)
3244 xxcd(3) = xxcd(3) + derivrotationmatrix(3, 3)*
bcdatad(mm)%&
3245 & uslip(i, j, 3) + derivrotationmatrix(2, 3)*
bcdatad(mm)%&
3246 & uslip(i, j, 2) + derivrotationmatrix(1, 3)*
bcdatad(mm)%&
3248 velygridd = velygridd +
bcdatad(mm)%uslip(i, j, 2)
3249 derivrotationmatrixd(2, 1) = derivrotationmatrixd(2, 1) + &
3250 & xxc(1)*
bcdatad(mm)%uslip(i, j, 2)
3251 derivrotationmatrixd(2, 2) = derivrotationmatrixd(2, 2) + &
3252 & xxc(2)*
bcdatad(mm)%uslip(i, j, 2)
3253 derivrotationmatrixd(2, 3) = derivrotationmatrixd(2, 3) + &
3254 & xxc(3)*
bcdatad(mm)%uslip(i, j, 2)
3255 velxgridd = velxgridd +
bcdatad(mm)%uslip(i, j, 1)
3256 derivrotationmatrixd(1, 1) = derivrotationmatrixd(1, 1) + &
3257 & xxc(1)*
bcdatad(mm)%uslip(i, j, 1)
3258 derivrotationmatrixd(1, 2) = derivrotationmatrixd(1, 2) + &
3259 & xxc(2)*
bcdatad(mm)%uslip(i, j, 1)
3260 derivrotationmatrixd(1, 3) = derivrotationmatrixd(1, 3) + &
3261 & xxc(3)*
bcdatad(mm)%uslip(i, j, 1)
3262 call popreal8(xxc(3))
3263 xcd(3) = xcd(3) + xxcd(3)
3264 call popreal8(xxc(2))
3265 xcd(2) = xcd(2) + xxcd(2)
3266 xxcd(2) = rotrate(1)*
bcdatad(mm)%uslip(i, j, 3)
3267 call popreal8(xxc(1))
3268 xcd(1) = xcd(1) + xxcd(1)
3269 xxcd(1) = -(rotrate(2)*
bcdatad(mm)%uslip(i, j, 3))
3270 rotrated(1) = rotrated(1) + xxc(2)*
bcdatad(mm)%uslip(i, j&
3272 rotrated(2) = rotrated(2) - xxc(1)*
bcdatad(mm)%uslip(i, j&
3274 bcdatad(mm)%uslip(i, j, 3) = 0.0_8
3275 xxcd(3) = -(rotrate(1)*
bcdatad(mm)%uslip(i, j, 2))
3276 rotrated(3) = rotrated(3) + xxc(1)*
bcdatad(mm)%uslip(i, j&
3278 xxcd(1) = xxcd(1) + rotrate(3)*
bcdatad(mm)%uslip(i, j, 2)
3279 rotrated(1) = rotrated(1) - xxc(3)*
bcdatad(mm)%uslip(i, j&
3281 bcdatad(mm)%uslip(i, j, 2) = 0.0_8
3282 rotrated(2) = rotrated(2) + xxc(3)*
bcdatad(mm)%uslip(i, j&
3284 xxcd(3) = xxcd(3) + rotrate(2)*
bcdatad(mm)%uslip(i, j, 1)
3285 rotrated(3) = rotrated(3) - xxc(2)*
bcdatad(mm)%uslip(i, j&
3287 xxcd(2) = xxcd(2) - rotrate(3)*
bcdatad(mm)%uslip(i, j, 1)
3288 bcdatad(mm)%uslip(i, j, 1) = 0.0_8
3289 call popreal8(xxc(3))
3290 xcd(3) = xcd(3) + xxcd(3)
3292 call popreal8(xxc(2))
3293 xcd(2) = xcd(2) + xxcd(2)
3295 call popreal8(xxc(1))
3296 xcd(1) = xcd(1) + xxcd(1)
3300 flowdomsd(nn,
groundlevel, sps)%x(1, i, j, 3) = flowdomsd(&
3302 flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 3) = &
3303 & flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 3) + tempd
3304 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 3) = &
3305 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 3) + tempd
3306 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 3) = &
3307 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 3) + &
3311 flowdomsd(nn,
groundlevel, sps)%x(1, i, j, 2) = flowdomsd(&
3313 flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 2) = &
3314 & flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 2) + tempd
3315 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 2) = &
3316 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 2) + tempd
3317 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 2) = &
3318 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 2) + &
3322 flowdomsd(nn,
groundlevel, sps)%x(1, i, j, 1) = flowdomsd(&
3324 flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 1) = &
3325 & flowdomsd(nn,
groundlevel, sps)%x(1, i, j-1, 1) + tempd
3326 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 1) = &
3327 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j, 1) + tempd
3328 flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 1) = &
3329 & flowdomsd(nn,
groundlevel, sps)%x(1, i-1, j-1, 1) + &
3334 velzgrid0d = velzgrid0d + velzgridd
3335 velygrid0d = velygrid0d + velygridd
3336 velxgrid0d = velxgrid0d + velxgridd
3337 call popreal8array(rotrate, 3)
3340 call popinteger4(ii)
3343 & derivrotationmatrixd, rotationpoint, t(1&
3394 integer(kind=inttype),
intent(in) :: sps, nn
3395 logical,
intent(in) :: useoldcoor
3396 real(kind=realtype),
dimension(*),
intent(in) :: t
3400 integer(kind=inttype) :: mm, i, j, level, ii
3401 real(kind=realtype) :: oneover4dt
3402 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
3403 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
3404 real(kind=realtype),
dimension(3) :: xc, xxc
3405 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
3406 real(kind=realtype),
dimension(3) :: rotationpoint
3407 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
3408 & derivrotationmatrix
3409 real(kind=realtype) :: tnew, told
3410 real(kind=realtype),
dimension(:, :, :),
pointer :: uslip
3411 real(kind=realtype),
dimension(:, :, :),
pointer :: xface
3412 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xfaceold
3413 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
3415 real(kind=realtype),
dimension(3) :: veldir
3416 real(kind=realtype),
dimension(3) :: refdirection
3419 if (.not.useoldcoor)
then
3446 velxgrid = velxgrid0
3447 velygrid = velygrid0
3448 velzgrid = velzgrid0
3461 & 1)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
3462 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 1)+flowdoms(&
3465 & 2)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
3466 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 2)+flowdoms(&
3469 & 3)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
3470 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 3)+flowdoms(&
3474 xxc(1) = xc(1) - rotcenter(1)
3475 xxc(2) = xc(2) - rotcenter(2)
3476 xxc(3) = xc(3) - rotcenter(3)
3479 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3481 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3483 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3487 xxc(1) = xc(1) - rotationpoint(1)
3488 xxc(2) = xc(2) - rotationpoint(2)
3489 xxc(3) = xc(3) - rotationpoint(3)
3493 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3494 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3495 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3497 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3498 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3499 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3501 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3502 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3503 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3528 xxc(1) = xc(1) - rotcenter(1)
3529 xxc(2) = xc(2) - rotcenter(2)
3530 xxc(3) = xc(3) - rotcenter(3)
3533 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3535 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3537 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3541 xxc(1) = xc(1) - rotationpoint(1)
3542 xxc(2) = xc(2) - rotationpoint(2)
3543 xxc(3) = xc(3) - rotationpoint(3)
3547 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3548 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3549 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3551 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3552 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3553 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3555 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3556 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3557 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3569 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
3570 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+flowdoms(&
3573 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
3574 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+flowdoms(&
3577 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
3578 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+flowdoms(&
3582 xxc(1) = xc(1) - rotcenter(1)
3583 xxc(2) = xc(2) - rotcenter(2)
3584 xxc(3) = xc(3) - rotcenter(3)
3587 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3589 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3591 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3595 xxc(1) = xc(1) - rotationpoint(1)
3596 xxc(2) = xc(2) - rotationpoint(2)
3597 xxc(3) = xc(3) - rotationpoint(3)
3601 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3602 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3603 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3605 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3606 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3607 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3609 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3610 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3611 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3636 xxc(1) = xc(1) - rotcenter(1)
3637 xxc(2) = xc(2) - rotcenter(2)
3638 xxc(3) = xc(3) - rotcenter(3)
3641 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3643 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3645 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3649 xxc(1) = xc(1) - rotationpoint(1)
3650 xxc(2) = xc(2) - rotationpoint(2)
3651 xxc(3) = xc(3) - rotationpoint(3)
3655 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3656 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3657 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3659 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3660 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3661 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3663 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3664 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3665 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3677 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
3678 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+flowdoms(&
3681 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
3682 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+flowdoms(&
3685 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
3686 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+flowdoms(&
3690 xxc(1) = xc(1) - rotcenter(1)
3691 xxc(2) = xc(2) - rotcenter(2)
3692 xxc(3) = xc(3) - rotcenter(3)
3695 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3697 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3699 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3703 xxc(1) = xc(1) - rotationpoint(1)
3704 xxc(2) = xc(2) - rotationpoint(2)
3705 xxc(3) = xc(3) - rotationpoint(3)
3709 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3710 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3711 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3713 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3714 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3715 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3717 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3718 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3719 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3744 xxc(1) = xc(1) - rotcenter(1)
3745 xxc(2) = xc(2) - rotcenter(2)
3746 xxc(3) = xc(3) - rotcenter(3)
3749 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
3751 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
3753 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
3757 xxc(1) = xc(1) - rotationpoint(1)
3758 xxc(2) = xc(2) - rotationpoint(2)
3759 xxc(3) = xc(3) - rotationpoint(3)
3763 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
3764 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
3765 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
3767 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
3768 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
3769 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
3771 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
3772 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
3773 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
3806 integer(kind=inttype),
intent(in) :: sps
3810 integer(kind=inttype) :: mm
3811 integer(kind=inttype) :: i, j
3812 real(kind=realtype) :: weight, mult
3813 real(kind=realtype) :: weightd
3814 real(kind=realtype),
dimension(:, :),
pointer :: sface
3815 real(kind=realtype),
dimension(:, :, :),
pointer :: ss
3816 intrinsic associated
3818 real(kind=realtype) :: temp
3819 real(kind=realtype) :: tempd
3820 real(kind=realtype) :: temp0
3821 real(kind=realtype) :: temp1
3822 real(kind=realtype) :: temp2
3823 real(kind=realtype) :: tempd0
3847 integer :: ad_from10
3866 if (
associated(
bcdata(mm)%rface))
then
3872 call pushreal8(mult)
3874 ad_from0 =
bcdata(mm)%jcbeg
3875 do j=ad_from0,
bcdata(mm)%jcend
3876 ad_from =
bcdata(mm)%icbeg
3877 do i=ad_from,
bcdata(mm)%icend
3880 call pushreal8(weight)
3881 weight = sqrt(
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si&
3883 if (weight .gt.
zero)
then
3884 call pushreal8(weight)
3885 weight = mult/weight
3886 call pushcontrol1b(0)
3888 call pushcontrol1b(1)
3891 call pushinteger4(i - 1)
3892 call pushinteger4(ad_from)
3894 call pushinteger4(j - 1)
3895 call pushinteger4(ad_from0)
3896 call pushcontrol3b(7)
3898 call pushreal8(mult)
3900 ad_from2 =
bcdata(mm)%jcbeg
3901 do j=ad_from2,
bcdata(mm)%jcend
3902 ad_from1 =
bcdata(mm)%icbeg
3903 do i=ad_from1,
bcdata(mm)%icend
3906 call pushreal8(weight)
3907 weight = sqrt(
si(
il, i, j, 1)**2 +
si(
il, i, j, 2)**2 + &
3908 &
si(
il, i, j, 3)**2)
3909 if (weight .gt.
zero)
then
3910 call pushreal8(weight)
3911 weight = mult/weight
3912 call pushcontrol1b(0)
3914 call pushcontrol1b(1)
3917 call pushinteger4(i - 1)
3918 call pushinteger4(ad_from1)
3920 call pushinteger4(j - 1)
3921 call pushinteger4(ad_from2)
3922 call pushcontrol3b(6)
3924 call pushreal8(mult)
3926 ad_from4 =
bcdata(mm)%jcbeg
3927 do j=ad_from4,
bcdata(mm)%jcend
3928 ad_from3 =
bcdata(mm)%icbeg
3929 do i=ad_from3,
bcdata(mm)%icend
3932 call pushreal8(weight)
3933 weight = sqrt(
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj&
3935 if (weight .gt.
zero)
then
3936 call pushreal8(weight)
3937 weight = mult/weight
3938 call pushcontrol1b(0)
3940 call pushcontrol1b(1)
3943 call pushinteger4(i - 1)
3944 call pushinteger4(ad_from3)
3946 call pushinteger4(j - 1)
3947 call pushinteger4(ad_from4)
3948 call pushcontrol3b(5)
3950 call pushreal8(mult)
3952 ad_from6 =
bcdata(mm)%jcbeg
3953 do j=ad_from6,
bcdata(mm)%jcend
3954 ad_from5 =
bcdata(mm)%icbeg
3955 do i=ad_from5,
bcdata(mm)%icend
3958 call pushreal8(weight)
3959 weight = sqrt(
sj(i,
jl, j, 1)**2 +
sj(i,
jl, j, 2)**2 + &
3960 &
sj(i,
jl, j, 3)**2)
3961 if (weight .gt.
zero)
then
3962 call pushreal8(weight)
3963 weight = mult/weight
3964 call pushcontrol1b(0)
3966 call pushcontrol1b(1)
3969 call pushinteger4(i - 1)
3970 call pushinteger4(ad_from5)
3972 call pushinteger4(j - 1)
3973 call pushinteger4(ad_from6)
3974 call pushcontrol3b(4)
3976 call pushreal8(mult)
3978 ad_from8 =
bcdata(mm)%jcbeg
3979 do j=ad_from8,
bcdata(mm)%jcend
3980 ad_from7 =
bcdata(mm)%icbeg
3981 do i=ad_from7,
bcdata(mm)%icend
3984 call pushreal8(weight)
3985 weight = sqrt(
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk&
3987 if (weight .gt.
zero)
then
3988 call pushreal8(weight)
3989 weight = mult/weight
3990 call pushcontrol1b(0)
3992 call pushcontrol1b(1)
3995 call pushinteger4(i - 1)
3996 call pushinteger4(ad_from7)
3998 call pushinteger4(j - 1)
3999 call pushinteger4(ad_from8)
4000 call pushcontrol3b(3)
4002 call pushreal8(mult)
4004 ad_from10 =
bcdata(mm)%jcbeg
4005 do j=ad_from10,
bcdata(mm)%jcend
4006 ad_from9 =
bcdata(mm)%icbeg
4007 do i=ad_from9,
bcdata(mm)%icend
4010 call pushreal8(weight)
4011 weight = sqrt(
sk(i, j,
kl, 1)**2 +
sk(i, j,
kl, 2)**2 + &
4012 &
sk(i, j,
kl, 3)**2)
4013 if (weight .gt.
zero)
then
4014 call pushreal8(weight)
4015 weight = mult/weight
4016 call pushcontrol1b(0)
4018 call pushcontrol1b(1)
4021 call pushinteger4(i - 1)
4022 call pushinteger4(ad_from9)
4024 call pushinteger4(j - 1)
4025 call pushinteger4(ad_from10)
4026 call pushcontrol3b(2)
4028 call pushcontrol3b(1)
4031 call pushcontrol3b(0)
4035 call popcontrol3b(branch)
4036 if (branch .lt. 4)
then
4037 if (branch .ge. 2)
then
4038 if (branch .eq. 2)
then
4039 call popinteger4(ad_from10)
4040 call popinteger4(ad_to10)
4041 do j=ad_to10,ad_from10,-1
4042 call popinteger4(ad_from9)
4043 call popinteger4(ad_to9)
4044 do i=ad_to9,ad_from9,-1
4048 bcdatad(mm)%rface(i, j) = 0.0_8
4049 call popcontrol1b(branch)
4050 if (branch .eq. 0)
then
4051 call popreal8(weight)
4052 weightd = -(mult*weightd/weight**2)
4054 call popreal8(weight)
4055 temp2 =
sk(i, j,
kl, 3)
4056 temp1 =
sk(i, j,
kl, 2)
4057 temp0 =
sk(i, j,
kl, 1)
4058 if (temp0**2 + temp1**2 + temp2**2 .eq. 0.0_8)
then
4061 tempd = weightd/(2.0*sqrt(temp0**2+temp1**2+temp2**2&
4064 skd(i, j,
kl, 1) =
skd(i, j,
kl, 1) + 2*temp0*tempd
4065 skd(i, j,
kl, 2) =
skd(i, j,
kl, 2) + 2*temp1*tempd
4066 skd(i, j,
kl, 3) =
skd(i, j,
kl, 3) + 2*temp2*tempd
4071 call popinteger4(ad_from8)
4072 call popinteger4(ad_to8)
4073 do j=ad_to8,ad_from8,-1
4074 call popinteger4(ad_from7)
4075 call popinteger4(ad_to7)
4076 do i=ad_to7,ad_from7,-1
4080 bcdatad(mm)%rface(i, j) = 0.0_8
4081 call popcontrol1b(branch)
4082 if (branch .eq. 0)
then
4083 call popreal8(weight)
4084 weightd = -(mult*weightd/weight**2)
4086 call popreal8(weight)
4087 if (
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk(i, j, 1&
4088 & , 3)**2 .eq. 0.0_8)
then
4091 tempd0 = weightd/(2.0*sqrt(
sk(i, j, 1, 1)**2+
sk(i, j&
4092 & , 1, 2)**2+
sk(i, j, 1, 3)**2))
4094 skd(i, j, 1, 1) =
skd(i, j, 1, 1) + 2*
sk(i, j, 1, 1)*&
4096 skd(i, j, 1, 2) =
skd(i, j, 1, 2) + 2*
sk(i, j, 1, 2)*&
4098 skd(i, j, 1, 3) =
skd(i, j, 1, 3) + 2*
sk(i, j, 1, 3)*&
4105 else if (branch .lt. 6)
then
4106 if (branch .eq. 4)
then
4107 call popinteger4(ad_from6)
4108 call popinteger4(ad_to6)
4109 do j=ad_to6,ad_from6,-1
4110 call popinteger4(ad_from5)
4111 call popinteger4(ad_to5)
4112 do i=ad_to5,ad_from5,-1
4116 bcdatad(mm)%rface(i, j) = 0.0_8
4117 call popcontrol1b(branch)
4118 if (branch .eq. 0)
then
4119 call popreal8(weight)
4120 weightd = -(mult*weightd/weight**2)
4122 call popreal8(weight)
4123 temp2 =
sj(i,
jl, j, 3)
4124 temp1 =
sj(i,
jl, j, 2)
4125 temp0 =
sj(i,
jl, j, 1)
4126 if (temp0**2 + temp1**2 + temp2**2 .eq. 0.0_8)
then
4129 tempd = weightd/(2.0*sqrt(temp0**2+temp1**2+temp2**2))
4131 sjd(i,
jl, j, 1) =
sjd(i,
jl, j, 1) + 2*temp0*tempd
4132 sjd(i,
jl, j, 2) =
sjd(i,
jl, j, 2) + 2*temp1*tempd
4133 sjd(i,
jl, j, 3) =
sjd(i,
jl, j, 3) + 2*temp2*tempd
4138 call popinteger4(ad_from4)
4139 call popinteger4(ad_to4)
4140 do j=ad_to4,ad_from4,-1
4141 call popinteger4(ad_from3)
4142 call popinteger4(ad_to3)
4143 do i=ad_to3,ad_from3,-1
4147 bcdatad(mm)%rface(i, j) = 0.0_8
4148 call popcontrol1b(branch)
4149 if (branch .eq. 0)
then
4150 call popreal8(weight)
4151 weightd = -(mult*weightd/weight**2)
4153 call popreal8(weight)
4154 if (
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj(i, 1, j, &
4155 & 3)**2 .eq. 0.0_8)
then
4158 tempd0 = weightd/(2.0*sqrt(
sj(i, 1, j, 1)**2+
sj(i, 1, &
4159 & j, 2)**2+
sj(i, 1, j, 3)**2))
4161 sjd(i, 1, j, 1) =
sjd(i, 1, j, 1) + 2*
sj(i, 1, j, 1)*&
4163 sjd(i, 1, j, 2) =
sjd(i, 1, j, 2) + 2*
sj(i, 1, j, 2)*&
4165 sjd(i, 1, j, 3) =
sjd(i, 1, j, 3) + 2*
sj(i, 1, j, 3)*&
4171 else if (branch .eq. 6)
then
4172 call popinteger4(ad_from2)
4173 call popinteger4(ad_to2)
4174 do j=ad_to2,ad_from2,-1
4175 call popinteger4(ad_from1)
4176 call popinteger4(ad_to1)
4177 do i=ad_to1,ad_from1,-1
4181 bcdatad(mm)%rface(i, j) = 0.0_8
4182 call popcontrol1b(branch)
4183 if (branch .eq. 0)
then
4184 call popreal8(weight)
4185 weightd = -(mult*weightd/weight**2)
4187 call popreal8(weight)
4188 temp =
si(
il, i, j, 3)
4189 temp0 =
si(
il, i, j, 2)
4190 temp1 =
si(
il, i, j, 1)
4191 if (temp1**2 + temp0**2 + temp**2 .eq. 0.0_8)
then
4194 tempd0 = weightd/(2.0*sqrt(temp1**2+temp0**2+temp**2))
4196 sid(
il, i, j, 1) =
sid(
il, i, j, 1) + 2*temp1*tempd0
4197 sid(
il, i, j, 2) =
sid(
il, i, j, 2) + 2*temp0*tempd0
4198 sid(
il, i, j, 3) =
sid(
il, i, j, 3) + 2*temp*tempd0
4203 call popinteger4(ad_from0)
4204 call popinteger4(ad_to0)
4205 do j=ad_to0,ad_from0,-1
4206 call popinteger4(ad_from)
4207 call popinteger4(ad_to)
4208 do i=ad_to,ad_from,-1
4212 bcdatad(mm)%rface(i, j) = 0.0_8
4213 call popcontrol1b(branch)
4214 if (branch .eq. 0)
then
4215 call popreal8(weight)
4216 weightd = -(mult*weightd/weight**2)
4218 call popreal8(weight)
4219 if (
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si(1, i, j, 3)&
4220 & **2 .eq. 0.0_8)
then
4223 tempd = weightd/(2.0*sqrt(
si(1, i, j, 1)**2+
si(1, i, j, &
4224 & 2)**2+
si(1, i, j, 3)**2))
4226 sid(1, i, j, 1) =
sid(1, i, j, 1) + 2*
si(1, i, j, 1)*tempd
4227 sid(1, i, j, 2) =
sid(1, i, j, 2) + 2*
si(1, i, j, 2)*tempd
4228 sid(1, i, j, 3) =
sid(1, i, j, 3) + 2*
si(1, i, j, 3)*tempd
4238 if (
associated(
bcdata(mm)%rface))
then
4239 call pushcontrol1b(1)
4241 call pushcontrol1b(0)
4245 call popcontrol1b(branch)
4246 if (branch .ne. 0)
bcdatad(mm)%rface = 0.0_8
4265 integer(kind=inttype),
intent(in) :: sps
4269 integer(kind=inttype) :: mm
4270 integer(kind=inttype) :: i, j
4271 real(kind=realtype) :: weight, mult
4272 real(kind=realtype),
dimension(:, :),
pointer :: sface
4273 real(kind=realtype),
dimension(:, :, :),
pointer :: ss
4274 intrinsic associated
4293 if (
associated(
bcdata(mm)%rface))
then
4304 weight = sqrt(
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si&
4306 if (weight .gt.
zero) weight = mult/weight
4318 weight = sqrt(
si(
il, i, j, 1)**2 +
si(
il, i, j, 2)**2 + &
4319 &
si(
il, i, j, 3)**2)
4320 if (weight .gt.
zero) weight = mult/weight
4332 weight = sqrt(
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj&
4334 if (weight .gt.
zero) weight = mult/weight
4346 weight = sqrt(
sj(i,
jl, j, 1)**2 +
sj(i,
jl, j, 2)**2 + &
4347 &
sj(i,
jl, j, 3)**2)
4348 if (weight .gt.
zero) weight = mult/weight
4360 weight = sqrt(
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk&
4362 if (weight .gt.
zero) weight = mult/weight
4374 weight = sqrt(
sk(i, j,
kl, 1)**2 +
sk(i, j,
kl, 2)**2 + &
4375 &
sk(i, j,
kl, 3)**2)
4376 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 derivativerotmatrixrigid(rotationmatrix, rotationpoint, t)
subroutine getdirvector(refdirection, alpha, beta, winddirection, liftindex)
subroutine derivativerotmatrixrigid_b(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_b(sps)
subroutine timestep_block(onlyradii)
subroutine slipvelocitiesfinelevel_block_b(useoldcoor, t, sps, nn)
subroutine cellfacevelocities(xc, rotcenter, rotrate, velxgrid, velygrid, velzgrid, derivrotationmatrix, sc)
subroutine gridvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine normalvelocities_block(sps)
subroutine gridvelocitiesfinelevel_block_b(useoldcoor, t, sps, nn)
subroutine timestep_block_b(onlyradii)
subroutine cellfacevelocities_b(xc, xcd, rotcenter, rotcenterd, rotrate, rotrated, velxgrid, velxgridd, velygrid, velygridd, velzgrid, velzgridd, derivrotationmatrix, derivrotationmatrixd, sc, scd)
subroutine slipvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine getdirangle(freestreamaxis, liftaxis, liftindex, alpha, beta)
subroutine rotmatrixrigidbody(tnew, told, rotationmatrix, rotationpoint)
subroutine setcoeftimeintegrator()
real(kind=realtype) function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
subroutine terminate(routinename, errormessage)
real(kind=realtype) function tsbeta(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
real(kind=realtype) function tsmach(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)