<div dir="ltr">Hello,<br><br>I am trying to find gradients and the coordinates of an object in nek. I used set_obj routine to fix my walls as object and also wrote a routine that is<br>similar to the drag_calc routine to dump out the co-ordinates and the gradients on the object. This code works fine for a serial setting while for parallel setting, <br>
only a part of the object coordinates are dumped out. I suspect that I have not included a few routines that would gather information from all the processors.<br>It would be great if you could throw in some suggestions that would set it to work in parallel setting. I have pasted a part of the usrchk routine herewith :<br>
<br><code><br><br> DIMENSION TEMP1(lz1**2) ! Stores the du/dy of all the GLL points in one face (in the object)<br><br> parameter(lt=lx1*ly1*lz1)<br> common /scrns/ pm1(lx1,ly1,lz1,lelv)<br>
$,vxx(lx1,ly1,lz1,lelv),vxy(lx1,ly1,lz1,lelv),vxz(lx1,ly1,lz1,lelv)<br> $,vyx(lx1,ly1,lz1,lelv),vyy(lx1,ly1,lz1,lelv),vyz(lx1,ly1,lz1,lelv)<br> common /scruz/<br> $ vzx(lx1,ly1,lz1,lelv),vzy(lx1,ly1,lz1,lelv),vzz(lx1,ly1,lz1,lelv)<br>
$,one(lx1,ly1,lz1,lelv)<br><br> if (istep.eq.0) then<br> call set_obj ! objects for surface integrals<br> endif<br><br> call izero(TEMP1,lz1**2) ! Initializing to zeros.<br>
<br>
open(unit=103,file='coord.txt') ! few files for post-processing<br> open(unit=104,file='elenos.txt')<br><br> CALL DUDXYZ (vxx,vx,RXM1,SXM1,TXM1,JACM1,1,1)<br> CALL DUDXYZ (vxy,vx,RYM1,SYM1,TYM1,JACM1,1,1)<br>
CALL DUDXYZ (vxz,vx,RZM1,SZM1,TZM1,JACM1,1,1)<br><br> ntot1 = nx1*ny1*nz1*nelv<br><br> call rone (one,ntot1)<br>c------------------------------------------------------------------<br><br> DO 100 II=1,NHIS<br>
<br> IF (HCODE(10,II).NE.'I') GOTO 100<br> IOBJ = LOCHIS(1,II)<br> MEMTOT = NMEMBER(IOBJ)<br><br> IF (HCODE(1,II).NE.' ' .OR. HCODE(2,II).NE.' ' .OR.<br> $ HCODE(3,II).NE.' ' ) THEN<br>
IFIELD = 1<br><br> DO 50 MEM=1,MEMTOT<br> ISK = 0<br> IEG = OBJECT(IOBJ,MEM,1)<br> IFC = OBJECT(IOBJ,MEM,2)<br>c IF (GLLNID(IEG).EQ.NID) THEN<br>
C This processor has a contribution<br> IE = GLLEL(IEG)<br> write(104,*)ieg,ie,gllnid(ieg),nid<br><br> call rone (one,ntot1)<br> call dotabf(TEMP1,vxy,one,ifc,ie) ! subroutine that multiplies vxy by one and stores in temp for that element<br>
<br> CALL DSSET(NX1,NY1,NZ1)<br> IFACE = EFACE1(IFC)<br> JS1 = SKPDAT(1,IFACE)<br> JF1 = SKPDAT(2,IFACE)<br> JSKIP1 = SKPDAT(3,IFACE)<br> JS2 = SKPDAT(4,IFACE)<br> JF2 = SKPDAT(5,IFACE)<br>
JSKIP2 = SKPDAT(6,IFACE)<br><br> I = 0<br> DO 110 J2=JS2,JF2,JSKIP2<br> DO 110 J1=JS1,JF1,JSKIP1<br> I = I+1<br> if(istep.eq.2) then<br> write(103,18)xm1(J1,J2,1,ie),ym1(J1,J2,1,ie),zm1(J1,J2,1,ie)<br>
$ ,TEMP1(I)<br> 18 format(1x,4(E14.7,1X))<br> endif<br> 110 CONTINUE<br><br>c ENDIF<br> 50 CONTINUE<br><br><br></code><br><br>If the rea/usr file is needed, please let me know. Thanks.<br>
<br>Thanks<br>Shriram <br>
</div>