1 subroutine eslsm0 ( nocson, nomfic, lnomfi,
4 > cactal, caetal, cartal,
6 > ulsort, langue, codret )
7 c ______________________________________________________________________
11 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
13 c Version originale enregistree le 18 juin 1996 sous le numero 96036
14 c aupres des huissiers de justice Simart et Lavoir a Clamart
15 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
16 c aupres des huissiers de justice
17 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
19 c HOMARD est une marque deposee d'Electricite de France
25 c ______________________________________________________________________
27 c Entree-Sortie - Lecture d'une Solution au format Med - phase 0
29 c ______________________________________________________________________
31 c . nom . e/s . taille . description .
32 c .____________________________________________________________________.
33 c . nocson . s . char*8 . nom de l'objet solution calcul iteration n .
34 c . nomfic . e . char* . nom du fichier .
35 c . lnomfi . e . 1 . longueur du nom du fichier .
36 c . nomamd . e . char64 . nom du maillage MED .
37 c . lnomam . e . 1 . longueur du nom du maillage .
38 c . nbseal . e . 1 . nombre de sequences a lire .
39 c . . . . si -1, on lit tous les champs du fichier .
40 c . nbtosv . s . 1 . nombre total de sequences lues .
41 c . cactal . e .8*nbseal. caracteristiques caracteres de chaque .
42 c . . . . tableau a lire .
43 c . . . . 1,...,8. nom du champ associe .
44 c . caetal . es . 12 * . caracteristiques entieres de chaque .
45 c . . . nbseal . tableau a lire .
46 c . . . . 1. type de support au sens MED .
47 c . . . . -1, si on prend tous les supports .
48 c . . . . 2. 2, on prend le dernier pas de temps .
49 c . . . . 1, le numero du pas de temps est fourni .
51 c . . . . 3. numero du pas de temps .
52 c . . . . 4. 2, on prend le dernier numero d'ordre .
53 c . . . . 1, le numero d'ordre est fourni .
55 c . . . . 5. numero d'ordre .
56 c . . . . 6. 2, on prend le dernier instant .
57 c . . . . 1, l'instant est fourni .
59 c . . . . 7. 1, si aux noeuds par elements, 0 sinon, .
60 c . . . . -1, si non precise .
61 c . . . . 8. numero du champ noeuds/element associe .
62 c . . . . 9. numero du champ associe dans HOMARD .
63 c . . . . 10. type d'interpolation .
64 c . . . . 0, si automatique .
65 c . . . . 1 si degre 1, 2 si degre 2, 3 si iso-P2 .
66 c . . . . 11. 1, s'il fait partie du champ en cours .
67 c . . . . d'examen, 0, sinon .
68 c . . . . 12. type de champ edfl64/edin64 .
69 c . cartal . e . nbseal . caracteristiques reelles de chaque .
70 c . . . . tableau a lire .
71 c . . . . 1. instant .
72 c . messin . e . 1 . message d'informations .
73 c . . . . impressions MED si multiple de 3 .
74 c . option . e . 1 . 1 : on controle que l'on a les couples (aux.
75 c . . . . noeuds par element/aux points de Gauss) .
76 c . . . . 0 : pas de controle .
77 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
78 c . langue . e . 1 . langue des messages .
79 c . . . . 1 : francais, 2 : anglais .
80 c . codret . es . 1 . code de retour des modules .
81 c . . . . 0 : pas de probleme .
82 c . . . . 1 : probleme .
83 c ______________________________________________________________________
85 c ESLSMD -> ESLSM0 -> ESOUVL -> ESVERI -> MFICOM
101 c -> ESLPR1 -> MPFPSN
103 c -> ESLPG1 -> ESLPG2 -> MLCNLC
108 c -> ESLSM2 -> ESLCH3
111 c -> ESLSM4 -> ESLCH4 -> MFDRPR
117 c 0. declarations et dimensionnement
120 c 0.1. ==> generalites
126 parameter ( nompro = 'ESLSM0' )
140 integer lnomfi, lnomam
141 integer nbseal, nbtosv
144 double precision cartal(*)
147 character*8 cactal(*)
151 integer messin, option
153 integer ulsort, langue, codret
155 c 0.4. ==> variables locales
158 integer codre1, codre2
161 integer nbchfi, nbcham, nbfonc, nbprof, nblopg
162 integer nbrpro, nbrlpg
164 integer adinch, adinpf, adinpr, adinlg
165 integer adtra1, adtra2
170 character*8 ntrav1, ntrav2
171 character*16 nomaxe(3), uniaxe(3)
172 #ifdef _DEBUG_HOMARD_
177 parameter ( nbmess = 150 )
178 character*80 texte(nblang,nbmess)
180 c 0.5. ==> initialisations
181 c ______________________________________________________________________
189 #ifdef _DEBUG_HOMARD_
190 write (ulsort,texte(langue,1)) 'Entree', nompro
201 #ifdef _DEBUG_HOMARD_
202 write (ulsort,90002) '2. prealables ; codret', codret
205 c 2.1. ==> ouverture du fichier MED
207 if ( codret.eq.0 ) then
209 #ifdef _DEBUG_HOMARD_
215 #ifdef _DEBUG_HOMARD_
216 write (ulsort,texte(langue,3)) 'ESOUVL', nompro
218 call esouvl ( idfmed, nomfic(1:lnomfi), iaux,
219 > ulsort, langue, codret )
223 c 2.2. ==> le maillage est-il present dans le fichier ?
225 if ( codret.eq.0 ) then
227 #ifdef _DEBUG_HOMARD_
228 write (ulsort,texte(langue,3)) 'ESLNOM', nompro
230 call eslnom ( idfmed, nomamd, lnomam,
232 > typrep, nomaxe, uniaxe,
233 > ulsort, langue, codret )
238 c 3. nombre de champs dans le fichier : s'il n'y en n'a pas, on met
239 c tout a zero et on passera par-dessus la suite
241 #ifdef _DEBUG_HOMARD_
242 write (ulsort,90002) '3. nb champs dans fichier ; codret', codret
245 c 3.1. ==> nombre de champs dans le fichier
247 if ( codret.eq.0 ) then
249 #ifdef _DEBUG_HOMARD_
250 write (ulsort,texte(langue,3)) 'MFDNFD', nompro
252 call mfdnfd ( idfmed, nbchfi, codret )
254 #ifdef _DEBUG_HOMARD_
255 if ( codret.eq.0 ) then
256 write (ulsort,90002) 'Nombre de champs dans le fichier', nbchfi
262 c 3.2. ==> nombre de localisations de points de Gauss dans le fichier
264 if ( codret.eq.0 ) then
266 #ifdef _DEBUG_HOMARD_
267 write (ulsort,texte(langue,3)) 'MLCNLC', nompro
269 call mlcnlc ( idfmed, nbrlpg, codret )
270 if ( codret.ne.0 ) then
271 write (ulsort,texte(langue,4))
272 write (ulsort,texte(langue,79))
275 #ifdef _DEBUG_HOMARD_
276 write (ulsort,texte(langue,82)) nbrlpg
281 c 3.3. ==> nombre de profils dans le fichier
283 if ( codret.eq.0 ) then
285 #ifdef _DEBUG_HOMARD_
286 write (ulsort,texte(langue,3)) 'MPFNPF', nompro
288 call mpfnpf ( idfmed, nbrpro, codret )
290 #ifdef _DEBUG_HOMARD_
291 write (ulsort,texte(langue,86)) nbrpro
296 c 3.4. ==> allocation de l'objet solution : la tete et la
298 c On suppose qu'il n'y a ni fonction, ni profil, ni
299 c localisation de points de Gauss
301 if ( codret.eq.0 ) then
304 #ifdef _DEBUG_HOMARD_
305 write (ulsort,texte(langue,3)) 'UTALSO', nompro
307 call utalso ( nocson,
308 > nbchfi, iaux, iaux, iaux,
309 > adinch, adinpf, adinpr, adinlg,
310 > ulsort, langue, codret )
315 c 4. caracterisations des champs
317 #ifdef _DEBUG_HOMARD_
318 write (ulsort,90002) '4. caracterisations champs ; codret', codret
325 if ( nbchfi.ne.0 ) then
327 c 4.1. ==> tableaux temporaires pour stocker les noms des eventuels
328 c profils et localisations de points de Gauss a lire
330 if ( codret.eq.0 ) then
332 iaux = 9*nbchfi*nbrpro
333 call gmalot ( ntrav1, 'chaine', iaux, adtra1, codre1 )
334 iaux = 9*nbchfi*nbrlpg
335 call gmalot ( ntrav2, 'chaine', iaux, adtra2, codre2 )
337 codre0 = min ( codre1, codre2 )
338 codret = max ( abs(codre0), codret,
343 c 4.2. ==> A partir des nbchfi champs contenus dans le fichier, on
344 c cree les caracteristiques de ce qu'il faut lire. On
345 c recupere leur nombre, nbcham, et le nombre total de
346 c tableaux de valeurs auxquels cela correspond, nbtosv
347 c On ne s'interesse ici qu'aux caracteristiques des tableaux
350 if ( codret.eq.0 ) then
352 #ifdef _DEBUG_HOMARD_
353 write (ulsort,texte(langue,3)) 'ESLSM1', nompro
355 call eslsm1 ( idfmed, nomamd,
357 > nbseal, cactal, caetal, cartal,
358 > nbcham, smem(adinch), nbtosv,
359 > nbprof, smem(adtra1),
360 > nblopg, smem(adtra2),
361 > ulsort, langue, codret )
365 #ifdef _DEBUG_HOMARD_
366 write (ulsort,90002) 'nbseal',nbseal
367 if ( nbseal.gt.0 ) then
368 write (ulsort,90005) 'caetal',(caetal(iaux,1),iaux=1,12)
369 write (ulsort,90004) 'cartal',cartal(1)
371 if ( codret.eq.0 ) then
372 write (ulsort,90002) 'Nbre de champs a lire (nbcham) ', nbcham
373 write (ulsort,90002) 'Nbre cumule de sequences (nbtosv)', nbtosv
374 write (ulsort,90002) 'Nbre cumule de profils (nbprof) ', nbprof
375 cgn call gmprsx (nompro, ntrav1 )
379 c 4.3. ==> stockage de l'information sur les champs dans la
381 #ifdef _DEBUG_HOMARD_
382 write (ulsort,90002)'Avant 4.3., codret', codret
385 if ( codret.eq.0 ) then
387 call gmecat ( nocson, 1, nbcham, codre1 )
388 call gmmod ( nocson//'.InfoCham',
389 > adinch, nbchfi, nbcham, 1, 1, codre2 )
391 codre0 = min ( codre1, codre2 )
392 codret = max ( abs(codre0), codret,
397 #ifdef _DEBUG_HOMARD_
398 if ( codret.eq.0 ) then
399 40000 format(/,'Apres 4.3., solution ',a8,/,29('='),/)
400 write (ulsort,40000) nocson
401 call gmprsx (nompro, nocson )
402 call gmprsx (nompro, nocson//'.InfoCham' )
403 cgn call gmprsx (nompro, '%%%%%%14' )
404 cgn call gmprsx (nompro, '%%%%%%14.Nom_Comp' )
405 cgn call gmprsx (nompro, '%%%%%%17.Cham_Ent' )
406 cgn call gmprsx (nompro, '%%%%%%18.Cham_Ent' )
407 cgn call gmprsx (nompro, '%%%%%%14.Cham_Ree' )
408 cgn call gmprsx (nompro, '%%%%%%14.Cham_Car' )
412 c 4.4.==> creations des structures representant les profils
413 c necessaires aux champs a lire
414 #ifdef _DEBUG_HOMARD_
415 write (ulsort,90002)'Avant 4.4., codret', codret
418 if ( nbprof.ne.0 ) then
420 if ( codret.eq.0 ) then
422 call gmaloj ( nocson//'.InfoProf', ' ',
423 > nbprof, adinpr, codre1 )
424 call gmecat ( nocson, 3, nbprof, codre2 )
426 codre0 = min ( codre1, codre2 )
427 codret = max ( abs(codre0), codret,
432 if ( codret.eq.0 ) then
434 do 44 , iaux = 1 , nbprof
435 smem(adinpr+iaux-1) = smem(adtra1+5*iaux-1)
440 #ifdef _DEBUG_HOMARD_
441 40004 format(/,'Apres 4.4., solution ',a8,/,29('='),/)
442 if ( codret.eq.0 ) then
443 write (ulsort,40004) nocson
444 call gmprsx (nompro, nocson )
445 call gmprsx (nompro, nocson//'.InfoProf' )
446 cgn call gmprsx (nompro, '%%%%%%%6' )
447 cgn call gmprsx (nompro, '%%%%%%%6.NomProfi' )
448 cgn call gmprsx (nompro, '%%%%%%%6.ListEnti' )
454 c 4.5. ==> creations des structures representant les localisations de
455 c points de Gauss necessaires aux champs a lire
456 #ifdef _DEBUG_HOMARD_
457 write (ulsort,90002) 'Avant 4.5., codret', codret
460 if ( nblopg.ne.0 ) then
462 if ( codret.eq.0 ) then
464 call gmaloj ( nocson//'.InfoLoPG', ' ',
465 > nblopg, adinlg, codre1 )
466 call gmecat ( nocson, 4, nblopg, codre2 )
468 codre0 = min ( codre1, codre2 )
469 codret = max ( abs(codre0), codret,
474 if ( codret.eq.0 ) then
476 do 45 , iaux = 1 , nblopg
477 smem(adinlg+iaux-1) = smem(adtra2+9*iaux-1)
482 #ifdef _DEBUG_HOMARD_
483 40005 format(/,'Apres 4.5., solution ',a8,/,29('='),/)
484 if ( codret.eq.0 ) then
485 write (ulsort,40005) nocson
486 call gmprsx (nompro, nocson )
487 call gmprsx (nompro, nocson//'.InfoLoPG' )
495 if ( codret.eq.0 ) then
497 call gmlboj ( ntrav1, codre1 )
498 call gmlboj ( ntrav2, codre2 )
500 codre0 = min ( codre1, codre2 )
501 codret = max ( abs(codre0), codret,
511 #ifdef _DEBUG_HOMARD_
512 write (ulsort,90002) '5. les fonctions ; codret', codret
515 if ( codret.eq.0 ) then
517 if ( nbtosv.ne.0 ) then
519 c 5.1.==> classement des champs en fonctions
520 c a priori, on suppose qu'il y a autant de fonctions differents
521 c que de tableaux ; on pourrait corriger ensuite en fonction
522 c des regroupements qui auront ete faits dans eslsm2, mais
523 c c'est inutile de passer du temps a cela car les tableaux
524 c sont detruits a la fin de cette sequence.
526 if ( codret.eq.0 ) then
528 #ifdef _DEBUG_HOMARD_
529 write (ulsort,90002) 'Nombre de fonctions suppose', nbtosv
530 write (ulsort,90002) 'nbinec', nbinec
533 call gmalot ( ntrav1, 'entier', iaux, adtra1, codre1 )
535 call gmalot ( ntrav2, 'chaine', iaux, adtra2, codre2 )
537 codre0 = min ( codre1, codre2 )
538 codret = max ( abs(codre0), codret,
543 if ( codret.eq.0 ) then
545 #ifdef _DEBUG_HOMARD_
546 write (ulsort,texte(langue,3)) 'ESLSM2', nompro
548 call eslsm2 ( nbcham, smem(adinch), nbseal,
549 > nbfonc, imem(adtra1), smem(adtra2), option,
550 > ulsort, langue, codret )
554 #ifdef _DEBUG_HOMARD_
555 if ( codret.eq.0 ) then
556 write (ulsort,90002) 'Nombre de fonctions (nbfonc)',nbfonc
557 call gmprsx (nompro, ntrav1 )
558 call gmprsx (nompro, ntrav2 )
562 c 5.2. ==> creations des structures pour les fonctions
564 #ifdef _DEBUG_HOMARD_
565 write (ulsort,90002)'Avant 5.2, codret',codret
568 if ( codret.eq.0 ) then
570 #ifdef _DEBUG_HOMARD_
571 write (ulsort,texte(langue,3)) 'ESLSM3', nompro
574 call eslsm3 ( nbfonc, imem(adtra1),
576 > ulsort, langue, codret )
578 #ifdef _DEBUG_HOMARD_
579 if ( codret.eq.0 ) then
580 call gmprsx (nompro, ntrav2 )
586 c 5.3. ==> lecture des valeurs numeriques et des eventuels profils
588 #ifdef _DEBUG_HOMARD_
589 write (ulsort,90002)'Avant 5.3, codret',codret
592 if ( codret.eq.0 ) then
594 #ifdef _DEBUG_HOMARD_
595 write (ulsort,texte(langue,3)) 'ESLSM4', nompro
598 call eslsm4 ( idfmed,
599 > nbcham, smem(adinch),
600 > nbfonc, imem(adtra1), smem(adtra2),
601 > ulsort, langue, codret )
605 c 5.4. ==> regroupement des fonctions en paquets
607 #ifdef _DEBUG_HOMARD_
608 write (ulsort,90002) 'Avant 5.4, codret', codret
611 if ( codret.eq.0 ) then
613 call gmaloj ( nocson//'.InfoPaFo', ' ', nbfonc, adinpf, codret )
617 if ( codret.eq.0 ) then
619 #ifdef _DEBUG_HOMARD_
620 write (ulsort,texte(langue,3)) 'ESLSM5', nompro
623 call eslsm5 ( nbfonc, imem(adtra1), smem(adtra2), nbseal,
624 > nbpafo, smem(adinpf), option,
625 > ulsort, langue, codret )
629 if ( codret.eq.0 ) then
631 call gmecat ( nocson, 2, nbpafo, codre1 )
632 call gmmod ( nocson//'.InfoPaFo',
633 > adinpf, nbfonc, nbpafo, 1, 1, codre2 )
635 codre0 = min ( codre1, codre2 )
636 codret = max ( abs(codre0), codret,
639 #ifdef _DEBUG_HOMARD_
640 if ( codret.eq.0 ) then
641 write (ulsort,40054) nocson
643 40054 format(/,'Apres 5.4., solution ',a8,/,29('='),/)
644 call gmprsx (nompro, nocson )
645 call gmprsx (nompro, nocson//'.InfoPaFo' )
646 do 54555 , iaux = adinpf , adinpf+nbpafo-1
647 call gmprsx (nompro, smem(iaux) )
649 call gmprsx (nompro, '%%Fo002I' )
650 call gmprsx (nompro, '%%%%%%12' )
651 call gmprsx (nompro,'%%%%%%12.ValeursR')
652 call gmprsx (nompro,'%%%%%%12.InfoPrPG')
653 call gmprsx (nompro, '%%%%%%10' )
654 write (ulsort,*) '+++++++++++++++++++++++++++++++++++++++++'
661 #ifdef _DEBUG_HOMARD_
662 write (ulsort,90002)'Avant 5.5, codret',codret
665 if ( codret.eq.0 ) then
667 ccc call gmprsx (nompro, ntrav1 )
668 call gmlboj ( ntrav1, codre1 )
669 ccc call gmprsx (nompro, ntrav2 )
670 call gmlboj ( ntrav2, codre2 )
672 codre0 = min ( codre1, codre2 )
673 codret = max ( abs(codre0), codret,
683 c 6. fermeture du fichier
685 #ifdef _DEBUG_HOMARD_
686 write (ulsort,90002) '6. fermeture du fichier ; codret', codret
689 if ( codret.eq.0 ) then
691 #ifdef _DEBUG_HOMARD_
692 write (ulsort,texte(langue,3)) 'MFICLO', nompro
694 call mficlo( idfmed, codret )
695 if ( codret.ne.0 ) then
696 write (ulsort,texte(langue,10))
701 #ifdef _DEBUG_HOMARD_
702 33333 format(80('*'))
703 44444 format(80('='))
704 if ( codret.eq.0 ) then
705 call gmprsx (nompro, nocson )
706 call gmprsx (nompro, nocson//'.InfoCham' )
707 call gmprsx (nompro, nocson//'.InfoPaFo' )
708 call gmprsx (nompro, nocson//'.InfoProf' )
710 do 61 , iaux = 6,20,2
711 call utench ( iaux, 'd', codre0, saux08,
712 > ulsort, langue, codret )
714 saux08(1:7) = '%%%%%%%'
716 saux08(1:6) = '%%%%%%'
718 call gmprsx (nompro,saux08)
719 call gmprsx (nompro,saux08//'.NomProfi')
720 call gmprsx (nompro,saux08//'.ListEnti')
725 call utench ( iaux, 'd', codre0, saux08,
726 > ulsort, langue, codret )
728 saux08(1:7) = '%%%%%%%'
730 saux08(1:6) = '%%%%%%'
732 call gmprsx (nompro,saux08)
733 call gmprsx (nompro,saux08//'.Fonction')
734 if ( iaux.eq.42 ) then
735 call gmprsx (nompro,'%%%%%%36')
736 call gmprsx (nompro,'%%%%%%36.ValeursR')
737 call gmprsx (nompro,'%%%%%%36.InfoPrPG')
740 call utench ( iaux-5, 'd', codre0, saux08,
741 > ulsort, langue, codret )
742 saux08(1:6) = '%%%%%%'
743 call gmprsx (nompro,saux08)
744 call gmprsx (nompro,saux08//'.ValeursR')
745 call gmprsx (nompro,saux08//'.InfoPrPG')
750 if ( mod(iaux,2).eq.1 .or. iaux.ge.21 ) then
751 call utench ( iaux, 'd', codre0, saux08,
752 > ulsort, langue, codret )
754 saux08(1:7) = '%%%%%%%'
756 saux08(1:6) = '%%%%%%'
758 call gmprsx (nompro,saux08)
761 cgn call gmprsx (nompro, '%%%%%%14' )
762 cgn call gmprsx (nompro, '%%%%%%14.Nom_Comp' )
763 cgn call gmprsx (nompro, '%%%%%%14.Cham_Ent' )
764 cgn call gmprsx (nompro, '%%%%%%14.Cham_Ree' )
765 cgn call gmprsx (nompro, '%%%%%%14.Cham_Car' )
766 cgn call gmprsx (nompro, '%%%%%%23' )
767 cgn call gmprsx (nompro, '%%Fo004J')
768 cgn call gmprsx (nompro, '%%%%%%21' )
769 cgn call gmprsx (nompro, '%%%%%%21.InfoPrPG' )
777 if ( codret.ne.0 ) then
781 write (ulsort,texte(langue,1)) 'Sortie', nompro
782 write (ulsort,texte(langue,2)) codret
783 write (ulsort,texte(langue,8)) nomfic
787 #ifdef _DEBUG_HOMARD_
788 write (ulsort,texte(langue,1)) 'Sortie', nompro