subroutine userq (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' return end c----------------------------------------------------------------------- subroutine userchk include 'SIZE' include 'TOTAL' parameter (lt=lx1*ly1*lz1*lelt,ld=lxd*lyd*lzd*lelt) common /mybvor/ bvor(lx1,ly1,lz1,lelt,3), $ work1(lx1,ly1,lz1,lelt),work2(lx1,ly1,lz1,lelt) common /testsin/ sinax(lx1,ly1,lz1,lelt),sinbx(lx1,ly1,lz1,lelt), $ deprod(lx1,ly1,lz1,lelt),canlyt(lx1,ly1,lz1,lelt), $ usrprod(lx1,ly1,lz1,lelt) common /intpusr/ finmsh(lxd,lyd,lzd,lelt), $ usrdl(lx1,ly1,lz1,lelt) m = nx1*ny1*nz1*nelt one = 1. pi = 4.*atan(one) do i=1,m x = xm1(i,1,1,1) y = ym1(i,1,1,1) z = zm1(i,1,1,1) cc arg1 = 2.0 arg2 = 1. cc sinax(i,1,1,1) = sin(arg1*x) sinbx(i,1,1,1) = sin(arg2*x) canlyt(i,1,1,1) = -.5*(cos((arg2+arg1)*x)-cos((arg2-arg1)*x)) enddo call testdeal_sin !Test dealiasing for product of sines prodmax = glmax(deprod,m) prodmin = glmin(deprod,m) sinmax = glmax(sinax,m) if (nid.eq.0) write(6,1) istep,prodmax,prodmin,sinmax 1 format(1i8,1p3e19.10,' growth') if ((mod(istep,iostep).eq.0).and.(istep.ge.iostep)) then ifpo=.false. ifto=.false. call outpost2(sinax,deprod,sinbx $ ,pr,t,0,'zgm') ifpo=.true. ifto=.true. endif return end c----------------------------------------------------------------------- subroutine uservp (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ifield.eq.1) then utrans = param(1) udiff = param(2) elseif (ifield.eq.2) then utrans = param(7) ! thermal properties udiff = param(8) elseif (ifield.eq.3) then utrans = param(7) ! thermal properties udiff = param(8) elseif (ifield.eq.4) then utrans = param(7) ! thermal properties udiff = param(8) endif return end c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' ffx = 0.0 ffy = 0.0 ffz = 0.0 return end c----------------------------------------------------------------------- subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process C Set boundary conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' ux=0.0 uy=0.0 uz=0.0 return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) C Set initial conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' return end c----------------------------------------------------------------------- subroutine usrdat return end c----------------------------------------------------------------------- subroutine usrdat2 include 'SIZE' include 'TOTAL' c Rescale x,y, and z. c one = 1. pi = 4.*atan(one) twopi = 2.*pi zleng = twopi / 0.57 ! dominant wavelenth & wavenumber c call rescale_x(xm1,0.,twopi) call rescale_x(ym1,0.,twopi) call rescale_x(zm1,0.,zleng) c param(66) = 4 c param(67) = 4 return end c----------------------------------------------------------------------- subroutine usrdat3 return end c----------------------------------------------------------------------- subroutine ucrossb_e(w1,u1,av1,e $ ,wf,uf,bf) include 'SIZE' include 'TOTAL' real w1(1),u1(1),av1(1) integer e parameter (ln=lx1*ly1*lz1,ld=lxd*lyd*lzd) real wf(ld),uf(ld),bf(ld) c ! Coarse to fine mesh c call op_c2f_e(uf,u1,bf,av1,wf,w1,e) ! Uf = J*U call intp_rstd(uf,u1,nx1,nxd,if3d,0) ! 0 --> forward nxyzd = lxd*lyd*lzd do i=1,nxyzd tr1 = uf(i) wf(i) = tr1*rx(i,1,e)+tr1*rx(i,2,e)+tr1*rx(i,3,e) enddo call intp_rstd(w1,wf,nx1,nxd,if3d,1) ! 1 --> back to coarse nxyz = lx1*ly1*lz1 ! -1 do i=1,nxyz ! to physical space. bi = 1./((bm1(i,1,1,e))) ! w1(i) = bi*w1(i)!/1.25204 enddo return end c----------------------------------------------------------------------- subroutine ucrossb(w1,u1,av1,ifld) include 'SIZE' include 'TOTAL' parameter (ln=lx1*ly1*lz1,ld=lxd*lyd*lzd) real w1(ln,1) $ ,u1(ln,1) $ ,av1(ln,1) common /scruz/ wf(ld),uf(ld),bf(ld) integer e call set_dealias_rx ! Make certain metrics are up-to-date do e=1,nelfld(ifld) call ucrossb_e( w1(1,e) $ , u1(1,e) $ , av1(1,e), e $ , wf,uf,bf) enddo return end c----------------------------------------------------------------------- subroutine testdeal_sin include 'SIZE' include 'TOTAL' common /testsin/ sinax(lx1,ly1,lz1,lelt),sinbx(lx1,ly1,lz1,lelt), $ deprod(lx1,ly1,lz1,lelt),canlyt(lx1,ly1,lz1,lelt), $ usrprod(lx1,ly1,lz1,lelt) c !Compute------u x Curl (t1, t2, t3)---------------- call ucrossb(deprod,sinax,sinbx,1) c call opzero (w1,w2,w3) ! Uncomment this to test null function return end c-----------------------------------------------------------------------