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.
58 lines
1.3 KiB
Fortran
58 lines
1.3 KiB
Fortran
5 years ago
|
SUBROUTINE FRMNODT(X1,Y1,X2,Y2,X3,Y3,NPTS)
|
||
|
|
||
|
USE BLK1MOD
|
||
|
! INCLUDE 'BLK1.COM'
|
||
|
|
||
|
! X1,X2,X3 AND Y1,Y2,Y3 are vertices of triangle
|
||
|
! NPTS is the nominal number of elements on each side
|
||
|
|
||
|
|
||
|
! Work along first side AND backwards along second line
|
||
|
|
||
|
DO N=1,NPTS-1
|
||
|
RATIO=FLOAT(N)/FLOAT(NPTS)
|
||
|
X12=X1+RATIO*(X2-X1)
|
||
|
Y12=Y1+RATIO*(Y2-Y1)
|
||
|
X32=X3+RATIO*(X2-X3)
|
||
|
Y32=Y3+RATIO*(Y2-Y3)
|
||
|
|
||
|
! Now get interior points
|
||
|
|
||
|
NINT=NPTS-N
|
||
|
DO M=1,NINT-1
|
||
|
RATIO=FLOAT(M)/FLOAT(NINT)
|
||
|
XNEW=X12+RATIO*(X32-X12)
|
||
|
YNEW=Y12+RATIO*(Y32-Y12)
|
||
|
CALL DEFNOD(XNEW,YNEW)
|
||
|
ENDDO
|
||
|
ENDDO
|
||
|
RETURN
|
||
|
END
|
||
|
|
||
|
SUBROUTINE DEFNOD(XNEW,YNEW)
|
||
|
|
||
|
USE BLK1MOD
|
||
|
USE BLK2MOD
|
||
|
! INCLUDE 'BLK1.COM'
|
||
|
! INCLUDE 'BLK2.COM'
|
||
|
INCLUDE 'TXFRM.COM'
|
||
|
|
||
|
CALL GETNOD(N2)
|
||
|
CORD(N2,1) = XNEW
|
||
|
CORD(N2,2) = YNEW
|
||
|
WD(N2)=-9999.
|
||
|
WIDTH(N2) = 0.
|
||
|
SS1(N2)=0.
|
||
|
SS2(N2)=0.
|
||
|
WIDS(N2)=0.
|
||
|
BS1(N2)=0.
|
||
|
INSKP(N2)=0
|
||
|
INEW(N2) = 1
|
||
|
!
|
||
|
XUSR(N2) = CORD(N2,1)*TXSCAL - XS
|
||
|
YUSR(N2) = CORD(N2,2)*TXSCAL - YS
|
||
|
LIST(N2)=1
|
||
|
CALL PLTNOD(N2,1)
|
||
|
|
||
|
RETURN
|
||
|
END
|