15 COMMON /cprint/ ifprint
19 LOGICAL IFALGN,IFNORX,IFNORY,IFNORZ,IFPRINT
30 ifnonl(ifield) = .false.
33 CALL lfalse (ifeppm,nface*nelv)
34 CALL lfalse (ifqinp,nface*nelv)
38 IF ( ifflow .AND. .NOT.ifnav ) ifwcno = .true.
39 IF ( ifmelt .AND. .NOT.ifflow ) ifwcno = .true.
47 cb = cbc(ifc,iel,ifield)
48 CALL chknord (ifalgn,ifnorx,ifnory,ifnorz,ifc,iel)
49 CALL chkcbc (cb,iel,ifc,ifalgn,ierr)
50 IF (cb.EQ.
'O ' .OR. cb.EQ.
'o ' .OR.
51 $ cb.EQ.
'ON ' .OR. cb.EQ.
'on ' .OR.
52 $ cb.EQ.
'S ' .OR. cb.EQ.
's ' .OR.
53 $ cb.EQ.
'SL ' .OR. cb.EQ.
'sl ' .OR.
54 $ cb.EQ.
'MM ' .OR. cb.EQ.
'mm ' .OR.
55 $ cb.EQ.
'MS ' .OR. cb.EQ.
'ms ')
THEN
57 ifeppm(ifc,iel) = .true.
59 IF (cb.EQ.
'VL ' .OR. cb.EQ.
'vl ' .OR.
60 $ cb.EQ.
'WSL' .OR. cb.EQ.
'wsl' .OR.
61 $ cb.EQ.
'SL ' .OR. cb.EQ.
'sl ' .OR.
62 $ cb.EQ.
'SHL' .OR. cb.EQ.
'shl' .OR.
63 $ cb.EQ.
'MM ' .OR. cb.EQ.
'mm ' .OR.
64 $ cb.EQ.
'MS ' .OR. cb.EQ.
'ms ' .OR.
65 $ cb.EQ.
'O ' .OR. cb.EQ.
'o ' .OR.
66 $ cb.EQ.
'ON ' .OR. cb.EQ.
'on ')
THEN
67 ifqinp(ifc,iel) = .true.
69 IF (cb.EQ.
'MS ' .OR. cb.EQ.
'ms ' .OR.
70 $ cb.EQ.
'MM ' .OR. cb.EQ.
'mm ' .OR.
71 $ cb.EQ.
'MSI' .OR. cb.EQ.
'msi' )
THEN
77 if (ierr.gt.0)
call exitt
82 DO 250 ifield=2,nfield
83 DO 250 iel=1,nelfld(ifield)
85 cb=cbc(ifc,iel,ifield)
86 IF (cb.EQ.
'r ' .OR. cb.EQ.
'R ')
THEN
87 ifnonl(ifield) = .true.
97 CALL gllog(ifvcor , .false.)
98 CALL gllog(ifsurt , .true. )
99 CALL gllog(ifwcno , .true. )
100 DO 400 ifield=2,nfield
101 CALL gllog(ifnonl(ifield),.true.)
104 IF (nio.EQ.0 .AND. ifecho)
THEN
105 WRITE (6,*)
'IFTRAN =',iftran
106 WRITE (6,*)
'IFFLOW =',ifflow
107 WRITE (6,*)
'IFHEAT =',ifheat
108 WRITE (6,*)
'IFSPLIT =',ifsplit
109 WRITE (6,*)
'IFLOMACH =',iflomach
110 WRITE (6,*)
'IFUSERVP =',ifuservp
111 WRITE (6,*)
'IFUSERMV =',ifusermv
112 WRITE (6,*)
'IFPERT =',ifpert
113 WRITE (6,*)
'IFADJ =',ifadj
114 WRITE (6,*)
'IFSTRS =',ifstrs
115 WRITE (6,*)
'IFCHAR =',ifchar
116 WRITE (6,*)
'IFCYCLIC =',ifcyclic
117 WRITE (6,*)
'IFAXIS =',ifaxis
118 WRITE (6,*)
'IFMVBD =',ifmvbd
119 WRITE (6,*)
'IFMELT =',ifmelt
120 WRITE (6,*)
'IFNEKNEK =',ifneknek
121 WRITE (6,*)
'IFNEKNEKC =',ifneknekc
122 WRITE (6,*)
'IFSYNC =',ifsync
124 WRITE (6,*)
'IFVCOR =',ifvcor
125 WRITE (6,*)
'IFINTQ =',ifintq
126 WRITE (6,*)
'IFGEOM =',ifgeom
127 WRITE (6,*)
'IFSURT =',ifsurt
128 WRITE (6,*)
'IFWCNO =',ifwcno
130 DO 500 ifield=1,nfield
132 WRITE (6,*)
'IFTMSH for field',ifield,
' = ',iftmsh(ifield)
133 WRITE (6,*)
'IFADVC for field',ifield,
' = ',ifadvc(ifield)
134 WRITE (6,*)
'IFNONL for field',ifield,
' = ',ifnonl(ifield)
137 if (param(99).gt.0)
write(6,*)
'Dealiasing enabled, nxd=', nxd
161 IF (diff.EQ.0.) eps = 1.e-7
162 IF (diff.GT.0.) eps = 1.e-14
166 ifrzer(iel) = .false.
170 IF(abs(yc(ic,iel)).LT.eps1)
THEN
177 IF ((nvert.EQ.2).AND.(ccurve(iedge,iel).EQ.
' '))
178 $ ifrzer(iel) = .true.
184 SUBROUTINE chknord (IFALGN,IFNORX,IFNORY,IFNORZ,IFC,IEL)
192 LOGICAL IFALGN,IFNORX,IFNORY,IFNORZ
207 sumx = sumx + abs( abs(unx(ix,1,ifc,iel)) - 1.0 )
208 sumy = sumy + abs( abs(uny(ix,1,ifc,iel)) - 1.0 )
212 IF ( sumx.LT.tolnor )
THEN
216 IF ( sumy.LT.tolnor )
THEN
226 sumx = sumx + abs( abs(unx(ix,iy,ifc,iel)) - 1.0 )
227 sumy = sumy + abs( abs(uny(ix,iy,ifc,iel)) - 1.0 )
228 sumz = sumz + abs( abs(unz(ix,iy,ifc,iel)) - 1.0 )
233 IF ( sumx.LT.tolnor )
THEN
237 IF ( sumy.LT.tolnor )
THEN
241 IF ( sumz.LT.tolnor )
THEN
262 cb = cbc(ifc,iel,ifld)
263 IF (cb.EQ.
'A ' .AND. ifc.NE.1)
GOTO 9000
268 9000
WRITE (6,*)
' Element face on the axis of symmetry must be FACE 1'
269 WRITE (6,*)
' Element',iel,
' face',ifc,
' is on the axis.'
274 SUBROUTINE chkcbc (CB,IEL,IFC,IFALGN,IERR)
289 IF (cb.EQ.
'SH ' .OR. cb.EQ.
'sh ' .OR.
290 $ cb.EQ.
'SHL' .OR. cb.EQ.
'shl' .OR.
291 $ cb.EQ.
'S ' .OR. cb.EQ.
's ' .OR.
292 $ cb.EQ.
'SL ' .OR. cb.EQ.
'sl ' .OR.
293 $ cb.EQ.
'MM ' .OR. cb.EQ.
'mm ' .OR.
294 $ cb.EQ.
'MS ' .OR. cb.EQ.
'ms ' .OR.
295 $ cb.EQ.
'MSI' .OR. cb.EQ.
'msi' )
GOTO 9001
297 IF ( .NOT.ifalgn .AND.
298 $ (cb.EQ.
'ON ' .OR. cb.EQ.
'on ' .OR. cb.EQ.
'SYM') )
GOTO 9010
302 9001
WRITE (6,*)
' Illegal traction boundary conditions detected for'
305 9010
WRITE (6,*)
' Mixed B.C. on a side nonaligned with either the X,Y,
306 $ or Z axis detected for'
308 9999
WRITE (6,*)
' Element',ieg,
' side',ifc
309 WRITE (6,*)
' Requires PN/PN-2 STRESS FORMULATION'
331 logical ifalgn,ifnorx,ifnory,ifnorz
342 CALL stsmask (w1mask,w2mask,w3mask)
345 if (cbc(f,e,1).eq.
'msi'.or.cbc(f,e,1).eq.
'msi')
then
346 call facev(w1mask,e,f,0.0,lx1,ly1,lz1)
347 call facev(w2mask,e,f,0.0,lx1,ly1,lz1)
348 call facev(w3mask,e,f,0.0,lx1,ly1,lz1)
363 call rone(pmask,ntot)
366 cb=cbc(iface,iel,ifield)
367 if (cb.eq.
'O ' .or. cb.eq.
'ON ' .or.
368 $ cb.eq.
'o ' .or. cb.eq.
'on ')
369 $
call facev(pmask,iel,iface,0.0,lx1,ly1,lz1)
371 if (nelt.gt.nelv)
then
372 nn=lx1*ly1*lz1*(nelt-nelv)
373 call rzero(pmask(1,1,1,nelv+1),nn)
378 CALL dsop(pmask,
'MUL',lx1,ly1,lz1)
383 CALL stsmask (v1mask,v2mask,v3mask)
386 CALL rone(v1mask,ntot)
387 CALL rone(v2mask,ntot)
388 CALL rone(v3mask,ntot)
391 DO 100 iface=1,nfaces
392 cb =cbc(iface,iel,ifield)
393 CALL chknord (ifalgn,ifnorx,ifnory,ifnorz,iface,iel)
397 IF (cb.EQ.
'v ' .OR. cb.EQ.
'V ' .OR. cb.EQ.
'vl ' .OR.
398 $ cb.eq.
'MV ' .or. cb.eq.
'mv ' .or.
399 $ cb.EQ.
'VL ' .OR. cb.EQ.
'W ')
THEN
400 CALL facev (v1mask,iel,iface,0.0,lx1,ly1,lz1)
401 CALL facev (v2mask,iel,iface,0.0,lx1,ly1,lz1)
402 CALL facev (v3mask,iel,iface,0.0,lx1,ly1,lz1)
408 IF (cb.EQ.
'SYM')
THEN
409 IF ( .NOT.ifalgn .OR. ifnorx )
410 $
CALL facev (v1mask,iel,iface,0.0,lx1,ly1,lz1)
412 $
CALL facev (v2mask,iel,iface,0.0,lx1,ly1,lz1)
414 $
CALL facev (v3mask,iel,iface,0.0,lx1,ly1,lz1)
418 IF (cb.EQ.
'ON ' .OR. cb.EQ.
'on ')
THEN
419 IF ( ifnory .OR. ifnorz )
420 $
CALL facev (v1mask,iel,iface,0.0,lx1,ly1,lz1)
421 IF ( .NOT.ifalgn .OR. ifnorx .OR. ifnorz )
422 $
CALL facev (v2mask,iel,iface,0.0,lx1,ly1,lz1)
423 IF ( .NOT.ifalgn .OR. ifnorx .OR. ifnory )
424 $
CALL facev (v3mask,iel,iface,0.0,lx1,ly1,lz1)
428 CALL facev (v2mask,iel,iface,0.0,lx1,ly1,lz1)
432 call opdsop(v1mask,v2mask,v3mask,
'MUL')
436 CALL rone(omask,ntot)
438 DO 200 iface=1,nfaces
439 cb =cbc(iface,iel,ifield)
441 CALL facev (omask,iel,iface,0.0,lx1,ly1,lz1)
444 CALL dsop(omask,
'MUL',lx1,ly1,lz1)
452 DO 1200 ifield=2,nfield
456 CALL rone (tmask(1,1,1,1,ipscal),ntot)
458 DO 1100 iface=1,nfaces
459 cb =cbc(iface,iel,ifield)
463 IF (cb.EQ.
'T ' .OR. cb.EQ.
't ' .OR.
464 $ (cb.EQ.
'A ' .AND. ifaziv) .OR.
465 $ cb.EQ.
'MCI' .OR. cb.EQ.
'MLI' .OR.
466 $ cb.EQ.
'KD ' .OR. cb.EQ.
'kd ' .OR.
467 $ cb.EQ.
'ED ' .OR. cb.EQ.
'ed ' .OR.
468 $ cb.EQ.
'KW ' .OR. cb.EQ.
'KWS' .OR. cb.EQ.
'EWS')
469 $
CALL facev (tmask(1,1,1,1,ipscal),
470 $ iel,iface,0.0,lx1,ly1,lz1)
472 CALL dsop (tmask(1,1,1,1,ipscal),
'MUL',lx1,ly1,lz1)
486 call rone(bpmask,ntot)
489 cb=cbc(iface,iel,ifield)
490 if (cb.eq.
'O ' .or. cb.eq.
'ON ')
491 $
call facev(bpmask,iel,iface,0.0,lx1,ly1,lz1)
497 call dsop(bpmask,
'MUL',lx1,ly1,lz1)
502 call stsmask (b1mask,b2mask,b3mask)
505 call rone(b1mask,ntot)
506 call rone(b2mask,ntot)
507 call rone(b3mask,ntot)
511 cb =cbc(iface,iel,ifield)
512 call chknord (ifalgn,ifnorx,ifnory,ifnorz,iface,iel)
514 if (cb.eq.
'v ' .or. cb.eq.
'V ' .or. cb.eq.
'vl ' .or.
515 $ cb.eq.
'VL ' .or. cb.eq.
'W ')
then
519 call facev (b1mask,iel,iface,0.0,lx1,ly1,lz1)
520 call facev (b2mask,iel,iface,0.0,lx1,ly1,lz1)
521 call facev (b3mask,iel,iface,0.0,lx1,ly1,lz1)
523 elseif (cb.eq.
'SYM')
then
527 if ( .not.ifalgn .or. ifnorx )
528 $
call facev (b1mask,iel,iface,0.0,lx1,ly1,lz1)
530 $
call facev (b2mask,iel,iface,0.0,lx1,ly1,lz1)
532 $
call facev (b3mask,iel,iface,0.0,lx1,ly1,lz1)
534 elseif (cb.eq.
'ON ')
then
538 if ( ifnory .or. ifnorz )
539 $
call facev (b1mask,iel,iface,0.0,lx1,ly1,lz1)
540 if ( .not.ifalgn .or. ifnorx .or. ifnorz )
541 $
call facev (b2mask,iel,iface,0.0,lx1,ly1,lz1)
542 if ( .not.ifalgn .or. ifnorx .or. ifnory )
543 $
call facev (b3mask,iel,iface,0.0,lx1,ly1,lz1)
545 elseif (cb.eq.
'A ')
then
549 call facev (b2mask,iel,iface,0.0,lx1,ly1,lz1)
554 $
call facev (b1mask,iel,iface,0.0,lx1,ly1,lz1)
556 $
call facev (b2mask,iel,iface,0.0,lx1,ly1,lz1)
557 if ( cb1(3).eq.
'd' .and. if3d )
558 $
call facev (b3mask,iel,iface,0.0,lx1,ly1,lz1)
564 call dsop(b1mask,
'MUL',lx1,ly1,lz1)
565 call dsop(b2mask,
'MUL',lx1,ly1,lz1)
566 if (ldim.eq.3)
call dsop(b3mask,
'MUL',lx1,ly1,lz1)
573 SUBROUTINE bcdirvc(V1,V2,V3,mask1,mask2,mask3)
585 COMMON /scruz/ tmp1(lx1,ly1,lz1,lelv)
586 $ , tmp2(lx1,ly1,lz1,lelv)
587 $ , tmp3(lx1,ly1,lz1,lelv)
588 COMMON /scrmg/ tmq1(lx1,ly1,lz1,lelv)
589 $ , tmq2(lx1,ly1,lz1,lelv)
590 $ , tmq3(lx1,ly1,lz1,lelv)
592 REAL V1(lx1,ly1,lz1,LELV),V2(lx1,ly1,lz1,LELV)
593 $ ,V3(lx1,ly1,lz1,LELV)
594 real mask1(lx1,ly1,lz1,lelv),mask2(lx1,ly1,lz1,lelv)
595 $ ,mask3(lx1,ly1,lz1,lelv)
606 if (icalld.eq.0)
then
620 CALL rzero(tmp1,ntot)
621 CALL rzero(tmp2,ntot)
622 IF (if3d)
CALL rzero(tmp3,ntot)
629 DO 2000 iface=1,nfaces
630 cb = cbc(iface,ie,ifield)
631 bc1 = bc(1,iface,ie,ifield)
632 bc2 = bc(2,iface,ie,ifield)
633 bc3 = bc(3,iface,ie,ifield)
635 IF (cb.EQ.
'V ' .OR. cb.EQ.
'VL ' .OR.
636 $ cb.EQ.
'WS ' .OR. cb.EQ.
'WSL')
THEN
637 CALL facev (tmp1,ie,iface,bc1,lx1,ly1,lz1)
638 CALL facev (tmp2,ie,iface,bc2,lx1,ly1,lz1)
639 IF (if3d)
CALL facev (tmp3,ie,iface,bc3,lx1,ly1,lz1)
640 IF ( ifqinp(iface,ie) )
641 $
CALL globrot (tmp1(1,1,1,ie),tmp2(1,1,1,ie),
642 $ tmp3(1,1,1,ie),ie,iface)
645 IF (cb.EQ.
'v ' .OR. cb.EQ.
'vl ' .OR.
646 $ cb.EQ.
'ws ' .OR. cb.EQ.
'wsl' .OR.
647 $ cb.EQ.
'mv ' .OR. cb.EQ.
'mvn' .OR.
648 $ cb1(1).eq.
'd'.or.cb1(2).eq.
'd'.or.cb1(3).eq.
'd')
then
650 call faceiv (cb,tmp1(1,1,1,ie),tmp2(1,1,1,ie),
651 $ tmp3(1,1,1,ie),ie,iface,lx1,ly1,lz1)
653 IF ( ifqinp(iface,ie) )
654 $
CALL globrot (tmp1(1,1,1,ie),tmp2(1,1,1,ie),
655 $ tmp3(1,1,1,ie),ie,iface)
658 IF (cb.EQ.
'ON ' .OR. cb.EQ.
'on ')
then
660 CALL faceiv (
'v ',tmp1(1,1,1,ie),tmp2(1,1,1,ie),
661 $ tmp3(1,1,1,ie),ie,iface,lx1,ly1,lz1)
666 DO 2010 iface=1,nfaces
667 IF (cbc(iface,ie,ifield).EQ.
'W ')
THEN
668 CALL facev (tmp1,ie,iface,0.0,lx1,ly1,lz1)
669 CALL facev (tmp2,ie,iface,0.0,lx1,ly1,lz1)
670 IF (if3d)
CALL facev (tmp3,ie,iface,0.0,lx1,ly1,lz1)
676 if (isweep.eq.1)
then
677 call opdsop(tmp1,tmp2,tmp3,
'MXA')
679 call opdsop(tmp1,tmp2,tmp3,
'MNA')
685 IF ( .NOT.ifstrs )
THEN
686 CALL col2(v1,mask1,ntot)
687 CALL col2(v2,mask2,ntot)
688 IF (if3d)
CALL col2(v3,mask3,ntot)
692 if (if3d)
call antimsk1(tmp3,mask3,ntot)
695 CALL rmask (v1,v2,v3,nelv)
698 CALL add2(v1,tmp1,ntot)
699 CALL add2(v2,tmp2,ntot)
700 IF (if3d)
CALL add2(v3,tmp3,ntot)
721 dimension s(lx1,ly1,lz1,lelt)
722 COMMON /scrsf/ tmp(lx1,ly1,lz1,lelt)
723 $ , tma(lx1,ly1,lz1,lelt)
724 $ , smu(lx1,ly1,lz1,lelt)
728 if (icalld.eq.0)
then
750 DO 2010 iface=1,nfaces
751 cb=cbc(iface,ie,ifield)
752 bc1=bc(1,iface,ie,ifield)
753 bc2=bc(2,iface,ie,ifield)
754 bc3=bc(3,iface,ie,ifield)
755 bc4=bc(4,iface,ie,ifield)
756 bck=bc(4,iface,ie,ifld)
757 bce=bc(5,iface,ie,ifld)
758 IF (cb.EQ.
'T ')
CALL facev (tmp,ie,iface,bc1,lx1,ly1,lz1)
759 IF (cb.EQ.
'MCI')
CALL facev (tmp,ie,iface,bc4,lx1,ly1,lz1)
760 IF (cb.EQ.
'MLI')
CALL facev (tmp,ie,iface,bc4,lx1,ly1,lz1)
761 IF (cb.EQ.
'KD ')
CALL facev (tmp,ie,iface,bck,lx1,ly1,lz1)
762 IF (cb.EQ.
'ED ')
CALL facev (tmp,ie,iface,bce,lx1,ly1,lz1)
763 IF (cb.EQ.
't ' .OR. cb.EQ.
'kd ' .or.
764 $ cb.EQ.
'ed ' .or. cb.eq.
'o ' .or. cb.eq.
'on ')
765 $
CALL faceis (cb,tmp(1,1,1,ie),ie,iface,lx1,ly1,lz1)
770 IF (isweep.EQ.1)
CALL dsop(tmp,
'MXA',lx1,ly1,lz1)
771 IF (isweep.EQ.2)
CALL dsop(tmp,
'MNA',lx1,ly1,lz1)
776 CALL col2(s,tmask(1,1,1,1,ifield-1),ntot)
777 CALL add2(s,tmp,ntot)
802 dimension s(lx1,ly1,lz1,lelt)
806 if (icalld.eq.0)
then
820 IF (itype.EQ.-1)
THEN
825 DO 1000 iface=1,nfaces
827 cb =cbc(iface,ie,ifield)
828 IF (cb.EQ.
'C ' .OR. cb.EQ.
'c ' .OR.
829 $ cb.EQ.
'R ' .OR. cb.EQ.
'r ')
THEN
831 IF (cb.EQ.
'C ') hc = bc(2,iface,ie,ifield)
833 tinf = bc(1,iface,ie,ifield)
834 hrad = bc(2,iface,ie,ifield)
840 CALL facind (kx1,kx2,ky1,ky2,kz1,kz2,lx1,ly1,lz1,iface)
845 ts = t(ix,iy,iz,ie,ifield-1)
846 IF (cb.EQ.
'c ' .OR. cb.EQ.
'r ')
THEN
847 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,ie)
848 CALL userbc (ix,iy,iz,iface,ieg)
850 IF (cb.EQ.
'r ' .OR. cb.EQ.
'R ')
851 $ hc = hrad * (tinf**2 + ts**2) * (tinf + ts)
852 s(ix,iy,iz,ie) = s(ix,iy,iz,ie) +
853 $ hc*area(ia,1,iface,ie)/bm1(ix,iy,iz,ie)
863 DO 2000 iface=1,nfaces
865 cb =cbc(iface,ie,ifield)
866 IF (cb.EQ.
'F ' .OR. cb.EQ.
'f ' .OR.
867 $ cb.EQ.
'C ' .OR. cb.EQ.
'c ' .OR.
868 $ cb.EQ.
'R ' .OR. cb.EQ.
'r ' )
THEN
870 IF (cb.EQ.
'F ') flux=bc(1,iface,ie,ifield)
871 IF (cb.EQ.
'C ') flux=bc(1,iface,ie,ifield)
872 $ *bc(2,iface,ie,ifield)
874 tinf=bc(1,iface,ie,ifield)
875 hrad=bc(2,iface,ie,ifield)
882 CALL facind (kx1,kx2,ky1,ky2,kz1,kz2,lx1,ly1,lz1,iface)
887 ts = t(ix,iy,iz,ie,ifield-1)
889 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,ie)
890 CALL userbc (ix,iy,iz,iface,ieg)
893 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,ie)
894 CALL userbc (ix,iy,iz,iface,ieg)
898 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,ie)
899 CALL userbc (ix,iy,iz,iface,ieg)
901 IF (cb.EQ.
'R ' .OR. cb.EQ.
'r ')
902 $ flux = hrad*(tinf**2 + ts**2)*(tinf + ts) * tinf
906 s(ix,iy,iz,ie) = s(ix,iy,iz,ie)
907 $ + flux*area(ia,1,iface,ie)
918 SUBROUTINE faceis (CB,S,IEL,IFACE,NX,NY,NZ)
929 dimension s(lx1,ly1,lz1)
942 CALL facind (kx1,kx2,ky1,ky2,kz1,kz2,nx,ny,nz,iface)
948 if (tmask(ix,iy,iz,iel,ifld1).eq.0)
then
949 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
950 CALL userbc (ix,iy,iz,iface,ieg)
956 elseif (cb.eq.
'o ' .or. cb.eq.
'on ')
then
960 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
961 CALL userbc (ix,iy,iz,iface,ieg)
966 ELSEIF (cb.EQ.
'ms ' .OR. cb.EQ.
'msi')
THEN
971 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
972 CALL userbc (ix,iy,iz,iface,ieg)
976 ELSEIF (cb.EQ.
'kd ')
THEN
981 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
982 CALL userbc (ix,iy,iz,iface,ieg)
986 ELSEIF (cb.EQ.
'ed ')
THEN
991 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
992 CALL userbc (ix,iy,iz,iface,ieg)
1001 SUBROUTINE faceiv (CB,V1,V2,V3,IEL,IFACE,NX,NY,NZ)
1010 dimension v1(nx,ny,nz),v2(nx,ny,nz),v3(nx,ny,nz)
1022 CALL facind (kx1,kx2,ky1,ky2,kz1,kz2,nx,ny,nz,iface)
1024 IF (cb.EQ.
'v ' .OR. cb.EQ.
'ws ' .OR. cb.EQ.
'mv '.OR.
1030 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1031 CALL userbc (ix,iy,iz,iface,ieg)
1038 elseif (cb1(1).eq.
'd'.or.cb1(2).eq.
'd'.or.cb1(3).eq.
'd')
then
1043 if (optlevel.le.2)
call nekasgn (ix,iy,iz,iel)
1044 call userbc (ix,iy,iz,iface,ieg)
1045 if (cb1(1).eq.
'd') v1(ix,iy,iz) = ux
1046 if (cb1(2).eq.
'd') v2(ix,iy,iz) = uy
1047 if (cb1(3).eq.
'd') v3(ix,iy,iz) = uz
1053 ELSEIF (cb.EQ.
'vl ' .OR. cb.EQ.
'wsl')
THEN
1058 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1059 CALL userbc (ix,iy,iz,iface,ieg)
1066 ELSEIF (cb.EQ.
's ' .OR. cb.EQ.
'sh ')
THEN
1071 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1072 CALL userbc (ix,iy,iz,iface,ieg)
1079 ELSEIF (cb.EQ.
'sl ' .OR. cb.EQ.
'shl')
THEN
1084 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1085 CALL userbc (ix,iy,iz,iface,ieg)
1091 ELSEIF (cb.EQ.
'ms ')
THEN
1096 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1097 CALL userbc (ix,iy,iz,iface,ieg)
1103 ELSEIF (cb.EQ.
'on ' .OR. cb.EQ.
'o ')
THEN
1108 if (optlevel.le.2)
CALL nekasgn (ix,iy,iz,iel)
1109 CALL userbc (ix,iy,iz,iface,ieg)
1167 COMMON /screv / sii(lx1,ly1,lz1,lelt)
1168 $ , siii(lx1,ly1,lz1,lelt)
1175 if (r.gt.0.0) r=sqrt(r)
1176 if (x.ne.0.0 .or. y.ne.0.0) theta = atan2(y,x)
1181 temp = t(ix,iy,iz,e,1)
1183 ps(ips) = t(ix,iy,iz,e,ips+1)
1189 si2 = sii(ix,iy,iz,e)
1190 si3 = siii(ix,iy,iz,e)
1191 udiff = vdiff(ix,iy,iz,e,ifield)
1192 utrans= vtrans(ix,iy,iz,e,ifield)
1205 COMMON /scrsf/ trx(lx1,ly1,lz1)
1206 $ , try(lx1,ly1,lz1)
1207 $ , trz(lx1,ly1,lz1)
1208 COMMON /ctmp0/ stc(lx1,ly1,lz1)
1211 LOGICAL IFALGN,IFNORX,IFNORY,IFNORZ
1223 cb = cbc(ifc,iel,ifld)
1224 bc1 = bc(1,ifc,iel,ifld)
1225 bc2 = bc(2,ifc,iel,ifld)
1226 bc3 = bc(3,ifc,iel,ifld)
1227 bc4 = bc(4,ifc,iel,ifld)
1228 CALL rzero3 (trx,try,trz,nxyz1)
1232 IF (cb.EQ.
'S ' .OR. cb.EQ.
'SL ' .OR.
1233 $ cb.EQ.
'SH ' .OR. cb.EQ.
'SHL' )
THEN
1234 CALL trcon (trx,try,trz,bc1,bc2,bc3,iel,ifc)
1235 IF (ifqinp(ifc,iel))
CALL globrot (trx,try,trz,iel,ifc)
1238 IF (cb.EQ.
's ' .OR. cb.EQ.
'sl ' .OR.
1239 $ cb.EQ.
'sh ' .OR. cb.EQ.
'shl' )
THEN
1240 CALL faceiv (cb,trx,try,trz,iel,ifc,lx1,ly1,lz1)
1241 CALL faccvs (trx,try,trz,area(1,1,ifc,iel),ifc)
1242 IF (ifqinp(ifc,iel))
CALL globrot (trx,try,trz,iel,ifc)
1248 IF (cb.EQ.
'ON ' .OR. cb.EQ.
'O ')
THEN
1252 CALL trcon (trx,try,trz,bcn,bc2,bc3,iel,ifc)
1253 CALL globrot (trx,try,trz,iel,ifc)
1256 IF (cb.EQ.
'on ' .OR. cb.EQ.
'o ')
THEN
1257 CALL faceiv (cb,trx,try,trz,iel,ifc,lx1,ly1,lz1)
1258 CALL faccvs (trx,try,trz,area(1,1,ifc,iel),ifc)
1259 CALL globrot (trx,try,trz,iel,ifc)
1265 IF (cb.EQ.
'MS ' .OR. cb.EQ.
'MSI' .OR.
1266 $ cb.EQ.
'MM ' .OR. cb.EQ.
'mm ' .OR.
1267 $ cb.EQ.
'ms ' .OR. cb.EQ.
'msi')
THEN
1268 IF (cb.EQ.
'MS '.or.cb.eq.
'MM ')
THEN
1270 CALL trcon (trx,try,trz,bcn,bc2,bc3,iel,ifc)
1271 CALL globrot (trx,try,trz,iel,ifc)
1274 IF (cb.EQ.
'ms '.or.cb.eq.
'msi')
THEN
1275 CALL faceiv (cb,trx,try,trz,iel,ifc,lx1,ly1,lz1)
1276 CALL faccvs (trx,try,trz,area(1,1,ifc,iel),ifc)
1277 CALL globrot (trx,try,trz,iel,ifc)
1279 IF (cb(1:1).EQ.
'M')
THEN
1280 CALL cfill (sigst,bc4,nxy1)
1282 CALL faceis (cb,stc,iel,ifc,lx1,ly1,lz1)
1283 CALL facexs (sigst,stc,ifc,0)
1286 CALL trstax (trx,try,sigst,iel,ifc)
1287 ELSEIF (ldim.EQ.2)
THEN
1288 CALL trst2d (trx,try,sigst,iel,ifc)
1290 CALL trst3d (trx,try,trz,sigst,iel,ifc)
1294 120
CALL add2 (bfx(1,1,1,iel),trx,nxyz1)
1295 CALL add2 (bfy(1,1,1,iel),try,nxyz1)
1296 IF (ldim.EQ.3)
CALL add2 (bfz(1,1,1,iel),trz,nxyz1)
1303 SUBROUTINE trcon (TRX,TRY,TRZ,TR1,TR2,TR3,IEL,IFC)
1309 dimension trx(lx1,ly1,lz1)
1310 $ , try(lx1,ly1,lz1)
1311 $ , trz(lx1,ly1,lz1)
1313 CALL dsset(lx1,ly1,lz1)
1315 js1 = skpdat(1,iface)
1316 jf1 = skpdat(2,iface)
1317 jskip1 = skpdat(3,iface)
1318 js2 = skpdat(4,iface)
1319 jf2 = skpdat(5,iface)
1320 jskip2 = skpdat(6,iface)
1324 DO 100 j2=js2,jf2,jskip2
1325 DO 100 j1=js1,jf1,jskip1
1327 trx(j1,j2,1) = tr1*area(i,1,ifc,iel)
1328 try(j1,j2,1) = tr2*area(i,1,ifc,iel)
1331 DO 200 j2=js2,jf2,jskip2
1332 DO 200 j1=js1,jf1,jskip1
1334 trx(j1,j2,1) = tr1*area(i,1,ifc,iel)
1335 try(j1,j2,1) = tr2*area(i,1,ifc,iel)
1336 trz(j1,j2,1) = tr3*area(i,1,ifc,iel)
1352 COMMON /ctmp1/ a1x(lx1),a1y(lx1),stx(lx1),sty(lx1)
1354 dimension trx(lx1,ly1,lz1),try(lx1,ly1,lz1),sigst(lx1,1)
1355 dimension cang(2),sang(2)
1356 dimension ixn(2),iyn(2),ian(2)
1359 aa = sigst(ix,1) * wxm1(ix)
1360 stx(ix) = t1x(ix,1,ifc,iel) * aa
1361 sty(ix) = t1y(ix,1,ifc,iel) * aa
1364 IF (ifc.EQ.3 .OR. ifc.EQ.4)
THEN
1369 IF (ifc.EQ.1 .OR. ifc.EQ.3)
THEN
1370 CALL mxm (dxtm1,lx1,stx,lx1,a1x,1)
1371 CALL mxm (dxtm1,lx1,sty,lx1,a1y,1)
1373 CALL mxm (dytm1,ly1,stx,ly1,a1x,1)
1374 CALL mxm (dytm1,ly1,sty,ly1,a1y,1)
1377 CALL dsset (lx1,ly1,lz1)
1379 js1 = skpdat(1,iface)
1380 jf1 = skpdat(2,iface)
1381 jskip1 = skpdat(3,iface)
1382 js2 = skpdat(4,iface)
1383 jf2 = skpdat(5,iface)
1384 jskip2 = skpdat(6,iface)
1387 DO 200 j2=js2,jf2,jskip2
1388 DO 200 j1=js1,jf1,jskip1
1390 trx(j1,j2,1) = trx(j1,j2,1) - a1x(i)
1391 try(j1,j2,1) = try(j1,j2,1) - a1y(i)
1396 CALL ctang2d (cang,sang,ixn,iyn,ian,ifc,iel)
1401 trx(ix,iy,1)=trx(ix,iy,1) + sigst(ia,1)*cang(i)
1402 try(ix,iy,1)=try(ix,iy,1) + sigst(ia,1)*sang(i)
1417 COMMON /ctmp1/ a1x(lx1),a1y(lx1),a2x(lx1),a2y(lx1)
1418 $ , stx(lx1),sty(lx1),xjm1(lx1)
1419 COMMON /ctmp0/ xfm1(lx1),yfm1(lx1),t1xf(lx1),t1yf(lx1)
1421 dimension trx(lx1,ly1,lz1),try(lx1,ly1,lz1),sigst(lx1,ly1)
1422 dimension cang(2),sang(2)
1423 dimension ixn(2),iyn(2),ian(2)
1427 IF ( ifrzer(iel) .AND. (ifc.EQ.2 .OR. ifc.EQ.4) ) ifglj = .true.
1428 CALL facec2 (xfm1,yfm1,xm1(1,1,1,iel),ym1(1,1,1,iel),ifc)
1431 CALL mxm (dam1,ly1,xfm1,ly1,t1xf,1)
1432 CALL mxm (dam1,ly1,yfm1,ly1,t1yf,1)
1435 CALL mxm (dxm1,lx1,xfm1,lx1,t1xf,1)
1436 CALL mxm (dxm1,lx1,yfm1,lx1,t1yf,1)
1440 xjm1(ix)=sqrt( t1xf(ix)**2 + t1yf(ix)**2 )
1441 t1xf(ix)=t1xf(ix) / xjm1(ix)
1442 t1yf(ix)=t1yf(ix) / xjm1(ix)
1446 CALL mxm (dam1,1,t1xf,ly1,t1xs0,1)
1447 CALL mxm (dam1,1,uny(1,1,ifc,iel),ly1,unys0,1)
1448 ddx = wam1(1)*sigst(1,1)*t1xs0*ys0
1449 ddy = wam1(1)*sigst(1,1)*t1yf(1)*ys0*2.0
1450 a2x(1) = wam1(1)*sigst(1,1)*xjm1(1)*unx(1,1,ifc,iel)*unys0
1455 aa = wam1(iy) * sigst(iy,1) / (1.0 + zam1(iy))
1456 stx(iy) = t1xf(iy) * aa
1457 sty(iy) = t1yf(iy) * aa
1458 aa = aa * xjm1(iy) * uny(iy,1,ifc,iel)
1459 a2x(iy) = unx(iy,1,ifc,iel) * aa
1460 a2y(iy) = uny(iy,1,ifc,iel) * aa
1464 aa = sigst(ix,1) * wxm1(ix)
1465 stx(ix) = t1xf(ix) * aa
1466 sty(ix) = t1yf(ix) * aa
1467 aa = aa * xjm1(ix) * uny(ix,1,ifc,iel)
1468 a2x(ix) = unx(ix,1,ifc,iel) * aa
1469 a2y(ix) = uny(ix,1,ifc,iel) * aa
1475 ysiy = t1yf(iy)*xjm1(iy)
1477 dty1 = datm1(iy,1)*ddy
1482 dtys = datm1(iy,j)*yfm1(j)
1483 dtx1 = dtx1 + dtys*stx(j)
1484 dty3 = dty3 + dtys*sty(j)
1486 a1x(iy) = dtx1 + dtx2
1487 a1y(iy) = dty1 + dty2 + dty3
1489 a1x(1) = a1x(1) + ddx
1491 CALL mxm (dxtm1,lx1,stx,lx1,a1x,1)
1492 CALL mxm (dxtm1,lx1,sty,lx1,a1y,1)
1493 CALL col2 (a1x,yfm1,lx1)
1494 CALL col2 (a1y,yfm1,lx1)
1497 CALL dsset (lx1,ly1,lz1)
1499 js1 = skpdat(1,iface)
1500 jf1 = skpdat(2,iface)
1501 jskip1 = skpdat(3,iface)
1502 js2 = skpdat(4,iface)
1503 jf2 = skpdat(5,iface)
1504 jskip2 = skpdat(6,iface)
1507 DO 300 j2=js2,jf2,jskip2
1508 DO 300 j1=js1,jf1,jskip1
1510 trx(j1,j2,1) = trx(j1,j2,1) - a2x(i) - a1x(i)
1511 try(j1,j2,1) = try(j1,j2,1) - a2y(i) - a1y(i)
1516 CALL ctang2d (cang,sang,ixn,iyn,ian,ifc,iel)
1521 aa = sigst(ia,1)*ym1(ix,iy,1,iel)
1522 trx(ix,iy,1)=trx(ix,iy,1) + aa*cang(i)
1523 try(ix,iy,1)=try(ix,iy,1) + aa*sang(i)
1529 SUBROUTINE ctang2d (CANG,SANG,IXN,IYN,IAN,IFC,IEL)
1536 dimension cang(2),sang(2)
1537 dimension ixn(2),iyn(2),ian(2),isn(2),nebpt(4,2)
1540 DATA nebpt /4,1,2,3, 2,3,4,1/
1546 cbn = cbc(ifcn,iel,ifld)
1553 IF (cbn.EQ.
'E '.OR.cbn.EQ.
'P '.OR.cbn.eq.
'p '.or.
1554 $ cbn(1:1).EQ.
'M' .OR. cbn(1:1).EQ.
'm')
GOTO 100
1557 IF (nc .EQ.2 .OR. nc .EQ.3) ixn(i) = lx1
1558 IF (nc .EQ.3 .OR. nc .EQ.4) iyn(i) = ly1
1559 IF (ifc .EQ.2 .OR. ifc .EQ.3) isn(i) = lx1
1560 IF (ifcn.EQ.2 .OR. ifcn.EQ.3) ian(i) = lx1
1565 IF (cbn(1:1).EQ.
'V' .OR. cbn(1:1).EQ.
'v' .OR.
1566 $ cbn .EQ.
'S ' .OR. cbn .EQ.
's ' .OR.
1567 $ cbn .EQ.
'SL ' .OR. cbn .EQ.
'sl ' .OR.
1568 $ cbn(1:1).EQ.
'O' .OR. cbn(1:1).EQ.
'o' )
THEN
1573 unlx=unx(is,1,ifcn,iel)
1574 unly=uny(is,1,ifcn,iel)
1576 dot =ux*unlx + uy*unly
1577 IF (
dot.LT.0.0) um=-um
1583 cang(i)=unx(is,1,ifcn,iel)
1584 sang(i)=uny(is,1,ifcn,iel)
1590 SUBROUTINE trst3d (TRX,TRY,TRZ,SIGST,IEL,IFC)
1597 COMMON /ctmp0/ xfm1(lx1,ly1),yfm1(lx1,ly1),zfm1(lx1,ly1)
1598 COMMON /ctmp1/ drm1(lx1,lx1),drtm1(lx1,ly1)
1599 $ , dsm1(lx1,lx1),dstm1(lx1,ly1)
1601 COMMON /scrmg/ xrm1(lx1,ly1),yrm1(lx1,ly1),zrm1(lx1,ly1)
1602 $ , xsm1(lx1,ly1),ysm1(lx1,ly1),zsm1(lx1,ly1)
1603 COMMON /scruz/ s1x(lx1,ly1),s1y(lx1,ly1),s1z(lx1,ly1)
1604 $ , s2x(lx1,ly1),s2y(lx1,ly1),s2z(lx1,ly1)
1605 COMMON /scrns/ g1x(lx1,ly1),g1y(lx1,ly1),g1z(lx1,ly1)
1606 $ , g2x(lx1,ly1),g2y(lx1,ly1),g2z(lx1,ly1)
1607 $ , gbs(lx1,ly1),gb1l(lx1,ly1),gb2l(lx1,ly1)
1609 dimension trx(lx1,ly1,lz1),try(lx1,ly1,lz1),trz(lx1,ly1,lz1)
1610 dimension sigst(lx1,ly1)
1614 CALL rzero3 (s1x,s1y,s1z,nxy1)
1615 CALL rzero3 (s2x,s2y,s2z,nxy1)
1616 CALL facexv (xfm1,yfm1,zfm1,xm1(1,1,1,iel),ym1(1,1,1,iel),
1617 $ zm1(1,1,1,iel),ifc,0)
1618 CALL setdrs (drm1,drtm1,dsm1,dstm1,ifc)
1620 CALL mxm (drm1,lx1, xfm1,lx1,xrm1,ly1)
1621 CALL mxm (drm1,lx1, yfm1,lx1,yrm1,ly1)
1622 CALL mxm (drm1,lx1, zfm1,lx1,zrm1,ly1)
1623 CALL mxm (xfm1,lx1,dstm1,ly1,xsm1,ly1)
1624 CALL mxm (yfm1,lx1,dstm1,ly1,ysm1,ly1)
1625 CALL mxm (zfm1,lx1,dstm1,ly1,zsm1,ly1)
1635 gb11=gb1x*gb1x + gb1y*gb1y + gb1z*gb1z
1636 gb12=gb1x*gb2x + gb1y*gb2y + gb1z*gb2z
1637 gb22=gb2x*gb2x + gb2y*gb2y + gb2z*gb2z
1638 gdet=gb11*gb22 - gb12*gb12
1639 IF (gdet .LT. 1.e-20)
GO TO 9001
1643 gb1l(ix,iy)=sqrt(gb11)
1644 gb2l(ix,iy)=sqrt(gb22)
1645 gbs(ix,iy)=sqrt(gdet)
1646 wgs(ix,iy)=wxm1(ix)*wym1(iy)*sigst(ix,iy)
1647 bb = gbs(ix,iy) * wgs(ix,iy)
1648 g1x(ix,iy) = bb * ( gt11*gb1x + gt12*gb2x )
1649 g1y(ix,iy) = bb * ( gt11*gb1y + gt12*gb2y )
1650 g1z(ix,iy) = bb * ( gt11*gb1z + gt12*gb2z )
1651 g2x(ix,iy) = bb * ( gt12*gb1x + gt22*gb2x )
1652 g2y(ix,iy) = bb * ( gt12*gb1y + gt22*gb2y )
1653 g2z(ix,iy) = bb * ( gt12*gb1z + gt22*gb2z )
1656 CALL mxm (drtm1,lx1,g1x,lx1,s1x,ly1)
1657 CALL mxm (drtm1,lx1,g1y,lx1,s1y,ly1)
1658 CALL mxm (drtm1,lx1,g1z,lx1,s1z,ly1)
1660 CALL mxm (g2x,lx1,dsm1,ly1,s2x,ly1)
1661 CALL mxm (g2y,lx1,dsm1,ly1,s2y,ly1)
1662 CALL mxm (g2z,lx1,dsm1,ly1,s2z,ly1)
1664 CALL add2 (s1x,s2x,nxy1)
1665 CALL add2 (s1y,s2y,nxy1)
1666 CALL add2 (s1z,s2z,nxy1)
1682 CALL facsub2 (trx,try,trz,s1x,s1y,s1z,ifc)
1686 9001
WRITE ( 6,*)
'Zero area for Element=',iel,
' Face=',ifc
1691 SUBROUTINE setdrs (DRM1,DRTM1,DSM1,DSTM1,IFC)
1696 dimension drm1(lx1,lx1),drtm1(lx1,lx1)
1697 $ , dsm1(ly1,ly1),dstm1(ly1,ly1)
1701 IF (ifc.EQ.5 .OR. ifc.EQ.6)
THEN
1702 CALL copy (drm1 ,dxm1 ,nxy1)
1703 CALL copy (dsm1 ,dym1 ,nxy1)
1704 CALL copy (drtm1,dxtm1,nxy1)
1705 CALL copy (dstm1,dytm1,nxy1)
1706 ELSEIF (ifc.EQ.2 .OR. ifc.EQ.4)
THEN
1707 CALL copy (drm1 ,dym1 ,nxy1)
1708 CALL copy (dsm1 ,dzm1 ,nxy1)
1709 CALL copy (drtm1,dytm1,nxy1)
1710 CALL copy (dstm1,dztm1 ,nxy1)
1712 CALL copy (drm1 ,dzm1 ,nxy1)
1713 CALL copy (dsm1 ,dxm1 ,nxy1)
1714 CALL copy (drtm1,dztm1,nxy1)
1715 CALL copy (dstm1,dxtm1,nxy1)
1734 dimension r1(lx1,ly1,lz1)
1738 CALL dsset (lx1,ly1,lz1)
1740 js1 = skpdat(1,iface)
1741 jf1 = skpdat(2,iface)
1742 jskip1 = skpdat(3,iface)
1743 js2 = skpdat(4,iface)
1744 jf2 = skpdat(5,iface)
1745 jskip2 = skpdat(6,iface)
1749 DO 200 j2=js2,jf2,jskip2
1750 DO 200 j1=js1,jf1,jskip1
1754 r1(j1,j2,1) = rnorl*unx(i,1,ifc,iel) +
1755 $ rtan1*t1x(i,1,ifc,iel)
1756 r2(j1,j2,1) = rnorl*uny(i,1,ifc,iel) +
1757 $ rtan1*t1y(i,1,ifc,iel)
1760 DO 300 j2=js2,jf2,jskip2
1761 DO 300 j1=js1,jf1,jskip1
1766 r1(j1,j2,1) = rnorl*unx(i,1,ifc,iel) +
1767 $ rtan1*t1x(i,1,ifc,iel) +
1768 $ rtan2*t2x(i,1,ifc,iel)
1769 r2(j1,j2,1) = rnorl*uny(i,1,ifc,iel) +
1770 $ rtan1*t1y(i,1,ifc,iel) +
1771 $ rtan2*t2y(i,1,ifc,iel)
1772 r3(j1,j2,1) = rnorl*unz(i,1,ifc,iel) +
1773 $ rtan1*t1z(i,1,ifc,iel) +
1774 $ rtan2*t2z(i,1,ifc,iel)
1791 dimension a1(lx1),a2(lx1),b1(lx1,ly1),b2(lx1,ly1)
1795 IF (ifc.EQ.1 .OR. ifc.EQ.3)
THEN
1796 IF (ifc.EQ.3) iy = ly1
1802 IF (ifc.EQ.2) ix = lx1
1821 dimension a(1),b(1),c(1)
1831 dimension x(1),y(1),z(1)
1833 xlngth = sqrt( x(i)**2 + y(i)**2 + z(i)**2 )
1834 IF (xlngth.NE.0.0)
THEN
1848 COMMON /scrmg/ v1(lx1,ly1,lz1,lelv)
1849 $ , v2(lx1,ly1,lz1,lelv)
1850 $ , v3(lx1,ly1,lz1,lelv)
1851 $ , vv(lx1,ly1,lz1,lelv)
1856 vnor1 =
facdot(v1(1,1,1,iel),unx(1,1,ifc,iel),ifc)
1857 vnor2 =
facdot(v2(1,1,1,iel),uny(1,1,ifc,iel),ifc)
1858 vnor = vnor1 + vnor2
1860 vnor3 =
facdot(v3(1,1,1,iel),unz(1,1,ifc,iel),ifc)
1863 vnor = abs(vnor) / nxz1
1866 IF (vnor .LT. tolv) ivnorl = 0
1881 dimension tmp1(lx1,ly1,lz1,1)
1882 $ , tmp2(lx1,ly1,lz1,1)
1883 $ , tmp3(lx1,ly1,lz1,1)
1888 ntot1 = lx1*ly1*lz1*nelv
1890 CALL rzero (tmp1,ntot1)
1891 CALL rzero (tmp2,ntot1)
1892 IF (if3d)
CALL rzero (tmp3,ntot1)
1896 cb = cbc(ifc,iel,ifield)
1897 bc1 = bc(1,ifc,iel,ifield)
1898 bc2 = bc(2,ifc,iel,ifield)
1899 bc3 = bc(3,ifc,iel,ifield)
1900 IF (cb.EQ.
'V ' .OR. cb.EQ.
'VL ' .OR.
1901 $ cb.EQ.
'WS ' .OR. cb.EQ.
'WSL')
THEN
1902 CALL facev (tmp1,iel,ifc,bc1,lx1,ly1,lz1)
1903 CALL facev (tmp2,iel,ifc,bc2,lx1,ly1,lz1)
1904 IF (ldim.EQ.3)
CALL facev (tmp3,iel,ifc,bc3,lx1,ly1,lz1)
1905 IF (cb.EQ.
'VL ' .OR. cb.EQ.
'WSL')
1906 $
CALL globrot (tmp1(1,1,1,iel),tmp2(1,1,1,iel),
1907 $ tmp3(1,1,1,iel),iel,ifc)
1909 IF (cb.EQ.
'v ' .OR. cb.EQ.
'vl ' .OR.
1910 $ cb.EQ.
'ws ' .OR. cb.EQ.
'wsl' .OR.
1911 $ cb.EQ.
'mv ' .OR. cb.EQ.
'mvn')
THEN
1912 CALL faceiv (cb,tmp1(1,1,1,iel),tmp2(1,1,1,iel),
1913 $ tmp3(1,1,1,iel),iel,ifc,lx1,ly1,lz1)
1914 IF (cb.EQ.
'vl ' .OR. cb.EQ.
'wsl')
1915 $
CALL globrot (tmp1(1,1,1,iel),tmp2(1,1,1,iel),
1916 $ tmp3(1,1,1,iel),iel,ifc)
1933 x(i) = x(i)*(1.-xmask(i))
1942 common /scrmg/ v1(lx1,ly1,lz1,lelt)
1943 $ , v2(lx1,ly1,lz1,lelt)
1944 $ , v3(lx1,ly1,lz1,lelt)
1950 n = lx1*ly1*lz1*nelt
1959 if (cbc(f,e,ifield).eq.
'P '.or.cbc(f,e,ifield).eq.
'p ')
then
1960 call facind2 (js1,jf1,jskip1,js2,jf2,jskip2,f)
1962 do j2=js2,jf2,jskip2
1963 do j1=js1,jf1,jskip1
1965 v1(j1,j2,1,e) = unx(j1,j2,1,e)
1966 v2(j1,j2,1,e) = uny(j1,j2,1,e)
1967 v3(j1,j2,1,e) = unz(j1,j2,1,e)
1979 if (ldim.eq.2)
call rzero(v3,n)
1984 if (cbc(f,e,ifield).eq.
'P '.or.cbc(f,e,ifield).eq.
'p ')
then
1986 call facindr(i0,i1,j0,j1,k0,k1,lx1,ly1,lz1,f)
1992 snorm = abs(v1(i,j,k,e))
1993 $ + abs(v2(i,j,k,e))
1994 $ + abs(v3(i,j,k,e))
1998 if (snorm.gt.eps) ifcyclic = .true.
2006 if (ifcyclic) itest = 1
2009 if (itest.gt.0) ifcyclic = .true.
2019 real tx(lx1,ly1,lz1,lelv)
2020 real ty(lx1,ly1,lz1,lelv)
2021 real tz(lx1,ly1,lz1,lelv)
2033 do 100 iface=1,nfaces
2034 cb = cbc(iface,iel,1)
2035 if (cb.eq.
'v ' .or. cb.eq.
'V ' .or. cb.eq.
'mv ')
then
2036 call facind(kx1,kx2,ky1,ky2,kz1,kz2,lx1,ly1,lz1,iface)
2042 termxyz = tx(ix,iy,iz,iel)*unx(ia,1,iface,iel)
2043 $ + ty(ix,iy,iz,iel)*uny(ia,1,iface,iel)
2044 $ + tz(ix,iy,iz,iel)*unz(ia,1,iface,iel)
2045 terma = terma + area(ia,1,iface,iel)
2046 termvl = termvl+ termxyz * area(ia,1,iface,iel)
2061 real tx(lx1,ly1,lz1,1),
2062 $ ty(lx1,ly1,lz1,1),
2063 $ tz(lx1,ly1,lz1,1),
2064 $ flux(lx1,ly1,lz1,1)
2073 call rzero(flux,ntot)
2076 do 100 iface=1,nfaces
2077 cb = cbc(iface,iel,ifld)
2078 if (cb.ne.
'E ')
then
2079 call facind(kx1,kx2,ky1,ky2,kz1,kz2,lx1,ly1,lz1,iface)
2085 dtmp = tx(ix,iy,iz,iel)*unx(ia,1,iface,iel)
2086 $ + ty(ix,iy,iz,iel)*uny(ia,1,iface,iel)
2087 $ + tz(ix,iy,iz,iel)*unz(ia,1,iface,iel)
2088 flux(ix,iy,iz,iel) = flux(ix,iy,iz,iel)
2089 $ + dtmp*area(ia,1,iface,iel)
2097 SUBROUTINE facind2 (JS1,JF1,JSKIP1,JS2,JF2,JSKIP2,IFC)
2102 CALL dsset (lx1,ly1,lz1)
2104 js1 = skpdat(1,iface)
2105 jf1 = skpdat(2,iface)
2106 jskip1 = skpdat(3,iface)
2107 js2 = skpdat(4,iface)
2108 jf2 = skpdat(5,iface)
2109 jskip2 = skpdat(6,iface)
2129 $
call exitti(
'maxobj too small, increate in SIZE.$',ierr)
2134 if (boundaryid(f,e) .eq. sid_list(i))
then
2135 nmember(iobj) = nmember(iobj) + 1
2138 object(iobj,mem,1) = ieg
2139 object(iobj,mem,2) = f
2163 if (bid.lt.1 .or. bid.gt.lbid)
2164 $
call exitti(
'invalid boundary id!$',bid)
2166 cbc_bmap(bid,ifld) = cbci
2168 if (iftmsh(ifld))
then
2171 if (boundaryidt(ifc,iel).eq.bid)
2172 $ cbc(ifc,iel,ifld) = cbc_bmap(bid,ifld)
2178 if (boundaryid(ifc,iel).eq.bid)
2179 $ cbc(ifc,iel,ifld) = cbc_bmap(bid,ifld)
subroutine unitvec(X, Y, Z, N)
subroutine create_obj(iobjo, sid_list, n)
subroutine chknord(IFALGN, IFNORX, IFNORY, IFNORZ, IFC, IEL)
subroutine setbc(bid, ifld, cbci)
subroutine chkzvn(VMAX, IEL, IFC, IVNORL)
subroutine globrot(R1, R2, R3, IEL, IFC)
subroutine setdrs(DRM1, DRTM1, DSM1, DSTM1, IFC)
subroutine local_bflux(flux, tx, ty, tz, ifld)
subroutine ctang2d(CANG, SANG, IXN, IYN, IAN, IFC, IEL)
subroutine bcneusc(S, ITYPE)
subroutine trstax(TRX, TRY, SIGST, IEL, IFC)
subroutine faceis(CB, S, IEL, IFACE, NX, NY, NZ)
subroutine setlog(ifecho)
subroutine bcdirvc(V1, V2, V3, mask1, mask2, mask3)
real function glcflux(tx, ty, tz)
subroutine trst2d(TRX, TRY, SIGST, IEL, IFC)
subroutine trcon(TRX, TRY, TRZ, TR1, TR2, TR3, IEL, IFC)
subroutine nekasgn(ix, iy, iz, e)
subroutine lfalse(IFA, N)
subroutine rzero3(A, B, C, N)
subroutine antimsk1(X, XMASK, N)
subroutine facind2(JS1, JF1, JSKIP1, JS2, JF2, JSKIP2, IFC)
subroutine chkcbc(CB, IEL, IFC, IFALGN, IERR)
subroutine trst3d(TRX, TRY, TRZ, SIGST, IEL, IFC)
subroutine faceiv(CB, V1, V2, V3, IEL, IFACE, NX, NY, NZ)
subroutine facec2(A1, A2, B1, B2, IFC)
subroutine bctwall(TMP1, TMP2, TMP3)
subroutine exitti(stringi, idata)
real *8 function dnekclock()
subroutine facev(a, ie, iface, val, nx, ny, nz)
subroutine facind(kx1, kx2, ky1, ky2, kz1, kz2, nx, ny, nz, iface)
subroutine dsset(nx, ny, nz)
subroutine facindr(kx1, kx2, ky1, ky2, kz1, kz2, nx, ny, nz, iface)
subroutine dsop(u, op, nx, ny, nz)
real function dot(V1, V2, N)
subroutine chcopy(a, b, n)
subroutine cfill(a, b, n)
subroutine fix_surface_flux
subroutine mxm(a, n1, b, n2, c, n3)
subroutine opdssum(a, b, c)
subroutine opdsop(a, b, c, op)
function facdot(A, B, IFACE1)
subroutine facsub2(A1, A2, A3, B1, B2, B3, IFACE1)
subroutine facexv(A1, A2, A3, B1, B2, B3, IFACE1, IOP)
subroutine stsmask(C1MASK, C2MASK, C3MASK)
subroutine faccvs(A1, A2, A3, B, IFACE1)
subroutine facexs(A, B, IFACE1, IOP)
subroutine rmask(R1, R2, R3, NEL)