13 COMMON /scrhi/ h2inv(lx1,ly1,lz1,lelv)
14 COMMON /scrns/ resv1(lx1,ly1,lz1,lelv)
15 $ , resv2(lx1,ly1,lz1,lelv)
16 $ , resv3(lx1,ly1,lz1,lelv)
17 $ , dv1(lx1,ly1,lz1,lelv)
18 $ , dv2(lx1,ly1,lz1,lelv)
19 $ , dv3(lx1,ly1,lz1,lelv)
20 $ , wp(lx2,ly2,lz2,lelv)
21 COMMON /scrvh/ h1(lx1,ly1,lz1,lelv)
22 $ , h2(lx1,ly1,lz1,lelv)
23 REAL G1 (LX1,LY1,LZ1,LELV)
24 REAL G2 (LX1,LY1,LZ1,LELV)
25 REAL G3 (LX1,LY1,LZ1,LELV)
26 equivalence(g1,resv1), (g2,resv2), (g3,resv3)
40 CALL bcdirvc (vx,vy,vz,v1mask,v2mask,v3mask)
50 IF (nio.EQ.0)
WRITE (6,*)
51 $
'Steady state reached in the fluid solver'
57 ntot1 = lx1*ly1*lz1*nelv
58 ntot2 = lx2*ly2*lz2*nelv
60 if (iftran) intype = -1
62 if (iftran)
call invers2 (h2inv,h2,ntot1)
63 call makeg ( g1,g2,g3,h1,h2,intype)
64 call crespuz (wp,g1,g2,g3,h1,h2,h2inv,intype)
65 call uzawa (wp,h1,h2,h2inv,intype,icg)
66 if (icg.gt.0)
call add2 (pr,wp,ntot2)
70 call cresvuz (resv1,resv2,resv3)
71 call ophinv (dv1,dv2,dv3,resv1,resv2,resv3,h1,h2,tolhv,nmxv)
72 call opadd2 (vx,vy,vz,dv1,dv2,dv3)
79 subroutine crespuz (respr,g1,g2,g3,h1,h2,h2inv,intype)
85 REAL RESPR (LX2,LY2,LZ2,LELV)
86 REAL G1 (LX1,LY1,LZ1,LELV)
87 REAL G2 (LX1,LY1,LZ1,LELV)
88 REAL G3 (LX1,LY1,LZ1,LELV)
89 REAL H1 (LX1,LY1,LZ1,LELV)
90 REAL H2 (LX1,LY1,LZ1,LELV)
91 REAL H2INV (LX1,LY1,LZ1,LELV)
92 COMMON /scruz/ ta1(lx1,ly1,lz1,lelv)
93 $ , ta2(lx1,ly1,lz1,lelv)
94 $ , ta3(lx1,ly1,lz1,lelv)
95 COMMON /scrmg/ vbdry1(lx1,ly1,lz1,lelv)
96 $ , vbdry2(lx1,ly1,lz1,lelv)
97 $ , vbdry3(lx1,ly1,lz1,lelv)
99 if ((intype.eq.0).or.(intype.eq.-1))
then
100 call ophinv (ta1,ta2,ta3,g1,g2,g3,h1,h2,tolhr,nmxp)
102 call opbinv (ta1,ta2,ta3,g1,g2,g3,h2inv)
104 call opamask (vbdry1,vbdry2,vbdry3)
105 call opsub2 (ta1,ta2,ta3,vbdry1,vbdry2,vbdry3)
106 call opdiv (respr,ta1,ta2,ta3)
119 REAL RESV1 (LX1,LY1,LZ1,1)
120 REAL RESV2 (LX1,LY1,LZ1,1)
121 REAL RESV3 (LX1,LY1,LZ1,1)
122 COMMON /scrmg/ ta1(lx1,ly1,lz1,lelv)
123 $ , ta2(lx1,ly1,lz1,lelv)
124 $ , ta3(lx1,ly1,lz1,lelv)
125 COMMON /screv/ h1(lx1,ly1,lz1,lelv)
126 $ , h2(lx1,ly1,lz1,lelv)
130 CALL oprzero (resv1,resv2,resv3)
131 CALL opgradt (resv1,resv2,resv3,pr)
132 CALL opadd2 (resv1,resv2,resv3,bfx,bfy,bfz)
133 CALL ophx (ta1,ta2,ta3,vx,vy,vz,h1,h2)
134 CALL opsub2 (resv1,resv2,resv3,ta1,ta2,ta3)
139 subroutine makeg (out1,out2,out3,h1,h2,intype)
151 REAL OUT1 (LX1,LY1,LZ1,LELV)
152 REAL OUT2 (LX1,LY1,LZ1,LELV)
153 REAL OUT3 (LX1,LY1,LZ1,LELV)
154 REAL H1 (LX1,LY1,LZ1,LELV)
155 REAL H2 (LX1,LY1,LZ1,LELV)
156 COMMON /scrmg/ ta1(lx1,ly1,lz1,lelv)
157 $ ,ta2(lx1,ly1,lz1,lelv)
158 $ ,ta3(lx1,ly1,lz1,lelv)
159 COMMON /scruz/ tb1(lx1,ly1,lz1,lelv)
160 $ ,tb2(lx1,ly1,lz1,lelv)
161 $ ,tb3(lx1,ly1,lz1,lelv)
162 $ ,hzero(lx1,ly1,lz1,lelv)
164 ntot1 = lx1*ly1*lz1*nelv
166 CALL opgradt (out1,out2,out3,pr)
169 IF ((intype.EQ.0.).OR.(intype.EQ.-1))
THEN
174 CALL ophx (ta1,ta2,ta3,tb1,tb2,tb3,h1,h2)
175 CALL opadd2 (out1,out2,out3,ta1,ta2,ta3)
176 CALL opsub2 (out1,out2,out3,bfx,bfy,bfz)
178 ELSEIF (intype.EQ.1)
THEN
182 CALL rzero (hzero,ntot1)
183 CALL ophx (ta1,ta2,ta3,vx,vy,vz,h1,hzero)
184 CALL opadd2 (out1,out2,out3,ta1,ta2,ta3)
185 CALL opsub2 (out1,out2,out3,bfx,bfy,bfz)
200 REAL RESPR (LX2,LY2,LZ2,LELV)
201 COMMON /scrmg/ work(lx1,ly1,lz1,lelv)
203 ntot1 = lx1*ly1*lz1*nelv
204 CALL invcol3 (work,respr,bm1,ntot1)
205 CALL col2 (work,respr,ntot1)
206 rinit = sqrt(
glsum(work,ntot1)/volvm1)
207 IF (tolpdf.GT.0.)
THEN
212 tolmin = rinit*prelax
214 IF (tolspl.LT.tolmin)
THEN
218 $
WRITE (6,*)
'Relax the pressure tolerance ',tolspl,tolold
234 real respr (lx2,ly2,lz2,lelv)
235 integer*8 ntotg,nxyz2
241 if (ifield.eq.1)
then
243 rlam =
glsum(respr,ntot)/ntotg
244 call cadd (respr,-rlam,ntot)
246 elseif (ifield.eq.ifldmhd)
then
248 rlam =
glsum(respr,ntot)/ntotg
249 call cadd (respr,-rlam,ntot)
252 call exitti(
'ortho: unaccounted ifield = $',ifield)
266 REAL AP (LX2,LY2,LZ2,1)
267 REAL WP (LX2,LY2,LZ2,1)
268 REAL H1 (LX1,LY1,LZ1,1)
269 REAL H2 (LX1,LY1,LZ1,1)
270 REAL H2INV (LX1,LY1,LZ1,1)
272 COMMON /scrns/ ta1(lx1,ly1,lz1,lelv)
273 $ , ta2(lx1,ly1,lz1,lelv)
274 $ , ta3(lx1,ly1,lz1,lelv)
275 $ , tb1(lx1,ly1,lz1,lelv)
276 $ , tb2(lx1,ly1,lz1,lelv)
277 $ , tb3(lx1,ly1,lz1,lelv)
280 if ((intype.eq.0).or.(intype.eq.-1))
then
282 call ophinv (tb1,tb2,tb3,ta1,ta2,ta3,h1,h2,tolhin,nmxv)
286 CALL opbinv1(tb1,tb2,tb3,ta1,ta2,ta3,dtbdi)
288 CALL opbinv (tb1,tb2,tb3,ta1,ta2,ta3,h2inv)
291 call opdiv (ap,tb1,tb2,tb3)
309 REAL OUT1 (LX2,LY2,LZ2,1)
310 REAL OUT2 (LX2,LY2,LZ2,1)
311 REAL OUT3 (LX2,LY2,LZ2,1)
312 REAL INP (LX1,LY1,LZ1,1)
316 if (ifsplit .and. .not.ifaxis)
then
317 call wgradm1(out1,out2,out3,inp,nelv)
321 ntot2 = lx2*ly2*lz2*nelv
322 CALL multd (out1,inp,rxm2,sxm2,txm2,1,iflg)
323 CALL multd (out2,inp,rym2,sym2,tym2,2,iflg)
325 $
CALL multd (out3,inp,rzm2,szm2,tzm2,3,iflg)
330 subroutine cdtp (dtx,x,rm2,sm2,tm2,isd)
345 real dtx (lx1*ly1*lz1,lelv)
346 real x (lx2*ly2*lz2,lelv)
347 real rm2 (lx2*ly2*lz2,lelv)
348 real sm2 (lx2*ly2*lz2,lelv)
349 real tm2 (lx2*ly2*lz2,lelv)
351 common /ctmp1/ wx(lx1*ly1*lz1)
358 COMMON /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
359 LOGICAL IFDFRM, IFFAST, IFH2, IFSOLV
365 if (icalld.eq.0) tcdtp=0.0
386 call copy (iym12,iam12,ly12)
387 call copy (dym12,dam12,ly12)
388 call copy (w3m2,w2am2,nxyz2)
390 call copy (iym12,icm12,ly12)
391 call copy (dym12,dcm12,ly12)
392 call copy (w3m2,w2cm2,nxyz2)
399 call col3 (wx,bm1(1,1,1,e),x(1,e),nxyz1)
400 call invcol2(wx,jacm1(1,1,1,e),nxyz1)
402 if (.not.ifaxis)
call col3 (wx,w3m2,x(1,e),nxyz2)
406 call col3 (wx,x(1,e),bm2(1,1,1,e),nxyz2)
407 call invcol2 (wx,jacm2(1,1,1,e),nxyz2)
409 call col3 (wx,w3m2,x(1,e),nxyz2)
410 call col2 (wx,ym2(1,1,1,e),nxyz2)
416 if (.not.ifdfrm(e) .and. ifalgn(e))
then
418 if ( ifrsxy(e).and.isd.eq.1 .or.
419 $ .not.ifrsxy(e).and.isd.eq.2)
then
421 call col3 (ta1,wx,rm2(1,e),nxyz2)
422 call mxm (dxtm12,lx1,ta1,lx2,ta2,nyz2)
423 call mxm (ta2,lx1,iym12,ly2,dtx(1,e),ly1)
425 call col3 (ta1,wx,sm2(1,e),nxyz2)
426 call mxm (ixtm12,lx1,ta1,lx2,ta2,nyz2)
427 call mxm (ta2,lx1,dym12,ly2,dtx(1,e),ly1)
430 call col3 (ta1,wx,rm2(1,e),nxyz2)
431 call mxm (dxtm12,lx1,ta1,lx2,ta2,nyz2)
432 call mxm (ta2,lx1,iym12,ly2,dtx(1,e),ly1)
434 call col3 (ta1,wx,sm2(1,e),nxyz2)
435 call mxm (ixtm12,lx1,ta1,lx2,ta2,nyz2)
436 call mxm (ta2,lx1,dym12,ly2,ta1,ly1)
438 call add2 (dtx(1,e),ta1,nxyz1)
444 call col3 (ta1,wx,rm2(1,e),nxyz2)
445 call mxm (dxtm12,lx1,ta1,lx2,dtx(1,e),nyz2)
446 call col3 (ta1,wx,sm2(1,e),nxyz2)
450 call mxm (ta1(i2),lx1,dym12,ly2,ta2(i1),ly1)
454 call add2 (dtx(1,e),ta2,nxyz1)
455 call col3 (ta1,wx,tm2(1,e),nxyz2)
456 call mxm (ta1,nxy1,dzm12,lz2,ta2,lz1)
457 call add2 (dtx(1,e),ta2,nxyz1)
461 call col3 (ta1,wx,rm2(1,e),nxyz2)
462 call mxm (dxtm12,lx1,ta1,lx2,ta2,nyz2)
466 call mxm (ta2(i2),lx1,iym12,ly2,ta1(i1),ly1)
470 call mxm (ta1,nxy1,izm12,lz2,dtx(1,e),lz1)
472 call col3 (ta1,wx,sm2(1,e),nxyz2)
473 call mxm (ixtm12,lx1,ta1,lx2,ta2,nyz2)
477 call mxm (ta2(i2),lx1,dym12,ly2,ta1(i1),ly1)
481 call mxm (ta1,nxy1,izm12,lz2,ta2,lz1)
482 call add2 (dtx(1,e),ta2,nxyz1)
484 call col3 (ta1,wx,tm2(1,e),nxyz2)
485 call mxm (ixtm12,lx1,ta1,lx2,ta2,nyz2)
489 call mxm (ta2(i2),lx1,iym12,ly2,ta1(i1),ly1)
493 call mxm (ta1,nxy1,dzm12,lz2,ta2,lz1)
494 call add2 (dtx(1,e),ta2,nxyz1)
507 if (ifaxis.and.(isd.eq.4))
then
508 call copy (ta1,x(1,e),nxyz1)
511 call mxm (x(1,e),lx1,datm1,ly1,duax,1)
512 call copy (ta1,duax,lx1)
514 call col2 (ta1,baxm1(1,1,1,e),nxyz1)
515 call add2 (dtx(1,e),ta1,nxyz1)
520 if (ifaxis.and.(isd.eq.2))
then
521 call col3 (ta1,x(1,e),bm2(1,1,1,e),nxyz2)
522 call invcol2 (ta1,ym2(1,1,1,e),nxyz2)
523 call mxm (ixtm12,lx1,ta1,lx2,ta2,ly2)
524 call mxm (ta2,lx1,iym12,ly2,ta1,ly1)
525 call add2 (dtx(1,e),ta1,nxyz1)
538 subroutine multd (dx,x,rm2,sm2,tm2,isd,iflg)
560 real dx (lx2*ly2*lz2,lelv)
561 real x (lx1*ly1*lz1,lelv)
562 real rm2 (lx2*ly2*lz2,lelv)
563 real sm2 (lx2*ly2*lz2,lelv)
564 real tm2 (lx2*ly2*lz2,lelv)
566 common /ctmp1/ ta1(lx1*ly1*lz1)
572 common /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
573 logical ifdfrm, iffast, ifh2, ifsolv
579 if (icalld.eq.0) tmltd=0.0
600 call copy (iytm12,iatm12,ly12)
601 call copy (dytm12,datm12,ly12)
602 call copy (w3m2,w2am2,nxyz2)
604 call copy (iytm12,ictm12,ly12)
605 call copy (dytm12,dctm12,ly12)
606 call copy (w3m2,w2cm2,nxyz2)
611 if (.not.ifdfrm(e) .and. ifalgn(e))
then
613 if ( ifrsxy(e).and.isd.eq.1 .or.
614 $ .not.ifrsxy(e).and.isd.eq.2)
then
615 call mxm (dxm12,lx2,x(1,e),lx1,ta1,nyz1)
616 call mxm (ta1,lx2,iytm12,ly1,dx(1,e),ly2)
617 call col2 (dx(1,e),rm2(1,e),nxyz2)
619 call mxm (ixm12,lx2,x(1,e),lx1,ta1,nyz1)
620 call mxm (ta1,lx2,dytm12,ly1,dx(1,e),ly2)
621 call col2 (dx(1,e),sm2(1,e),nxyz2)
624 call mxm (dxm12,lx2,x(1,e),lx1,ta1,nyz1)
625 call mxm (ta1,lx2,iytm12,ly1,dx(1,e),ly2)
626 call col2 (dx(1,e),rm2(1,e),nxyz2)
627 call mxm (ixm12,lx2,x(1,e),lx1,ta1,nyz1)
628 call mxm (ta1,lx2,dytm12,ly1,ta3,ly2)
629 call addcol3 (dx(1,e),ta3,sm2(1,e),nxyz2)
651 call mxm (dxm12,lx2,x(1,e),lx1,ta1,nyz1)
655 call mxm (ta1(i1),lx2,iytm12,ly1,ta2(i2),ly2)
659 call mxm (ta2,nxy2,iztm12,lz1,dx(1,e),lz2)
660 call col2 (dx(1,e),rm2(1,e),nxyz2)
662 call mxm (ixm12,lx2,x(1,e),lx1,ta3,nyz1)
666 call mxm (ta3(i1),lx2,dytm12,ly1,ta2(i2),ly2)
670 call mxm (ta2,nxy2,iztm12,lz1,ta1,lz2)
671 call addcol3 (dx(1,e),ta1,sm2(1,e),nxyz2)
677 call mxm (ta3(i1),lx2,iytm12,ly1,ta2(i2),ly2)
681 call mxm (ta2,nxy2,dztm12,lz1,ta3,lz2)
682 call addcol3 (dx(1,e),ta3,tm2(1,e),nxyz2)
690 call col2 (dx(1,e),bm1(1,1,1,e),nxyz1)
691 call invcol2(dx(1,e),jacm1(1,1,1,e),nxyz1)
693 if (.not.ifaxis)
call col2 (dx(1,e),w3m2,nxyz2)
696 call col2 (dx(1,e),bm2(1,1,1,e),nxyz2)
697 call invcol2 (dx(1,e),jacm2(1,1,1,e),nxyz2)
699 call col2 (dx(1,e),w3m2,nxyz2)
700 call col2 (dx(1,e),ym2(1,1,1,e),nxyz2)
711 if (ifaxis.and.(isd.eq.2).and.iflg.eq.1)
then
712 call copy (ta3,x(1,e),nxyz1)
715 call mxm (x(1,e),lx1,datm1,ly1,duax,1)
716 call copy (ta3,duax,lx1)
718 call col2 (ta3,baxm1(1,1,1,e),nxyz1)
719 call add2 (dx(1,e),ta3,nxyz2)
724 if (ifaxis.and.(isd.eq.2))
then
725 call mxm (ixm12,lx2,x(1,e),lx1,ta1,ly1)
726 call mxm (ta1,lx2,iytm12,ly1,ta2,ly2)
727 call col3 (ta3,bm2(1,1,1,e),ta2,nxyz2)
728 call invcol2 (ta3,ym2(1,1,1,e),nxyz2)
729 call add2 (dx(1,e),ta3,nxyz2)
742 subroutine ophx (out1,out2,out3,inp1,inp2,inp3,h1,h2)
751 REAL OUT1 (LX1,LY1,LZ1,1)
752 REAL OUT2 (LX1,LY1,LZ1,1)
753 REAL OUT3 (LX1,LY1,LZ1,1)
754 REAL INP1 (LX1,LY1,LZ1,1)
755 REAL INP2 (LX1,LY1,LZ1,1)
756 REAL INP3 (LX1,LY1,LZ1,1)
757 REAL H1 (LX1,LY1,LZ1,1)
758 REAL H2 (LX1,LY1,LZ1,1)
764 CALL axhmsf (out1,out2,out3,inp1,inp2,inp3,h1,h2,matmod)
766 CALL axhelm (out1,inp1,h1,h2,imesh,1)
767 CALL axhelm (out2,inp2,h1,h2,imesh,2)
769 $
CALL axhelm (out3,inp3,h1,h2,imesh,3)
775 subroutine opbinv (out1,out2,out3,inp1,inp2,inp3,h2inv)
798 if (isclld.eq.0)
then
802 rname(myrout) =
'opbinv'
806 call opmask (inp1,inp2,inp3)
809 ntot=lx1*ly1*lz1*nelv
812 isbcnt = ntot*(1+ldim)
813 dct(myrout) = dct(myrout) + (isbcnt)
814 ncall(myrout) = ncall(myrout) + 1
815 dcount = dcount + (isbcnt)
818 call invcol3 (out1,bm1,h2inv,ntot)
819 call dssum (out1,lx1,ly1,lz1)
838 subroutine opbinv1(out1,out2,out3,inp1,inp2,inp3,SCALE)
860 if (isclld.eq.0)
then
864 rname(myrout) =
'opbnv1'
868 CALL opmask (inp1,inp2,inp3)
871 ntot=lx1*ly1*lz1*nelv
874 isbcnt = ntot*(1+ldim)
875 dct(myrout) = dct(myrout) + (isbcnt)
876 ncall(myrout) = ncall(myrout) + 1
877 dcount = dcount + (isbcnt)
882 tmp =binvm1(i,1,1,1)*
scale
889 tmp =binvm1(i,1,1,1)*
scale
898 subroutine uzprec (rpcg,rcg,h1m1,h2m1,intype,wp)
911 REAL RPCG (LX2,LY2,LZ2,LELV)
912 REAL RCG (LX2,LY2,LZ2,LELV)
913 REAL WP (LX2,LY2,LZ2,LELV)
914 REAL H1M1 (LX1,LY1,LZ1,LELV)
915 REAL H2M1 (LX1,LY1,LZ1,LELV)
916 COMMON /scrch/ h1m2(lx2,ly2,lz2,lelv)
917 $ , h2m2(lx2,ly2,lz2,lelv)
923 integer*8 ntotg,nxyz2
925 ntot2 = lx2*ly2*lz2*nelv
926 if (istep.ne.kstep .and. .not.ifanls)
then
929 CALL map12 (h1m2(1,1,1,ie),h1m1(1,1,1,ie),ie)
930 CALL map12 (h2m2(1,1,1,ie),h2m1(1,1,1,ie),ie)
934 IF (intype.EQ.0)
THEN
935 CALL col3 (wp,rcg,h1m2,ntot2)
936 CALL col3 (rpcg,wp,bm2inv,ntot2)
937 ELSEIF (intype.EQ.-1)
THEN
939 CALL col2 (wp,h2m2,ntot2)
940 CALL col3 (rpcg,rcg,bm2inv,ntot2)
941 CALL col2 (rpcg,h1m2,ntot2)
942 CALL add2 (rpcg,wp,ntot2)
943 ELSEIF (intype.EQ.1)
THEN
947 CALL cmult (rpcg,dtbd,ntot2)
953 CALL copy (rpcg,rcg,ntot2)
978 REAL Z2 (LX2,LY2,LZ2,LELV)
979 REAL R2 (LX2,LY2,LZ2,LELV)
980 COMMON /scrns/ mask(lx1,ly1,lz1,lelv)
981 $ ,r1(lx1,ly1,lz1,lelv)
982 $ ,x1(lx1,ly1,lz1,lelv)
983 $ ,w2(lx2,ly2,lz2,lelv)
984 $ ,h1(lx1,ly1,lz1,lelv)
985 $ ,h2(lx1,ly1,lz1,lelv)
987 COMMON /cprint/ ifprint, ifhzpc
988 LOGICAL IFPRINT, IFHZPC
994 ntot2 = lx2*ly2*lz2*nelv
999 CALL col3 (w2,r2,bm2inv,ntot2)
1000 rinit = sqrt(
glsc2(w2,r2,ntot2)/volvm2)
1007 CALL map21e (r1(1,1,1,iel),r2(1,1,1,iel),iel)
1011 otr1 =
glsum(r1,ntot1)
1012 call rone (x1,ntot1)
1014 call add2s2 (r1,x1,c2,ntot1)
1016 otr1 =
glsum(r1,ntot1)
1017 tolmin = 10.*abs(otr1)
1018 IF (tol .LT. tolmin)
THEN
1020 $
write(6,*)
'Resetting tol in EPREC:(old,new)',tol,tolmin
1025 CALL rone (h1,ntot1)
1026 CALL rzero (h2,ntot1)
1028 CALL hmholtz (
'PREC',x1,r1,h1,h2,pmask,vmult,imesh,tol,nmxp,1)
1032 CALL map12 (z2(1,1,1,iel),x1(1,1,1,iel),iel)
1048 REAL wrk1(2),wrk2(2)
1050 ntot2 = lx2*ly2*lz2*nelv
1051 wrk1(1) =
vlsc21(res,bm2inv,ntot2)
1052 wrk1(2) =
vlsc2(res,z ,ntot2)
1053 call gop(wrk1,wrk2,
'+ ',2)
1054 rbnorm = sqrt(wrk1(1)/volvm2)
1062 IF (rbnorm.LT.tol) iconv=1
1074 REAL RES (LX2,LY2,LZ2,LELV)
1075 COMMON /scrmg/ ta(lx2,ly2,lz2,lelv)
1076 $ , tb(lx2,ly2,lz2,lelv)
1079 ntot2 = lx2*ly2*lz2*nelv
1080 CALL col3 (ta,res,bm2inv,ntot2)
1081 CALL col3 (tb,ta,ta,ntot2)
1082 rbnorm = sqrt(
glsc2(bm2,tb,ntot2)/volvm2)
1085 IF (rbnorm.LT.tol) iconv=1
1102 REAL RES (LX2,LY2,LZ2,LELV)
1103 COMMON /ctmp0/ ta(lx2,ly2,lz2,lelv)
1104 $ , tb(lx2,ly2,lz2,lelv)
1105 COMMON /cprint/ ifprint
1116 IF (diff.EQ.0.) eps = 1.e-5
1117 IF (diff.GT.0.) eps = 1.e-10
1121 IF (prelax.NE.0.) eps = prelax
1123 ntot2 = lx2*ly2*lz2*nelv
1124 CALL col3 (ta,res,bm2inv,ntot2)
1125 CALL col3 (tb,ta,ta,ntot2)
1126 CALL col2 (tb,bm2,ntot2)
1127 rinit = sqrt(
glsum(tb,ntot2)/volvm2 )
1128 IF (rinit.LT.tol)
THEN
1132 IF (tolpdf.GT.0.)
THEN
1137 IF (tol.LT.rmin)
THEN
1140 IF (nio.EQ.0 .AND. ifprint)
WRITE (6,*)
1141 $
'New CG2-tolerance (RINIT*10-5/10-10) = ',tol,tolold
1144 otr =
glsum(res,ntot2)
1145 tolmin = abs(otr)*100.
1146 IF (tol .LT. tolmin)
THEN
1149 IF (nio.EQ.0 .AND. ifprint)
1150 $
WRITE (6,*)
'New CG2-tolerance (OTR) = ',tolmin,tolold
1156 subroutine dudxyz (du,u,rm1,sm1,tm1,jm1,imsh,isd)
1174 REAL DU (LX1,LY1,LZ1,1)
1175 REAL U (LX1,LY1,LZ1,1)
1176 REAL RM1 (LX1,LY1,LZ1,1)
1177 REAL SM1 (LX1,LY1,LZ1,1)
1178 REAL TM1 (LX1,LY1,LZ1,1)
1179 REAL JM1 (LX1,LY1,LZ1,1)
1181 COMMON /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
1182 LOGICAL IFDFRM, IFFAST, IFH2, IFSOLV
1184 REAL DRST(LX1,LY1,LZ1)
1186 IF (imsh.EQ.1) nel = nelv
1187 IF (imsh.EQ.2) nel = nelt
1195 IF (ifaxis)
CALL setaxdy (ifrzer(iel) )
1198 CALL mxm (dxm1,lx1,u(1,1,1,iel),lx1,du(1,1,1,iel),nyz1)
1199 CALL col2 (du(1,1,1,iel),rm1(1,1,1,iel),nxyz1)
1200 CALL mxm (u(1,1,1,iel),lx1,dytm1,ly1,drst,ly1)
1201 CALL addcol3 (du(1,1,1,iel),drst,sm1(1,1,1,iel),nxyz1)
1203 CALL mxm (dxm1,lx1,u(1,1,1,iel),lx1,du(1,1,1,iel),nyz1)
1204 CALL col2 (du(1,1,1,iel),rm1(1,1,1,iel),nxyz1)
1206 CALL mxm (u(1,1,iz,iel),lx1,dytm1,ly1,drst(1,1,iz),ly1)
1208 CALL addcol3 (du(1,1,1,iel),drst,sm1(1,1,1,iel),nxyz1)
1209 CALL mxm (u(1,1,1,iel),nxy1,dztm1,lz1,drst,lz1)
1210 CALL addcol3 (du(1,1,1,iel),drst,tm1(1,1,1,iel),nxyz1)
1216 CALL col2 (du,jacmi,ntot)
1241 COMMON /scrch/ cmask1(lx1,ly1,lz1,lelv)
1242 $ , cmask2(lx1,ly1,lz1,lelv)
1243 COMMON /ctmp1/
mfi(lx1,ly1,lz1,lelv)
1244 $ , dmfi(lx1,ly1,lz1,lelv)
1245 $ , mdmfi(lx1,ly1,lz1,lelv)
1250 REAL CONV (LX1,LY1,LZ1,1)
1251 REAL FI (LX1,LY1,LZ1,1)
1255 ntot1 = lx1*ly1*lz1*nelv
1256 ntotz = lx1*ly1*lz1*nelt
1258 CALL rzero (conv,ntotz)
1260 IF (param(86).EQ.0.0)
THEN
1262 CALL conv1 (conv,fi)
1268 CALL cmask (cmask1,cmask2)
1270 CALL col3 (mfi,fi,cmask1,ntot1)
1271 CALL conv1 (dmfi,mfi)
1272 CALL col3 (mdmfi,dmfi,cmask1,ntot1)
1273 CALL add2s2 (conv,mdmfi,0.5,ntot1)
1275 CALL col3 (mdmfi,dmfi,cmask2,ntot1)
1276 CALL add2 (conv,mdmfi,ntot1)
1278 CALL conv2 (dmfi,mfi)
1279 CALL col3 (mdmfi,dmfi,cmask1,ntot1)
1280 CALL add2s2 (conv,mdmfi,-0.5,ntot1)
1282 CALL col3 (mfi,fi,cmask2,ntot1)
1283 CALL conv1 (dmfi,mfi)
1284 CALL col3 (mdmfi,dmfi,cmask2,ntot1)
1285 CALL add2s2 (conv,mdmfi,0.5,ntot1)
1287 CALL conv2 (dmfi,mfi)
1288 CALL col3 (mdmfi,dmfi,cmask1,ntot1)
1289 CALL add2s2 (conv,mdmfi,-1.,ntot1)
1291 CALL col3 (mdmfi,dmfi,cmask2,ntot1)
1292 CALL add2s2 (conv,mdmfi,0.5,ntot1)
1306 REAL DTFI (LX1,LY1,LZ1,1)
1307 REAL FI (LX1,LY1,LZ1,1)
1308 COMMON /scrns/ ta1(lx1,ly1,lz1,lelv)
1309 $ , ta2(lx1,ly1,lz1,lelv)
1310 $ , ta3(lx1,ly1,lz1,lelv)
1311 $ , tb1(lx1,ly1,lz1,lelv)
1312 $ , tb2(lx1,ly1,lz1,lelv)
1313 $ , tb3(lx1,ly1,lz1,lelv)
1318 ntot1 = lx1*ly1*lz1*nelv
1320 CALL rzero(dtfi,ntot1)
1322 IF (ldim .EQ. 2)
THEN
1326 CALL col4 (ta1,rxm1,vx,fi,ntot1)
1327 CALL col4 (ta2,rym1,vy,fi,ntot1)
1328 CALL add2 (ta1,ta2,ntot1)
1330 CALL col2 (ta1(1,1,1,iel),w3m1,nxyz1)
1331 CALL mxm (dxtm1,lx1,ta1(1,1,1,iel),lx1,tb1(1,1,1,iel),ly1)
1333 CALL copy(dtfi,tb1,ntot1)
1335 CALL col4 (ta1,sxm1,vx,fi,ntot1)
1336 CALL col4 (ta2,sym1,vy,fi,ntot1)
1337 CALL add2 (ta1,ta2,ntot1)
1339 CALL col2 (ta1(1,1,1,iel),w3m1,nxyz1)
1340 CALL mxm (ta1(1,1,1,iel),lx1,dym1,ly1,tb1(1,1,1,iel),ly1)
1342 CALL add2 (dtfi,tb1,ntot1)
1349 CALL col4 (ta1,rxm1,vx,fi,ntot1)
1350 CALL col4 (ta2,rym1,vy,fi,ntot1)
1351 CALL col4 (ta3,rzm1,vz,fi,ntot1)
1352 CALL add2 (ta1,ta2,ntot1)
1353 CALL add2 (ta1,ta3,ntot1)
1355 CALL col2 (ta1(1,1,1,iel),w3m1,nxyz1)
1356 CALL mxm (dxtm1,lx1,ta1(1,1,1,iel),lx1,tb1(1,1,1,iel),nyz1)
1358 CALL copy(dtfi,tb1,ntot1)
1360 CALL col4 (ta1,sxm1,vx,fi,ntot1)
1361 CALL col4 (ta2,sym1,vy,fi,ntot1)
1362 CALL col4 (ta3,szm1,vz,fi,ntot1)
1363 CALL add2 (ta1,ta2,ntot1)
1364 CALL add2 (ta1,ta3,ntot1)
1366 CALL col2 (ta1(1,1,1,iel),w3m1,nxyz1)
1368 CALL mxm (ta1(1,1,iz,iel),lx1,dym1,ly1,tb1(1,1,iz,iel),ly1)
1371 CALL add2 (dtfi,tb1,ntot1)
1373 CALL col4 (ta1,txm1,vx,fi,ntot1)
1374 CALL col4 (ta2,tym1,vy,fi,ntot1)
1375 CALL col4 (ta3,tzm1,vz,fi,ntot1)
1376 CALL add2 (ta1,ta2,ntot1)
1377 CALL add2 (ta1,ta3,ntot1)
1379 CALL col2 (ta1(1,1,1,iel),w3m1,nxyz1)
1380 CALL mxm (ta1(1,1,1,iel),nxy1,dzm1,lz1,tb1(1,1,1,iel),lz1)
1382 CALL add2 (dtfi,tb1,ntot1)
1405 REAL CMASK1 (LX1,LY1,LZ1,LELV)
1406 REAL CMASK2 (LX1,LY1,LZ1,LELV)
1410 ntot1 = lx1*ly1*lz1*nelv
1412 CALL cfill (cmask1,1.,ntot1)
1413 CALL cfill (cmask2,0.,ntot1)
1415 DO 100 iface=1,nfaces
1416 cb = cbc(iface,iel,ifield)
1417 IF (cb.EQ.
'O' .OR. cb.EQ.
'o')
THEN
1418 CALL facev (cmask1,iel,iface,0.,lx1,ly1,lz1)
1419 CALL facev (cmask2,iel,iface,1.,lx1,ly1,lz1)
1447 if (ifexplvis.and.ifsplit)
call makevis
1448 if (ifnav .and..not.ifchar)
call advab
1449 if (ifmvbd.and..not.ifchar)
call admeshv
1451 if ((iftran.and..not.ifchar).or.
1452 $ (iftran.and..not.ifnav.and.ifchar))
call makebdf
1453 if (ifnav.and.ifchar)
call advchar
1475 CALL nekuf (bfx,bfy,bfz)
1476 CALL opcolv (bfx,bfy,bfz,bm1)
1488 REAL F1 (LX1,LY1,LZ1,LELV)
1489 REAL F2 (LX1,LY1,LZ1,LELV)
1490 REAL F3 (LX1,LY1,LZ1,LELV)
1502 if (optlevel.le.2)
CALL nekasgn (i,j,k,iel)
1503 CALL userf (i,j,k,ielg)
1528 COMMON /scruz/ ta1(lx1,ly1,lz1,lelv)
1529 $ , ta2(lx1,ly1,lz1,lelv)
1530 $ , ta3(lx1,ly1,lz1,lelv)
1532 ntot1 = lx1*ly1*lz1*nelv
1535 CALL subcol3 (bfx,bm1,ta1,ntot1)
1536 CALL subcol3 (bfy,bm1,ta2,ntot1)
1538 CALL rzero (ta3,ntot1)
1541 CALL subcol3 (bfz,bm1,ta3,ntot1)
1559 COMMON /scrns/ ta1(lx1,ly1,lz1,lelv)
1560 $ , ta2(lx1,ly1,lz1,lelv)
1561 $ , ta3(lx1,ly1,lz1,lelv)
1562 $ , tb1(lx1,ly1,lz1,lelv)
1563 $ , tb2(lx1,ly1,lz1,lelv)
1564 $ , tb3(lx1,ly1,lz1,lelv)
1565 $ , h2(lx1,ly1,lz1,lelv)
1567 ntot1 = lx1*ly1*lz1*nelv
1571 call cfill(h2,const,ntot1)
1573 call cmult2(h2,vtrans(1,1,1,1,ifield),const,ntot1)
1576 CALL opcolv3c (tb1,tb2,tb3,vx,vy,vz,bm1,bd(2))
1580 CALL opcolv3c(ta1,ta2,ta3,vxlag(1,1,1,1,ilag-1),
1581 $ vylag(1,1,1,1,ilag-1),
1582 $ vzlag(1,1,1,1,ilag-1),
1583 $ bm1lag(1,1,1,1,ilag-1),bd(ilag+1))
1585 CALL opcolv3c(ta1,ta2,ta3,vxlag(1,1,1,1,ilag-1),
1586 $ vylag(1,1,1,1,ilag-1),
1587 $ vzlag(1,1,1,1,ilag-1),
1590 CALL opadd2 (tb1,tb2,tb3,ta1,ta2,ta3)
1592 CALL opadd2col (bfx,bfy,bfz,tb1,tb2,tb3,h2)
1608 COMMON /scruz/ ta1(lx1,ly1,lz1,lelv)
1609 $ , ta2(lx1,ly1,lz1,lelv)
1610 $ , ta3(lx1,ly1,lz1,lelv)
1612 ntot1 = lx1*ly1*lz1*nelv
1617 CALL add3s2 (ta1,abx1,abx2,ab1,ab2,ntot1)
1618 CALL add3s2 (ta2,aby1,aby2,ab1,ab2,ntot1)
1619 CALL copy (abx2,abx1,ntot1)
1620 CALL copy (aby2,aby1,ntot1)
1621 CALL copy (abx1,bfx,ntot1)
1622 CALL copy (aby1,bfy,ntot1)
1623 CALL add2s1 (bfx,ta1,ab0,ntot1)
1624 CALL add2s1 (bfy,ta2,ab0,ntot1)
1625 if(.not.iflomach)
CALL col2 (bfx,vtrans,ntot1)
1626 if(.not.iflomach)
CALL col2 (bfy,vtrans,ntot1)
1628 CALL add3s2 (ta3,abz1,abz2,ab1,ab2,ntot1)
1629 CALL copy (abz2,abz1,ntot1)
1630 CALL copy (abz1,bfz,ntot1)
1631 CALL add2s1 (bfz,ta3,ab0,ntot1)
1632 if(.not.iflomach)
CALL col2 (bfz,vtrans,ntot1)
1647 IF (istep.LE.2)
THEN
1655 ab2 = (dt0/dt2)*((dt0/3.+dt1/2.)/(dt1+dt2))
1656 ab1 = -(dt0/dt1)*(0.5+(dt0/3.+dt1/2.)/dt2)
1675 REAL AB(NAB),DTLAG(NAB)
1681 IF ( nab.EQ.1 )
THEN
1685 ELSEIF ( nab.EQ.2 )
THEN
1689 IF ( nbd.EQ.1 )
THEN
1694 ELSEIF ( nbd.EQ.2 )
THEN
1701 ELSEIF ( nab.EQ.3 )
THEN
1710 IF ( nbd.EQ.1 )
THEN
1712 ab(3) = dte*( 0.5*dtb + dtc/3. )
1713 ab(2) = -0.5*dta - ab(3)*dtd
1714 ab(1) = 1.0 - ab(2) - ab(3)
1716 ELSEIF ( nbd.EQ.2 )
THEN
1718 ab(3) = 2./3.*dtc*(1./dtd + dte)
1719 ab(2) = -dta - ab(3)*dtd
1720 ab(1) = 1.0 - ab(2) - ab(3)
1722 ELSEIF ( nbd.EQ.3 )
THEN
1724 ab(3) = dte*(dtb + dtc)
1725 ab(2) = -dta*(1.0 + dtb + dtc)
1726 ab(1) = 1.0 - ab(2) - ab(3)
1741 parameter(ldim = 10)
1742 REAL BDMAT(ldim,ldim),BDRHS(ldim)
1743 INTEGER IR(ldim),IC(ldim)
1749 ELSEIF (nbd.GE.2)
THEN
1751 CALL bdsys (bdmat,bdrhs,dtbd,nbd,ldim)
1752 CALL lu (bdmat,nsys,ldim,ir,ic)
1753 CALL solve (bdrhs,bdmat,1,nsys,ldim,ir,ic)
1767 bd(ibd) = bd(ibd)/bdf
1776 REAL A(ldim,9),B(9),DT(9)
1777 CALL rzero (a,ldim**2)
1799 a(i,j) = sumdt**(i-1)
1816 DO 10 i=nbd,ilag+1,-1
1830 REAL VEL1 (LX1,LY1,LZ1,LELV)
1831 REAL VEL2 (LX1,LY1,LZ1,LELV)
1832 REAL VEL3 (LX1,LY1,LZ1,LELV)
1834 CALL opcopy (vel1,vel2,vel3,vx,vy,vz)
1836 CALL opcopy (vel1,vel2,vel3,vxlag(1,1,1,1,ilag-1)
1837 $ ,vylag(1,1,1,1,ilag-1)
1838 $ ,vzlag(1,1,1,1,ilag-1) )
1852 REAL VXN (LX1,LY1,LZ1,LELV)
1853 REAL VYN (LX1,LY1,LZ1,LELV)
1854 REAL VZN (LX1,LY1,LZ1,LELV)
1855 CALL velchar (vx,vxn,vxlag,nbd,tau,dtlag)
1856 CALL velchar (vy,vyn,vylag,nbd,tau,dtlag)
1858 $
CALL velchar (vz,vzn,vzlag,nbd,tau,dtlag)
1872 REAL Y (LX1,LY1,LZ1,1)
1873 REAL X (LX1,LY1,LZ1,1)
1874 REAL MASK (LX1,LY1,LZ1,1)
1876 IF (imesh.EQ.1) nel=nelv
1877 IF (imesh.EQ.2) nel=nelt
1878 ntot1 = lx1*ly1*lz1*nel
1880 CALL col2 (y,bm1,ntot1)
1881 CALL dssum (y,lx1,ly1,lz1)
1882 IF (imesh.EQ.1)
CALL col2 (y,binvm1,ntot1)
1883 IF (imesh.EQ.2)
CALL col2 (y,bintm1,ntot1)
1884 CALL col2 (y,mask,ntot1)
1896 REAL VEL (LX1,LY1,LZ1,LELV)
1897 REAL VN (LX1,LY1,LZ1,LELV)
1898 REAL VLAG (LX1,LY1,LZ1,LELV,9)
1901 ntot1 = lx1*ly1*lz1*nelv
1903 CALL copy (vel,vn,ntot1)
1905 ELSEIF (nbd.EQ.2)
THEN
1908 CALL add3s2 (vel,vn,vlag,c1,c2,ntot1)
1909 ELSEIF (nbd.EQ.3)
THEN
1910 f1 = tau**2-dtbd(3)*tau
1911 f2 = tau**2-(dtbd(2)+dtbd(3))*tau
1912 f3 = dtbd(2)*dtbd(3)
1913 f4 = dtbd(2)*(dtbd(2)+dtbd(3))
1919 CALL add3s2 (vel,vlag(1,1,1,1,1),vlag(1,1,1,1,2),c2,c3,ntot1)
1920 CALL add2s2 (vel,vn,c1,ntot1)
1922 WRITE (6,*)
'Need higher order expansion in VELCHAR'
1940 ntot1 = lx1*ly1*lz1*nelv
1943 DO 100 ilag=3-1,2,-1
1944 CALL copy (vxlag(1,1,1,1,ilag),vxlag(1,1,1,1,ilag-1),ntot1)
1945 CALL copy (vylag(1,1,1,1,ilag),vylag(1,1,1,1,ilag-1),ntot1)
1947 $
CALL copy (vzlag(1,1,1,1,ilag),vzlag(1,1,1,1,ilag-1),ntot1)
1950 CALL opcopy (vxlag,vylag,vzlag,vx,vy,vz)
1966 REAL HV1MSK (LX1,LY1,LZ1,1)
1967 REAL HV2MSK (LX1,LY1,LZ1,1)
1968 REAL HV3MSK (LX1,LY1,LZ1,1)
1970 parameter(lxyz1=lx1*ly1*lz1)
1971 COMMON /ctmp1/ work(lxyz1,lelt)
1974 ntot1 = lx1*ly1*lz1*nelv
1975 CALL rzero (work ,ntot1)
1976 CALL rone (hv1msk,ntot1)
1978 IF (ifield.EQ.1)
THEN
1980 DO 100 iface=1,nfaces
1981 cb=cbc(iface,ie,ifield)
1982 IF (cb(1:1).EQ.
'V' .OR. cb(1:1).EQ.
'v')
THEN
1983 CALL faccl3 (work(1,ie),vx(1,1,1,ie),unx(1,1,iface,ie),iface)
1984 CALL faddcl3(work(1,ie),vy(1,1,1,ie),uny(1,1,iface,ie),iface)
1986 $
CALL faddcl3(work(1,ie),vz(1,1,1,ie),unz(1,1,iface,ie),iface)
1987 CALL fcaver (vaver,work,ie,iface)
1989 IF (vaver.LT.0.)
CALL facev (hv1msk,ie,iface,0.0,lx1,ly1,lz1)
1991 IF (cb(1:2).EQ.
'WS' .OR. cb(1:2).EQ.
'ws')
1992 $
CALL facev (hv1msk,ie,iface,0.0,lx1,ly1,lz1)
1996 CALL copy (hv2msk,hv1msk,ntot1)
1997 CALL copy (hv3msk,hv1msk,ntot1)
2013 IF ( nbdinp.LT.1)
THEN
2016 IF ((istep.EQ.0).OR.(istep.EQ.1)) nbd = 1
2017 IF ((istep.GT.1).AND.(istep.LE.nbdinp)) nbd = istep
2018 IF (istep.GT.nbdinp) nbd = nbdinp
2037 REAL X (LX1,LY1,LZ1,1)
2038 COMMON /scrnrm/ y(lx1,ly1,lz1,lelt)
2039 $ ,ta1(lx1,ly1,lz1,lelt)
2040 $ ,ta2(lx1,ly1,lz1,lelt)
2041 REAL H1,SEMI,L2,LINF
2044 IF (imesh.EQ.1)
THEN
2047 ELSEIF (imesh.EQ.2)
THEN
2051 length = vol**(1./(ldim))
2062 CALL col3 (ta1,x,x,ntot1)
2063 CALL col2 (ta1,bm1,ntot1)
2064 l2 =
glsum(ta1,ntot1)
2065 IF (l2.LT.0.0) l2 = 0.
2067 CALL rone (ta1,ntot1)
2068 CALL rzero (ta2,ntot1)
2069 CALL axhelm (y,x,ta1,ta2,imesh,1)
2070 CALL col3 (ta1,y,x,ntot1)
2071 semi =
glsum(ta1,ntot1)
2072 IF (semi.LT.0.0) semi = 0.
2074 h1 = sqrt((semi*length**2+l2)/vol)
2075 semi = sqrt(semi/vol)
2077 IF (h1.LT.0.) h1 = 0.
2094 REAL X1 (LX1,LY1,LZ1,1)
2095 REAL X2 (LX1,LY1,LZ1,1)
2096 REAL X3 (LX1,LY1,LZ1,1)
2097 COMMON /scrmg/ y1(lx1,ly1,lz1,lelt)
2098 $ ,y2(lx1,ly1,lz1,lelt)
2099 $ ,y3(lx1,ly1,lz1,lelt)
2100 $ ,ta1(lx1,ly1,lz1,lelt)
2101 COMMON /scrch/ ta2(lx1,ly1,lz1,lelt)
2102 REAL H1,SEMI,L2,LINF
2108 length = vol**(1./(ldim))
2117 CALL col3 (ta1,x1,x1,ntot1)
2118 CALL col3 (ta2,x2,x2,ntot1)
2119 CALL add2 (ta1,ta2,ntot1)
2121 CALL col3 (ta2,x3,x3,ntot1)
2122 CALL add2 (ta1,ta2,ntot1)
2127 CALL col3 (ta1,x1,x1,ntot1)
2128 CALL col3 (ta2,x2,x2,ntot1)
2129 CALL add2 (ta1,ta2,ntot1)
2131 CALL col3 (ta2,x3,x3,ntot1)
2132 CALL add2 (ta1,ta2,ntot1)
2134 CALL col2 (ta1,bm1,ntot1)
2135 l2 =
glsum(ta1,ntot1)
2136 IF (l2.LT.0.0) l2 = 0.
2138 CALL rone (ta1,ntot1)
2139 CALL rzero (ta2,ntot1)
2140 CALL ophx (y1,y2,y3,x1,x2,x3,ta1,ta2)
2141 CALL col3 (ta1,y1,x1,ntot1)
2142 CALL col3 (ta2,y2,x2,ntot1)
2143 CALL add2 (ta1,ta2,ntot1)
2145 CALL col3 (ta2,y3,x3,ntot1)
2146 CALL add2 (ta1,ta2,ntot1)
2148 semi =
glsum(ta1,ntot1)
2149 IF (semi.LT.0.0) semi = 0.
2151 h1 = sqrt((semi*length**2+l2)/vol)
2152 semi = sqrt(semi/vol)
2154 IF (h1.LT.0.) h1 = 0.
2168 REAL WP (LX2,LY2,LZ2,LELV)
2169 REAL P (LX2,LY2,LZ2,LELV)
2170 REAL WM2 (LX2,LY2,LZ2)
2174 CALL col3 (wp(1,1,1,iel),wm2(1,1,1),p(1,1,1,iel),nxyz2)
2189 COMMON /scrns/ resv1(lx1,ly1,lz1,lelv)
2190 $ , resv2(lx1,ly1,lz1,lelv)
2191 $ , resv3(lx1,ly1,lz1,lelv)
2192 $ , resp(lx2,ly2,lz2,lelv)
2193 $ , ta1(lx1,ly1,lz1,lelv)
2194 $ , ta2(lx1,ly1,lz1,lelv)
2195 $ , ta3(lx1,ly1,lz1,lelv)
2196 COMMON /scrmg/ tb1(lx1,ly1,lz1,lelv)
2197 $ , tb2(lx1,ly1,lz1,lelv)
2198 $ , tb3(lx1,ly1,lz1,lelv)
2199 $ , wp(lx2,ly2,lz2,lelv)
2200 COMMON /scrvh/ h1(lx1,ly1,lz1,lelv)
2201 $ , h2(lx1,ly1,lz1,lelv)
2206 ntot1 = lx1*ly1*lz1*nelv
2207 ntot2 = lx2*ly2*lz2*nelv
2209 CALL sethlm (h1,h2,intype)
2213 CALL opcopy (resv1,resv2,resv3,bfx,bfy,bfz)
2215 CALL ophx (tb1,tb2,tb3,vx,vy,vz,h1,h2)
2216 CALL opadd2 (resv1,resv2,resv3,ta1,ta2,ta3)
2217 CALL opsub2 (resv1,resv2,resv3,tb1,tb2,tb3)
2218 CALL opmask (resv1,resv2,resv3)
2219 CALL opdssum (resv1,resv2,resv3)
2220 CALL opcolv3 (ta1,ta2,ta3,resv1 ,resv2 ,resv3,binvm1)
2221 rv1 = sqrt(
glsc3(ta1,resv1,vmult,ntot1)/volvm1)
2222 rv2 = sqrt(
glsc3(ta2,resv2,vmult,ntot1)/volvm1)
2223 IF (rv1 .GT. tcritv) ifstuz = .false.
2224 IF (rv2 .GT. tcritv) ifstuz = .false.
2226 rv3 = sqrt(
glsc3(ta3,resv3,vmult,ntot1)/volvm1)
2227 IF (rv3 .GT. tcritv) ifstuz = .false.
2232 CALL opdiv (resp,vx,vy,vz)
2233 CALL col3 (wp,resp,bm2inv,ntot2)
2234 rp = sqrt(
glsc2(wp,resp,ntot2)/volvm2)
2235 IF (rp .GT. tcritp) ifstuz = .false.
2252 REAL Y(1),X(1),XMASK(1)
2256 if (isclld.eq.0)
then
2260 rname(myrout) =
'antmsk'
2263 dct(myrout) = dct(myrout) + (isbcnt)
2264 ncall(myrout) = ncall(myrout) + 1
2265 dcount = dcount + (isbcnt)
2269 y(i) = x(i)*(1.-xmask(i))
2284 REAL VBDRY1 (LX1,LY1,LZ1,1)
2285 REAL VBDRY2 (LX1,LY1,LZ1,1)
2286 REAL VBDRY3 (LX1,LY1,LZ1,1)
2288 ntot1 = lx1*ly1*lz1*nelv
2291 if (ifield.eq.ifldmhd)
then
2292 CALL amask (vbdry1,vbdry2,vbdry3,bx,by,bz,nelv)
2294 CALL amask (vbdry1,vbdry2,vbdry3,vx,vy,vz,nelv)
2297 if (ifield.eq.ifldmhd)
then
2298 CALL antimsk (vbdry1,bx,b1mask,ntot1)
2299 CALL antimsk (vbdry2,by,b2mask,ntot1)
2301 $
CALL antimsk (vbdry3,bz,b3mask,ntot1)
2303 CALL antimsk (vbdry1,vx,v1mask,ntot1)
2304 CALL antimsk (vbdry2,vy,v2mask,ntot1)
2306 $
CALL antimsk (vbdry3,vz,v3mask,ntot1)
2323 REAL RES1(1),RES2(1),RES3(1)
2325 ntot1 = lx1*ly1*lz1*nelv
2331 CALL rmask (res1,res2,res3,nelv)
2333 if (ifield.eq.ifldmhd)
then
2334 CALL col2 (res1,b1mask,ntot1)
2335 CALL col2 (res2,b2mask,ntot1)
2337 $
CALL col2 (res3,b3mask,ntot1)
2339 CALL col2 (res1,v1mask,ntot1)
2340 CALL col2 (res2,v2mask,ntot1)
2342 $
CALL col2 (res3,v3mask,ntot1)
2351 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1)
2352 ntot1=lx1*ly1*lz1*nelv
2353 CALL add2(a1,b1,ntot1)
2354 CALL add2(a2,b2,ntot1)
2355 IF(ldim.EQ.3)
CALL add2(a3,b3,ntot1)
2361 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1)
2362 ntot1=lx1*ly1*lz1*nelv
2363 CALL sub2(a1,b1,ntot1)
2364 CALL sub2(a2,b2,ntot1)
2365 IF(ldim.EQ.3)
CALL sub2(a3,b3,ntot1)
2369 subroutine opsub3 (a1,a2,a3,b1,b2,b3,c1,c2,c3)
2371 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1),C1(1),C2(1),C3(1)
2372 ntot1=lx1*ly1*lz1*nelv
2373 CALL sub3(a1,b1,c1,ntot1)
2374 CALL sub3(a2,b2,c2,ntot1)
2375 IF(ldim.EQ.3)
CALL sub3(a3,b3,c3,ntot1)
2381 REAL A1(1),A2(1),A3(1)
2382 REAL B1(1),B2(1),B3(1)
2386 ntot1=lx1*ly1*lz1*nelv
2389 if (isclld.eq.0)
then
2393 rname(myrout) =
'opcolv'
2397 dct(myrout) = dct(myrout) + (isbcnt)
2398 ncall(myrout) = ncall(myrout) + 1
2399 dcount = dcount + (isbcnt)
2419 REAL A1(1),A2(1),A3(1),C(1)
2422 ntot1=lx1*ly1*lz1*nelv
2425 if (isclld.eq.0)
then
2429 rname(myrout) =
'opcolv'
2433 dct(myrout) = dct(myrout) + (isbcnt)
2434 ncall(myrout) = ncall(myrout) + 1
2435 dcount = dcount + (isbcnt)
2455 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1)
2456 ntot1=lx1*ly1*lz1*nelv
2457 CALL col2(a1,b1,ntot1)
2458 CALL col2(a2,b2,ntot1)
2459 IF(ldim.EQ.3)
CALL col2(a3,b3,ntot1)
2466 ntot1=lx1*ly1*lz1*nelv
2469 IF(ldim.EQ.3)
CALL chsign(c,ntot1)
2475 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1)
2476 ntot1=lx1*ly1*lz1*nelv
2477 CALL copy(a1,b1,ntot1)
2478 CALL copy(a2,b2,ntot1)
2479 IF(ldim.EQ.3)
CALL copy(a3,b3,ntot1)
2492 real r1(lx1,ly1,lz1,1)
2493 $ , r2(lx1,ly1,lz1,1)
2494 $ , r3(lx1,ly1,lz1,1)
2504 do e=1,nelfld(ifield)
2507 if(cbc(f,e,ifield) .eq.
'P '.or.cbc(f,e,ifield).eq.
'p ')
then
2509 call facind2 (js1,jf1,jskip1,js2,jf2,jskip2,f)
2512 do j2=js2,jf2,jskip2
2513 do j1=js1,jf1,jskip1
2516 dotprod = unx(k,1,f,e)*ym1(j1,j2,1,e)
2517 $ -uny(k,1,f,e)*xm1(j1,j2,1,e)
2521 length = unx(k,1,f,e)*unx(k,1,f,e)
2522 $ + uny(k,1,f,e)*uny(k,1,f,e)
2523 length = sqrt(length)
2525 cost = unx(k,1,f,e)/length
2526 sint = uny(k,1,f,e)/length
2528 rnor = ( r1(j1,j2,1,e)*cost + r2(j1,j2,1,e)*sint )
2529 rtn1 = (-r1(j1,j2,1,e)*sint + r2(j1,j2,1,e)*cost )
2531 if (ifxy.and.dotprod .ge. 0.0)
then
2532 r1(j1,j2,1,e) = rnor
2533 r2(j1,j2,1,e) = rtn1
2535 r1(j1,j2,1,e) =-rnor
2536 r2(j1,j2,1,e) =-rtn1
2544 do j2=js2,jf2,jskip2
2545 do j1=js1,jf1,jskip1
2548 dotprod = unx(k,1,f,e)*ym1(j1,j2,1,e)
2549 $ -uny(k,1,f,e)*xm1(j1,j2,1,e)
2552 length = unx(k,1,f,e)*unx(k,1,f,e)
2553 $ + uny(k,1,f,e)*uny(k,1,f,e)
2554 length = sqrt(length)
2556 cost = unx(k,1,f,e)/length
2557 sint = uny(k,1,f,e)/length
2559 rnor = ( r1(j1,j2,1,e)*cost - r2(j1,j2,1,e)*sint )
2560 rtn1 = ( r1(j1,j2,1,e)*sint + r2(j1,j2,1,e)*cost )
2562 if(ifxy.and.dotprod .ge. 0.0)
then
2563 r1(j1,j2,1,e) = rnor
2564 r2(j1,j2,1,e) = rtn1
2566 r1(j1,j2,1,e) =-rnor
2567 r2(j1,j2,1,e) =-rtn1
2615 if (op.eq.
'* ' .or. op.eq.
'mul' .or. op.eq.
'MUL')
then
2616 call vec_dsop (a,b,c,lx1,ly1,lz1,op)
2619 call vec_dsop (a,b,c,lx1,ly1,lz1,op)
2625 call vec_dsop (a,b,c,lx1,ly1,lz1,op)
2634 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1)
2635 ntot1=lx1*ly1*lz1*nelv
2638 IF(ldim.EQ.3)
CALL invcol2(a3,b3,ntot1)
2645 ntot1=lx1*ly1*lz1*nelv
2648 IF(ldim.EQ.3)
CALL rzero(c,ntot1)
2655 ntot1=lx1*ly1*lz1*nelv
2658 IF(ldim.EQ.3)
CALL rone(c,ntot1)
2665 ntot1=lx1*ly1*lz1*nelv
2666 CALL cmult(a,const,ntot1)
2667 CALL cmult(b,const,ntot1)
2668 IF(ldim.EQ.3)
CALL cmult(c,const,ntot1)
2674 REAL A1(1),A2(1),A3(1)
2678 ntot1=lx1*ly1*lz1*nelv
2681 if (isclld.eq.0)
then
2685 rname(myrout) =
'opcv2c'
2688 isbcnt = ntot1*(ldim+2)
2689 dct(myrout) = dct(myrout) + (isbcnt)
2690 ncall(myrout) = ncall(myrout) + 1
2691 dcount = dcount + (isbcnt)
2713 REAL A1(1),A2(1),A3(1)
2717 ntot1=lx1*ly1*lz1*nelv
2720 if (isclld.eq.0)
then
2724 rname(myrout) =
'opclv2'
2727 isbcnt = ntot1*(ldim+1)
2728 dct(myrout) = dct(myrout) + (isbcnt)
2729 ncall(myrout) = ncall(myrout) + 1
2730 dcount = dcount + (isbcnt)
2752 REAL A1(1),A2(1),A3(1)
2753 REAL B1(1),B2(1),B3(1),C(1)
2756 ntot1=lx1*ly1*lz1*nelv
2759 if (isclld.eq.0)
then
2763 rname(myrout) =
'opa2cl'
2766 isbcnt = ntot1*(ldim*2)
2767 dct(myrout) = dct(myrout) + (isbcnt)
2768 ncall(myrout) = ncall(myrout) + 1
2769 dcount = dcount + (isbcnt)
2774 a1(i)=a1(i)+b1(i)*c(i)
2775 a2(i)=a2(i)+b2(i)*c(i)
2776 a3(i)=a3(i)+b3(i)*c(i)
2780 a1(i)=a1(i)+b1(i)*c(i)
2781 a2(i)=a2(i)+b2(i)*c(i)
2789 REAL A1(1),A2(1),A3(1)
2790 REAL B1(1),B2(1),B3(1)
2794 ntot1=lx1*ly1*lz1*nelv
2797 if (isclld.eq.0)
then
2801 rname(myrout) =
'opcv3c'
2804 isbcnt = ntot1*ldim*2
2805 dct(myrout) = dct(myrout) + (isbcnt)
2806 ncall(myrout) = ncall(myrout) + 1
2807 dcount = dcount + (isbcnt)
2826 subroutine uzawa (rcg,h1,h2,h2inv,intype,iter)
2838 COMMON /ctolpr/ divex
2839 COMMON /cprint/ ifprint
2841 REAL RCG (LX2,LY2,LZ2,LELV)
2842 REAL H1 (LX1,LY1,LZ1,LELV)
2843 REAL H2 (LX1,LY1,LZ1,LELV)
2844 REAL H2INV(LX1,LY1,LZ1,LELV)
2845 COMMON /scruz/ wp(lx2,ly2,lz2,lelv)
2846 $ , xcg(lx2,ly2,lz2,lelv)
2847 $ , pcg(lx2,ly2,lz2,lelv)
2848 $ , rpcg(lx2,ly2,lz2,lelv)
2851 integer*8 ntotg,nxyz2
2858 CALL chktcg2 (tolps,rcg,iconv)
2859 if (param(21).gt.0.and.tolps.gt.abs(param(21)))
2860 $ tolps = abs(param(21))
2871 CALL uzprec (rpcg,rcg,h1,h2,intype,wp)
2872 rrp1 =
glsc2(rpcg,rcg,ntot2)
2873 CALL copy (pcg,rpcg,ntot2)
2874 CALL rzero (xcg,ntot2)
2875 if (rrp1.eq.0)
return
2883 call convprn (iconv,rnorm,rrp1,rcg,rpcg,tolpss)
2885 if (iter.eq.1) div0 = rnorm
2886 if (param(21).lt.0) tolpss = abs(param(21))*div0
2889 IF (ifprint.AND.nio.EQ.0)
2890 $
WRITE (6,66) iter,tolpss,rnorm,div0,ratio,istep
2891 66
format(i5,1p4e12.5,i8,
' Divergence')
2893 IF (iconv.EQ.1.and.iter.gt.1)
GOTO 9000
2899 IF (iter .NE. 1)
THEN
2901 CALL add2s1 (pcg,rpcg,beta,ntot2)
2904 CALL cdabdtp (wp,pcg,h1,h2,h2inv,intype)
2905 pap =
glsc2(pcg,wp,ntot2)
2910 pcgmx =
glamax(pcg,ntot2)
2911 wp_mx =
glamax(wp ,ntot2)
2912 ntot1 = lx1*ly1*lz1*nelv
2913 h1_mx =
glamax(h1 ,ntot1)
2914 h2_mx =
glamax(h2 ,ntot1)
2915 if (nid.eq.0)
write(6,*)
'ERROR: pap=0 in uzawa.'
2916 $ ,iter,pcgmx,wp_mx,h1_mx,h2_mx
2919 CALL add2s2 (xcg,pcg,alpha,ntot2)
2920 CALL add2s2 (rcg,wp,-alpha,ntot2)
2922 if (iter.eq.-1)
then
2923 call convprn (iconv,rnrm1,rrpx,rcg,rpcg,tolpss)
2924 if (iconv.eq.1)
then
2928 $
write (6,66) iter,tolpss,rnrm1,div0,ratio,istep
2936 CALL uzprec (rpcg,rcg,h1,h2,intype,wp)
2940 if (nid.eq.0)
WRITE (6,3001) iter,rnorm,tolpss
2942 3001
FORMAT(i6,
' **ERROR**: Failed to converge in UZAWA:',6e13.4)
2948 if (iter.gt.0)
call copy (rcg,xcg,ntot2)
2952 IF (nio.EQ.0)
WRITE(6,9999) istep,
' U-Press std. ',
2953 & iter,divex,div0,tolpss,etime1
2954 9999
FORMAT(i11,a,i7,1p4e13.4)
2955 19999
FORMAT(i11,
' U-Press 1.e-5: ',i7,1p4e13.4)
2969 real md(lxd,lyd,lzd,lelv),m1(lx1,ly1,lz1,lelv)
2975 if (icalld .eq. 0)
then
2980 if (mflg .eq.1)
then
2982 call specmp(md(1,1,1,ie),nd,m1(1,1,1,ie),n1,im1d,im1dt,w)
2986 call specmp(m1(1,1,1,ie),n1,md(1,1,1,ie),nd,imd1,imd1t,w)
3001 real md(lxd,lyd,lzd,lelv),m1(lx1,ly1,lz1,lelv)
3007 if (icalld .eq. 0)
then
3013 call specmp(m1(1,1,1,ie),n1,md(1,1,1,ie),nd,pmd1,pmd1t,w)
3027 real b(nb,nb,nb),a(na,na,na)
3034 call mxm(ba,nb,a,na,b,na*na)
3038 call mxm(b(k,1,1),nb,ab,na,w(l),nb)
3042 call mxm(w,nbb,ab,na,b,nb)
3044 call mxm(ba,nb,a,na,w,na)
3045 call mxm(w,nb,ab,na,b,nb)
3056 real z1(lx),zd(lx),w(lx)
3058 if (n1.gt.lx.or.nd.gt.lx)
then
3059 write(6,*)
'ERROR: increase lx in setmap to max:',n1,nd
3065 call igllm(im1d,im1dt,z1,zd,n1,nd,n1,nd)
3066 call igllm(imd1,imd1t,zd,z1,nd,n1,nd,n1)
3074 real P(N,D),LkD(0:N-1,D),LkNt(N,0:N-1)
3077 real zN(lx),zD(lx),w(lx)
3092 lkd(k,j) =
pnleg(zd(j),k)
3096 lknt(j,k) =
pnleg(zn(j),k)
3107 s = s + lkd(k,j)*lkd(k,j)*w(j)
3114 lkd(k,j) = s * lkd(k,j)
3118 lknt(j,k) = s * lknt(j,k)
3127 lkd(k,j) = lkd(k,j)*w(j)
3133 call mxm(lknt,n,lkd,n,p,d)
3157 COMMON /scrch/ cmask1(lx1,ly1,lz1,lelv)
3158 $ , cmask2(lx1,ly1,lz1,lelv)
3159 COMMON /ctmp1/
mfi(lx1,ly1,lz1,lelv)
3160 $ , dmfi(lx1,ly1,lz1,lelv)
3161 $ , mdmfi(lx1,ly1,lz1,lelv)
3166 REAL CONV (LX1,LY1,LZ1,1)
3167 REAL FI (LX1,LY1,LZ1,1)
3169 if (nio.eq.0.and.loglevel.gt.2)
3170 $
write(6,*)
'convop', ifield, ifdeal(ifield)
3173 if (icalld.eq.0) tadvc=0.0
3180 ntot1 = lx1*ly1*lz1*nelv
3181 ntotz = lx1*ly1*lz1*nelfld(ifield)
3182 ntott = lx1*ly1*lz1*nelt
3184 call rzero (conv,ntott)
3186 if (ifdgfld(ifield))
then
3187 call convect_dg (conv,fi,.false.,vxd,vyd,vzd,.true.)
3189 elseif (param(86).ne.0.0)
then
3194 if (.not. ifdeal(ifield))
then
3195 call conv1 (conv,fi)
3196 elseif (param(99).eq.2.or.param(99).eq.3)
then
3198 elseif (param(99).eq.4)
then
3200 call convect_new (conv,fi,.false.,vx,vy,vz,.false.)
3202 call convect_new (conv,fi,.false.,vxd,vyd,vzd,.true.)
3205 elseif (param(99).eq.5)
then
3209 call conv1 (conv,fi)
3230 REAL DFI (LX1,LY1,LZ1,1)
3231 REAL FI (LX1,LY1,LZ1,1)
3233 COMMON /ctmp0/ ta1(lx1,ly1,lz1,lelv)
3234 $ , dfid(lxd,lyd,lzd,lelv)
3235 $ , ta1d(lxd,lyd,lzd,lelv)
3241 ntotd = lxd*lyd*lzd*nelv
3246 CALL dudxyz (ta1,fi,rxm1,sxm1,txm1,jacm1,imesh,1)
3247 call mapw (ta1d,lxd,ta1,lx1,1)
3248 call mapw (vxd ,lxd,vx ,lx1,1)
3249 CALL col3 (dfid,ta1d,vxd,ntotd)
3254 CALL dudxyz (ta1,fi,rym1,sym1,tym1,jacm1,imesh,2)
3255 call mapw (ta1d,lxd,ta1,lx1,1)
3256 call mapw (vyd ,lxd,vy ,lx1,1)
3257 CALL addcol3 (dfid,ta1d,vyd,ntotd)
3263 CALL dudxyz (ta1,fi,rzm1,szm1,tzm1,jacm1,imesh,3)
3264 call mapw (ta1d,lxd,ta1,lx1,1)
3265 call mapw (vzd ,lxd,vz ,lx1,1)
3266 CALL addcol3 (dfid,ta1d,vzd,ntotd)
3272 call mapwp(dfid,lxd,dfi,lx1,-1)
3285 real du (lx1*ly1*lz1,1)
3286 real u (lx1,ly1,lz1,1)
3288 common /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
3289 logical ifdfrm, iffast, ifh2, ifsolv
3293 common /ctmp0/ dudr(lx1,ly1,lz1)
3294 $ , duds(lx1,ly1,lz1)
3295 $ , dudt(lx1,ly1,lz1)
3298 if (imesh.eq.2) nel = nelt
3310 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,dudr,nyz1)
3312 call mxm (u(1,1,iz,ie),lx1,dytm1,ly1,duds(1,1,iz),ly1)
3314 call mxm (u(1,1,1,ie),nxy1,dztm1,lz1,dudt,lz1)
3317 du(i,ie) = jacmi(i,ie)*(
3319 $ rxm1(i,1,1,ie)*dudr(i,1,1)
3320 $ + sxm1(i,1,1,ie)*duds(i,1,1)
3321 $ + txm1(i,1,1,ie)*dudt(i,1,1) )
3323 $ rym1(i,1,1,ie)*dudr(i,1,1)
3324 $ + sym1(i,1,1,ie)*duds(i,1,1)
3325 $ + tym1(i,1,1,ie)*dudt(i,1,1) )
3327 $ rzm1(i,1,1,ie)*dudr(i,1,1)
3328 $ + szm1(i,1,1,ie)*duds(i,1,1)
3329 $ + tzm1(i,1,1,ie)*dudt(i,1,1) ) )
3335 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,dudr,nyz1)
3336 call mxm (u(1,1,1,ie),lx1,dytm1,ly1,duds,ly1)
3338 du(i,ie) = jacmi(i,ie)*(
3340 $ rxm1(i,1,1,ie)*dudr(i,1,1)
3341 $ + sxm1(i,1,1,ie)*duds(i,1,1) )
3343 $ rym1(i,1,1,ie)*dudr(i,1,1)
3344 $ + sym1(i,1,1,ie)*duds(i,1,1) ) )
3362 real du (lx1*ly1*lz1,1)
3363 real u (lx1,ly1,lz1,1)
3365 common /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
3366 logical ifdfrm, iffast, ifh2, ifsolv
3371 common /ctmp0/ dudr(lx1,ly1,lz1)
3372 $ , duds(lx1,ly1,lz1)
3373 $ , dudt(lx1,ly1,lz1)
3376 if (imesh.eq.2) nel = nelt
3388 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,dudr,nyz1)
3390 call mxm (u(1,1,iz,ie),lx1,dytm1,ly1,duds(1,1,iz),ly1)
3392 call mxm (u(1,1,1,ie),nxy1,dztm1,lz1,dudt,lz1)
3395 du(i,ie) = jacmi(i,ie)*(
3397 $ rxm1(i,1,1,ie)*dudr(i,1,1)
3398 $ + sxm1(i,1,1,ie)*duds(i,1,1)
3399 $ + txm1(i,1,1,ie)*dudt(i,1,1) )
3401 $ rym1(i,1,1,ie)*dudr(i,1,1)
3402 $ + sym1(i,1,1,ie)*duds(i,1,1)
3403 $ + tym1(i,1,1,ie)*dudt(i,1,1) )
3405 $ rzm1(i,1,1,ie)*dudr(i,1,1)
3406 $ + szm1(i,1,1,ie)*duds(i,1,1)
3407 $ + tzm1(i,1,1,ie)*dudt(i,1,1) ) )
3413 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,dudr,nyz1)
3414 call mxm (u(1,1,1,ie),lx1,dytm1,ly1,duds,ly1)
3416 du(i,ie) = jacmi(i,ie)*(
3418 $ rxm1(i,1,1,ie)*dudr(i,1,1)
3419 $ + sxm1(i,1,1,ie)*duds(i,1,1) )
3421 $ rym1(i,1,1,ie)*dudr(i,1,1)
3422 $ + sym1(i,1,1,ie)*duds(i,1,1) ) )
3440 real du(lx1*ly1*lz1,1),dv(lx1*ly1*lz1,1),dw(lx1*ly1*lz1,1)
3441 real u (lx1,ly1,lz1,1),v (lx1,ly1,lz1,1),w (lx1,ly1,lz1,1)
3443 common /fastmd/ ifdfrm(lelt), iffast(lelt), ifh2, ifsolv
3444 logical ifdfrm, iffast, ifh2, ifsolv
3446 common /ctmp0/ duds(lx1,ly1,lz1)
3447 $ , dvds(lx1,ly1,lz1)
3448 $ , dwds(lx1,ly1,lz1)
3451 if (imesh.eq.2) nel = nelt
3461 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,du(1,ie),nyz1)
3462 call mxm (dxm1,lx1,v(1,1,1,ie),lx1,dv(1,ie),nyz1)
3463 call mxm (dxm1,lx1,w(1,1,1,ie),lx1,dw(1,ie),nyz1)
3465 du(i,ie) = du(i,ie)*vx(i,1,1,ie)
3466 dv(i,ie) = dv(i,ie)*vx(i,1,1,ie)
3467 dw(i,ie) = dw(i,ie)*vx(i,1,1,ie)
3471 call mxm (u(1,1,iz,ie),lx1,dytm1,ly1,duds(1,1,iz),ly1)
3474 call mxm (v(1,1,iz,ie),lx1,dytm1,ly1,dvds(1,1,iz),ly1)
3477 call mxm (w(1,1,iz,ie),lx1,dytm1,ly1,dwds(1,1,iz),ly1)
3480 du(i,ie) = du(i,ie) + duds(i,1,1)*vy(i,1,1,ie)
3481 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vy(i,1,1,ie)
3482 dw(i,ie) = dw(i,ie) + dwds(i,1,1)*vy(i,1,1,ie)
3485 call mxm (u(1,1,1,ie),nxy1,dztm1,lz1,duds,lz1)
3486 call mxm (v(1,1,1,ie),nxy1,dztm1,lz1,dvds,lz1)
3487 call mxm (w(1,1,1,ie),nxy1,dztm1,lz1,dwds,lz1)
3489 du(i,ie) = du(i,ie) + duds(i,1,1)*vz(i,1,1,ie)
3490 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vz(i,1,1,ie)
3491 dw(i,ie) = dw(i,ie) + dwds(i,1,1)*vz(i,1,1,ie)
3495 call mxm (dxm1,lx1,u(1,1,1,ie),lx1,du(1,ie),nyz1)
3496 call mxm (dxm1,lx1,v(1,1,1,ie),lx1,dv(1,ie),nyz1)
3498 du(i,ie) = du(i,ie)*vx(i,1,1,ie)
3499 dv(i,ie) = dv(i,ie)*vx(i,1,1,ie)
3502 call mxm (u(1,1,1,ie),lx1,dytm1,ly1,duds,ly1)
3503 call mxm (v(1,1,1,ie),lx1,dytm1,ly1,dvds,ly1)
3505 du(i,ie) = du(i,ie) + duds(i,1,1)*vy(i,1,1,ie)
3506 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vy(i,1,1,ie)
3525 real vxn(1),vyn(1),vzn(1)
3532 if (isclld.eq.0)
then
3536 rname(myrout) =
'velcvv'
3538 ncall(myrout) = ncall(myrout) + 1
3542 call velchar (vx,vxn,vxlag,nbd,tau,dtlag)
3543 call velchar (vy,vyn,vylag,nbd,tau,dtlag)
3545 $
call velchar (vz,vzn,vzlag,nbd,tau,dtlag)
3547 ntot = lx1*ly1*lz1*nelv
3551 tx = vx(i,1,1,1)*bm1(i,1,1,1)*jacmi(i,1)
3552 ty = vy(i,1,1,1)*bm1(i,1,1,1)*jacmi(i,1)
3553 tz = vz(i,1,1,1)*bm1(i,1,1,1)*jacmi(i,1)
3555 vx(i,1,1,1) = tx*rxm1(i,1,1,1)
3556 $ + ty*rym1(i,1,1,1)
3557 $ + tz*rzm1(i,1,1,1)
3558 vy(i,1,1,1) = tx*sxm1(i,1,1,1)
3559 $ + ty*sym1(i,1,1,1)
3560 $ + tz*szm1(i,1,1,1)
3561 vz(i,1,1,1) = tx*txm1(i,1,1,1)
3562 $ + ty*tym1(i,1,1,1)
3563 $ + tz*tzm1(i,1,1,1)
3568 tx = vx(i,1,1,1)*bm1(i,1,1,1)*jacmi(i,1)
3569 ty = vy(i,1,1,1)*bm1(i,1,1,1)*jacmi(i,1)
3571 vx(i,1,1,1) = tx*rxm1(i,1,1,1)
3572 $ + ty*rym1(i,1,1,1)
3573 vy(i,1,1,1) = tx*sxm1(i,1,1,1)
3574 $ + ty*sym1(i,1,1,1)
3584 dct(myrout) = dct(myrout) + opct
3585 dcount = dcount + opct
3602 real du(1),dv(1),dw(1)
3603 real u (1),v (1),w (1)
3612 if (isclld.eq.0)
then
3616 rname(myrout) =
'frkcvv'
3618 ncall(myrout) = ncall(myrout) + 1
3625 ntot = lx1*ly1*lz1*nelv
3631 du(i) = du(i)*binvm1(i,1,1,1)
3632 dv(i) = dv(i)*binvm1(i,1,1,1)
3633 dw(i) = dw(i)*binvm1(i,1,1,1)
3637 du(i) = du(i)*binvm1(i,1,1,1)
3638 dv(i) = dv(i)*binvm1(i,1,1,1)
3660 dct(myrout) = dct(myrout) + opct
3661 dcount = dcount + opct
3667 subroutine conv1rk2(du,dv,dw,u,v,w,cu,cv,cw,beta,wk)
3676 real du(lx1*ly1*lz1,1),dv(lx1*ly1*lz1,1),dw(lx1*ly1*lz1,1)
3677 real u (lx1,ly1,lz1,1),v (lx1,ly1,lz1,1),w (lx1,ly1,lz1,1)
3678 real cu(lx1,ly1,lz1,1),cv(lx1,ly1,lz1,1),cw(lx1,ly1,lz1,1)
3679 real wk(lx1,ly1,lz1,3)
3681 common /ctmp0/ duds(lx1,ly1,lz1)
3682 $ , dvds(lx1,ly1,lz1)
3683 $ , dwds(lx1,ly1,lz1)
3691 if (isclld.eq.0)
then
3695 rname(myrout) =
'cv1rk2'
3697 ncall(myrout) = ncall(myrout) + 1
3702 if (imesh.eq.2) nel = nelt
3714 wk(i,1,1,1)=u(i,1,1,ie)+beta*cu(i,1,1,ie)
3715 wk(i,1,1,2)=v(i,1,1,ie)+beta*cv(i,1,1,ie)
3716 wk(i,1,1,3)=w(i,1,1,ie)+beta*cw(i,1,1,ie)
3719 call mxm (dxm1,lx1,wk(1,1,1,1),lx1,du(1,ie),nyz1)
3720 call mxm (dxm1,lx1,wk(1,1,1,2),lx1,dv(1,ie),nyz1)
3721 call mxm (dxm1,lx1,wk(1,1,1,3),lx1,dw(1,ie),nyz1)
3723 du(i,ie) = du(i,ie)*vx(i,1,1,ie)
3724 dv(i,ie) = dv(i,ie)*vx(i,1,1,ie)
3725 dw(i,ie) = dw(i,ie)*vx(i,1,1,ie)
3729 call mxm (wk(1,1,iz,1),lx1,dytm1,ly1,duds(1,1,iz),ly1)
3732 call mxm (wk(1,1,iz,2),lx1,dytm1,ly1,dvds(1,1,iz),ly1)
3735 call mxm (wk(1,1,iz,3),lx1,dytm1,ly1,dwds(1,1,iz),ly1)
3738 du(i,ie) = du(i,ie) + duds(i,1,1)*vy(i,1,1,ie)
3739 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vy(i,1,1,ie)
3740 dw(i,ie) = dw(i,ie) + dwds(i,1,1)*vy(i,1,1,ie)
3743 call mxm (wk(1,1,1,1),nxy1,dztm1,lz1,duds,lz1)
3744 call mxm (wk(1,1,1,2),nxy1,dztm1,lz1,dvds,lz1)
3745 call mxm (wk(1,1,1,3),nxy1,dztm1,lz1,dwds,lz1)
3747 du(i,ie) = du(i,ie) + duds(i,1,1)*vz(i,1,1,ie)
3748 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vz(i,1,1,ie)
3749 dw(i,ie) = dw(i,ie) + dwds(i,1,1)*vz(i,1,1,ie)
3754 wk(i,1,1,1)=u(i,1,1,ie)+beta*cu(i,1,1,ie)
3755 wk(i,1,1,2)=v(i,1,1,ie)+beta*cv(i,1,1,ie)
3758 call mxm (dxm1,lx1,wk(1,1,1,1),lx1,du(1,ie),nyz1)
3759 call mxm (dxm1,lx1,wk(1,1,1,2),lx1,dv(1,ie),nyz1)
3761 du(i,ie) = du(i,ie)*vx(i,1,1,ie)
3762 dv(i,ie) = dv(i,ie)*vx(i,1,1,ie)
3765 call mxm (wk(1,1,1,1),lx1,dytm1,ly1,duds,ly1)
3766 call mxm (wk(1,1,1,2),lx1,dytm1,ly1,dvds,ly1)
3768 du(i,ie) = du(i,ie) + duds(i,1,1)*vy(i,1,1,ie)
3769 dv(i,ie) = dv(i,ie) + dvds(i,1,1)*vy(i,1,1,ie)
3782 dct(myrout) = dct(myrout) + opct
3783 dcount = dcount + opct
3789 subroutine frkconvv2(du,dv,dw,u,v,w,cu,cv,cw,beta,mu,wk)
3799 real du(1),dv(1),dw(1)
3800 real u (1),v (1),w (1)
3801 real cu(1),cv(1),cw(1)
3802 real wk(lx1*ly1*lz1,3)
3811 if (isclld.eq.0)
then
3815 rname(myrout) =
'frkcv2'
3817 ncall(myrout) = ncall(myrout) + 1
3825 ntot = lx1*ly1*lz1*nelv
3826 call conv1rk2 (du,dv,dw,u,v,w,cu,cv,cw,beta,wk)
3831 du(i) = du(i)*binvm1(i,1,1,1)
3832 dv(i) = dv(i)*binvm1(i,1,1,1)
3833 dw(i) = dw(i)*binvm1(i,1,1,1)
3837 du(i) = du(i)*binvm1(i,1,1,1)
3838 dv(i) = dv(i)*binvm1(i,1,1,1)
3860 dct(myrout) = dct(myrout) + opct
3861 dcount = dcount + opct
3880 parameter(lxyz1=lx1*ly1*lz1)
3881 COMMON /ctmp1/ work(lxyz1,lelt)
3882 real mask(lxyz1,lelt)
3885 ntot1 = lx1*ly1*lz1*nelv
3886 CALL rzero (work ,ntot1)
3887 CALL rone (mask,ntot1)
3889 IF (ifield.EQ.1)
THEN
3891 DO 100 iface=1,nfaces
3892 cb=cbc(iface,ie,ifield)
3893 IF (cb(1:1).EQ.
'V' .OR. cb(1:1).EQ.
'v')
THEN
3894 CALL faccl3 (work(1,ie),vx(1,1,1,ie),unx(1,1,iface,ie),iface)
3895 CALL faddcl3(work(1,ie),vy(1,1,1,ie),uny(1,1,iface,ie),iface)
3897 $
CALL faddcl3(work(1,ie),vz(1,1,1,ie),unz(1,1,iface,ie),iface)
3898 CALL fcaver (vaver,work,ie,iface)
3900 IF (vaver.LT.0.)
CALL facev (mask,ie,iface,0.0,lx1,ly1,lz1)
3902 IF (cb(1:2).EQ.
'WS' .OR. cb(1:2).EQ.
'ws')
3903 $
CALL facev (mask,ie,iface,0.0,lx1,ly1,lz1)
3908 ntot = lx1*ly1*lz1*nelv
3910 if (mask(i,1).eq.0)
then
3932 REAL VEL1 (LX1,LY1,LZ1,1)
3933 REAL VEL2 (LX1,LY1,LZ1,1)
3934 REAL VEL3 (LX1,LY1,LZ1,1)
3935 COMMON /scrns/ vxn(lx1,ly1,lz1,lelv)
3936 $ , vyn(lx1,ly1,lz1,lelv)
3937 $ , vzn(lx1,ly1,lz1,lelv)
3938 $ , hv1msk(lx1,ly1,lz1,lelv)
3939 $ , hv2msk(lx1,ly1,lz1,lelv)
3940 $ , hv3msk(lx1,ly1,lz1,lelv)
3941 $ , work(lx1,ly1,lz1,lelv)
3942 COMMON /ctmp1/ rkx1(lx1,ly1,lz1,lelv)
3943 $ , rkx2(lx1,ly1,lz1,lelv)
3944 $ , rkx3(lx1,ly1,lz1,lelv)
3945 $ , rkx4(lx1,ly1,lz1,lelv)
3946 COMMON /scrmg/ rky1(lx1,ly1,lz1,lelv)
3947 $ , rky2(lx1,ly1,lz1,lelv)
3948 $ , rky3(lx1,ly1,lz1,lelv)
3949 $ , rky4(lx1,ly1,lz1,lelv)
3950 COMMON /screv/ rkz1(lx1,ly1,lz1,lelv)
3951 $ , rkz2(lx1,ly1,lz1,lelv)
3952 COMMON /scrch/ rkz3(lx1,ly1,lz1,lelv)
3953 $ , rkz4(lx1,ly1,lz1,lelv)
3955 ntot1 = lx1*ly1*lz1*nelv
3957 CALL opcopy (vxn,vyn,vzn,vx,vy,vz)
3958 CALL hypmsk3 (hv1msk,hv2msk,hv3msk)
3960 CALL velinit (vel1,vel2,vel3,ilag)
3961 CALL velconv (vxn,vyn,vzn,tau)
3963 DO 1000 jlag=ilag,1,-1
3965 dtau = dtlag(jlag)/(ntaubd)
3970 DO 900 itau=1,ntaubd
3974 CALL frkconv (rkx1,vel1,hv1msk)
3975 CALL frkconv (rky1,vel2,hv2msk)
3977 $
CALL frkconv (rkz1,vel3,hv3msk)
3983 CALL velconv (vxn,vyn,vzn,tau)
3985 CALL copy (work,vel1,ntot1)
3986 CALL add2s2 (work,rkx1,-dthalf,ntot1)
3987 CALL frkconv (rkx2,work,hv1msk)
3989 CALL copy (work,vel2,ntot1)
3990 CALL add2s2 (work,rky1,-dthalf,ntot1)
3991 CALL frkconv (rky2,work,hv2msk)
3994 CALL copy (work,vel3,ntot1)
3995 CALL add2s2 (work,rkz1,-dthalf,ntot1)
3996 CALL frkconv (rkz2,work,hv3msk)
4002 CALL copy (work,vel1,ntot1)
4003 CALL add2s2 (work,rkx2,-dthalf,ntot1)
4004 CALL frkconv (rkx3,work,hv1msk)
4006 CALL copy (work,vel2,ntot1)
4007 CALL add2s2 (work,rky2,-dthalf,ntot1)
4008 CALL frkconv (rky3,work,hv2msk)
4011 CALL copy (work,vel3,ntot1)
4012 CALL add2s2 (work,rkz2,-dthalf,ntot1)
4013 CALL frkconv (rkz3,work,hv3msk)
4020 CALL velconv (vxn,vyn,vzn,tau)
4022 CALL copy (work,vel1,ntot1)
4023 CALL add2s2 (work,rkx3,-dtau,ntot1)
4024 CALL frkconv (rkx4,work,hv1msk)
4026 CALL copy (work,vel2,ntot1)
4027 CALL add2s2 (work,rky3,-dtau,ntot1)
4028 CALL frkconv (rky4,work,hv2msk)
4031 CALL copy (work,vel3,ntot1)
4032 CALL add2s2 (work,rkz3,-dtau,ntot1)
4033 CALL frkconv (rkz4,work,hv3msk)
4039 CALL add2s2 (vel1,rkx1,-crk1,ntot1)
4040 CALL add2s2 (vel1,rkx2,-crk2,ntot1)
4041 CALL add2s2 (vel1,rkx3,-crk2,ntot1)
4042 CALL add2s2 (vel1,rkx4,-crk1,ntot1)
4044 CALL add2s2 (vel2,rky1,-crk1,ntot1)
4045 CALL add2s2 (vel2,rky2,-crk2,ntot1)
4046 CALL add2s2 (vel2,rky3,-crk2,ntot1)
4047 CALL add2s2 (vel2,rky4,-crk1,ntot1)
4050 CALL add2s2 (vel3,rkz1,-crk1,ntot1)
4051 CALL add2s2 (vel3,rkz2,-crk2,ntot1)
4052 CALL add2s2 (vel3,rkz3,-crk2,ntot1)
4053 CALL add2s2 (vel3,rkz4,-crk1,ntot1)
4059 CALL opcopy (vx,vy,vz,vxn,vyn,vzn)
4073 real outfld (lx2,ly2,lz2,1)
4074 real inpx (lx1,ly1,lz1,1)
4075 real inpy (lx1,ly1,lz1,1)
4076 real inpz (lx1,ly1,lz1,1)
4077 common /ctmp0/ work(lx2,ly2,lz2,lelv)
4081 ntot2 = lx2*ly2*lz2*nelv
4082 call multd (work,inpx,rxm2,sxm2,txm2,1,iflg)
4083 call copy (outfld,work,ntot2)
4084 call multd (work,inpy,rym2,sym2,tym2,2,iflg)
4085 call add2 (outfld,work,ntot2)
4087 call multd (work,inpz,rzm2,szm2,tzm2,3,iflg)
4088 call add2 (outfld,work,ntot2)
4103 real outx (lx1,ly1,lz1,1)
4104 real outy (lx1,ly1,lz1,1)
4105 real outz (lx1,ly1,lz1,1)
4106 real inpfld (lx2,ly2,lz2,1)
4108 call cdtp (outx,inpfld,rxm2,sxm2,txm2,1)
4109 call cdtp (outy,inpfld,rym2,sym2,tym2,2)
4111 $
call cdtp (outz,inpfld,rzm2,szm2,tzm2,3)
4123 real LkN(lx,lx),LkD(lx,lx),LkNt(lx,lx)
4125 if (n1.gt.lx.or.nd.gt.lx)
then
4126 write(6,*)
'ERROR: increase lx in setmap to max:',n1,nd
4131 if (param(99).eq.2)
then
4132 call set_pnd (pmd1 ,lkd,lknt,n1,nd)
4133 elseif (param(99).eq.3)
then
4149 real Pt(N,D),P(D,N),LkNt(N,0:N-1)
4152 real zN(lx),zD(lx),wN(lx),wD(lx)
4159 if (nio.eq.0)
write(6,*)
'dealias, pndoi:',n,d
4160 call igllm (p,pt,zn,zd,n,d,n,d)
4164 pt(i,j) = wd(j)*pt(i,j)/wn(i)
4181 parameter(lxyz=lx1*ly1*lz1)
4182 real ux(lxyz,1),uy(lxyz,1),uz(lxyz,1),u(lxyz,1)
4184 common /ctmp1/ ur(lxyz),us(lxyz),ut(lxyz)
4193 ux(i,e) = w3m1(i,1,1)*(ur(i)*rxm1(i,1,1,e)
4194 $ + us(i)*sxm1(i,1,1,e)
4195 $ + ut(i)*txm1(i,1,1,e) )
4196 uy(i,e) = w3m1(i,1,1)*(ur(i)*rym1(i,1,1,e)
4197 $ + us(i)*sym1(i,1,1,e)
4198 $ + ut(i)*tym1(i,1,1,e) )
4199 uz(i,e) = w3m1(i,1,1)*(ur(i)*rzm1(i,1,1,e)
4200 $ + us(i)*szm1(i,1,1,e)
4201 $ + ut(i)*tzm1(i,1,1,e) )
4213 ux(i,e) =w3m1(i,1,1)*(ur(i)*rxm1(i,1,1,e)
4214 $ + us(i)*sxm1(i,1,1,e) )
4215 uy(i,e) =w3m1(i,1,1)*(ur(i)*rym1(i,1,1,e)
4216 $ + us(i)*sym1(i,1,1,e) )
4252 COMMON /scruz/ w1(lx1,ly1,lz1,lelv)
4253 $ , w2(lx1,ly1,lz1,lelv)
4254 $ , w3(lx1,ly1,lz1,lelv)
4256 COMMON /scrns/ sxz(lx1,ly1,lz1,lelt)
4257 $ , syz(lx1,ly1,lz1,lelt)
4258 $ , sxx(lx1,ly1,lz1,lelt)
4259 $ , sxy(lx1,ly1,lz1,lelt)
4260 $ , syy(lx1,ly1,lz1,lelt)
4261 $ , szz(lx1,ly1,lz1,lelt)
4266 ntot = lx1*ly1*lz1*nelv
4274 CALL copy (w1,qtl,ntot)
4276 CALL cmult (w1,fac,ntot)
4277 CALL add2 (sxx,w1,ntot)
4278 CALL add2 (syy,w1,ntot)
4279 CALL add2 (szz,w1,ntot)
4281 CALL opcolv(sxx,syy,szz,vdiff_e)
4282 CALL opcolv(sxy,sxz,syz,vdiff_e)
4285 CALL opcolv (sxx,syy,szz,bm1)
4286 CALL opcolv (sxy,sxz,syz,bm1)
4289 CALL opcolv (sxx,syy,szz,binvm1)
4290 CALL opcolv (sxy,sxz,syz,binvm1)
4294 CALL cmult (w2,fac,ntot)
4297 CALL opdiv (w1,sxx,sxy,sxz)
4298 CALL col2 (w1,w2,ntot)
4299 CALL add2 (bfx,w1,ntot)
4301 CALL opdiv (w1,sxy,syy,syz)
4302 CALL col2 (w1,w2,ntot)
4303 CALL add2 (bfy,w1,ntot)
4306 CALL opdiv (w1,sxz,syz,szz)
4307 CALL col2 (w1,w2,ntot)
4308 CALL add2 (bfz,w1,ntot)
4326 COMMON /scrns/ exz(lx1,ly1,lz1,lelt)
4327 $ , eyz(lx1,ly1,lz1,lelt)
4328 $ , exx(lx1,ly1,lz1,lelt)
4329 $ , exy(lx1,ly1,lz1,lelt)
4330 $ , eyy(lx1,ly1,lz1,lelt)
4331 $ , ezz(lx1,ly1,lz1,lelt)
4334 dimension u1(lx1,ly1,lz1,1)
4335 $ , u2(lx1,ly1,lz1,1)
4336 $ , u3(lx1,ly1,lz1,1)
4340 ntot1 = lx1*ly1*lz1*nel
4342 CALL rzero3 (exx,eyy,ezz,ntot1)
4343 CALL rzero3 (exy,exz,eyz,ntot1)
4345 CALL uxyz (u1,exx,exy,exz,nel)
4346 CALL uxyz (u2,exy,eyy,eyz,nel)
4347 IF (ldim.EQ.3)
CALL uxyz (u3,exz,eyz,ezz,nel)
4349 CALL col2 (exx,jacmi,ntot1)
4350 CALL col2 (exy,jacmi,ntot1)
4351 CALL col2 (eyy,jacmi,ntot1)
4353 IF (ifaxis)
CALL axiezz (u2,eyy,ezz,nel)
4356 CALL col2 (exz,jacmi,ntot1)
4357 CALL col2 (eyz,jacmi,ntot1)
4358 CALL col2 (ezz,jacmi,ntot1)
4362 CALL cmult (exy,fac,ntot1)
4363 CALL cmult (exz,fac,ntot1)
4364 CALL cmult (eyz,fac,ntot1)
4377 real out(1),a(1),diff(1)
4378 real wrk(lx1,ly1,lz1,lelt)
4379 real h2(lx1,ly1,lz1,lelt)
4381 ntot = lx1*ly1*lz1*nelfld(ifld)
4382 if (.not.iftmsh(ifld)) imesh = 1
4383 if ( iftmsh(ifld)) imesh = 2
4391 call axhelm(wrk,a,diff,h2,imesh,1)
4392 call sub2 (out,wrk,ntot)
4404 common /scruz/ u(lx1*ly1*lz1),v(lx1*ly1*lz1),w(lx1*ly1*lz1)
4413 call expl_strs_e(u,v,w,vx(1,1,1,e),vy(1,1,1,e),vz(1,1,1,e),e)
4416 bfx(i,1,1,e) = bfx(i,1,1,e) - u(i)
4417 bfy(i,1,1,e) = bfy(i,1,1,e) - v(i)
4418 bfz(i,1,1,e) = bfz(i,1,1,e) - w(i)
4430 real w1(1),w2(1),w3(1),u1(1),u2(1),u3(1)
4438 call expl_strs_e(w1(k),w2(k),w3(k),u1(k),u2(k),u3(k),e)
4451 real w1(1),w2(1),w3(1),u1(1),u2(1),u3(1)
4458 if (nio.eq.0.and.icalld.eq.0)
write(6,*)
'nu_star:',nu_star
4479 real w1(1),w2(1),w3(1),u1(1),u2(1),u3(1)
4492 parameter(lxyz=lx1*ly1*lz1)
4493 common /ctmp1/ ur(lxyz),us(lxyz),ut(lxyz)
4494 $ , vr(lxyz),vs(lxyz),vt(lxyz)
4495 $ , wr(lxyz),ws(lxyz),wt(lxyz)
4503 nu = vdiff(i,1,1,e,1)
4508 u11=ur(i)*rxm1(i,1,1,e)+us(i)*sxm1(i,1,1,e)+ut(i)*txm1(i,1,1,e)
4509 u21=vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e)+vt(i)*txm1(i,1,1,e)
4510 u31=wr(i)*rxm1(i,1,1,e)+ws(i)*sxm1(i,1,1,e)+wt(i)*txm1(i,1,1,e)
4511 u12=ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e)+ut(i)*tym1(i,1,1,e)
4512 u22=vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e)+vt(i)*tym1(i,1,1,e)
4513 u32=wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e)+wt(i)*tym1(i,1,1,e)
4514 u13=ur(i)*rzm1(i,1,1,e)+us(i)*szm1(i,1,1,e)+ut(i)*tzm1(i,1,1,e)
4515 u23=vr(i)*rzm1(i,1,1,e)+vs(i)*szm1(i,1,1,e)+vt(i)*tzm1(i,1,1,e)
4516 u33=wr(i)*rzm1(i,1,1,e)+ws(i)*szm1(i,1,1,e)+wt(i)*tzm1(i,1,1,e)
4518 w11 = dnu*u11 + nu*u11
4519 w12 = dnu*u12 + nu*u21
4520 w13 = dnu*u13 + nu*u31
4521 w21 = dnu*u21 + nu*u12
4522 w22 = dnu*u22 + nu*u22
4523 w23 = dnu*u23 + nu*u32
4524 w31 = dnu*u31 + nu*u13
4525 w32 = dnu*u32 + nu*u23
4526 w33 = dnu*u33 + nu*u33
4528 w = w3m1(i,1,1)*jacmi(i,e)
4530 ur(i)=(w11*rxm1(i,1,1,e)+w12*rym1(i,1,1,e)+w13*rzm1(i,1,1,e))*w
4531 us(i)=(w11*sxm1(i,1,1,e)+w12*sym1(i,1,1,e)+w13*szm1(i,1,1,e))*w
4532 ut(i)=(w11*txm1(i,1,1,e)+w12*tym1(i,1,1,e)+w13*tzm1(i,1,1,e))*w
4533 vr(i)=(w21*rxm1(i,1,1,e)+w22*rym1(i,1,1,e)+w23*rzm1(i,1,1,e))*w
4534 vs(i)=(w21*sxm1(i,1,1,e)+w22*sym1(i,1,1,e)+w23*szm1(i,1,1,e))*w
4535 vt(i)=(w21*txm1(i,1,1,e)+w22*tym1(i,1,1,e)+w23*tzm1(i,1,1,e))*w
4536 wr(i)=(w31*rxm1(i,1,1,e)+w32*rym1(i,1,1,e)+w33*rzm1(i,1,1,e))*w
4537 ws(i)=(w31*sxm1(i,1,1,e)+w32*sym1(i,1,1,e)+w33*szm1(i,1,1,e))*w
4538 wt(i)=(w31*txm1(i,1,1,e)+w32*tym1(i,1,1,e)+w33*tzm1(i,1,1,e))*w
4560 real w1(1),w2(1),u1(1),u2(1)
4573 parameter(lxyz=lx1*ly1*lz1)
4574 common /ctmp1/ ur(lxyz),us(lxyz),ut(lxyz)
4575 $ , vr(lxyz),vs(lxyz),vt(lxyz)
4576 $ , wr(lxyz),ws(lxyz),wt(lxyz)
4583 nu = vdiff(i,1,1,e,1)
4588 u11=ur(i)*rxm1(i,1,1,e)+us(i)*sxm1(i,1,1,e)
4589 u21=vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e)
4590 u12=ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e)
4591 u22=vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e)
4593 w11 = dnu*u11 + nu*u11
4594 w12 = dnu*u12 + nu*u21
4595 w21 = dnu*u21 + nu*u12
4596 w22 = dnu*u22 + nu*u22
4598 w = w3m1(i,1,1)*jacmi(i,e)
4600 ur(i)=(w11*rxm1(i,1,1,e)+w12*rym1(i,1,1,e))*w
4601 us(i)=(w11*sxm1(i,1,1,e)+w12*sym1(i,1,1,e))*w
4602 vr(i)=(w21*rxm1(i,1,1,e)+w22*rym1(i,1,1,e))*w
4603 vs(i)=(w21*sxm1(i,1,1,e)+w22*sym1(i,1,1,e))*w
4621 real u(1),ur(1),us(1),ut(1)
4626 parameter(ldg=lxd**3,lwkd=2*ldg)
4627 common /dgradl/ d(ldg),dt(ldg),dg(ldg),dgt(ldg),jgl(ldg),jgt(ldg)
4647 real ur(1),us(1),ut(1),u(1)
4652 parameter(ldg=lxd**3,lwkd=4*lxd*lxd)
4653 common /dgradl/ d(ldg),dt(ldg),dg(ldg),dgt(ldg),jgl(ldg),jgt(ldg)
4670 real u (0:N,0:N,0:N,1)
4671 real ur(0:N,0:N,0:N),us(0:N,0:N,0:N),ut(0:N,0:N,0:N)
4672 real D (0:N,0:N),Dt(0:N,0:N)
4673 real w (0:N,0:N,0:N)
4680 call mxm(dt,m1,ur,m1,u(0,0,0,e),m2)
4683 call mxm(us(0,0,k),m1,d ,m1,w(0,0,k),m1)
4685 call add2(u(0,0,0,e),w,m3)
4687 call mxm(ut,m2,d ,m1,w,m1)
4688 call add2(u(0,0,0,e),w,m3)
4696 real ur(0:N,0:N),us(0:N,0:N)
4697 real D (0:N,0:N),Dt(0:N,0:N)
4704 call mxm(dt,m1,ur,m1,u(0,0,e),m1)
4705 call mxm(us,m1,d ,m1,w ,m1)
4706 call add2(u(0,0,e),w,m2)
4719 parameter(ldg=lxd**3,lwkd=4*lxd*lxd)
4720 common /dgradl/ d(ldg),dt(ldg),dg(ldg),dgt(ldg),jgl(ldg),jgt(ldg)
4727 common /jgradl/ pd(0:ld*ld)
4730 integer pd , pdg , pjgl
4739 nstore = nstore + md*mx
4743 if (nid.eq.985)
write(6,*) nstore,ldg,ij,md,mx,ip,
' NSTOR'
4746 call lim_chk(nstore,ldg ,
'dg ',
'ldg ',
'get_dgl_pt')
4747 call lim_chk(nwrkd ,lwkd,
'wkd ',
'lwkd ',
'get_dgl_pt')
4749 call gen_dgll(d(ip),dt(ip),md,mx,wkd)
4768 real dgl(mp,np),dgt(np*mp),w(1)
4774 call zwgll (w(iz),dgt,np)
4775 call zwgll (w(id),dgt,mp)
4779 call lim_chk(ndgt,ldgt,
'ldgt ',
'dgt ',
'gen_dgl ')
4785 dgl(i,j) = dgt(np+j)
subroutine bcneusc(S, ITYPE)
subroutine bcdirvc(V1, V2, V3, mask1, mask2, mask3)
subroutine nekasgn(ix, iy, iz, e)
subroutine rzero3(A, B, C, N)
subroutine facind2(JS1, JF1, JSKIP1, JS2, JF2, JSKIP2, IFC)
subroutine map21e(y, x, iel)
subroutine map12(y, x, iel)
subroutine gop(x, w, op, n)
subroutine exitti(stringi, idata)
real *8 function dnekclock()
real *8 function dnekclock_sync()
subroutine facev(a, ie, iface, val, nx, ny, nz)
subroutine scale(xyzl, nl)
subroutine convect_dg(du, u, ifuf, cr, cs, ct, ifcf)
subroutine convect_cons(bdu, u, ifuf, cx, cy, cz, ifcf)
subroutine lim_chk(n, m, avar5, lvar5, sub_name10)
subroutine convect_new(bdu, u, ifuf, cx, cy, cz, ifcf)
subroutine vec_dssum(u, v, w, nx, ny, nz)
subroutine vec_dsop(u, v, w, nx, ny, nz, op)
subroutine dssum(u, nx, ny, nz)
subroutine fd_weights_full(xx, x, n, m, c)
subroutine solve(F, A, K, N, ldim, IR, IC)
subroutine lu(A, N, ldim, IR, IC)
subroutine hmholtz(name, u, rhs, h1, h2, mask, mult, imsh, tli, maxit, isd)
subroutine axhelm(au, u, helm1, helm2, imesh, isd)
subroutine mfi(fname_in, ifile)
subroutine ophinv(o1, o2, o3, i1, i2, i3, h1, h2, tolh, nmxhi)
subroutine cadd(a, const, n)
subroutine col3(a, b, c, n)
subroutine invers2(a, b, n)
subroutine invcol2(a, b, n)
subroutine transpose(a, lda, b, ldb)
subroutine addcol3(a, b, c, n)
real function vlsc21(x, y, n)
function glsc3(a, b, mult, n)
subroutine add2s2(a, b, c1, n)
subroutine col4(a, b, c, d, n)
real function vlsc2(x, y, n)
subroutine subcol3(a, b, c, n)
subroutine add3s2(a, b, c, c1, c2, n)
subroutine sub3(a, b, c, n)
subroutine cmult(a, const, n)
real function glamax(a, n)
subroutine cfill(a, b, n)
subroutine invcol3(a, b, c, n)
subroutine add2s1(a, b, c1, n)
subroutine mxm(a, n1, b, n2, c, n3)
subroutine frkconv(y, x, mask)
subroutine opgradt(outx, outy, outz, inpfld)
subroutine cdtp(dtx, x, rm2, sm2, tm2, isd)
subroutine wlaplacian(out, a, diff, ifld)
subroutine velinit(vel1, vel2, vel3, ilag)
subroutine opbinv1(out1, out2, out3, inp1, inp2, inp3, SCALE)
subroutine gradl_rst(ur, us, ut, u, md, if3d)
subroutine uzawa(rcg, h1, h2, h2inv, intype, iter)
subroutine convprn(iconv, rbnorm, rrpt, res, z, tol)
subroutine opcolv2c(a1, a2, a3, b1, b2, c)
subroutine conv1d(dfi, fi)
subroutine tauinit(tau, ilag)
subroutine specmp(b, nb, a, na, ba, ab, w)
subroutine get_dgll_ptr(ip, mx, md)
subroutine frkconvv(du, dv, dw, u, v, w, mu)
subroutine opamask(vbdry1, vbdry2, vbdry3)
subroutine opdssum(a, b, c)
subroutine opcolv3c(a1, a2, a3, b1, b2, b3, c, d)
subroutine opcol2(a1, a2, a3, b1, b2, b3)
subroutine convuz(ifstuz)
subroutine convop(conv, fi)
subroutine opcmult(a, b, c, const)
subroutine uzprec(rpcg, rcg, h1m1, h2m1, intype, wp)
subroutine convpr(res, tol, iconv, rbnorm)
subroutine expl_strs_e(w1, w2, w3, u1, u2, u3, e)
subroutine ophyprk(vel1, vel2, vel3, ilag)
subroutine opbinv(out1, out2, out3, inp1, inp2, inp3, h2inv)
subroutine local_grad3_t(u, ur, us, ut, N, e, D, Dt, w)
subroutine opadd2col(a1, a2, a3, b1, b2, b3, c)
subroutine opcopy(a1, a2, a3, b1, b2, b3)
subroutine gradl_rst_t(u, ur, us, ut, md, if3d)
subroutine velchar(vel, vn, vlag, nbd, tau, dtbd)
subroutine opdiv(outfld, inpx, inpy, inpz)
subroutine genwp(wp, wm2, p)
subroutine conv1rk(du, dv, dw, u, v, w)
subroutine cdabdtp(ap, wp, h1, h2, h2inv, intype)
subroutine wgradm1(ux, uy, uz, u, nel)
subroutine opcolv3(a1, a2, a3, b1, b2, b3, c)
subroutine opcolv2(a1, a2, a3, b1, b2)
subroutine expl_strs(w1, w2, w3, u1, u2, u3)
subroutine opmask(res1, res2, res3)
subroutine rotate_cyc(r1, r2, r3, idir)
subroutine bdsys(a, b, dt, nbd, ldim)
subroutine setab3(ab0, ab1, ab2)
subroutine cmask(cmask1, cmask2)
subroutine convopo(conv, fi)
subroutine frkconvv2(du, dv, dw, u, v, w, cu, cv, cw, beta, mu, wk)
subroutine set_pndoi(Pt, P, LkNt, N, D)
subroutine opcolv(a1, a2, a3, c)
subroutine set_pnd(P, LkD, LkNt, N, D)
subroutine normvc(h1, semi, l2, linf, x1, x2, x3)
subroutine crespuz(respr, g1, g2, g3, h1, h2, h2inv, intype)
subroutine setmap(n1, nd)
subroutine setbd(bd, dtbd, nbd)
subroutine mapw(md, nd, m1, n1, mflg)
subroutine oprone(a, b, c)
subroutine setabbd(ab, dtlag, nab, nbd)
subroutine antimsk(y, x, xmask, n)
subroutine expl_strs_e_3d(w1, w2, w3, u1, u2, u3, e)
subroutine expl_strs_e_2d(w1, w2, u1, u2, e)
subroutine makeg(out1, out2, out3, h1, h2, intype)
subroutine ophx(out1, out2, out3, inp1, inp2, inp3, h1, h2)
subroutine conv1no(du, u)
subroutine comp_siej(U1, U2, U3)
subroutine setproj(n1, nd)
subroutine velconvv(vxn, vyn, vzn, tau)
subroutine velconv(vxn, vyn, vzn, tau)
subroutine cresvuz(resv1, resv2, resv3)
subroutine chktcg2(tol, res, iconv)
subroutine opdsop(a, b, c, op)
subroutine conv1rk2(du, dv, dw, u, v, w, cu, cv, cw, beta, wk)
subroutine nekuf(f1, f2, f3)
subroutine ctolspl(tolspl, respr)
subroutine opadd2(a1, a2, a3, b1, b2, b3)
subroutine hypmsk3(hv1msk, hv2msk, hv3msk)
subroutine convsp(ifstsp)
subroutine hypmsk3v(msk, mask)
subroutine opsub3(a1, a2, a3, b1, b2, b3, c1, c2, c3)
subroutine opicol2(a1, a2, a3, b1, b2, b3)
subroutine multd(dx, x, rm2, sm2, tm2, isd, iflg)
subroutine local_grad2_t(u, ur, us, N, e, D, Dt, w)
subroutine dudxyz(du, u, rm1, sm1, tm1, jm1, imsh, isd)
subroutine opchsgn(a, b, c)
subroutine opsub2(a1, a2, a3, b1, b2, b3)
subroutine gen_dgll(dgl, dgt, mp, np, w)
subroutine mapwp(md, nd, m1, n1, mflg)
subroutine oprzero(a, b, c)
subroutine normsc(h1, semi, l2, linf, x, imesh)
subroutine opgrad(out1, out2, out3, inp)
subroutine conv2(dtfi, fi)
subroutine eprec2(Z2, R2)
subroutine local_grad2(ur, us, u, N, e, D, Dt)
subroutine local_grad3(ur, us, ut, u, N, e, D, Dt)
subroutine zwgll(Z, W, NP)
real function pnleg(Z, N)
subroutine igllm(I12, IT12, Z1, Z2, lz1, lz2, ND1, ND2)
subroutine faddcl3(a, b, c, iface1)
subroutine axhmsf(au1, au2, au3, u1, u2, u3, h1, h2, matmod)
subroutine fcaver(xaver, a, iel, iface1)
subroutine setaxdy(ifaxdy)
subroutine faccl3(a, b, c, iface1)
subroutine uxyz(u, ex, ey, ez, nel)
subroutine axiezz(u2, eyy, ezz, nel)
subroutine sethlm(h1, h2, intloc)
subroutine amask(VB1, VB2, VB3, V1, V2, V3, NEL)
subroutine cmult2(A, B, CONST, N)
subroutine setaxw1(IFAXWG)
subroutine rmask(R1, R2, R3, NEL)