Salome HOME
Homard executable
[modules/homard.git] / src / tool / ES_MED / eslsmd.F
1       subroutine eslsmd ( nocson, nochso,
2      >                    messin, option,
3      >                    ulsort, langue, codret )
4 c ______________________________________________________________________
5 c
6 c                             H O M A R D
7 c
8 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
9 c
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
15 c
16 c    HOMARD est une marque deposee d'Electricite de France
17 c
18 c Copyright EDF 1996
19 c Copyright EDF 1998
20 c Copyright EDF 2002
21 c Copyright EDF 2020
22 c ______________________________________________________________________
23 c
24 c  Entree-Sortie - Lecture d'une Solution au format MeD
25 c  -      -        -             -                  - -
26 c ______________________________________________________________________
27 c .        .     .        .                                            .
28 c .  nom   . e/s . taille .           description                      .
29 c .____________________________________________________________________.
30 c . nocson .   s . char*8 . nom de l'objet solution calcul iteration n .
31 c . nochso . e   . char*8 . nom des champs de solution a lire          .
32 c .        .     .        . si la chaine est blanche, on lit tout      .
33 c . messin . e   .   1    . message d'informations                     .
34 c .        .     .        . impressions MED si multiple de 3           .
35 c . option . e   .   1    . 1 : on controle que l'on a les couples (aux.
36 c .        .     .        . noeuds par element/aux points de Gauss)    .
37 c .        .     .        . 0 : pas de controle                        .
38 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
39 c . langue . e   .    1   . langue des messages                        .
40 c .        .     .        . 1 : francais, 2 : anglais                  .
41 c . codret . es  .    1   . code de retour des modules                 .
42 c .        .     .        . 0 : pas de probleme                        .
43 c .        .     .        . 1 : probleme                               .
44 c .        .     .        . -1 : fichier inconnu                       .
45 c .        .     .        . -2 : nom de maillage inconnu               .
46 c ______________________________________________________________________
47 c
48 c  HOAPLS --> ESLSMD
49 c /ININFM
50 c  ESLSMD -> ESLSM0 -> ESOUVL -> ESVERI -> MFICOM
51 c                                       -> MLBSTV
52 c                                       -> MFIOPE
53 c                                       -> MFISVR
54 c                                       -> MFICLO
55 c                             -> MFIOPE
56 c                             -> ESLENT -> MFICOR
57 c                   -> ESLNOM -> MMHNMH
58 c                             -> MMHMII
59 c                   -> MFDNFD
60 c                   -> MLCNLC
61 c                   -> ESLSM1 -> MFDNFC
62 c                             -> MFDFDI
63 c                             -> ESLCH1 -> ESLCH2 -> MFDCSI
64 c                                       -> MFDNPF
65 c                                       -> ESLPR1 -> MPFPSN
66 c                                                 -> MPFPRR
67 c                                       -> ESLPG1 -> ESLPG2 -> MLCNLC
68 c                                                           -> MLCLCI
69 c                                                 -> MLCLOR
70 c                                       -> MFDNPN
71 c                             -> ESLCH6
72 c                   -> ESLSM2 -> ESLCH3
73 c                             -> ESLCH7
74 c                   -> ESLSM3
75 c                   -> ESLSM4 -> ESLCH4 -> MFDRPR
76 c                                       -> ESLCH5
77 c                   -> ESLSM5
78 c         -> MFICLO
79 c====
80 c 0. declarations et dimensionnement
81 c====
82 c
83 c 0.1. ==> generalites
84 c
85       implicit none
86       save
87 c
88       character*6 nompro
89       parameter ( nompro = 'ESLSMD' )
90 c
91 #include "nblang.h"
92 c
93 #include "motcle.h"
94 #include "consts.h"
95 c
96 c 0.2. ==> communs
97 c
98 #include "envex1.h"
99 c
100 #include "gmenti.h"
101 #include "gmreel.h"
102 #include "gmstri.h"
103 c
104 c 0.3. ==> arguments
105 c
106       character*8 nocson, nochso
107 c
108       integer messin, option
109 c
110       integer ulsort, langue, codret
111 c
112 c 0.4. ==> variables locales
113 c
114       integer iaux, jaux
115       integer lnomfi, lnomam
116       integer nbseal, nbtosv
117       integer adcact, adcaet, adcart
118 c
119       character*8 typobs
120       character*64 nomamd
121       character*200 nomfic
122 c
123       integer nbmess
124       parameter ( nbmess = 150 )
125       character*80 texte(nblang,nbmess)
126 c
127 c 0.5. ==> initialisations
128 c ______________________________________________________________________
129 c
130 c====
131 c 1. initialisations
132 c====
133 c
134 c 1.1. ==> les messages
135 c
136 #include "impr01.h"
137 c
138 #ifdef _DEBUG_HOMARD_
139       write (ulsort,texte(langue,1)) 'Entree', nompro
140       call dmflsh (iaux)
141 #endif
142 c
143 #include "impr03.h"
144 c
145 #include "esimpr.h"
146 c
147 c 1.2. ==> nom du fichier contenant la solution
148 c
149       typobs = mccson
150       iaux = 0
151       jaux = 0
152       call utfino ( typobs, iaux, nomfic, lnomfi,
153      >              jaux,
154      >              ulsort, langue, codret )
155       if ( codret.ne.0 ) then
156         write (ulsort,texte(langue,8)) 'en entree'
157         codret = -1
158       endif
159 c
160 c 1.3. ==> nom du maillage dans ce fichier
161 c
162       if ( codret.eq.0 ) then
163 c
164       typobs = mccnmn
165       iaux = 0
166       jaux = 0
167       call utfino ( typobs, iaux, nomamd, lnomam,
168      >              jaux,
169      >              ulsort, langue, codret )
170       if ( codret.ne.0 ) then
171         call utosme ( typobs, ulsort, langue )
172         if ( codret.eq.4 ) then
173           write (ulsort,texte(langue,52)) lnomam
174           write (ulsort,texte(langue,53)) len(nomamd)
175           codret = -2
176         endif
177       endif
178 c
179       endif
180 c
181 c====
182 c 2. liste des champs a lire
183 c    si nbseal = -1, on lira tous les champs du fichier
184 c====
185 #ifdef _DEBUG_HOMARD_
186       write (ulsort,90002) '2. liste des champs a lire ; codret', codret
187 #endif
188 c
189       if ( codret.eq.0 ) then
190 c
191 #ifdef _DEBUG_HOMARD_
192       write (ulsort,90002) '... Debut de 2., codret',codret
193       write (ulsort,*) '... Debut de 2., nochso =',nochso
194       if ( nochso.ne.blan08 ) then
195         write (ulsort,*) '... Champs a lire :'
196 cgn        call gmprsx (nompro,nochso)
197         call gmprsx (nompro, nochso//'.CarCaChp' )
198         call gmprsx (nompro, nochso//'.CarEnChp' )
199         call gmprsx (nompro, nochso//'.CarReChp' )
200       endif
201       write (ulsort,texte(langue,3)) 'ESLSCH', nompro
202 #endif
203       call eslsch ( nochso,
204      >              nbseal, adcact, adcaet, adcart,
205      >              ulsort, langue, codret )
206 c
207       endif
208 c
209 #ifdef _DEBUG_HOMARD_
210       write (ulsort,90002) 'Etape 2, nbseal', nbseal
211 #endif
212 c
213 c====
214 c 3. lecture vraie
215 c====
216 #ifdef _DEBUG_HOMARD_
217       write (ulsort,90002) '3. lecture vraie ; codret', codret
218 #endif
219 c
220       if ( codret.eq.0 ) then
221 c
222 #ifdef _DEBUG_HOMARD_
223       write (ulsort,texte(langue,3)) 'ESLSM0', nompro
224 #endif
225       call eslsm0 ( nocson, nomfic, lnomfi,
226      >              nomamd, lnomam,
227      >              nbseal, nbtosv,
228      >              smem(adcact), imem(adcaet), rmem(adcart),
229      >              messin, option,
230      >              ulsort, langue, codret )
231 c
232       endif
233 c
234 #ifdef _DEBUG_HOMARD_
235       if ( codret.eq.0 ) then
236       write (ulsort,texte(langue,111)) nbtosv
237       call gmprsx (nompro, nocson)
238       call gmprsx (nompro, nocson//'.InfoCham')
239       call gmprsx (nompro, nocson//'.InfoPaFo')
240       call gmprsx (nompro, nocson//'.InfoProf')
241       call gmprsx (nompro, nocson//'.InfoLoPG')
242       call gmprsx (nompro, '%%%%%%%7')
243       call gmprsx (nompro, '%%%%%%%9')
244       call gmprsx (nompro, '%%Fo002o')
245       call gmprsx (nompro, '%%%%%%%8')
246       call gmprsx (nompro, '%%%%%%%8.InfoCham')
247       call gmprsx (nompro, '%%%%%%%8.InfoPrPG')
248       call gmprsx (nompro, '%%%%%%%8.ValeursR')
249       endif
250 #endif
251 c
252 c====
253 c 4. message si on n'a pas trouve les champs
254 c====
255 #ifdef _DEBUG_HOMARD_
256       write (ulsort,90002) '4. message ; codret', codret
257 #endif
258 c
259       if ( codret.ne.0 ) then
260 c
261       iaux = codret
262 c
263 #ifdef _DEBUG_HOMARD_
264       write (ulsort,texte(langue,3)) 'ESLSC1', nompro
265 #endif
266       call eslsc1 ( nomfic, lnomfi,
267      >              messin,
268      >              ulsort, langue, codret )
269 c
270       codret = iaux
271 c
272       endif
273 c
274 c====
275 c 5. menage
276 c====
277 c
278       if ( codret.eq.0 ) then
279 c
280       if ( nochso.ne.blan08 ) then
281 c
282         call gmsgoj (nochso, codret)
283 c
284       endif
285 c
286       endif
287 c
288 c====
289 c 6. la fin
290 c====
291 c
292       if ( codret.ne.0 ) then
293 c
294 #include "envex2.h"
295 c
296       write (ulsort,texte(langue,1)) 'Sortie', nompro
297       write (ulsort,texte(langue,2)) codret
298       if ( codret.ne.-1 ) then
299         write (ulsort,texte(langue,8)) nomfic
300       endif
301       if ( codret.gt.0 ) then
302         write (ulsort,texte(langue,22)) nomamd
303       endif
304 c
305       endif
306 c
307 #ifdef _DEBUG_HOMARD_
308       write (ulsort,texte(langue,1)) 'Sortie', nompro
309       call dmflsh (iaux)
310 #endif
311 c
312       end