1 subroutine utmcfa ( ncafan, ncafar, ncfgnf, ncfgng,
2 > ulsort, langue, codret )
3 c ______________________________________________________________________
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
9 c Version originale enregistree le 18 juin 1996 sous le numero 96036
10 c aupres des huissiers de justice Simart et Lavoir a Clamart
11 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
12 c aupres des huissiers de justice
13 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
15 c HOMARD est une marque deposee d'Electricite de France
21 c ______________________________________________________________________
23 c UTilitaire : Mot-Cle - caracterisation des Frontieres Analytiques
25 c ______________________________________________________________________
27 c . nom . e/s . taille . description .
28 c .____________________________________________________________________.
29 c . ncafan . es . char*8 . nom de l'objet des frontieres analytiques :.
30 c . . . . nom des frontieres .
31 c . ncafar . es . char*8 . nom de l'objet des frontieres analytiques :.
32 c . . . . valeurs reelles .
33 c . ncfgnf . es . char*8 . lien frontiere/groupe : nom des frontieres .
34 c . ncfgng . es . char*8 . lien frontiere/groupe : nom des groupes .
35 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
36 c . langue . e . 1 . langue des messages .
37 c . . . . 1 : francais, 2 : anglais .
38 c . codret . es . 1 . code de retour des modules .
39 c . . . . 0 : pas de probleme .
40 c . . . . 1 : la configuration est perdue .
41 c . . . . 2 : probleme de lecture .
42 c . . . . 8 : Allocation impossible .
43 c ______________________________________________________________________
46 c 0. declarations et dimensionnement
49 c 0.1. ==> generalites
55 parameter ( nompro = 'UTMCFA' )
61 parameter ( nbmcle = 13 )
73 character*8 ncafan, ncafar, ncfgnf, ncfgng
75 integer ulsort, langue, codret
77 c 0.4. ==> variables locales
88 integer adnore, adlono, adpono, adnofi, adnoos
91 integer adcpoi, adctai, adctab
92 integer adfpoi, adftai, adftab
93 integer adgpoi, adgtai, adgtab
99 parameter ( nbmess = 20 )
100 character*80 texte(nblang,nbmess)
102 c 0.5. ==> initialisations
103 c ______________________________________________________________________
109 c 1.1. ==> tout va bien
113 c 1.2. ==> les messages
117 #ifdef _DEBUG_HOMARD_
118 write (ulsort,texte(langue,1)) 'Entree', nompro
122 texte(1,4) = '(''Nombre de frontieres analytiques :'',i8)'
123 texte(1,5) = '(''Nombre de liens frontiere/groupe :'',i8)'
124 texte(1,9) = '(''Le mot-cle '',a,'' apparait :'',i8,'' fois.'')'
125 texte(1,11) = '(''La configuration est perdue ?'')'
126 texte(1,12) = '(''Probleme de lecture.'')'
127 texte(1,13) = '(''Donnees incoherentes.'')'
129 >'(''Impossible d''''allouer la structure memorisant les choix.'')'
131 texte(2,4) = '(''Number of analytical boundaries :'',i8)'
132 texte(2,5) = '(''Number of links boundary/group :'',i8)'
133 texte(2,9) = '(''Keyword '',a,'' appears :'',i8,'' times.'')'
134 texte(2,11) = '(''Configuration is lost ?'')'
135 texte(2,12) = '(''Problem while reading.'')'
136 texte(2,13) = '(''Data without coherence.'')'
137 texte(2,18) = '(''Structure of choices cannot be allocated.'')'
140 c 2. recherche du nombre d'occurences du mot-cle :
141 c A. Le nom d'une frontiere analytique dans sa description
142 c B. Le nom d'une frontiere analytique dans son lien avec un groupe
147 c 2.1. ==> presence du mot-cle ?
149 if ( codret.eq.0 ) then
151 if ( iaux.eq.1 ) then
158 call utfin1 ( motcle, numero,
159 > jaux, option, loptio,
160 > ulsort, langue, codre0 )
161 #ifdef _DEBUG_HOMARD_
162 write (ulsort,texte(langue,9)) motcle, jaux
165 c 2.2. ==> aucune option n'a ete precisee
167 if ( codre0.eq.2 ) then
172 c 2.3. ==> probleme de lecture
174 elseif ( codre0.ne.0 ) then
178 c 2.4. ==> on peut y aller
188 if ( codret.eq.0 ) then
190 if ( iaux.eq.1 ) then
195 #ifdef _DEBUG_HOMARD_
196 write (ulsort,texte(langue,3+iaux)) jaux
207 c 2.6. ==> Si aucun lien frontiere/groupe n'est present, on annule
208 c toute description eventuelle de frontiere pour ne pas
209 c surcharger les donnees
211 if ( codret.eq.0 ) then
213 if ( nbfrgr.eq.0 ) then
222 c 3. on alloue le receptacle des caracteristiques des frontieres
224 #ifdef _DEBUG_HOMARD_
225 write (ulsort,*) '3. Allocation ; codret = ', codret
228 if ( codret.eq.0 ) then
230 #ifdef _DEBUG_HOMARD_
231 write (ulsort,texte(langue,3)) 'UTMCF0 - frontiere', nompro
233 call utmcf0 ( nbfran, ncafan,
234 > adcpoi, adctai, adctab,
235 > ulsort, langue, codret )
237 #ifdef _DEBUG_HOMARD_
238 call gmprsx(nompro,ncafan)
243 if ( codret.eq.0 ) then
245 if ( nbfran.ne.0 ) then
248 call gmalot ( ncafar, 'reel ', iaux, adcafr, codret )
255 c 4. recherche des adresses des objets GM lies aux noms des fichiers
258 #ifdef _DEBUG_HOMARD_
259 write (ulsort,*) '4. Recherche ; codret = ', codret
262 if ( nbfran.ne.0 ) then
264 if ( codret.eq.0 ) then
266 #ifdef _DEBUG_HOMARD_
267 write (ulsort,texte(langue,3)) 'UTAD80', nompro
269 call utad80 ( nbfich,
270 > adnore, adlono, adpono, adnofi, adnoos,
271 > ulsort, langue, codret )
278 c 5. remplissage des tableaux caracterisant les frontieres
281 if ( nbfran.ne.0 ) then
283 if ( codret.eq.0 ) then
285 #ifdef _DEBUG_HOMARD_
286 write (ulsort,texte(langue,3)) 'UTMCF1', nompro
288 call utmcf1 ( nbfran, rmem(adcafr),
289 > imem(adcpoi), imem(adctai), smem(adctab),
291 > smem(adnore), imem(adlono), imem(adpono),
292 > smem(adnofi), smem(adnoos),
293 > ulsort, langue, codret )
295 if ( codret.ne.0 ) then
301 #ifdef _DEBUG_HOMARD_
302 if ( codret.eq.0 ) then
303 call gmprsx (nompro, ncafar )
304 call gmprsx (nompro, ncafan )
305 call gmprsx (nompro, ncafan//'.Pointeur' )
306 call gmprsx (nompro, ncafan//'.Taille' )
307 call gmprsx (nompro, ncafan//'.Table' )
314 c 6. Les tableaux des liens frontieres/groupes
316 #ifdef _DEBUG_HOMARD_
317 write (ulsort,*) '6. liens frontieres/groupes ; codret = ', codret
320 if ( nbfrgr.ne.0 ) then
322 c 6.1. ==> Nom des frontieres
324 if ( codret.eq.0 ) then
326 #ifdef _DEBUG_HOMARD_
327 write (ulsort,texte(langue,3)) 'UTMCF0 - lien - frontiere', nompro
329 call utmcf0 ( nbfrgr, ncfgnf,
330 > adfpoi, adftai, adftab,
331 > ulsort, langue, codret )
335 c 6.2. ==> Nom des groupes
337 if ( codret.eq.0 ) then
339 #ifdef _DEBUG_HOMARD_
340 write (ulsort,texte(langue,3)) 'UTMCF0 - lien - groupe', nompro
342 call utmcf0 ( nbfrgr, ncfgng,
343 > adgpoi, adgtai, adgtab,
344 > ulsort, langue, codret )
348 c 6.3. remplissage des tableaux des liens frontieres/groupes
350 if ( codret.eq.0 ) then
352 #ifdef _DEBUG_HOMARD_
353 write (ulsort,texte(langue,3)) 'UTMCF2', nompro
355 call utmcf2 ( nbfrgr,
356 > imem(adfpoi), imem(adftai), smem(adftab),
357 > imem(adgpoi), imem(adgtai), smem(adgtab),
359 > smem(adnore), imem(adlono), imem(adpono),
360 > smem(adnofi), smem(adnoos),
361 > ulsort, langue, codret )
363 if ( codret.ne.0 ) then
369 #ifdef _DEBUG_HOMARD_
370 if ( codret.eq.0 ) then
371 call gmprsx (nompro, ncfgnf )
372 call gmprsx (nompro, ncfgnf//'.Pointeur' )
373 call gmprsx (nompro, ncfgnf//'.Taille' )
374 call gmprsx (nompro, ncfgnf//'.Table' )
375 call gmprsx (nompro, ncfgng )
376 call gmprsx (nompro, ncfgng//'.Pointeur' )
377 call gmprsx (nompro, ncfgng//'.Taille' )
378 call gmprsx (nompro, ncfgng//'.Table' )
388 if ( codret.ne.0 ) then
392 write (ulsort,texte(langue,1)) 'Sortie', nompro
393 write (ulsort,texte(langue,2)) codret
394 write (ulsort,texte(langue,10+codret))
398 #ifdef _DEBUG_HOMARD_
399 write (ulsort,texte(langue,1)) 'Sortie', nompro