24 common /scrns/ resv1(lx1,ly1,lz1,lelv)
25 $ , resv2(lx1,ly1,lz1,lelv)
26 $ , resv3(lx1,ly1,lz1,lelv)
27 $ , dv1(lx1,ly1,lz1,lelv)
28 $ , dv2(lx1,ly1,lz1,lelv)
29 $ , dv3(lx1,ly1,lz1,lelv)
30 common /scrvh/ h1(lx1,ly1,lz1,lelv)
31 $ , h2(lx1,ly1,lz1,lelv)
65 $ ( bxlag(1,ilag ),bylag(1,ilag ),bzlag(1,ilag )
66 $ , bxlag(1,ilag-1),bylag(1,ilag-1),bzlag(1,ilag-1) )
68 call opcopy (bxlag,bylag,bzlag,bx,by,bz)
84 if (icalld.eq.0) tbmhd=0.0
96 do ifield = 2,npscal+1
102 if (ifnav.and.(.not.ifchar))
then
106 write(6,*)
'No IFCHAR for MHD, yet.'
132 call nekuf (bmx,bmy,bmz)
133 call opcolv2 (bmx,bmy,bmz,vtrans(1,1,1,1,ifield),bm1)
151 common /scrns/ ta1(lx1,ly1,lz1,lelv)
152 $ , ta2(lx1,ly1,lz1,lelv)
153 $ , ta3(lx1,ly1,lz1,lelv)
155 ntot1 = lx1*ly1*lz1*nelv
160 call add3s2 (ta1,bbx1,bbx2,ab1,ab2,ntot1)
161 call add3s2 (ta2,bby1,bby2,ab1,ab2,ntot1)
162 call copy (bbx2,bbx1,ntot1)
163 call copy (bby2,bby1,ntot1)
164 call copy (bbx1,bmx,ntot1)
165 call copy (bby1,bmy,ntot1)
166 call add2s1 (bmx,ta1,ab0,ntot1)
167 call add2s1 (bmy,ta2,ab0,ntot1)
169 call add3s2 (ta3,bbz1,bbz2,ab1,ab2,ntot1)
170 call copy (bbz2,bbz1,ntot1)
171 call copy (bbz1,bmz,ntot1)
172 call add2s1 (bmz,ta3,ab0,ntot1)
189 COMMON /scrns/ ta1(lx1,ly1,lz1,lelv)
190 $ , ta2(lx1,ly1,lz1,lelv)
191 $ , ta3(lx1,ly1,lz1,lelv)
192 $ , tb1(lx1,ly1,lz1,lelv)
193 $ , tb2(lx1,ly1,lz1,lelv)
194 $ , tb3(lx1,ly1,lz1,lelv)
195 $ , h2(lx1,ly1,lz1,lelv)
197 ntot1 = lx1*ly1*lz1*nelv
199 CALL cmult2(h2,vtrans(1,1,1,1,ifield),const,ntot1)
200 CALL opcolv3c (tb1,tb2,tb3,bx,by,bz,bm1,bd(2))
204 CALL opcolv3c(ta1,ta2,ta3,bxlag(1,ilag-1),
207 $ bm1lag(1,1,1,1,ilag-1),bd(ilag+1))
209 CALL opcolv3c(ta1,ta2,ta3,bxlag(1,ilag-1),
214 CALL opadd2 (tb1,tb2,tb3,ta1,ta2,ta3)
216 CALL opadd2col (bmx,bmy,bmz,tb1,tb2,tb3,h2)
230 real resv1 (lx1,ly1,lz1,1)
231 real resv2 (lx1,ly1,lz1,1)
232 real resv3 (lx1,ly1,lz1,1)
233 real h1 (lx1,ly1,lz1,1)
234 real h2 (lx1,ly1,lz1,1)
235 common /scruz/ w1(lx1,ly1,lz1,lelv)
236 $ , w2(lx1,ly1,lz1,lelv)
237 $ , w3(lx1,ly1,lz1,lelv)
240 call bcdirvc (bx,by,bz,b1mask,b2mask,b3mask)
242 call opgradt (resv1,resv2,resv3,pm)
243 call opadd2 (resv1,resv2,resv3,bmx,bmy,bmz)
245 call ophx (w1,w2,w3,bx,by,bz,h1,h2)
246 call opsub2 (resv1,resv2,resv3,w1,w2,w3)
260 real resv1 (lx1,ly1,lz1,1)
261 real resv2 (lx1,ly1,lz1,1)
262 real resv3 (lx1,ly1,lz1,1)
263 real h1 (lx1,ly1,lz1,1)
264 real h2 (lx1,ly1,lz1,1)
265 common /scruz/ w1(lx1,ly1,lz1,lelv)
266 $ , w2(lx1,ly1,lz1,lelv)
267 $ , w3(lx1,ly1,lz1,lelv)
269 call bcdirvc (vx,vy,vz,v1mask,v2mask,v3mask)
272 call opgradt (resv1,resv2,resv3,pr)
273 call opadd2 (resv1,resv2,resv3,bfx,bfy,bfz)
275 call ophx (w1,w2,w3,vx,vy,vz,h1,h2)
276 call opsub2 (resv1,resv2,resv3,w1,w2,w3)
304 common /scrns/ w1(lx1,ly1,lz1,lelv)
305 $ , w2(lx1,ly1,lz1,lelv)
306 $ , w3(lx1,ly1,lz1,lelv)
307 $ , dv1(lx1,ly1,lz1,lelv)
308 $ , dv2(lx1,ly1,lz1,lelv)
309 $ , dv3(lx1,ly1,lz1,lelv)
310 $ , dp(lx2,ly2,lz2,lelv)
311 common /scrvh/ h1(lx1,ly1,lz1,lelv)
312 $ , h2(lx1,ly1,lz1,lelv)
313 common /scrhi/ h2inv(lx1,ly1,lz1,lelv)
315 parameter(nset = 1 + lbelv/lelv)
316 common /orthov/ pset(lx2*ly2*lz2*lelv*mxprev,nset)
317 common /orthbi/ nprv(2)
322 if (istep.ge.istart.and.istart.ne.0) ifprjp=.true.
324 if (icalld.eq.0) tpres=0.0
329 ntot1 = lx1*ly1*lz1*nelv
330 ntot2 = lx2*ly2*lz2*nelv
333 call rzero (h1,ntot1)
334 call copy (h2,vtrans(1,1,1,1,ifield),ntot1)
337 call opdiv (dp,ux,uy,uz)
340 call cmult (dp,bdti,ntot2)
346 i = 1 + ifield/ifldmhd
347 if (ifprjp)
call setrhsp (dp,h1,h2,h2inv,pset(1,i),nprv(i))
350 call cmult(dp,scaledt,ntot2)
351 call esolver (dp,h1,h2,h2inv,intype)
352 call cmult(dp,scaledi,ntot2)
353 if (ifprjp)
call gensolnp (dp,h1,h2,h2inv,pset(1,i),nprv(i))
355 call add2(up,dp,ntot2)
358 call opbinv (dv1,dv2,dv3,w1 ,w2 ,w3 ,h2inv)
360 call opadd2cm (ux ,uy ,uz ,dv1,dv2,dv3, dtb )
377 real p (lx2,ly2,lz2,1)
378 $ ,plag (lx2,ly2,lz2,1)
382 ntot2 = lx2*ly2*lz2*nelv
384 if (nbd.eq.2.and.nbdinp.gt.2.and.igeom.le.2)
then
385 call copy(plag,p,ntot2)
386 elseif (nbd.eq.3.and.igeom.le.2)
then
388 const = dtlag(1)/dtlag(2)
393 p(i,1,1,1) = pnm1 + const*(pnm1-pnm2)
397 elseif (nbd.gt.3)
then
398 WRITE (6,*)
'Pressure extrapolation cannot be completed'
399 WRITE (6,*)
'Try a lower-order temporal scheme'
408 real ux(1),uy(1),uz(1)
410 n = lx1*ly1*lz1*nelfld(ifield)
413 if (if3d)
call rzero(uz,n)
422 real ux(1),uy(1),uz(1)
425 n = lx1*ly1*lz1*nelfld(ifield)
426 if (type3.eq.
'L2 ')
then
428 un(1) =
vlsc3(ux,ux,bm1,n)
429 un(2) =
vlsc3(uy,uy,bm1,n)
430 un(3) =
vlsc3(uz,uz,bm1,n)
431 un(1) = un(1) + un(2) + un(3)
435 un(1) =
vlsc3(ux,ux,bm1,n)
436 un(2) =
vlsc3(uy,uy,bm1,n)
437 un(1) = un(1) + un(2)
464 real lf(lx1*ly1*lz1*lelv,ldim)
465 real b1(lx1*ly1*lz1*lelv)
466 real b2(lx1*ly1*lz1*lelv)
467 real b3(lx1*ly1*lz1*lelv)
469 call curl(lf,b1,b2,b3,.false.,w1,w2)
471 ntot = lx1*ly1*lz1*nelv
474 c1 = lf(i,2)*b3(i) - lf(i,3)*b2(i)
475 c2 = lf(i,3)*b1(i) - lf(i,1)*b3(i)
476 c3 = lf(i,1)*b2(i) - lf(i,2)*b1(i)
485 subroutine curl(vort,u,v,w,ifavg,work1,work2)
492 parameter(lt=lx1*ly1*lz1*lelv)
493 real vort(lt,3),work1(1),work2(1),u(1),v(1),w(1)
495 ntot = lx1*ly1*lz1*nelv
498 call dudxyz(work1,w,rym1,sym1,tym1,jacm1,1,2)
499 call dudxyz(work2,v,rzm1,szm1,tzm1,jacm1,1,3)
500 call sub3(vort(1,1),work1,work2,ntot)
502 call dudxyz(work1,u,rzm1,szm1,tzm1,jacm1,1,3)
503 call dudxyz(work2,w,rxm1,sxm1,txm1,jacm1,1,1)
504 call sub3(vort(1,2),work1,work2,ntot)
506 call dudxyz(work1,v,rxm1,sxm1,txm1,jacm1,1,1)
507 call dudxyz(work2,u,rym1,sym1,tym1,jacm1,1,2)
508 call sub3(vort(1,3),work1,work2,ntot)
511 call dudxyz(work1,v,rxm1,sxm1,txm1,jacm1,1,1)
512 call dudxyz(work2,u,rym1,sym1,tym1,jacm1,1,2)
513 call sub3(vort(1,3),work1,work2,ntot)
523 call col2 (vort(1,idim),bm1,ntot)
524 call dssum (vort(1,idim),lx1,ly1,lz1)
525 call col2 (vort(1,idim),binvm1,ntot)
528 call col2 (vort(1,3),bm1,ntot)
529 call dssum (vort(1,3),lx1,ly1,lz1)
530 call col2 (vort(1,3),binvm1,ntot)
556 real lf(lx1*ly1*lz1*ldim,lelt)
557 real b1(lx1*ly1*lz1,lelt)
558 real b2(lx1*ly1*lz1,lelt)
559 real b3(lx1*ly1*lz1,lelt)
615 real lf(lx1*ly1*lz1,3)
625 common /ctmp1x/ lfd(lxd*lyd*lzd,3)
626 $ , bd(lxd*lyd*lzd,3)
627 $ , cb(lx1*ly1*lz1,3)
628 $ , cbd(lxd*lyd*lzd,3)
631 if (icalld .eq. 0)
then
632 write(6,*)
'CALL SET PROJ',lx1,lxd
639 $ , rxm1(1,1,1,e),rym1(1,1,1,e),rzm1(1,1,1,e)
640 $ , sxm1(1,1,1,e),sym1(1,1,1,e),szm1(1,1,1,e)
641 $ , txm1(1,1,1,e),tym1(1,1,1,e),tzm1(1,1,1,e) )
644 call specmp(cbd(1,d),lxd,cb(1,d),lx1,im1d,im1dt,bd)
646 call specmp(bd(1,1),lxd,b1,lx1,im1d,im1dt,lfd)
647 call specmp(bd(1,2),lxd,b2,lx1,im1d,im1dt,lfd)
648 call specmp(bd(1,3),lxd,b3,lx1,im1d,im1dt,lfd)
652 lfd(i,1) = cbd(i,2)*bd(i,3) - cbd(i,3)*bd(i,2)
653 lfd(i,2) = cbd(i,3)*bd(i,1) - cbd(i,1)*bd(i,3)
654 lfd(i,3) = cbd(i,1)*bd(i,2) - cbd(i,2)*bd(i,1)
667 call specmp(lf(1,1),lx1,lfd(1,1),lxd,pmd1,pmd1t,cbd)
668 call specmp(lf(1,2),lx1,lfd(1,2),lxd,pmd1,pmd1t,cbd)
669 call specmp(lf(1,3),lx1,lfd(1,3),lxd,pmd1,pmd1t,cbd)
677 scale = 1./jacm1(i,1,1,e)
678 lf(i,1) =
scale*lf(i,1)
679 lf(i,2) =
scale*lf(i,2)
680 lf(i,3) =
scale*lf(i,3)
686 subroutine spec_curl_e (cb,b1,b2,b3,rx,ry,rz,sx,sy,sz,tx,ty,tz)
693 real cb(lx1*ly1*lz1,3)
694 real b1(1),b2(1),b3(1)
696 real rx(1),ry(1),rz(1)
697 real sx(1),sy(1),sz(1)
698 real tx(1),ty(1),tz(1)
700 common /ctmp0x/ br(lx1*ly1*lz1),bs(lx1*ly1*lz1),bt(lx1*ly1*lz1)
732 cb(i,2) = (br(i)*rz(i)+bs(i)*sz(i)+bt(i)*tz(i))
733 cb(i,3) = -(br(i)*ry(i)+bs(i)*sy(i)+bt(i)*ty(i))
738 cb(i,1) = -(br(i)*rz(i)+bs(i)*sz(i)+bt(i)*tz(i))
739 cb(i,3) = (br(i)*rx(i)+bs(i)*sx(i)+bt(i)*tx(i))
745 cb(i,1) = (br(i)*ry(i)+bs(i)*sy(i)+bt(i)*ty(i))
747 cb(i,2) = -(br(i)*rx(i)+bs(i)*sx(i)+bt(i)*tx(i))
771 real u1(1),u2(1),u3(1),b1(1),b2(1),b3(1)
798 real u1(1),u2(1),u3(1),b1(1),b2(1),b3(1)
802 zpx = 0.5*( u1(i) + b1(i) )
803 zpy = 0.5*( u2(i) + b2(i) )
804 zpz = 0.5*( u3(i) + b3(i) )
806 zmx = 0.5*( u1(i) - b1(i) )
807 zmy = 0.5*( u2(i) - b2(i) )
808 zmz = 0.5*( u3(i) - b3(i) )
842 zpx = 0.5*( u1(i) + b1(i) )
843 zmx = 0.5*( u1(i) - b1(i) )
865 common /scrnt/ besv1(lbx1,lby1,lbz1,lbelv)
866 $ , besv2(lbx1,lby1,lbz1,lbelv)
867 $ , besv3(lbx1,lby1,lbz1,lbelv)
868 COMMON /scrns/ resv1(lx1,ly1,lz1,lelv)
869 $ , resv2(lx1,ly1,lz1,lelv)
870 $ , resv3(lx1,ly1,lz1,lelv)
871 $ , dv1(lx1,ly1,lz1,lelv)
872 $ , dv2(lx1,ly1,lz1,lelv)
873 $ , dv3(lx1,ly1,lz1,lelv)
874 COMMON /scrvh/ h1(lx1,ly1,lz1,lelv)
875 $ , h2(lx1,ly1,lz1,lelv)
884 call sethlm (h1,h2,intype)
885 call cresvibp (resv1,resv2,resv3,h1,h2)
888 call sethlm (h1,h2,intype)
889 call cresvib (besv1,besv2,besv3,h1,h2)
893 call sethlm (h1,h2,intype)
895 call ophinv (dv1,dv2,dv3,resv1,resv2,resv3,h1,h2,tolhv,nmxv)
897 call opadd2 (vx,vy,vz,dv1,dv2,dv3)
899 if (filtertype.eq.1)
then
900 alpha_filt=param(103)
907 call sethlm (h1,h2,intype)
909 call ophinv (dv1,dv2,dv3,besv1,besv2,besv3,h1,h2,tolhv,nmxv)
910 call opadd2 (bx,by,bz,dv1,dv2,dv3)
927 real u(lx1,ly1,lz1,nelv),v(lx1,ly1,lz1,nelv),w(lx1,ly1,lz1,nelv)
931 common /cfldx/ dri(lx1),dsi(ly1),dti(lz1)
939 if (icalld.eq.0)
then
941 call getdr(dri,zgm1(1,1),lx1)
942 call getdr(dsi,zgm1(1,2),ly1)
943 if (if3d)
call getdr(dti,zgm1(1,3),lz1)
956 ur = ( u(i,j,k,e)*rxm1(i,j,k,e)
957 $ + v(i,j,k,e)*rym1(i,j,k,e)
958 $ + w(i,j,k,e)*rzm1(i,j,k,e) ) * jacmi(l,1)
959 us = ( u(i,j,k,e)*sxm1(i,j,k,e)
960 $ + v(i,j,k,e)*sym1(i,j,k,e)
961 $ + w(i,j,k,e)*szm1(i,j,k,e) ) * jacmi(l,1)
962 ut = ( u(i,j,k,e)*txm1(i,j,k,e)
963 $ + v(i,j,k,e)*tym1(i,j,k,e)
964 $ + w(i,j,k,e)*tzm1(i,j,k,e) ) * jacmi(l,1)
966 cflr = abs(dt*ur*dri(i))
967 cfls = abs(dt*us*dsi(j))
968 cflt = abs(dt*ut*dti(k))
970 cflm = cflr + cfls + cflt
985 ur = ( u(i,j,1,e)*rxm1(i,j,1,e)
986 $ + v(i,j,1,e)*rym1(i,j,1,e) ) * jacmi(l,1)
987 us = ( u(i,j,1,e)*sxm1(i,j,1,e)
988 $ + v(i,j,1,e)*sym1(i,j,1,e) ) * jacmi(l,1)
990 cflr = abs(dt*ur*dri(i))
991 cfls = abs(dt*us*dsi(j))
1009 real dri(lx1),zgm1(lx1)
1011 dri(1) = zgm1(2) - zgm1(1)
1013 dri(i) = 0.5*( zgm1(i+1) - zgm1(i-1) )
1015 dri(lx1) = zgm1(lx1) - zgm1(lx1-1)
1022 subroutine ophinv(o1,o2,o3,i1,i2,i3,h1,h2,tolh,nmxhi)
1034 real o1 (lx1,ly1,lz1,1) , o2 (lx1,ly1,lz1,1) , o3 (lx1,ly1,lz1,1)
1035 real i1 (lx1,ly1,lz1,1) , i2 (lx1,ly1,lz1,1) , i3 (lx1,ly1,lz1,1)
1036 real h1 (lx1,ly1,lz1,1) , h2 (lx1,ly1,lz1,1)
1052 ivproj(1,i) = min(mxprev,mtmp) - 1
1059 call hmhzsf (
'NOMG',o1,o2,o3,i1,i2,i3,h1,h2,
1060 $ v1mask,v2mask,v3mask,vmult,
1061 $ tolh,nmxhi,matmod)
1063 if (ifield.eq.1)
then
1064 call hsolve (
'VELX',o1,i1,h1,h2,v1mask,vmult
1065 $ ,imesh,tolh,nmxhi,1
1066 $ ,vproj(1,1),ivproj(1,1),binvm1)
1067 call hsolve (
'VELY',o2,i2,h1,h2,v2mask,vmult
1068 $ ,imesh,tolh,nmxhi,2
1069 $ ,vproj(1,2),ivproj(1,2),binvm1)
1071 $
call hsolve (
'VELZ',o3,i3,h1,h2,v3mask,vmult
1072 $ ,imesh,tolh,nmxhi,3
1073 $ ,vproj(1,3),ivproj(1,3),binvm1)
1074 elseif (ifield.eq.ifldmhd)
then
1075 call hsolve (
' BX ',o1,i1,h1,h2,b1mask,vmult
1076 $ ,imesh,tolh,nmxhi,1
1077 $ ,vproj(1,4),ivproj(1,4),binvm1)
1078 call hsolve (
' BY ',o2,i2,h1,h2,b2mask,vmult
1079 $ ,imesh,tolh,nmxhi,2
1080 $ ,vproj(1,5),ivproj(1,5),binvm1)
1082 $
call hsolve (
' BZ ',o3,i3,h1,h2,b3mask,vmult
1083 $ ,imesh,tolh,nmxhi,3
1084 $ ,vproj(1,6),ivproj(1,6),binvm1)
1106 cb = cbc(ifc,iel,ifield)
1107 if (cb.eq.
'ndd' .or. cb.eq.
'dnd' .or. cb.eq.
'ddn')
1112 call gllog(ifbcor , .false.)
1114 if (nio.eq.0)
write (6,*)
'IFBCOR =',ifbcor
1161 real p (lx2,ly2,lz2,lelv)
1162 real h1 (lx1,ly1,lz1,lelv)
1163 real h2 (lx1,ly1,lz1,lelv)
1164 real h2inv(lx1,ly1,lz1,lelv)
1165 real pset (lx2*ly2*lz2*lelv,mxprev)
1167 parameter(ltot2=lx2*ly2*lz2*lelv)
1168 common /orthox/ pbar(ltot2),pnew(ltot2)
1169 common /orthos/ alpha(mxprev),work(mxprev)
1170 common /orthoi/ nprev,mprev
1173 if (nprev.eq.0)
return
1176 ntot2 = lx2*ly2*lz2*nelv
1177 alpha1 =
glsc3(p,p,bm2inv,ntot2)
1178 if (alpha1.gt.0)
then
1179 alpha1 = sqrt(alpha1/volvm2)
1184 call updrhse(p,h1,h2,h2inv,ierr)
1188 alpha(i) =
vlsc2(p,pset(1,i),ntot2)
1190 call gop(alpha,work,
'+ ',nprev)
1192 call rzero(pbar,ntot2)
1194 call add2s2(pbar,pset(1,i),alpha(i),ntot2)
1198 call cdabdtp(pnew,pbar,h1,h2,h2inv,intetype)
1199 call sub2 (p,pnew,ntot2)
1202 alpha2 =
glsc3(p,p,bm2inv,ntot2)
1203 if (alpha2.gt.0)
then
1204 alpha2 = sqrt(alpha2/volvm2)
1205 ratio = alpha1/alpha2
1209 11
format(2i5,
' alpha:',1p10e12.4)
1210 12
format(i6,i4,1p3e12.4,
' alph12')
1212 if (nio.eq.0)
write(6,13) istep,
' Project PRES ',
1213 & alpha2,alpha1,ratio,nprev,mxprev
1214 13
format(i11,a,6x,1p3e13.4,i4,i4)
1229 real p (lx2,ly2,lz2,lelv)
1230 real h1 (lx1,ly1,lz1,lelv)
1231 real h2 (lx1,ly1,lz1,lelv)
1232 real h2inv(lx1,ly1,lz1,lelv)
1233 real pset (lx2*ly2*lz2*lelv,mxprev)
1235 parameter(ltot2=lx2*ly2*lz2*lelv)
1236 common /orthox/ pbar(ltot2),pnew(ltot2)
1237 common /orthos/ alpha(mxprev),work(mxprev)
1240 mprev=min(mprev,mxprev)
1242 ntot2=lx2*ly2*lz2*nelv
1244 if (nprev.lt.mprev)
then
1246 call copy (pset(1,nprev),p,ntot2)
1247 call add2 (p,pbar,ntot2)
1248 call econjp(pset,nprev,h1,h2,h2inv,ierr)
1252 call copy (pset(1,nprev),p,ntot2)
1253 call econjp(pset,nprev,h1,h2,h2inv,ierr)
1258 call add2 (p,pbar,ntot2)
1259 call copy (pset(1,nprev),p,ntot2)
1260 call econjp(pset,nprev,h1,h2,h2inv,ierr)
1266 subroutine econjp(pset,nprev,h1,h2,h2inv,ierr)
1274 real p (lx2,ly2,lz2,lelv)
1275 real h1 (lx1,ly1,lz1,lelv)
1276 real h2 (lx1,ly1,lz1,lelv)
1277 real h2inv(lx1,ly1,lz1,lelv)
1278 real pset (lx2*ly2*lz2*lelv,mxprev)
1280 parameter(ltot2=lx2*ly2*lz2*lelv)
1281 common /orthox/ pbar(ltot2),pnew(ltot2)
1282 common /orthos/ alpha(mxprev),work(mxprev)
1286 ntot2=lx2*ly2*lz2*nelv
1296 call cdabdtp(pnew,pset(1,nprev),h1,h2,h2inv,intetype)
1297 alphad =
glsc2(pnew,pset(1,nprev),ntot2)
1301 alpha(i) =
vlsc2(pnew,pset(1,i),ntot2)
1303 if (nprev1.gt.0)
call gop(alpha,work,
'+ ',nprev1)
1307 call add2s2(pset(1,nprev),pset(1,i),alpham,ntot2)
1308 alphad = alphad - alpha(i)**2
1314 if (alphad.le.0)
then
1315 write(6,*) .le.
'ERROR: alphad 0 in econjp',alphad,nprev
1319 alphad = 1./sqrt(alphad)
1320 call cmult(pset(1,nprev),alphad,ntot2)
1337 parameter(lxy=lx1*ly1*lz1,ltd=lxd*lyd*lzd)
1338 common /scrns/ wk(2*ltd)
1339 $ , fx(lxy),fy(lxy),fz(lxy)
1340 $ , gx(lxy),gy(lxy),gz(lxy)
1341 $ , zr(ltd),zs(ltd),zt(ltd)
1342 $ , tr(ltd,3),zp(ltd,3),zm(ltd,3)
1364 call add3(wk,vx(1,1,1,e),bx(1,1,1,e),nxyz1)
1365 call intp_rstd(zp(1,1),wk,lx1,lxd,if3d,0)
1367 call add3(wk,vy(1,1,1,e),by(1,1,1,e),nxyz1)
1368 call intp_rstd(zp(1,2),wk,lx1,lxd,if3d,0)
1370 call add3(wk,vz(1,1,1,e),bz(1,1,1,e),nxyz1)
1371 call intp_rstd(zp(1,3),wk,lx1,lxd,if3d,0)
1373 call sub3(wk,vx(1,1,1,e),bx(1,1,1,e),nxyz1)
1374 call intp_rstd(zm(1,1),wk,lx1,lxd,if3d,0)
1376 call sub3(wk,vy(1,1,1,e),by(1,1,1,e),nxyz1)
1377 call intp_rstd(zm(1,2),wk,lx1,lxd,if3d,0)
1379 call sub3(wk,vz(1,1,1,e),bz(1,1,1,e),nxyz1)
1380 call intp_rstd(zm(1,3),wk,lx1,lxd,if3d,0)
1384 $ rx(i,1,e)*zm(i,1)+rx(i,2,e)*zm(i,2)+rx(i,3,e)*zm(i,3)
1386 $ rx(i,4,e)*zm(i,1)+rx(i,5,e)*zm(i,2)+rx(i,6,e)*zm(i,3)
1388 $ rx(i,7,e)*zm(i,1)+rx(i,8,e)*zm(i,2)+rx(i,9,e)*zm(i,3)
1392 call grad_rst(zr,zs,zt,zp(1,1),lxd,if3d)
1394 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1398 call grad_rst(zr,zs,zt,zp(1,2),lxd,if3d)
1400 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1404 call grad_rst(zr,zs,zt,zp(1,3),lxd,if3d)
1406 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1413 $ rx(i,1,e)*zp(i,1)+rx(i,2,e)*zp(i,2)+rx(i,3,e)*zp(i,3)
1415 $ rx(i,4,e)*zp(i,1)+rx(i,5,e)*zp(i,2)+rx(i,6,e)*zp(i,3)
1417 $ rx(i,7,e)*zp(i,1)+rx(i,8,e)*zp(i,2)+rx(i,9,e)*zp(i,3)
1421 call grad_rst(zr,zs,zt,zm(1,1),lxd,if3d)
1423 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1427 call grad_rst(zr,zs,zt,zm(1,2),lxd,if3d)
1429 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1433 call grad_rst(zr,zs,zt,zm(1,3),lxd,if3d)
1435 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)+tr(i,3)*zt(i)
1441 bfx(i,1,1,e) = bfx(i,1,1,e) + tmp*( fx(i) + gx(i) )
1442 bmx(i,1,1,e) = bmx(i,1,1,e) + tmp*( fx(i) - gx(i) )
1444 bfy(i,1,1,e) = bfy(i,1,1,e) + tmp*( fy(i) + gy(i) )
1445 bmy(i,1,1,e) = bmy(i,1,1,e) + tmp*( fy(i) - gy(i) )
1447 bfz(i,1,1,e) = bfz(i,1,1,e) + tmp*( fz(i) + gz(i) )
1448 bmz(i,1,1,e) = bmz(i,1,1,e) + tmp*( fz(i) - gz(i) )
1459 call add3(wk,vx(1,1,1,e),bx(1,1,1,e),nxyz1)
1460 call intp_rstd(zp(1,1),wk,lx1,lxd,if3d,0)
1462 call add3(wk,vy(1,1,1,e),by(1,1,1,e),nxyz1)
1463 call intp_rstd(zp(1,2),wk,lx1,lxd,if3d,0)
1465 call sub3(wk,vx(1,1,1,e),bx(1,1,1,e),nxyz1)
1466 call intp_rstd(zm(1,1),wk,lx1,lxd,if3d,0)
1468 call sub3(wk,vy(1,1,1,e),by(1,1,1,e),nxyz1)
1469 call intp_rstd(zm(1,2),wk,lx1,lxd,if3d,0)
1473 $ rx(i,1,e)*zm(i,1)+rx(i,2,e)*zm(i,2)
1475 $ rx(i,3,e)*zm(i,1)+rx(i,4,e)*zm(i,2)
1478 call grad_rst(zr,zs,zt,zp(1,1),lxd,if3d)
1480 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)
1484 call grad_rst(zr,zs,zt,zp(1,2),lxd,if3d)
1486 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)
1492 $ rx(i,1,e)*zp(i,1)+rx(i,2,e)*zp(i,2)
1494 $ rx(i,3,e)*zp(i,1)+rx(i,4,e)*zp(i,2)
1497 call grad_rst(zr,zs,zt,zm(1,1),lxd,if3d)
1499 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)
1503 call grad_rst(zr,zs,zt,zm(1,2),lxd,if3d)
1505 wk(i) = tr(i,1)*zr(i)+tr(i,2)*zs(i)
1511 bfx(i,1,1,e) = bfx(i,1,1,e) + tmp*( fx(i) + gx(i) )
1512 bmx(i,1,1,e) = bmx(i,1,1,e) + tmp*( fx(i) - gx(i) )
1514 bfy(i,1,1,e) = bfy(i,1,1,e) + tmp*( fy(i) + gy(i) )
1515 bmy(i,1,1,e) = bmy(i,1,1,e) + tmp*( fy(i) - gy(i) )
1531 common /scrns/ ta1(lx1,ly1,lz1,lelv)
1532 $ , ta2(lx1,ly1,lz1,lelv)
1533 $ , ta3(lx1,ly1,lz1,lelv)
1534 $ , tb1(lx1,ly1,lz1,lelv)
1535 $ , tb2(lx1,ly1,lz1,lelv)
1536 $ , tb3(lx1,ly1,lz1,lelv)
1539 call opcopy(ta1,ta2,ta3,vx,vy,vz)
1540 call opcopy(tb1,tb2,tb3,bx,by,bz)
1542 ntot1 = lx1*ly1*lz1*nelv
1548 courno = max(cflp,cflm)
1550 if (nio.eq.0)
write(6,1) istep,time,dt,cflp,cflm
1551 1
format(i9,1p4e15.7,
' CFL')
subroutine bcdirvc(V1, V2, V3, mask1, mask2, mask3)
subroutine gop(x, w, op, n)
real *8 function dnekclock()
subroutine scale(xyzl, nl)
subroutine set_dealias_rx
subroutine intp_rstd(ju, u, mx, md, if3d, idir)
subroutine grad_rst(ur, us, ut, u, md, if3d)
subroutine dssum(u, nx, ny, nz)
subroutine makebsource_mhd
subroutine ophinv(o1, o2, o3, i1, i2, i3, h1, h2, tolh, nmxhi)
subroutine phys_to_elsasser2(u1, b1, n)
subroutine specx(b, nb, a, na, ba, ab, w)
subroutine spec_curl_e(cb, b1, b2, b3, rx, ry, rz, sx, sy, sz, tx, ty, tz)
subroutine advab_elsasser_fast
subroutine elsasser_to_phys2(u1, b1, n)
subroutine extrapp(p, plag)
subroutine opzero(ux, uy, uz)
subroutine opnorm(unorm, ux, uy, uz, type3)
subroutine elsasser_to_phys(u1, u2, u3, b1, b2, b3, n)
subroutine setrhsp(p, h1, h2, h2inv, pset, niprev)
subroutine gensolnp(p, h1, h2, h2inv, pset, nprev)
subroutine econjp(pset, nprev, h1, h2, h2inv, ierr)
subroutine lorentz_force(lf, b1, b2, b3, w1, w2)
subroutine cresvibp(resv1, resv2, resv3, h1, h2)
subroutine cresvib(resv1, resv2, resv3, h1, h2)
subroutine compute_cfl(cfl, u, v, w, dt)
subroutine lorentz_force_e(lf, b1, b2, b3, e)
subroutine elsasserh(igeom)
subroutine lorentz_force2(lf, b1, b2, b3)
subroutine curl(vort, u, v, w, ifavg, work1, work2)
subroutine getdr(dri, zgm1, lx1)
subroutine incomprn(ux, uy, uz, up)
subroutine phys_to_elsasser(u1, u2, u3, b1, b2, b3, n)
subroutine invers2(a, b, n)
subroutine add2col2(a, b, c, n)
function glsc3(a, b, mult, n)
subroutine add2s2(a, b, c1, n)
subroutine add3(a, b, c, n)
real function vlsc2(x, y, n)
subroutine add3s2(a, b, c, c1, c2, n)
subroutine sub3(a, b, c, n)
subroutine cmult(a, const, n)
subroutine add2s1(a, b, c1, n)
subroutine esolver(RES, H1, H2, H2INV, INTYPE)
subroutine opgradt(outx, outy, outz, inpfld)
subroutine specmp(b, nb, a, na, ba, ab, w)
subroutine opcolv3c(a1, a2, a3, b1, b2, b3, c, d)
subroutine opbinv(out1, out2, out3, inp1, inp2, inp3, h2inv)
subroutine opadd2col(a1, a2, a3, b1, b2, b3, c)
subroutine opcopy(a1, a2, a3, b1, b2, b3)
subroutine opdiv(outfld, inpx, inpy, inpz)
subroutine cdabdtp(ap, wp, h1, h2, h2inv, intype)
subroutine opcolv2(a1, a2, a3, b1, b2)
subroutine setmap(n1, nd)
subroutine ophx(out1, out2, out3, inp1, inp2, inp3, h1, h2)
subroutine setproj(n1, nd)
subroutine nekuf(f1, f2, f3)
subroutine opadd2(a1, a2, a3, b1, b2, b3)
subroutine dudxyz(du, u, rm1, sm1, tm1, jm1, imsh, isd)
subroutine opsub2(a1, a2, a3, b1, b2, b3)
subroutine hsolve(name, u, r, h1, h2, vmk, vml, imsh, tol, maxit, isd, approx, napprox, bi)
function vlsc3(X, Y, B, N)
subroutine updrhse(p, h1, h2, h2inv, ierr)
subroutine q_filter(wght)
subroutine local_grad3(ur, us, ut, u, N, e, D, Dt)
subroutine opadd2cm(a1, a2, a3, b1, b2, b3, c)
subroutine hmhzsf(name, u1, u2, u3, r1, r2, r3, h1, h2, rmask1, rmask2, rmask3, rmult, tol, maxit, matmod)
subroutine sethlm(h1, h2, intloc)
subroutine cmult2(A, B, CONST, N)