Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utlo09.F
1       subroutine utlo09 ( motcle, option, ulsort, langue, codret )
2 c ______________________________________________________________________
3 c
4 c                             H O M A R D
5 c
6 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
7 c
8 c Version originale enregistree le 18 juin 1996 sous le numero 96036
9 c aupres des huissiers de justice Simart et Lavoir a Clamart
10 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
11 c aupres des huissiers de justice
12 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
13 c
14 c    HOMARD est une marque deposee d'Electricite de France
15 c
16 c Copyright EDF 1996
17 c Copyright EDF 1998
18 c Copyright EDF 2002
19 c Copyright EDF 2020
20 c ______________________________________________________________________
21 c
22 c   UTilitaire : Lectures des Options - 09
23 c   --           -            -         --
24 c ______________________________________________________________________
25 c
26 c but : decoder le texte relatif au mode de fonctionnement de
27 c       l'ecriture des fichiers au format HOMARD
28 c ______________________________________________________________________
29 c .        .     .        .                                            .
30 c .  nom   . e/s . taille .           description                      .
31 c .____________________________________________________________________.
32 c . motcle . e   . char*8 . mot-cle a decoder                          .
33 c . option .  s  .   1    . produit de :                               .
34 c .        .     .        . 2 : maillage n                             .
35 c .        .     .        . 3 : maillage n+1                           .
36 c .        .     .        . >0 : on ecrit les frontieres               .
37 c .        .     .        . <0 : on n'ecrit pas les frontieres         .
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 .        .     .        . 6 : impossible de decoder les options      .
44 c ______________________________________________________________________
45 c
46 c====
47 c 0. declarations et dimensionnement
48 c====
49 c
50 c 0.1. ==> generalites
51 c
52       implicit none
53       save
54 c
55       character*6 nompro
56       parameter ( nompro = 'UTLO09' )
57 c
58 #include "nblang.h"
59 c
60 c 0.2. ==> communs
61 c
62 #include "envex1.h"
63 c
64 c 0.3. ==> arguments
65 c
66       character*8 motcle
67 c
68       integer option
69 c
70       integer ulsort, langue, codret
71 c
72 c 0.4. ==> variables locales
73 c
74       integer iaux
75       integer codre0
76       integer loptio
77       integer nbrmin, nbrmax
78 c
79       character*200 noptio
80 c
81       integer nbmess
82       parameter ( nbmess = 15 )
83       character*80 texte(nblang,nbmess)
84 c
85 c 0.5. ==> initialisations
86 c ______________________________________________________________________
87 c
88 c====
89 c 1. messages
90 c====
91 c
92 c 1.1. ==> tout va bien
93 c
94       codret = 0
95 c
96 c 1.2. ==> les messages
97 c
98 #include "impr01.h"
99 c
100 #ifdef _DEBUG_HOMARD_
101       write (ulsort,texte(langue,1)) 'Entree', nompro
102       call dmflsh (iaux)
103 #endif
104 c
105 #include "impr03.h"
106 c
107 #include "utlo00.h"
108 #include "utlo02.h"
109 c
110       nbrmin = 0
111       nbrmax = 1
112 c
113 c 1.3. ==> par defaut, ecriture apres adaptation, sans les frontieres
114 c
115       option = -3
116 c
117 c====
118 c 2. options textuelles
119 c====
120 c
121 c 2.1. ==> recherche du texte associe au mot-cle
122 c          code de retour de utfino :
123 c             0 : pas de probleme
124 c             1 : la configuration est perdue
125 c             2 : pas de nom dans la base
126 c     remarque : on recupere le texte en majuscule
127 c
128       iaux = 1
129 #ifdef _DEBUG_HOMARD_
130       write (ulsort,texte(langue,3)) 'UTFIN2', nompro
131 #endif
132       call utfin2 ( motcle, iaux, noptio, loptio,
133      >              nbrmin, nbrmax,
134      >              ulsort, langue, codre0)
135 c
136 c 2.2. ==> decodage de l'option
137 c
138       if ( codre0.eq.0 ) then
139 c
140 #include "utlo03.h"
141 c
142         if ( loptio.eq.1 ) then
143 c                                   1
144           if ( noptio(1:loptio).eq.'N' ) then
145             option = 2
146           else
147             codre0 = 5
148           endif
149 c
150         elseif ( loptio.eq.3 ) then
151 c                                   123
152           if ( noptio(1:loptio).eq.'NP1' ) then
153             option = 3
154           else
155             codre0 = 5
156           endif
157 c
158         elseif ( loptio.eq.4 ) then
159 c                                   1234
160           if ( noptio(1:loptio).eq.'TOUT' ) then
161             option = 6
162           else
163             codre0 = 5
164           endif
165 c
166         elseif ( loptio.eq.16 ) then
167 c                                   1234567890123456
168           if ( noptio(1:loptio).eq.'N_SANS_FRONTIERE' ) then
169             option = -2
170           else
171             codre0 = 5
172           endif
173 c
174         elseif ( loptio.eq.18 ) then
175 c                                   123456789012345678
176           if ( noptio(1:loptio).eq.'NP1_SANS_FRONTIERE' ) then
177             option = -3
178           else
179             codre0 = 5
180           endif
181 c
182         elseif ( loptio.eq.19 ) then
183 c                                   1234567890123456789
184           if ( noptio(1:loptio).eq.'TOUT_SANS_FRONTIERE' ) then
185             option = -6
186           else
187             codre0 = 5
188           endif
189 c
190         else
191           codre0 = 5
192         endif
193 c
194       elseif ( codre0.eq.2 ) then
195 c
196         codre0 = 0
197 c
198       else
199         codre0 = 6
200 c
201       endif
202 c
203 #include "utlo01.h"
204 c
205 #ifdef _DEBUG_HOMARD_
206       write (ulsort,90002) 'option', option
207 #endif
208 c
209 c====
210 c 3. la fin
211 c====
212 c
213       if ( codret.ne.0 ) then
214 c
215 #include "envex2.h"
216 c
217       write (ulsort,texte(langue,1)) 'Sortie', nompro
218       write (ulsort,texte(langue,2)) codret
219 c
220       endif
221 c
222 #ifdef _DEBUG_HOMARD_
223       write (ulsort,texte(langue,1)) 'Sortie', nompro
224       call dmflsh (iaux)
225 #endif
226 c
227       end