1 subroutine utad06 ( typenh, option, optio2, nhenti,
2 > nbeold, nbenew, nbaold, nbanew,
3 > adhist, adcode, adfill, admere,
5 > adnivo, adinsu, adins2,
6 > adnoim, adanci, adhomo, adcoar,
7 > ulsort, langue, codret )
8 c ______________________________________________________________________
12 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
14 c Version originale enregistree le 18 juin 1996 sous le numero 96036
15 c aupres des huissiers de justice Simart et Lavoir a Clamart
16 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
17 c aupres des huissiers de justice
18 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
20 c HOMARD est une marque deposee d'Electricite de France
26 c ______________________________________________________________________
28 c UTilitaire - ADresses - phase 06
30 c ______________________________________________________________________
31 c Modification des longueurs des tableaux pour une entite HOM_Enti
32 c et recuperation de leurs adresses
33 c Remarque : le code de retour en entree ne doit pas etre ecrase
34 c brutalement ; il doit etre cumule avec les operations
36 c Remarque : utal02, utad02, utad06, utad08 et utad22 sont similaires
37 c ______________________________________________________________________
39 c . nom . e/s . taille . description .
40 c .____________________________________________________________________.
41 c . typenh . e . 1 . code des entites au sens homard .
42 c . . . . 0 : mailles-points .
43 c . . . . 1 : segments .
44 c . . . . 2 : triangles .
45 c . . . . 3 : tetraedres .
46 c . . . . 4 : quadrangles .
47 c . . . . 5 : pyramides .
48 c . . . . 6 : hexaedres .
49 c . . . . 7 : pentaedres .
50 c . option . e . 1 . option de pilotage des adresses a recuperer.
51 c . . . . c'est un multiple des entiers suivants : .
52 c . . . . 2 : historique, connectivite descendante .
58 c . . . . 17 : isup2 .
59 c . . . . 19 : noeud interne a la maille .
60 c . . . . 23 : Deraffin .
61 c . . . . 29 : homologue .
62 c . . . . 31 : connectivite par arete .
63 c . optio2 . e . 1 . 0 : on detruit les objets de taille nulle .
64 c . . . . 1 : on garde les objets de taille nulle .
65 c . nhenti . e . char8 . nom de l'objet decrivant l'entite .
66 c . nbeold . e . 1 . nombre d'entites ancien .
67 c . nbenew . e . 1 . nombre d'entites nouveau .
68 c . nbaold . e . 1 . nombre d'entites decrites par arete ancien .
69 c . nbanew . e . 1 . nombre d'entites decrites par arete nouveau.
70 c . adhist . s . 1 . historique de l'etat .
71 c . adcode . s . 1 . connectivite descendante .
72 c . adfill . s . 1 . fille des entites .
73 c . admere . s . 1 . mere des entites .
74 c . adfami . s . 1 . famille des entites .
75 c . adnivo . s . 1 . niveau des entites .
76 c . adinsu . s . 1 . informations supplementaires .
77 c . adins2 . s . 1 . informations supplementaires numero 2 .
78 c . adnoim . s . 1 . noeud interne a la maille .
79 c . adanci . s . 1 . memorisation du deraffinement .
80 c . adhomo . s . 1 . homologue .
81 c . adcoar . s . 1 . connectivite par arete .
82 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
83 c . langue . e . 1 . langue des messages .
84 c . . . . 1 : francais, 2 : anglais .
85 c . codret . es . 1 . code de retour des modules .
86 c ______________________________________________________________________
89 c 0. declarations et dimensionnement
92 c 0.1. ==> generalites
98 parameter ( nompro = 'UTAD06' )
112 integer option, optio2
113 integer nbeold, nbenew, nbaold, nbanew
114 integer adhist, adcode, adfill, admere
124 integer ulsort, langue, codret
126 c 0.4. ==> variables locales
131 integer iaux, jaux, kaux, laux
135 integer codre1, codre2
139 parameter ( nbmess = 10 )
140 character*80 texte(nblang,nbmess)
142 c 0.5. ==> initialisations
143 c ______________________________________________________________________
151 #ifdef _DEBUG_HOMARD_
152 write (ulsort,texte(langue,1)) 'Entree', nompro
156 texte(1,4) = '(''Reallocations pour les '',a)'
157 texte(1,6) = '(''On detruit les objets de taille nulle.'')'
158 texte(1,7) = '(''On garde les objets de taille nulle.'')'
159 texte(1,8) = '(''Codes de retour'',20i3)'
160 texte(1,9) = '(''Ancien nombre d''''entites : '',i10)'
161 texte(1,10) = '(''Nouveau nombre d''''entites : '',i10)'
163 texte(2,4) = '(''Reallocation for the '',a)'
164 texte(2,6) = '(''Null size objects are destroyed.'')'
165 texte(2,7) = '(''Null size objetcs are kept.'')'
166 texte(2,8) = '(''Error codes'',20i3)'
167 texte(2,9) = '(''Old number of entities : '',i10)'
168 texte(2,10) = '(''New number of entities : '',i10)'
172 #ifdef _DEBUG_HOMARD_
173 write (ulsort,texte(langue,4)) mess14(langue,3,typenh)
174 write (ulsort,90002) 'option', option
175 write (ulsort,texte(langue,6+optio2))
176 write (ulsort,texte(langue,9)) nbeold
177 write (ulsort,texte(langue,10)) nbenew
178 cgn call gmprsx ( nompro, nhenti )
182 do 10 , iaux = 0 , 13
190 c 2. recuperation des adresses
193 if ( option.gt.0 ) then
195 c 2.1. ==> Historique des etats et connectivite descendante
197 if ( mod(option,2).eq.0 ) then
199 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
201 call gmlboj ( nhenti//'.HistEtat' , codre1 )
202 call gmlboj ( nhenti//'.ConnDesc' , codre2 )
206 call gmmod ( nhenti//'.HistEtat',
207 > adhist, nbeold, nbenew, un, un, codre1 )
209 if ( typenh.eq.0 ) then
211 elseif ( typenh.eq.1 ) then
213 elseif ( typenh.eq.2 ) then
215 elseif ( typenh.eq.3 ) then
217 elseif ( typenh.eq.4 ) then
219 elseif ( typenh.eq.5 ) then
221 elseif ( typenh.eq.6 ) then
223 elseif ( typenh.eq.7 ) then
230 if ( codret.eq.0 ) then
232 if ( dimaux.lt.0 ) then
238 iaux = (nbeold-nbaold)
239 jaux = (nbenew-nbanew)
243 call gmmod ( nhenti//'.ConnDesc',
244 > adcode, iaux, jaux, kaux, laux, codre2 )
250 if ( codre1.ne.0 ) then
255 if ( codre2.ne.0 ) then
260 #ifdef _DEBUG_HOMARD_
261 write (ulsort,90002) 'traitement', 2
262 write (ulsort,texte(langue,8)) codre1, codre2
269 if ( mod(option,3).eq.0 ) then
271 if ( codret.eq.0 ) then
273 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
275 call gmlboj ( nhenti//'.Fille' , codre0 )
279 call gmmod ( nhenti//'.Fille',
280 > adfill, nbeold, nbenew, un, un, codre0 )
284 if ( codre0.ne.0 ) then
289 #ifdef _DEBUG_HOMARD_
290 write (ulsort,90002) 'traitement', 3
291 write (ulsort,texte(langue,8)) codre0
300 if ( mod(option,5).eq.0 ) then
302 if ( codret.eq.0 ) then
304 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
306 call gmlboj ( nhenti//'.Mere' , codre0 )
310 call gmmod ( nhenti//'.Mere',
311 > admere, nbeold, nbenew, un, un, codre0 )
315 if ( codre0.ne.0 ) then
320 #ifdef _DEBUG_HOMARD_
321 write (ulsort,90002) 'traitement', 5
322 write (ulsort,texte(langue,8)) codre0
329 c 2.4. ==> Les familles
330 c Attention : ne jamais tuer EntiFamm si taille nulle
332 if ( mod(option,7).eq.0 ) then
334 if ( codret.eq.0 ) then
336 call gmmod ( nhenti//'.Famille.EntiFamm',
337 > adfami, nbeold, nbenew, un, un, codre0 )
339 if ( codre0.ne.0 ) then
344 #ifdef _DEBUG_HOMARD_
345 write (ulsort,90002) 'traitement', 7
346 write (ulsort,texte(langue,8)) codre0
355 if ( mod(option,11).eq.0 ) then
357 if ( codret.eq.0 ) then
359 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
361 call gmlboj ( nhenti//'.Niveau' , codre0 )
365 call gmmod ( nhenti//'.Niveau',
366 > adnivo, nbeold, nbenew, un, un, codre0 )
370 if ( codre0.ne.0 ) then
375 #ifdef _DEBUG_HOMARD_
376 write (ulsort,90002) 'traitement', 11
377 write (ulsort,texte(langue,8)) codre0
384 c 2.6. ==> Les informations supplementaires
386 if ( mod(option,13).eq.0 ) then
388 if ( codret.eq.0 ) then
390 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
392 call gmlboj ( nhenti//'.InfoSupp' , codre0 )
396 if ( typenh.eq.0 ) then
398 elseif ( typenh.eq.1 ) then
400 elseif ( typenh.eq.2 ) then
402 elseif ( typenh.eq.3 ) then
404 elseif ( typenh.eq.4 ) then
406 elseif ( typenh.eq.5 ) then
408 elseif ( typenh.eq.6 ) then
410 elseif ( typenh.eq.7 ) then
416 iaux = (nbeold-nbaold)
417 jaux = (nbenew-nbanew)
420 call gmmod ( nhenti//'.InfoSupp',
421 > adinsu, iaux, jaux, kaux, laux, codre0 )
425 if ( codre0.ne.0 ) then
430 #ifdef _DEBUG_HOMARD_
431 write (ulsort,90002) 'traitement', 13
432 write (ulsort,texte(langue,8)) codre0
439 c 2.7. ==> Les informations supplementaires numero 2
441 if ( mod(option,17).eq.0 ) then
443 if ( codret.eq.0 ) then
445 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
447 call gmlboj ( nhenti//'.InfoSup2' , codre0 )
451 call gmmod ( nhenti//'.InfoSup2',
452 > adins2, nbeold, nbenew, un, un, codre0 )
456 if ( codre0.ne.0 ) then
461 #ifdef _DEBUG_HOMARD_
462 write (ulsort,90002) 'traitement', 17
463 write (ulsort,texte(langue,8)) codre0
470 c 2.8. ==> Le noeud supplementaire
472 if ( mod(option,19).eq.0 ) then
474 if ( codret.eq.0 ) then
476 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
478 call gmlboj ( nhenti//'.NoeuInMa' , codre0 )
482 call gmmod ( nhenti//'.NoeuInMa',
483 > adnoim, nbeold, nbenew, un, un, codre0 )
487 if ( codre0.ne.0 ) then
492 #ifdef _DEBUG_HOMARD_
493 write (ulsort,90002) 'traitement', 19
494 write (ulsort,texte(langue,8)) codre0
501 c 2.9. ==> La memorisation du deraffinement
503 if ( mod(option,23).eq.0 ) then
505 if ( codret.eq.0 ) then
507 call gmobal ( nhenti//'.Deraffin', codre0 )
509 if ( codre0.eq.2 ) then
511 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
513 call gmlboj ( nhenti//'.Deraffin' , codre0 )
517 call gmmod ( nhenti//'.Deraffin',
518 > adanci, nbeold, nbenew, un, un, codre0 )
522 if ( codre0.ne.0 ) then
527 #ifdef _DEBUG_HOMARD_
528 write (ulsort,90002) 'traitement', 23
529 write (ulsort,texte(langue,8)) codre0
538 c 2.10. ==> Les homologues
540 if ( mod(option,29).eq.0 ) then
542 if ( codret.eq.0 ) then
544 if ( optio2.eq.0 .and. nbenew.eq.0 ) then
546 call gmlboj ( nhenti//'.Homologu' , codre0 )
550 call gmmod ( nhenti//'.Homologu',
551 > adhomo, nbeold, nbenew, un, un, codre0 )
555 if ( codre0.ne.0 ) then
560 #ifdef _DEBUG_HOMARD_
561 write (ulsort,90002) 'traitement', 29
562 write (ulsort,texte(langue,8)) codre0
569 c 2.11. ==> Connectivites par aretes
571 if ( mod(option,31).eq.0 ) then
573 if ( codret.eq.0 ) then
575 if ( optio2.eq.0 .and. nbanew.eq.0 ) then
577 call gmlboj ( nhenti//'.ConnAret' , codre0 )
581 call gmmod ( nhenti//'.ConnAret',
582 > adcoar, nbaold, nbanew, un, un, codre0 )
586 if ( codre0.ne.0 ) then
591 #ifdef _DEBUG_HOMARD_
592 write (ulsort,90002) 'traitement', 31
593 write (ulsort,texte(langue,8)) codre0
606 if ( codret.eq.0 ) then
608 call gmecat ( nhenti, 1, nbenew, codre1 )
609 call gmecat ( nhenti, 2, nbanew, codre2 )
611 codre0 = min ( codre1, codre2 )
612 codret = max ( abs(codre0), codret,
615 if ( codret.ne.0 ) then
626 if ( codret.ne.0 ) then
630 write (ulsort,texte(langue,1)) 'Sortie', nompro
631 write (ulsort,texte(langue,2)) codret
632 write (ulsort,texte(langue,4)) mess14(langue,3,typenh)
633 write (ulsort,90002) 'option', option
634 write (ulsort,texte(langue,8)) tabcod
635 write (ulsort,texte(langue,9)) nbeold
636 write (ulsort,texte(langue,10)) nbenew
637 call gmprsx(nompro,nhenti)
645 #ifdef _DEBUG_HOMARD_
646 write (ulsort,texte(langue,1)) 'Sortie', nompro