1 subroutine eslsm5 ( nbfonc, defonc, nofonc, nbseal,
2 > nbpafo, noinpf, option,
3 > ulsort, langue, codret )
4 c ______________________________________________________________________
8 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
10 c Version originale enregistree le 18 juin 1996 sous le numero 96036
11 c aupres des huissiers de justice Simart et Lavoir a Clamart
12 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
13 c aupres des huissiers de justice
14 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
16 c HOMARD est une marque deposee d'Electricite de France
22 c ______________________________________________________________________
24 c Entree-Sortie - Lecture d'une Solution au format MED - phase 5
26 c ______________________________________________________________________
28 c . nom . e/s . taille . description .
29 c .____________________________________________________________________.
30 c . nbfonc . e . 1 . nombre de fonctions .
31 c . defonc . e . nbinec*. description des fonctions en entier .
32 c . . . nbfonc . 1. type de support au sens MED .
33 c . . . . 2. nombre de points de Gauss .
34 c . . . . 3. nombre de valeurs .
35 c . . . . 4. nombre de valeurs du profil eventuel .
36 c . . . . 5. nombre de supports associes .
37 c . . . . 6. 1, si aux noeuds par elements .
38 c . . . . 2, si aux points de Gauss, associe avec .
39 c . . . . un champ aux noeuds par elements .
40 c . . . . 3, si aux points de Gauss autonome .
42 c . . . . 7. nombre de tableaux de ce type .
43 c . . . . 8. numero du tableau dans la fonction .
44 c . . . . 9. numero de la fonction associee si champ .
45 c . . . . aux noeuds par element ou points de Gaus.
46 c . . . . 10. numero HOMARD du champ associe .
47 c . . . . 11. type interpolation .
48 c . . . . 0, si automatique .
49 c . . . . 1 si degre 1, 2 si degre 2, .
50 c . . . . 3 si iso-P2 .
51 c . . . . 21-nbinec. type des supports associes .
52 c . nofonc . e .3*nbfonc. description des fonctions en caracteres .
53 c . . . . 1. nom de l'objet profil, blanc sinon .
54 c . . . . 2. nom de l'objet fonction .
55 c . . . . 3. nom de l'objet localisation des points .
56 c . . . . de Gauss, blanc sinon .
57 c . nbseal . e . 1 . nombre de sequences a lire .
58 c . . . . si -1, on lit tous les champs du fichier .
59 c . nbpafo . s . 1 . nombre de paquets de fonctions .
60 c . noinpf . s . nbpafo . nom des objets qui contiennent la .
61 c . . . . description de chaque paquet de fonctions .
62 c . option . e . 1 . 1 : on controle que l'on a les couples (aux.
63 c . . . . noeuds par element/aux points de Gauss) .
64 c . . . . 0 : pas de controle .
65 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
66 c . langue . e . 1 . langue des messages .
67 c . . . . 1 : francais, 2 : anglais .
68 c . codret . es . 1 . code de retour des modules .
69 c . . . . 0 : pas de probleme .
70 c . . . . 1 : probleme .
71 c ______________________________________________________________________
74 c 0. declarations et dimensionnement
77 c 0.1. ==> generalites
83 parameter ( nompro = 'ESLSM5' )
99 integer nbfonc, nbpafo, nbseal
100 integer defonc(nbinec,*)
103 character*8 nofonc(3,nbfonc), noinpf(*)
105 integer ulsort, langue, codret
107 c 0.4. ==> variables locales
109 integer iaux, jaux, kaux, laux, maux, naux
110 integer nrfonc, nrinpf, nbfopa, nrpafo
113 integer typgeo, ngauss, nbenmx, nbvapr, nbtyas
114 integer carsup, typint, nbtafo
115 integer advale, advalr, adobch, adprpg, adtyas
117 integer typge2, ngaus2, nbenm2, nbvap2, nbtya2
118 integer carsu2, nbtaf2, typin2
119 integer advae2, advar2, adobc2, adobp2, adtya2
120 integer adobfo, adtyge
121 integer adobf2, adtyg2
122 integer typgpf, ngaupf, carspf, typipf
123 integer tbiaux(nbinec)
125 character*8 nomfon, saux08
127 character*8 tbsaux(1)
130 parameter ( nbmess = 150 )
131 character*80 texte(nblang,nbmess)
133 c 0.5. ==> initialisations
136 c ______________________________________________________________________
144 #ifdef _DEBUG_HOMARD_
145 write (ulsort,texte(langue,1)) 'Entree', nompro
151 texte(1,4) = '(''Creation du paquet de fonctions '',i3,'' : '',a)'
153 > '(''Ajout de la '',i3,''-eme fonction dans le paquet '',a)'
154 texte(1,6) = '(''Impossible de trouver la fonction.'')'
155 texte(1,7) = '(''Impossible de trouver le paquet.'')'
156 texte(1,8) = '(''Nombre de paquets crees :'',i8)'
158 texte(2,4) = '(''Creation of pack of functions # '',i3,'' : '',a)'
159 texte(2,5) = '(''Addition of '',i3,''-th function in pack '',a)'
160 texte(2,6) = '(''Function cannot be found.'')'
161 texte(2,7) = '(''Pack cannot be found.'')'
162 texte(2,8) = '(''Number of created packs :'',i8)'
169 c 2. regroupement des fonctions en paquets
172 do 20 , nrfonc = 1 , nbfonc
174 c 2.1. ==> caracteristiques de la fonction a ranger
176 if ( codret.eq.0 ) then
178 #ifdef _DEBUG_HOMARD_
179 write (ulsort,texte(langue,36)) nompro, nrfonc
180 call gmprsx (nompro, nofonc(2,nrfonc) )
181 cgn call gmprsx (nompro, nofonc(2,nrfonc)//'.InfoCham' )
183 #ifdef _DEBUG_HOMARD_
184 write (ulsort,texte(langue,3)) 'utcafo', nompro
186 call utcafo ( nofonc(2,nrfonc),
188 > typgeo, ngauss, nbenmx, nbvapr, nbtyas,
189 > carsup, nbtafo, typint,
190 > advale, advalr, adobch, adprpg, adtyas,
191 > ulsort, langue, codret )
192 #ifdef _DEBUG_HOMARD_
193 write (ulsort,90002) 'Fonction numero ', nrfonc
194 write (ulsort,90002) 'typgeo', typgeo
195 write (ulsort,90002) 'ngauss', ngauss
196 write (ulsort,90002) 'nbenmx', nbenmx
197 write (ulsort,90002) 'nbvapr', nbvapr
198 write (ulsort,90002) 'nbtyas', nbtyas
199 write (ulsort,90002) 'carsup', carsup
200 write (ulsort,90002) 'typint', typint
201 write (ulsort,90002) 'nbtafo', nbtafo
202 write (ulsort,90003) 'champ ', smem(adobch)
203 write (ulsort,*) 'Profil ', smem(adprpg)
204 write (ulsort,*) 'Loca PG ', smem(adprpg+1)
205 write (ulsort,*) 'Fonc. As.', smem(adprpg+2)
210 c 2.2. ==> on recherche s'il existe un paquet convenable
214 do 22 , iaux = 1 , nbpafo
216 #ifdef _DEBUG_HOMARD_
217 write (ulsort,90002) '. Examen du paquet numero', iaux
220 c 2.2.1. ==> caracteristiques de l'iaux-eme paquet de fonction
222 if ( codret.eq.0 ) then
224 obpafo = noinpf(iaux)
226 #ifdef _DEBUG_HOMARD_
227 call gmprsx (nompro, obpafo )
230 #ifdef _DEBUG_HOMARD_
231 write (ulsort,texte(langue,3)) 'UTCAPF', nompro
233 call utcapf ( obpafo,
234 > nbfopa, typgpf, ngaupf, carspf, typipf,
236 > ulsort, langue, codret )
237 cgn write (ulsort,90002) 'kaux/tnpass', kaux
238 cgn write (ulsort,90002) 'laux/ngauss', laux
239 cgn write (ulsort,90002) 'maux/carsup', maux
240 cgn write (ulsort,90002) 'naux/typint', naux
244 c 2.2.2. ==> le paquet convient si le support geometrique est
245 c simple, tout est identique
247 if ( typgpf.gt.0 ) then
249 if ( typgeo.eq.typgpf .and.
250 > ngauss.eq.ngaupf .and.
251 > carsup.eq.carspf .and.
252 > typint.eq.typipf ) then
257 c 2.2.3. ==> ou ... si le support est multiple, le champ est le meme
259 elseif ( typgpf.lt.0 ) then
261 do 223 , jaux = 1 , nbfopa
263 if ( codret.eq.0 ) then
265 #ifdef _DEBUG_HOMARD_
266 write (ulsort,texte(langue,3)) 'utcafo', nompro
269 call utcafo ( smem(adobfo+jaux-1),
271 > typge2, ngaus2, nbenm2, nbvap2, nbtya2,
272 > carsu2, nbtaf2, typin2,
273 > advae2, advar2, adobc2, adobp2, adtya2,
274 > ulsort, langue, codret )
278 if ( codret.eq.0 ) then
280 if ( smem(adobch).eq.smem(adobc2) ) then
293 c 2.3. ==> creation d'un nouveau paquet
297 if ( nrinpf.eq.0 ) then
299 if ( codret.eq.0 ) then
302 if ( nbtyas.le.0 ) then
308 #ifdef _DEBUG_HOMARD_
309 write (ulsort,texte(langue,3)) 'UTALPF', nompro
311 call utalpf ( obpafo,
312 > nbfopa, typgpf, ngauss, carsup, typint,
314 > ulsort, langue, codret )
317 #ifdef _DEBUG_HOMARD_
318 call gmprsx ( nompro//' - apres UTALPF', obpafo )
321 if ( codret.eq.0 ) then
324 noinpf(nbpafo) = obpafo
326 #ifdef _DEBUG_HOMARD_
327 write (ulsort,texte(langue,4)) nbpafo, obpafo
332 if ( nbtyas.gt.0 ) then
334 if ( codret.eq.0 ) then
336 do 231 ,iaux = 1 , nbtyas
337 tbiaux(iaux) = imem(adtyas+iaux-1)
339 tbiaux(nbtyas+1) = typgeo
341 #ifdef _DEBUG_HOMARD_
342 write (ulsort,texte(langue,3)) 'UTMOPF', nompro
347 call utmopf ( obpafo, jaux,
348 > iaux, tbsaux, tbiaux,
350 > nbfopa, kaux, laux, maux, naux,
352 > ulsort, langue, codret )
354 #ifdef _DEBUG_HOMARD_
355 call gmprsx (nompro, obpafo//'.TypeSuAs' )
364 c 2.4. ==> ajout de la fonction dans le paquet
366 if ( codret.eq.0 ) then
368 #ifdef _DEBUG_HOMARD_
369 write (ulsort,texte(langue,3)) 'UTMOPF', nompro
373 call utmopf ( obpafo, jaux,
374 > nbpafo, tbsaux, tbiaux,
376 > nbfopa, kaux, laux, maux, naux,
378 > ulsort, langue, codret )
380 #ifdef _DEBUG_HOMARD_
381 write (ulsort,texte(langue,5)) nbfopa, obpafo
382 call gmprsx (nompro, obpafo )
383 call gmprsx (nompro, obpafo//'.Fonction' )
390 #ifdef _DEBUG_HOMARD_
391 if ( codret.eq.0 ) then
392 write (ulsort,texte(langue,8)) nbpafo
393 write (ulsort,93010) (noinpf(nrpafo),nrpafo = 1 , nbpafo)
398 c 3. gestion des couples (aux noeuds par element/aux points de Gauss)
400 #ifdef _DEBUG_HOMARD_
401 write (ulsort,90002) '3. gestion des couples, codret',codret
404 if ( option.eq.1 ) then
406 do 30 , nrpafo = 1 , nbpafo
408 c 3.1. ==> caracteristiques du paquet
410 #ifdef _DEBUG_HOMARD_
411 write (ulsort,90002) 'Paquet numero', nrpafo
414 if ( codret.eq.0 ) then
416 obpafo = noinpf(nrpafo)
418 #ifdef _DEBUG_HOMARD_
419 call gmprsx (nompro, obpafo )
422 #ifdef _DEBUG_HOMARD_
423 write (ulsort,texte(langue,3)) 'UTCAPF', nompro
426 call utcapf ( obpafo,
427 > nbfopa, nbtyas, ngauss, carsup, typint,
429 > ulsort, langue, codret )
430 #ifdef _DEBUG_HOMARD_
431 write (ulsort,texte(langue,65+carsup))
432 write (ulsort,90002) 'nbfopa', nbfopa
433 write (ulsort,90002) 'nbtyas', nbtyas
434 write (ulsort,90002) 'ngauss', ngauss
435 write (ulsort,90002) 'carsup', carsup
436 write (ulsort,90002) 'typint', typint
437 write (ulsort,93010) (smem(adobfo+iaux),' ',iaux=0,nbfopa)
442 c 3.2. ==> on poursuit si c'est un paquet aux noeuds par element ou
443 c aux points de Gauss
445 if ( carsup.ge.1 .and. carsup.le.2 ) then
447 c 3.2.1. ==> Recherche du numero global de la premiere des fonctions
450 if ( codret.eq.0 ) then
452 nomfon = smem(adobfo)
453 do 321 , iaux = 1 , nbfonc
454 if ( nofonc(2,iaux).eq.nomfon ) then
460 write (ulsort,texte(langue,6))
466 c 3.2.2. ==> Numero global et nom de la fonction associee
468 if ( codret.eq.0 ) then
470 iaux = defonc(9,nrofon)
471 saux08 = nofonc(2,iaux)
475 c 3.2.3. ==> Recherche du paquet contenant cette fonction associee
476 c Rearque : inutile de chercher dans le paquet courant ...
478 if ( codret.eq.0 ) then
480 do 323 , iaux = 1 , nbpafo
482 if ( iaux.ne.nrpafo ) then
484 if ( codret.eq.0 ) then
486 obpafo = noinpf(iaux)
488 #ifdef _DEBUG_HOMARD_
489 write (ulsort,texte(langue,3)) 'UTCAPF', nompro
491 call utcapf ( obpafo,
492 > jaux, kaux, laux, maux, naux,
494 > ulsort, langue, codret )
498 if ( codret.eq.0 ) then
500 do 3231 , nrofon = 1 , jaux
501 if ( smem(adobf2+nrofon-1).eq.saux08 ) then
502 smem(adobfo+nbfopa) = obpafo
513 if ( nbseal.gt.0 .and. carsup.eq.2 ) then
514 write (ulsort,texte(langue,7))
532 if ( codret.ne.0 ) then
536 write (ulsort,texte(langue,1)) 'Sortie', nompro
537 write (ulsort,texte(langue,2)) codret
541 #ifdef _DEBUG_HOMARD_
542 write (ulsort,texte(langue,1)) 'Sortie', nompro