C----------------------------------------------------------------------- C nek5000 user-file template C C user specified routines: C - userbc : boundary conditions C - useric : initial conditions C - uservp : variable properties C - userf : local acceleration term for fluid C - userq : local source term for scalars C - userchk: general purpose routine for checking errors etc. C C----------------------------------------------------------------------- subroutine uservp(ix,iy,iz,eg) ! set variable properties include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) udiff = 0.0 utrans = 0.0 return end c----------------------------------------------------------------------- subroutine userf(ix,iy,iz,eg) ! set acceleration term c c Note: this is an acceleration term, NOT a force! c Thus, ffx will subsequently be multiplied by rho(x,t). c include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) ffx = 0.0 ffy = 0.0 ffz = 0.0 return end c----------------------------------------------------------------------- subroutine userq(ix,iy,iz,eg) ! set source term include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) qvol = 0.0 source = 0.0 return end c----------------------------------------------------------------------- subroutine userbc(ix,iy,iz,iside,ieg) ! set up boundary conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' c if (cbc(iside,gllel(ieg),ifield).eq.'v01') ux = 0.0 uy = 0.0 uz = 0.0 temp = 0.0 return end c----------------------------------------------------------------------- subroutine useric(ix,iy,iz,ieg) ! set up initial conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' ux = 0.0 uy = 1.0 uz = 0.0 temp = 0.0 return end c----------------------------------------------------------------------- subroutine userchk() include 'SIZE' include 'TOTAL' call hptsnew() call exitt return end c----------------------------------------------------------------------- subroutine usrdat() ! This routine to modify element vertices include 'SIZE' include 'TOTAL' return end c----------------------------------------------------------------------- subroutine usrdat2() ! This routine to modify mesh coordinates include 'SIZE' include 'TOTAL' return end c----------------------------------------------------------------------- subroutine usrdat3() include 'SIZE' include 'TOTAL' return end c----------------------------------------------------------------------- subroutine hptsnew c INCLUDE 'SIZE' INCLUDE 'TOTAL' real pts(ldim,lhis) real fieldout(ldim+ldimt+1,lhis) real dist(lhis) real rst(lhis*ldim) integer rcode(lhis),elid(lhis),proc(lhis) common /hpts_r/ rst common /hpts_i/ rcode,elid,proc common /scrcg/ pm1 (lx1,ly1,lz1,lelv) ! mapped pressure common /outtmp/ wrk(lx1*ly1*lz1*lelt,ldim+ldimt+1) logical iffind integer icalld,npoints save icalld,npoints data icalld /0/ data npoints /0/ save inth_hpts nxyz = nx1*ny1*nz1 ntot = nxyz*nelt if(nid.eq.0) write(6,*) 'dump history points' if(nelgt.ne.nelgv) then if(nid.eq.0) write(6,*) & 'ABORT: hpts() no support for nelgt.ne.nelgv!' call exitt endif if(icalld.eq.0) then npoints=2 pts(1,1)=1.0 pts(2,1)=0.5 pts(3,1)=0.0 pts(1,2)=-10.0 pts(2,2)=1.0 pts(3,2)=3.0 call intpts_setup(-1.0,inth_hpts) ! use default tolerance endif if(npoints.gt.lhis) then if(nid.eq.0) write(6,*) & 'ABORT: lhis too low, increase in SIZE', npoints, lhis call exitt endif ! interpolate if(icalld.eq.0) then call findpts(inth_hpts,rcode,1, & proc,1, & elid,1, & rst,ndim, & dist,1, & pts(1,1),ndim, & pts(2,1),ndim, & pts(3,1),ndim,npoints) print *,rst(1),rst(2),rst(3) do i=1,npoints ! check return code if(rcode(i).eq.1) then if(dist(i).gt.1e-12) then write(6,'(A,4E15.7)') & ' WARNING: point on boundary or outside the mesh xy[z]d^2:' & ,(pts(k,i),k=1,ndim),dist(i) endif elseif(rcode(i).eq.2) then nfail = nfail + 1 write(6,'(A,3E15.7)') & ' WARNING: point not within mesh xy[z]: !', & (pts(k,i),k=1,ndim) endif enddo icalld = 1 endif return end c c automatically added by makenek subroutine usrsetvert(glo_num,nel,nx,ny,nz) ! to modify glo_num integer*8 glo_num(1) return end