37
38
39
43
44
45
46#include "implicit_f.inc"
47
48
49
50 INTEGER ID,ITABM1(*),ITAG(*),MATRIX_ADD(4,*), CPT_STIFF,CPT_MASS,FLAG
52 CHARACTER PCH_FILE*100
53 CHARACTER(LEN=NCHARTITLE) :: TITR
54
55
56
57 INTEGER I,REF,IFO,TIN,TOUT,POLAR,NCOL,DUM,ID_NOD1,ID_NOD2,,ISTOP
59 CHARACTER DEBUT*8,NAME*8,MATRIX_TYPE*16,NWLINE*100,MESS*40
60
61 INTEGER :: LEN_TMP_NAME,I_ERR
62 CHARACTER(len=2148) :: TMP_NAME
63
64
65
66 INTEGER USR2SYS
67 DATA mess/'FLEXIBLE BODY DEF - READ OF PCH FILE '/
68
69
70
71
72
73 ref = 71
74 i_err = 0
75
78 OPEN(unit=ref,file=tmp_name(1:len_tmp_name),
79 . access='SEQUENTIAL',form='FORMATTED',status='UNKNOWN')
80
82 READ(nwline,'((A,A,5I8,I16))') debut,name,dum,ifo,tin,tout,polar,ncol
83
84 IF ((ifo == 6).AND.(tin < 3)) THEN
85
86
87
88
89 DO WHILE (i_err == 0)
90
91 istop=0
92 DO WHILE (istop==0)
93 READ(ref,'(A)',END=100) nwline
94 IF (nwline(1:5)=='DMIG ') THEN
95 READ(nwline,'((A,A,5I8,I16))') debut,name,dum,ifo,tin,tout,polar,ncol
96 ELSEIF ((nwline(1:1)/='#').AND.((nwline(1:1)/='$')).AND.((len_trim(nwline)/=0))) THEN
97 istop=1
98 ENDIF
99 ENDDO
100
101 READ(nwline,'((A,A,2I16))') debut,matrix_type,id_nod1,i
103 IF (id_nod1 /= 0) THEN
104 itag(id_nod1) = 1
105 ELSE
106 RETURN
107 ENDIF
108
110
111 IF (adjustl(matrix_type) == 'KAAX') THEN
112 DO WHILE (nwline(1:1) == '*')
113 READ(nwline,'((A,I16,I16,F16.3))') debut,id_nod2,j,rell
114 cpt_stiff = cpt_stiff + 1
116 IF (id_nod2 /= 0) THEN
117 itag(id_nod2) = 1
118 IF (flag == 1) THEN
119 matrix(cpt_stiff-1) = rell
120 matrix_add(1,cpt_stiff-1) = id_nod1
121 matrix_add(2,cpt_stiff-1) = id_nod2
122 matrix_add(3,cpt_stiff-1) = i
123 matrix_add(4,cpt_stiff-1) = j
124 ENDIF
125 ELSE
126 RETURN
127 ENDIF
128 READ(ref,'(A)',iostat=i_err,END=100) nwline
129 END DO
130
131 ELSEIF (adjustl(matrix_type) == 'MAAX') THEN
132 DO WHILE (nwline(1:1) == '*')
133 READ(nwline,'((A,I16,I16,F16.3))') debut,id_nod2,j,rell
134 cpt_mass = cpt_mass + 1
136 IF (id_nod2 /= 0) THEN
137 IF (flag == 1) THEN
138 matrix(cpt_mass-1) = rell
139 matrix_add(1,cpt_mass-1) = id_nod1
140 matrix_add(2,cpt_mass-1) = id_nod2
141 matrix_add(3,cpt_mass-1) = i
142 matrix_add(4,cpt_mass-1) = j
143 ENDIF
144 ELSE
145 RETURN
146 ENDIF
147 READ(ref,'(A)',iostat=i_err,END=100) nwline
148 END DO
149
150 ELSEIF ((adjustl(matrix_type)=='BAAX').OR.(adjustl(matrix_type)=='PAX').OR.adjustl(matrix_type)=='K4AAX') THEN
151
152 i_err = 1
153 IF (flag == 0) THEN
155 . msgtype=msgerror,
156 . anmode=aninfo_blind_1,
158 . c1=titr,
159 . c2=adjustl(matrix_type))
160 ENDIF
161
162 ENDIF
163
164 backspace(ref)
165
166 END DO
167
168100 CONTINUE
169
170 ENDIF
171
172 CLOSE(unit=ref,status='KEEP')
173
174 RETURN
175
subroutine fxrline(ific, nwline, id, titr)
character(len=infile_char_len) infile_name
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)
integer function usr2sys(iu, itabm1, mess, id)