Salome HOME
Homard executable
[modules/homard.git] / src / tool / HOMARD_00 / hoavlm.F
1       subroutine hoavlm ( lgopti, taopti, lgopts, taopts,
2      >                    lgetco, taetco,
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       HOMARD : interface AVant adaptation : Lectures du Maillage
25 c       --                 --                 -           -
26 c ______________________________________________________________________
27 c .        .     .        .                                            .
28 c .  nom   . e/s . taille .           description                      .
29 c .____________________________________________________________________.
30 c . lgopti . e   .   1    . longueur du tableau des options entieres   .
31 c . taopti . e   . lgopti . tableau des options entieres               .
32 c . lgopts . e   .   1    . longueur du tableau des options caracteres .
33 c . taopts . e   . lgopts . tableau des options caracteres             .
34 c . lgetco . e   .   1    . longueur du tableau de l'etat courant      .
35 c . taetco . e   . lgetco . tableau de l'etat courant                  .
36 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
37 c . langue . e   .    1   . langue des messages                        .
38 c .        .     .        . 1 : francais, 2 : anglais                  .
39 c . codret . es  .    1   . code de retour des modules                 .
40 c .        .     .        . 0 : pas de probleme                        .
41 c .        .     .        . 5 : mauvais type de code de calcul associe .
42 c ______________________________________________________________________
43 c
44 c====
45 c 0. declarations et dimensionnement
46 c====
47 c
48 c 0.1. ==> generalites
49 c
50       implicit none
51       save
52 c
53       character*6 nompro
54       parameter ( nompro = 'HOAVLM' )
55 c
56 #include "nblang.h"
57 #include "motcle.h"
58 c
59 c 0.2. ==> communs
60 c
61 #include "envex1.h"
62 c
63 c VERRUE CONFORME PENTAEDRE - DEBUT
64 #include "gmenti.h"
65 c VERRUE CONFORME PENTAEDRE - FIN
66 c
67 c 0.3. ==> arguments
68 c
69       integer lgopti
70       integer taopti(lgopti)
71 c
72       integer lgopts
73       character*8 taopts(lgopts)
74 c
75       integer lgetco
76       integer taetco(lgetco)
77 c
78       integer ulsort, langue, codret
79 c
80 c 0.4. ==> variables locales
81 c
82       integer codava
83       integer nrosec, nrssse
84       integer nretap, nrsset
85       integer iaux
86       integer typcca
87 c
88 c VERRUE CONFORME PENTAEDRE - DEBUT
89       integer adnomb
90       integer jaux
91 c VERRUE CONFORME PENTAEDRE - FIN
92 c
93       character*6 saux
94       character*8 nomail, nosvmn
95       character*8 mcfich, mcmail
96       character*8 typobs
97 c
98       integer nbmess
99       parameter ( nbmess = 10 )
100       character*80 texte(nblang,nbmess)
101 c
102 c====
103 c 1. messages
104 c====
105 c
106       codava = codret
107 c
108 c=======================================================================
109       if ( codava.eq.0 ) then
110 c=======================================================================
111 c
112 c 1.1. ==> le debut des mesures de temps
113 c
114       nrosec = taetco(4)
115       call gtdems (nrosec)
116 c
117 c 1.3. ==> les messages
118 c
119 #include "impr01.h"
120 c
121 #ifdef _DEBUG_HOMARD_
122       write (ulsort,texte(langue,1)) 'Entree', nompro
123       call dmflsh (iaux)
124 #endif
125 c
126       texte(1,4) = '(/,a6,'' LECTURE DU MAILLAGE DE CALCUL'')'
127       texte(1,5) = '(36(''=''),/)'
128       texte(1,6) = '(''Mauvais code de calcul :'',i5)'
129 c
130       texte(2,4) = '(/,a6,'' READINGS OF CALCULATION MESH'')'
131       texte(2,5) = '(35(''=''),/)'
132       texte(2,6) = '(''Bad related code:'',i5)'
133 c
134 c 1.4. ==> le numero de sous-etape
135 c
136       nretap = taetco(1)
137       nrsset = taetco(2) + 1
138       taetco(2) = nrsset
139 c
140       call utcvne ( nretap, nrsset, saux, iaux, codret )
141 c
142 #include "impr03.h"
143 c
144 #ifdef _DEBUG_HOMARD_
145       write (ulsort,90002) 'taopti( 4) - modhom', taopti( 4)
146       write (ulsort,90002) 'taopti(21) - cvmail', taopti(21)
147 #endif
148 c
149 c====
150 c 2. lecture du maillage au format med
151 c====
152 c
153 #ifdef _DEBUG_HOMARD_
154       write (ulsort,90002) '2. lecture au format med ; codret', codret
155 #endif
156 c
157       if ( taopti(21).ne.0 .or. taopti(4).eq.5 ) then
158 c
159         if ( mod(taopti(11)-6,10).eq.0 ) then
160 c
161           write (ulsort,texte(langue,4)) saux
162           write (ulsort,texte(langue,5))
163 c
164           nrsset = taetco(2) + 1
165           taetco(2) = nrsset
166 c
167           mcfich = mccman
168           mcmail = mccnmn
169           if ( taopti(4).eq.5 ) then
170             iaux = 2
171           else
172             iaux = 1
173           endif
174 #ifdef _DEBUG_HOMARD_
175       write (ulsort,texte(langue,3)) 'ESLMMD', nompro
176 #endif
177           call eslmmd ( mcfich, mcmail,
178      >                  taopti(11), taopts(1),
179      >                  iaux, taopti(9),
180      >                  ulsort, langue, codret )
181 c
182 c 2.3. ==> mauvais type
183 c
184         else
185 c
186           codret = 5
187 c
188         endif
189 c
190       endif
191 c
192 c====
193 c 3. lecture du maillage au format HOMARD
194 c====
195 c
196 #ifdef _DEBUG_HOMARD_
197       write (ulsort,90002) '3. lecture au format HOMARD ; codret', codret
198 #endif
199 c
200 c
201       if ( taopti(21).eq.0 ) then
202 c
203 c 3.1. ==> lecture
204 c       iteration n+1 pour le mode homard interpolation (4)
205 c       iteration n pour les autres modes
206 c
207         if ( taopti(4).eq.4 ) then
208           typobs = mchmap
209         else
210           typobs = mchman
211         endif
212         nrssse = 0
213 c
214 #ifdef _DEBUG_HOMARD_
215       write (ulsort,texte(langue,3)) 'ESLMHO', nompro
216 #endif
217         call eslmho ( typobs, nrssse, nretap, nrsset,
218      >                taopts(3), typcca,
219      >                taopti(29), taopts(16), taopts(17),
220      >                ulsort, langue, codret )
221 c
222 c 3.2. ==> pour les modes homard pur (0, 1), et
223 c            s'il y a conversion de solution, on cree les tables de
224 c            memorisation du maillage n
225 c
226         if ( ( taopti(4).eq.0 .or. taopti(4).eq.1 ) .and.
227      >       taopti(28).eq.1 ) then
228 c
229           if ( codret.eq.0 ) then
230           iaux = 1
231           call utosno ( typobs, nomail, iaux, ulsort, langue, codret )
232           endif
233 c
234           if ( codret.eq.0 ) then
235           call utsvmn ( nomail, nosvmn,
236      >                  ulsort, langue, codret )
237           endif
238 c
239           if ( codret.eq.0 ) then
240           taopts(14) = nosvmn
241           endif
242 C
243         endif
244 c
245 c 3.3. ==> par defaut, le maillage est extrude en Z si c'est du
246 c            SATURNE ou du NEPTUNE 2D
247 c
248         if ( codret.eq.0 ) then
249 c
250         if ( typcca.eq.26 .or. typcca.eq.46 ) then
251           taopti(39) = 3
252         endif
253 c
254         endif
255 c
256       endif
257 c
258 c====
259 c 4. la fin
260 c====
261 c
262 c 4.1. ==> message si erreur
263 c
264       if ( codret.ne.0 ) then
265 c
266 #include "envex2.h"
267 c
268       write (ulsort,texte(langue,1)) 'Sortie', nompro
269       write (ulsort,texte(langue,2)) codret
270       if ( codret.eq.5 ) then
271         write (ulsort,texte(langue,6)) taopti(11)
272       endif
273 c
274       endif
275 c
276 c 4.2. ==> fin des mesures de temps de la section
277 c
278       call gtfims (nrosec)
279 c
280 #ifdef _DEBUG_HOMARD_
281       write (ulsort,texte(langue,1)) 'Sortie', nompro
282       call dmflsh (iaux)
283 #endif
284 c
285 c=======================================================================
286       endif
287 c=======================================================================
288 c
289       end