You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
786 B
Fortran

SUBROUTINE ASSIGNEQ
USE BLK1MOD
USE BLKELTLD
COMMON XCEN(5000),YCEN(5000)
DIST(I,J)=(XYCEL(I,1)-XCEN(J))**2+(XYCEL(I,2)-YCEN(J))**2
VOID=1.E20
! get centroids of mesh
XCEN=VOID
YCEN=VOID
DO J=1,NE
CALL GETXCL(J,XCJ,YCJ)
XCEN(J)=XCJ
YCEN(J)=YCJ
ENDDO
! test for nearest centroid
DO I=1,NQHYD
NCLINE(I)=0
DISTM=VOID
DO J=1,NE
IF(XCEN(J) .GE. VOID) CYCLE
IF(DIST(I,J) .LT. DISTM) THEN
DISTM=DIST(I,J)
NCLINE(I)=J
ENDIF
ENDDO
WRITE(103,6001) NCLINE(I),ILAYRE(1,NQHYD),HAE(1,I),(HDE(1,I,K),K=1,3)
6001 FORMAT('EFE',5X,2I8,7X,'1',F8.3,3F8.2,7X,'1')
ENDDO
RETURN
END