Salome HOME
Homard executable
[modules/homard.git] / src / tool / ES_HOMARD / esleno.F
1       subroutine esleno ( idfmed, nomamd,
2      >                    nhnoeu,
3      >                    dimcst, lgnoig, nbnoco,
4      >                    ltbiau, tbiaux,
5      >                    ulsort, langue, codret)
6 c
7 c ______________________________________________________________________
8 c
9 c                             H O M A R D
10 c
11 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
12 c
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
18 c
19 c    HOMARD est une marque deposee d'Electricite de France
20 c
21 c Copyright EDF 1996
22 c Copyright EDF 1998
23 c Copyright EDF 2002
24 c Copyright EDF 2020
25 c ______________________________________________________________________
26 c
27 c  Entree-Sortie : LEcture des NOeuds
28 c  -      -        --          --
29 c ______________________________________________________________________
30 c .  nom   . e/s . taille .           description                      .
31 c .____________________________________________________________________.
32 c . idfmed . e   .   1    . identificateur du fichier MED              .
33 c . nomamd . e   . char64 . nom du maillage MED voulu                  .
34 c . dimcst . e   .   1    . 0, si toutes les coordonnees varient       .
35 c .        .     .        . i, si la i-eme est constante et n'est pas  .
36 c .        .     .        .    memorisee sur chaque noeud              .
37 c . lgnoig . e   .   1    . nombre de noeuds lies aux elements ignores .
38 c . nbnoco . e   .   1    . nbr noeuds pour la non-conformite initiale .
39 c . ltbiau . e   .    1   . longueur allouee a tbiaux                  .
40 c . tbiaux .     .    *   . tableau tampon entier                      .
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 ______________________________________________________________________
47 c
48 c====
49 c 0. declarations et dimensionnement
50 c====
51 c
52 c 0.1. ==> generalites
53 c
54       implicit none
55       save
56 c
57       character*6 nompro
58       parameter ( nompro = 'ESLENO' )
59 c
60 #include "nblang.h"
61 #include "consts.h"
62 c
63 c 0.2. ==> communs
64 c
65 #include "envex1.h"
66 #include "gmenti.h"
67 #include "gmreel.h"
68 c
69 #include "envca1.h"
70 #include "nombno.h"
71 #include "dicfen.h"
72 #include "nbfami.h"
73 c
74 c 0.3. ==> arguments
75 c
76       integer*8 idfmed
77       integer dimcst, lgnoig, nbnoco
78       integer ltbiau, tbiaux(*)
79 c
80       character*8 nhnoeu
81       character*64 nomamd
82 c
83       integer ulsort, langue, codret
84 c
85 c 0.4. ==> variables locales
86 c
87 #include "meddc0.h"
88 c
89       integer iaux
90       integer codre1, codre2, codre3, codre4, codre5
91       integer codre6
92       integer codre0
93       integer adnoig
94       integer pcoono
95       integer pfamno, pcfano
96 c
97       character*8 nhnofa
98 c
99       integer nbmess
100       parameter ( nbmess = 150 )
101       character*80 texte(nblang,nbmess)
102 c ______________________________________________________________________
103 c
104 c====
105 c 1. messages
106 c====
107 c
108 #include "impr01.h"
109 c
110 #ifdef _DEBUG_HOMARD_
111       write (ulsort,texte(langue,1)) 'Entree', nompro
112       call dmflsh (iaux)
113 #endif
114 c
115       texte(1,4) = '(''. Lecture des noeuds.'')'
116 c
117       texte(2,4) = '(''. Readings of nodes.'')'
118 c
119 #include "esimpr.h"
120 c
121 #ifdef _DEBUG_HOMARD_
122       write (ulsort,texte(langue,4))
123 #endif
124 c
125 c====
126 c 2. Gestion de la memoire
127 c====
128 c 2.1. ==> la base
129 c
130       call gmecat ( nhnoeu, 1, nbnoto, codre1 )
131       call gmecat ( nhnoeu, 2, dimcst, codre2 )
132       call gmecat ( nhnoeu, 3, lgnoig, codre3 )
133       call gmecat ( nhnoeu, 4, nbnoco, codre4 )
134       call gmaloj ( nhnoeu//'.InfoGene', ' ', lgnoig, adnoig, codre5 )
135       iaux = sdim * nbnoto
136       call gmaloj ( nhnoeu//'.Coor', ' ', iaux, pcoono, codre6 )
137 c
138       codre0 = min ( codre1, codre2, codre3, codre4, codre5,
139      >               codre6 )
140       codret = max ( abs(codre0), codret,
141      >               codre1, codre2, codre3, codre4, codre5,
142      >               codre6 )
143 c
144 c 2.2. ==> appel du programme generique pour l'allocation de
145 c          la branche liee aux familles
146 c
147       if ( codret.eq.0 ) then
148 c
149 #ifdef _DEBUG_HOMARD_
150       write (ulsort,texte(langue,3)) 'UTALFE', nompro
151 #endif
152       iaux = -1
153       call utalfe ( iaux, nhnoeu,
154      >              nbnoto, nctfno, nbfnoe,
155      >              nhnofa, pfamno, pcfano,
156      >              ulsort, langue, codret)
157 c
158       endif
159 c
160 c====
161 c 3. Lectures
162 c====
163 c 3.1. ==> Lecture de la connectivite et des familles
164 c
165       if ( codret.eq.0 ) then
166 c
167       iaux = 1
168 #ifdef _DEBUG_HOMARD_
169       write (ulsort,texte(langue,3)) 'ESLMNO', nompro
170 #endif
171       call eslmno ( idfmed, nomamd,
172      >                iaux,
173      >              nbnoto, sdim, rmem(pcoono), imem(pfamno),
174      >              ulsort, langue, codret )
175 c
176       endif
177 c
178 c 2.2. ==> Lecture des complements
179 c
180       if ( codret.eq.0 ) then
181 c
182 #ifdef _DEBUG_HOMARD_
183       write (ulsort,texte(langue,3)) 'ESLEN1', nompro
184 #endif
185       call eslen1 ( idfmed, nomamd,
186      >              nhnoeu,
187      >              dimcst,
188      >              ltbiau, tbiaux,
189      >              ulsort, langue, codret )
190 c
191       endif
192 #ifdef _DEBUG_HOMARD_
193       call gmprsx ( nompro, nhnoeu )
194       call gmprsx ( nompro, nhnoeu//'.Coor' )
195       call gmprsx ( nompro, nhnoeu//'.HistEtat' )
196       call gmprsx ( nompro, nhnoeu//'.AretSupp' )
197 #endif
198 c
199 c====
200 c 4. la fin
201 c====
202 c
203       if ( codret.ne.0 ) then
204 c
205 #include "envex2.h"
206 c
207       write (ulsort,texte(langue,1)) 'Sortie', nompro
208       write (ulsort,texte(langue,2)) codret
209 c
210       endif
211 c
212 #ifdef _DEBUG_HOMARD_
213       write (ulsort,texte(langue,1)) 'Sortie', nompro
214       call dmflsh (iaux)
215 #endif
216 c
217       end