39 USE format_mod , ONLY : fmw_5i_f, fmw_5i
40
41
42
43#include "implicit_f.inc"
44
45
46
47#include "units_c.inc"
48#include "scr03_c.inc"
49
50
51
52 INTEGER NSN,IWPENE
54 INTEGER IRECT(4,*), MSR(*), NSV(*), ILOC(*), IRTL(*), IRTLO(*), ITAB(*)
55 my_real x(3,*), cst(2,*), fric0(3,*)
56 INTEGER ID
57 CHARACTER(LEN=NCHARTITLE) :: TITR
58
59
60
61 INTEGER II, I, J, K, L, M, JJ
62 my_real n2, n3, ys, zs, t2, t3, xl, pen, ss, ym1, ym2, zm1, zm2
63
64
65
66 DO 150 ii=1,nsn
67 i=nsv(ii)
68 j=iloc(ii)
69 k=msr(j)
70 l=irtl(ii)
71 irtlo(ii)=0
72 fric0(1,ii)=zero
73 m=msr(irect(1,l))
74 ym1=x(2,m)
75 zm1=x(3,m)
76 m=msr(irect(2,l))
77 ym2=x(2,m)
78 zm2=x(3,m)
79 ys =x(2,i)
80 zs =x(3,i)
81
82
83
84 t2=ym2-ym1
85 t3=zm2-zm1
86 xl=sqrt(t2**2+t3**2)
87 IF(xl==0.0)THEN
88 CALL ancmsg(msgid=80,msgtype=msgerror,anmode=aninfo,i1=
id,c1=titr,i2=l,i3=itab(msr(irect(1,l))),i4=itab(msr(irect(2,l))))
89 ENDIF
90 t2=t2/xl
91 t3=t3/xl
92 n2= t3
93 n3=-t2
94 pen=n2*(ys-ym1)+n3*(zs-zm1)-gap
95 IF(pen>0.0)THEN
96 GOTO 110
97 ENDIF
98 ss=t2*(ys-ym1)+t3*(zs-zm1)
99 ss=ss/xl
100 ss=two*ss-one
101 IF(ss> onep05)GO TO 110
102 IF(ss<-onep05)GO TO 110
103 IF(pen<zero)THEN
104 iwpene=iwpene+1
105 CALL ancmsg(msgid=346,msgtype=msgwarning,anmode=aninfo_blind_2,i1=
id,i2=itab(i),c1=titr,r1=pen)
106 ENDIF
107 IF(ipri>=1)THEN
108 WRITE(iout,fmt=fmw_5i_f)itab(i),itab(k),l,itab(msr(irect(1,l))),itab(msr(irect(2,l))),ss
109 ENDIF
110 IF(fric==0.0) GO TO 150
111 irtlo(ii)=l
112 cst(1,ii)=ss
113 GO TO 150
114 110 CONTINUE
115 IF(ipri>=1)THEN
116 WRITE(iout,fmt=fmw_5i)itab(i),itab(k),l,itab(msr(irect(1,l))),itab(msr(irect(2,l)))
117 ENDIF
118 150 CONTINUE
119
120 RETURN
integer, parameter nchartitle
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)