1 subroutine deinit ( nomail, nohind,
2 > lgopti, taopti, lgoptr, taoptr,
3 > lgopts, taopts, lgetco, taetco,
4 > ulsort, langue, codret )
5 c ______________________________________________________________________
9 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
11 c Version originale enregistree le 18 juin 1996 sous le numero 96036
12 c aupres des huissiers de justice Simart et Lavoir a Clamart
13 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
14 c aupres des huissiers de justice
15 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
17 c HOMARD est une marque deposee d'Electricite de France
23 c ______________________________________________________________________
25 c traitement des DEcisions - INITialisations
27 c ______________________________________________________________________
29 c . nom . e/s . taille . description .
30 c .____________________________________________________________________.
31 c . nomail . e . ch8 . nom de l'objet contenant le maillage .
32 c . nohind . e . ch8 . nom de l'objet contenant l'indicateur .
33 c . lgopti . e . 1 . longueur du tableau des options .
34 c . taopti . e . lgopti . tableau des options .
35 c . lgoptr . e . 1 . longueur du tableau des options reelles .
36 c . taoptr . e . lgoptr . tableau des options reelles .
37 c . lgopts . e . 1 . longueur du tableau des options caracteres .
38 c . taopts . e . lgopts . tableau des options caracteres .
39 c . lgetco . e . 1 . longueur du tableau de l'etat courant .
40 c . taetco . e . lgetco . tableau de l'etat courant .
41 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
42 c . langue . e . 1 . langue des messages .
43 c . . . . 1 : francais, 2 : anglais .
44 c . codret . es . 1 . code de retour des modules .
45 c . . . . 0 : pas de probleme .
46 c ______________________________________________________________________
49 c 0. declarations et dimensionnement
52 c 0.1. ==> generalites
58 parameter ( nompro = 'DEINIT' )
82 character*8 nomail, nohind
85 integer taopti(lgopti)
88 double precision taoptr(lgoptr)
91 character*8 taopts(lgopts)
94 integer taetco(lgetco)
96 integer ulsort, langue, codret
98 c 0.4. ==> variables locales
102 integer nretap, nrsset
106 integer pdecfa, pdecar
107 integer ppovos, pvoiso
108 integer pnoemp, phetmp
109 integer psomar, phetar, pfilar, pmerar, pnp2ar
110 integer pposif, pfacar
111 integer paretr, phettr, pfiltr, ppertr, pnivtr, advotr
112 integer parequ, phetqu, pfilqu, pperqu, pnivqu, advoqu
113 integer ptrite, phette, pfilte
114 integer pfacpy, phetpy
115 integer pquahe, phethe, pfilhe
116 integer pfacpe, phetpe, pfilpe
117 integer adpptr, adppqu
120 integer codre0, codre1, codre2
124 character*8 nhnoeu, nhmapo, nharet, nhtria, nhquad
125 character*8 nhtetr, nhhexa, nhpyra, nhpent
127 character*8 nhvois, nhsupe, nhsups
128 character*8 ntrav1, ntrav2, ntrav3
131 parameter ( nbmess = 10 )
132 character*80 texte(nblang,nbmess)
134 c 0.5. ==> initialisations
135 c ______________________________________________________________________
143 #ifdef _DEBUG_HOMARD_
144 write (ulsort,texte(langue,1)) 'Entree', nompro
150 c=======================================================================
151 if ( codava.eq.0 ) then
152 c=======================================================================
154 c 1.1. ==> le debut des mesures de temps
159 c 1.3. ==> les messages
162 > '(/,a6,'' INITIALISATION ET FILTRAGE DES DECISIONS'')'
163 texte(1,5) = '(47(''=''),/)'
164 texte(1,6) = '(/,''Decisions sur les '',a)'
165 texte(1,7) = '(/,5x,''Bilan de l''''initialisation'')'
168 > '(/,a6,'' INITIALISATION AND FILTERING OF DECISIONS'')'
169 texte(2,5) = '(48(''=''),/)'
170 texte(2,6) = '(/,''Decisions over '',a)'
171 texte(2,7) = '(/,5x,''Summary after the initialisation'')'
175 c 1.4. ==> le numero de sous-etape
178 nrsset = taetco(2) + 1
181 call utcvne ( nretap, nrsset, saux, iaux, codret )
185 write (ulsort,texte(langue,4)) saux
186 write (ulsort,texte(langue,5))
189 c 2. gestion des tableaux
192 c 2.1. ==> structure generale
194 if ( codret.eq.0 ) then
196 #ifdef _DEBUG_HOMARD_
197 write (ulsort,texte(langue,3)) 'UTNOMH', nompro
199 call utnomh ( nomail,
201 > degre, maconf, homolo, hierar,
202 > rafdef, nbmane, typcca, typsfr, maextr,
205 > nhnoeu, nhmapo, nharet,
207 > nhtetr, nhhexa, nhpyra, nhpent,
209 > nhvois, nhsupe, nhsups,
210 > ulsort, langue, codret)
216 if ( codret.eq.0 ) then
218 if ( nbmpto.ne.0 ) then
220 #ifdef _DEBUG_HOMARD_
221 write (ulsort,texte(langue,3)) 'UTAD02_mp', nompro
224 call utad02 ( iaux, nhmapo,
225 > phetmp, pnoemp, jaux , jaux ,
229 > ulsort, langue, codret )
233 if ( taopti(19).gt.0 ) then
235 if ( nbmpto.ne.0 ) then
237 if ( codret.eq.0 ) then
239 #ifdef _DEBUG_HOMARD_
240 write (ulsort,texte(langue,3)) 'UTVGAN', nompro
244 call utvgan ( nhvois, nhnoeu, nharet,
247 > ulsort, langue, codret)
255 if ( codret.eq.0 ) then
258 if ( nbiter.gt.0 .and. taopti(38).ne.0 ) then
261 if ( degre.eq.2 ) then
264 #ifdef _DEBUG_HOMARD_
265 write (ulsort,texte(langue,3)) 'UTAD02_ar', nompro
267 call utad02 ( iaux, nharet,
268 > phetar, psomar, pfilar, pmerar,
270 > jaux, pnp2ar, jaux,
272 > ulsort, langue, codret )
276 if ( nbtrto.ne.0 ) then
279 if ( nbiter.gt.0 .and. taopti(38).ne.0 ) then
282 #ifdef _DEBUG_HOMARD_
283 write (ulsort,texte(langue,3)) 'UTAD02_tr', nompro
285 call utad02 ( iaux, nhtria,
286 > phettr, paretr, pfiltr, ppertr,
288 > pnivtr, jaux, jaux,
290 > ulsort, langue, codret )
294 if ( nbquto.ne.0 ) then
297 #ifdef _DEBUG_HOMARD_
298 write (ulsort,texte(langue,3)) 'UTAD02_qu', nompro
300 call utad02 ( iaux, nhquad,
301 > phetqu, parequ, pfilqu, pperqu,
303 > pnivqu, jaux, jaux,
305 > ulsort, langue, codret )
309 if ( nbteto.ne.0 ) then
312 #ifdef _DEBUG_HOMARD_
313 write (ulsort,texte(langue,3)) 'UTAD02_te', nompro
315 call utad02 ( iaux, nhtetr,
316 > phette, ptrite, pfilte, jaux,
320 > ulsort, langue, codret )
324 if ( nbheto.ne.0 ) then
327 #ifdef _DEBUG_HOMARD_
328 write (ulsort,texte(langue,3)) 'UTAD02_he', nompro
330 call utad02 ( iaux, nhhexa,
331 > phethe, pquahe, pfilhe, jaux,
335 > ulsort, langue, codret )
339 if ( nbpyto.ne.0 ) then
342 #ifdef _DEBUG_HOMARD_
343 write (ulsort,texte(langue,3)) 'UTAD02_py', nompro
345 call utad02 ( iaux, nhpyra,
346 > phetpy, pfacpy, jaux, jaux,
350 > ulsort, langue, codret )
354 if ( nbpeto.ne.0 ) then
357 #ifdef _DEBUG_HOMARD_
358 write (ulsort,texte(langue,3)) 'UTAD02_pe', nompro
360 call utad02 ( iaux, nhpent,
361 > phetpe, pfacpe, pfilpe, jaux,
365 > ulsort, langue, codret )
371 if ( codret.eq.0 ) then
374 if ( nbteto.ne.0 .or. nbpyto.ne.0 .or. nbpeto.ne.0 ) then
377 if ( nbheto.ne.0 .or. nbpyto.ne.0 .or. nbpeto.ne.0 ) then
380 if ( nbpyto.ne.0 .or. nbpeto.ne.0 ) then
383 #ifdef _DEBUG_HOMARD_
384 write (ulsort,texte(langue,3)) 'UTAD04', nompro
386 call utad04 ( iaux, nhvois,
387 > jaux, jaux, pposif, pfacar,
389 > jaux, jaux, adpptr, adppqu,
394 > ulsort, langue, codret )
398 c 2.3. ==> les decisions sur les faces et les aretes
399 #ifdef _DEBUG_HOMARD_
400 write (ulsort,90002) '2.3. decare/decfac ; codret', codret
403 if ( codret.eq.0 ) then
406 call gmalot ( ntrav1, 'entier ', iaux, pdecar, codre1 )
407 iaux = nbquto + nbtrto + 1
408 call gmalot ( ntrav2, 'entier ', iaux, pdecfa, codre2 )
409 codre0 = min ( codre1, codre2)
410 codret = max ( abs(codre0), codret,
415 if ( codret.eq.0 ) then
420 c A priori, rien ne se passe, donc on met 0
422 if ( codret.eq.0 ) then
425 ifin = pdecar + nbarto
426 do 231 , iaux = ideb , ifin
431 ifin = pdecfa + nbtrto + nbquto
432 do 232 , iaux = ideb , ifin
438 c 2.4. ==> tableau de travail
440 if ( codret.eq.0 ) then
442 iaux = nbquto + nbtrto + 1
443 call gmalot ( ntrav3, 'entier ', iaux, adtra3, codret )
448 c 3. initialisations des tableaux des decisions sur les faces et
451 #ifdef _DEBUG_HOMARD_
452 write (ulsort,90002) '3. initialisations ; codret', codret
453 write (ulsort,90002) 'taopti(31)/pilraf', taopti(31)
454 write (ulsort,90002) 'taopti(32)/pilder', taopti(32)
455 write (ulsort,90002) 'taopti(19)/filada', taopti(19)
456 write (ulsort,90004) 'taoptr( 3)/diammi', taoptr( 3)
459 if ( codret.eq.0 ) then
461 c 3.1. ==> Cas du raffinement uniforme sans filtrage
463 if ( taopti(31).eq.-1 .and.
464 > ( taopti(19).eq.0 .and. taoptr(3).le.0.d0 ) ) then
466 #ifdef _DEBUG_HOMARD_
467 write (ulsort,texte(langue,3)) 'DEINUN', nompro
468 cgn call gmprsx (nompro,nhvois)
471 > ( taopti(31), taopti(32), taopti(33), taopti(34),
472 > imem(pdecfa), imem(pdecar),
476 > ulsort, langue, codret )
478 c 3.2. ==> Cas du pilotage par zone, par indicateur ou raffinement
479 c uniforme avec filtrage ou deraffinement uniforme
481 elseif ( taopti(31).gt.0 .or. taopti(32).gt.0 .or.
482 > ( taopti(31).eq.-1 .and.
483 > ( taopti(19).gt.0 .or. taoptr(3).gt.0.d0 ) ) .or.
484 > taopti(32).eq.-1 ) then
486 #ifdef _DEBUG_HOMARD_
487 write (ulsort,texte(langue,3)) 'DEINNU', nompro
492 > taopti(30), taopti(31), taopti(32),
493 > taopti(33), taopti(34),
494 > taopti( 6), taopti( 7), taoptr( 1), taoptr( 2),
496 > taopti(19), taoptr( 3), taopti(37), taopti(38),
498 > imem(pdecar), imem(pdecfa),
499 > imem(ppovos), imem(pvoiso),
501 > imem(psomar), imem(phetar), imem(pfilar), imem(pmerar),
502 > imem(pnp2ar), imem(pposif), imem(pfacar),
503 > imem(paretr), imem(phettr),
504 > imem(pfiltr), imem(ppertr), imem(pnivtr),
505 > imem(advotr), imem(adpptr),
506 > imem(parequ), imem(phetqu),
507 > imem(pfilqu), imem(pperqu), imem(pnivqu),
509 > imem(ptrite), imem(phette), imem(pfilte),
510 > imem(pquahe), imem(phethe), imem(pfilhe),
511 > imem(pfacpy), imem(phetpy),
512 > imem(pfacpe), imem(phetpe), imem(pfilpe),
515 > ulsort, langue, codret)
517 #ifdef _DEBUG_HOMARD_
518 if ( codret.eq.0 ) then
521 call delist ( nomail, 'DEINNU', iaux,
523 > ulsort, langue, codret )
533 c 4. Menage du fitrage eventuel
535 #ifdef _DEBUG_HOMARD_
536 write (ulsort,90002) '4. Menage ; codret', codret
539 if ( codret.eq.0 ) then
541 if ( taopti(19).gt.0 ) then
543 if ( nbmpto.ne.0 ) then
544 call gmsgoj ( nhvois//'.0D/1D' , codre0 )
545 codret = max ( abs(codre0), codret )
553 c 5. decompte des decisions
555 #ifdef _DEBUG_HOMARD_
556 write (ulsort,90002) '5. decompte des decisions ; codret', codret
559 if ( codret.eq.0 ) then
561 write (ulsort,texte(langue,7))
563 #ifdef _DEBUG_HOMARD_
564 write (ulsort,texte(langue,3)) 'DECPTE', nompro
567 > ( taopti(31), taopti(32),
568 > imem(pdecar), imem(pdecfa),
569 > imem(phettr), imem(phetqu), imem(ptrite), imem(phette),
570 > imem(pquahe), imem(phethe),
571 > imem(pfacpy), imem(phetpy),
572 > imem(pfacpe), imem(phetpe),
573 > ulsort, langue, codret )
581 if ( codret.eq.0 ) then
583 call gmlboj ( ntrav3, codret )
587 #ifdef _DEBUG_HOMARD_
588 if ( codret.eq.0 ) then
589 write (ulsort,texte(langue,6)) mess14(langue,3,1)
590 call gmprot ( 'DECARE a la fin de '//nompro,
591 > ntrav1 , 1, min(50,nbarto+1) )
592 if ( nbarto.gt.50 ) then
593 call gmprot ( 'DECARE a la fin de '//nompro,
594 > ntrav1 , max(51,nbarto-49), nbarto+1 )
596 write (ulsort,texte(langue,6)) mess14(langue,3,8)
597 call gmprot ( 'DECFAC a la fin de '//nompro,
598 > ntrav2 , 1, min(50,nbtrto+nbquto+1) )
599 if ( nbtrto+nbquto.gt.50 ) then
600 call gmprot ( 'DECFAC a la fin de '//nompro,
601 > ntrav2 , max(51,nbtrto+nbquto-49), nbtrto+nbquto+1)
605 #ifdef _DEBUG_HOMARD_
606 write (ulsort,*) 'en sortie de ',nompro
608 #ifdef _DEBUG_HOMARD_
609 write (ulsort,91010) (imem(pdecfa+nbquto+iaux),iaux=1,nbtrto)
610 write (ulsort,91010) (imem(pdecar+iaux),iaux=0,nbarto)
612 #ifdef _DEBUG_HOMARD_
614 if (imem(pdecfa+nbquto+iaux).ne.0 ) then
615 write (ulsort,90002) 'tr ',iaux
619 #ifdef _DEBUG_HOMARD_
621 if (imem(pdecfa-1+iaux).ne.0 ) then
622 write (ulsort,90002) 'qu ',iaux
625 #ifdef _DEBUG_HOMARD_
628 if (imem(pdecar+iaux-1).ne.0 ) then
629 write (ulsort,90002) 'ar ',iaux
634 c 6.1. ==> message si erreur
636 if ( codret.ne.0 ) then
640 write (ulsort,texte(langue,1)) 'Sortie', nompro
641 write (ulsort,texte(langue,2)) codret
645 c 6.2. ==> fin des mesures de temps de la section
649 #ifdef _DEBUG_HOMARD_
650 write (ulsort,texte(langue,1)) 'Sortie', nompro
654 c=======================================================================
656 c=======================================================================