41
42
43
49 USE reader_old_mod , ONLY : irec
50
51
52
53
54
55#include "implicit_f.inc"
56
57
58
59#include "com04_c.inc"
60#include "units_c.inc"
61#include "scr17_c.inc"
62#include "param_c.inc"
63#include "r2r_c.inc"
64
65
66
67 INTEGER IEXTER(NR2R,*),IPART(LIPART1,*)
68 TYPE(SUBMODEL_DATA),INTENT(IN)::LSUBMODEL(*)
69
70
71
72 INTEGER NUSER, IGR, STAT,I,COMPT,SET
73 CHARACTER MESS*40
74 CHARACTER(LEN=NCHARKEY)::KEY
75 CHARACTER(LEN=NCHARTITLE)::TITR
76 INTEGER J,ADD,K
77 INTEGER FLAG_OK,FOUND,NEL,ID,NELN
78 INTEGER, DIMENSION(:), ALLOCATABLE :: ID_SUB_TEMP
79 LOGICAL
80 DATA mess/' ** ERROR EXTERNAL COUPLING DEFINITION '/
81 WRITE(iout,1000)
82 IF (nr2rlnk>0) WRITE(iout,1200)
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 IF (nr2rlnk > 0) THEN
105
106
107
108
109 is_available = .false.
111
112 DO i=1,nr2rlnk
114 CALL hm_get_intv(
'grnod_id',igr,is_available,lsubmodel)
115
116 iexter(1,i) = igr
117 iexter(2,i) = nuser
118 iexter(3,i) = -1
119 iexter(4,i) = -1
120
121 WRITE(iout,1100) nuser,igr
122 ENDDO
123
124 ENDIF
125
126 IF (nsubdom>0) THEN
127
128
129
130
131 is_available = .false.
134 ALLOCATE (id_sub_temp(nb_part_sub),stat=stat)
135 set = 0
136 r2r_flag_err_off = 0
137
138 DO i=1,nsubdom
139 CALL hm_option_read_key(lsubmodel,option_id = nuser,option_titr = titr,keyword2 = key)
140 CALL hm_get_intv(
'idsmax',nel,is_available,lsubmodel)
141 CALL hm_get_intv(
'negativeIdsmax',neln,is_available,lsubmodel)
142 IF (i>1) set = set+
isubdom(1,i-1)
144 compt = 0
145 DO j=1,nel
147 compt=compt+1
148 id_sub_temp(compt+set)=
id
149
150 flag_ok = 0
151 DO k=1,npart
152 IF(
id==ipart(4,k))
THEN
153 flag_ok=1
155 END IF
156 END DO
157 IF (flag_ok==0) THEN
158 CALL ancmsg(msgid=783,msgtype=msgerror,anmode=aninfo,i1=nuser,c1=titr,i2=
id)
159 ENDIF
160 END DO
161
162 IF (neln > 0) r2r_flag_err_off = 1
163
164
167
168 ENDDO
169
170 DO i=1,nsubdom
172 WRITE(iout,1301)
174 WRITE(iout,1302) (id_sub_temp(j+add),j=1,
isubdom(1,i))
175 END DO
176
177 IF (flg_swale==1) THEN
178
179
180
181 nb_part_sub = npart -
isubdom(1,1)
184 END DO
185
188 compt = 0
189 DO i=1,npart
190 found = 0
192 IF (id_sub_temp(j)==i) found = 1
193 END DO
194 IF (found==1) cycle
195 compt = compt + 1
197 END DO
199
200 ENDIF
201
202 DEALLOCATE (id_sub_temp)
203
204 ENDIF
205
206
207 irec=irec+1
208
209 RETURN
210
211 1000 FORMAT(
212 . //' MULTIDOMAINS COUPLING DEFINITIONS '/
213 . ' --------------------------------- '/)
214 1100 FORMAT(/10x,'EXTERNAL LINK IDENTIFIER . . . .',i10,
215 . /10x,'RADIOSS NODE GROUP ID . . . . . ',i10)
216 1300 FORMAT(/10x,'SUBDOMAIN IDENTIFIER . . . . . .',i10,
217 . /10x,'NUMBER OF PARTS . . . . . . . . ',i10)
218 1301 FORMAT( 10x,'LIST OF PARTS : ')
219 1302 FORMAT( 9x,10i9)
220 1200 FORMAT(' ** INFO : DATA RELATED TO EXTERNAL',
221 . ' COUPLING WILL BE CHECKED IN RADIOSS ENGINE.')
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
integer, parameter nchartitle
integer, parameter ncharkey
integer, dimension(:), allocatable isubdom_part
integer, dimension(:,:), allocatable isubdom
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)