Salome HOME
Homard executable
[modules/homard.git] / src / tool / AV_Conversion / vcmail.F
1       subroutine vcmail ( 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    aVant adaptation - Conversion de 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            .
31 c . taopti . e   . lgopti . tableau des options                        .
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 = 'VCMAIL' )
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 0.3. ==> arguments
64 c
65       integer lgopti
66       integer taopti(lgopti)
67 c
68       integer lgopts
69       character*8 taopts(lgopts)
70 c
71       integer lgetco
72       integer taetco(lgetco)
73 c
74       integer ulsort, langue, codret
75 c
76 c 0.4. ==> variables locales
77 c
78       integer codava
79       integer nretap, nrsset
80       integer iaux
81       integer typnom
82 c
83       character*6 saux
84       character*8 action
85       character*8 typobs, nocman, nohman
86 c
87       integer nbmess
88       parameter ( nbmess = 10 )
89       character*80 texte(nblang,nbmess)
90 c
91 c 0.5. ==> initialisations
92 c ______________________________________________________________________
93 c
94       codava = codret
95 c
96 c=======================================================================
97       if ( codava.eq.0 ) then
98 c=======================================================================
99 c
100 c====
101 c 1. messages
102 c====
103 c
104 #include "impr01.h"
105 c
106 #ifdef _DEBUG_HOMARD_
107       write (ulsort,texte(langue,1)) 'Entree', nompro
108       call dmflsh (iaux)
109 #endif
110 c
111       texte(1,4) = '(/,a6,'' CONVERSION DU MAILLAGE'')'
112       texte(1,5) = '(29(''=''),/)'
113       texte(1,6) = '(''Le nom du maillage HOMARD est inconnu.'')'
114 c
115       texte(2,4) = '(/,a6,'' MESH CONVERSION'')'
116       texte(2,5) = '(22(''=''),/)'
117       texte(2,6) = '(''The name of the HOMARD mesh is unknown.'')'
118 c
119 c 1.4. ==> le numero de sous-etape
120 c
121       nretap = taetco(1)
122       nrsset = taetco(2) + 1
123       taetco(2) = nrsset
124 c
125       call utcvne ( nretap, nrsset, saux, iaux, codret )
126 c
127 c 1.5 ==> le titre
128 c
129       if ( taopti(4).ne.2 ) then
130       write (ulsort,texte(langue,4)) saux
131       write (ulsort,texte(langue,5))
132       endif
133 c
134 #include "impr03.h"
135 c
136 c====
137 c 2. les structures de base
138 c====
139 c
140       if ( codret.eq.0 ) then
141 c
142 c 2.1. ==> le maillage homard
143 c          . en mode information et si l'entree n'est pas au format
144 c            HOMARD et si on ne souhaite pas archiver le maillage,
145 c            le nom du maillage HOMARD est cree automatiquement.
146 c          . dans tous les autres modes, on doit l'avoir fourni.
147 c
148       if ( taopti(4).eq.2 .and.
149      >     taopti(11).ne.1 .and.
150      >     taopti(5).eq.1 ) then
151 c
152         typnom = 0
153 c
154       else
155 c
156         typnom = 1
157 c
158         typobs = mchman
159         iaux = 0
160         call utosno ( typobs, nohman, iaux, ulsort, langue, codret )
161         if ( codret.ne.0 ) then
162         write (ulsort,texte(langue,6))
163         endif
164 c
165       endif
166 c
167 c 2.2. ==> le maillage de calcul
168 c
169       nocman = taopts(1)
170 c
171       endif
172 c
173 c====
174 c 3. conversion du maillage
175 c====
176 c 3.1. ==> les connectivites
177 #ifdef _DEBUG_HOMARD_
178       write (ulsort,90002) '3.1. connectivites ; codret', codret
179 #endif
180 c
181       if ( codret.eq.0 ) then
182 c
183 #ifdef _DEBUG_HOMARD_
184       write (ulsort,texte(langue,3)) 'VCMACO', nompro
185 #endif
186 c
187       call vcmaco ( taopti(4), taopti(11), taopti(49),
188      >              taopti(30), taopti(39),
189      >              nocman, nohman, typnom,
190      >              ulsort, langue, codret )
191 c
192       if ( codret.eq.0 ) then
193 c
194       taopts(3) = nohman
195 c
196       endif
197 c
198       endif
199 c
200 c 3.2. ==> les familles
201 #ifdef _DEBUG_HOMARD_
202       write (ulsort,90002) '3.2. familles ; codret', codret
203 #endif
204 c
205       if ( codret.eq.0 ) then
206 c
207 #ifdef _DEBUG_HOMARD_
208       write (ulsort,texte(langue,3)) 'VCMAFA', nompro
209 #endif
210 c
211       call vcmafa ( taopti(4), taopti(31), taopti(30), taopti(29),
212      >              nocman, nohman,
213      >              taopts(17), taopts(25), taopts(23), taopts(24),
214      >              ulsort, langue, codret )
215 c
216       endif
217 c
218 c 3.3. ==> verifications sauf pour une information car c'est fait apres
219 #ifdef _DEBUG_HOMARD_
220       write (ulsort,90002) '3.3. verifications ; codret', codret
221 #endif
222 c
223       if ( codret.eq.0 ) then
224 c
225       action = taopts(30)
226 c
227 #ifdef _DEBUG_HOMARD_
228 c
229 #else
230       if ( action.ne.'info_av ' ) then
231 #endif
232 c
233         if ( action.eq.'homa    ' ) then
234           action = 'avad'
235         endif
236 #ifdef _DEBUG_HOMARD_
237       write (ulsort,texte(langue,3)) 'VCMVER', nompro
238 #endif
239         call vcmver ( taopti(4), nohman, action,
240      >               ulsort, langue, codret )
241 c
242 #ifdef _DEBUG_HOMARD_
243 c
244 #else
245       endif
246 #endif
247 c
248       endif
249 c
250 c====
251 c 4. la fin
252 c====
253 c
254       if ( codret.ne.0 ) then
255 c
256 #include "envex2.h"
257 c
258       write (ulsort,texte(langue,1)) 'Sortie', nompro
259       write (ulsort,texte(langue,2)) codret
260 c
261       endif
262 c
263 #ifdef _DEBUG_HOMARD_
264       write (ulsort,texte(langue,1)) 'Sortie', nompro
265       call dmflsh (iaux)
266 #endif
267 c
268 c=======================================================================
269       endif
270 c=======================================================================
271 c
272       end