Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utlo06.F
1       subroutine utlo06 ( 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 - 06
23 c   --           -            -         --
24 c ______________________________________________________________________
25 c
26 c but : decoder le texte relatif a l'usage des composantes de
27 c       l'indicateur
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    . 0 : valeur relative                        .
34 c .        .     .        . 1 : valeur absolue (defaut)                .
35 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
36 c . langue . e   .    1   . langue des messages                        .
37 c .        .     .        . 1 : francais, 2 : anglais                  .
38 c . codret . es  .    1   . code de retour des modules                 .
39 c .        .     .        . 0 : pas de probleme                        .
40 c .        .     .        . 6 : impossible de decoder les options      .
41 c ______________________________________________________________________
42 c
43 c====
44 c 0. declarations et dimensionnement
45 c====
46 c
47 c 0.1. ==> generalites
48 c
49       implicit none
50       save
51 c
52       character*6 nompro
53       parameter ( nompro = 'UTLO06' )
54 c
55 #include "nblang.h"
56 c
57 c 0.2. ==> communs
58 c
59 #include "envex1.h"
60 c
61 c 0.3. ==> arguments
62 c
63       character*8 motcle
64 c
65       integer option
66 c
67       integer ulsort, langue, codret
68 c
69 c 0.4. ==> variables locales
70 c
71       integer iaux
72       integer codre0
73       integer loptio
74       integer nbrmin, nbrmax
75 c
76       character*200 noptio
77 c
78       integer nbmess
79       parameter ( nbmess = 15 )
80       character*80 texte(nblang,nbmess)
81 c
82 c 0.5. ==> initialisations
83 c ______________________________________________________________________
84 c
85 c====
86 c 1. messages
87 c====
88 c
89 c 1.1. ==> tout va bien
90 c
91       codret = 0
92 c
93 c 1.2. ==> les messages
94 c
95 #include "impr01.h"
96 c
97 #ifdef _DEBUG_HOMARD_
98       write (ulsort,texte(langue,1)) 'Entree', nompro
99       call dmflsh (iaux)
100 #endif
101 c
102 #include "utlo00.h"
103 #include "utlo02.h"
104 c
105       nbrmin = 0
106       nbrmax = 1
107 c
108 c 1.3. ==> par defaut, valeur absolue
109 c
110       option = 0
111 c
112 c====
113 c 2. options textuelles
114 c====
115 c
116 c 2.1. ==> recherche du texte associe au mot-cle
117 c          code de retour de utfino :
118 c             0 : pas de probleme
119 c             1 : la configuration est perdue
120 c             2 : pas de nom dans la base
121 c     remarque : on recupere le texte en majuscule
122 c
123       iaux = 1
124 #ifdef _DEBUG_HOMARD_
125       write (ulsort,texte(langue,3)) 'UTFIN2', nompro
126 #endif
127       call utfin2 ( motcle, iaux, noptio, loptio,
128      >              nbrmin, nbrmax,
129      >              ulsort, langue, codre0)
130 c
131 c 2.2. ==> decodage de l'option
132 c
133       if ( codre0.eq.0 ) then
134 c
135 #include "utlo03.h"
136 c
137         if ( loptio.eq.2 ) then
138 c
139           if ( noptio(1:loptio).eq.'L2' ) then
140             option = 0
141           else
142             codre0 = 5
143           endif
144 c
145         elseif ( loptio.eq.6 ) then
146 c
147 c                                   123456
148           if ( noptio(1:loptio).eq.'ABSOLU' ) then
149             option = 0
150           elseif ( noptio(1:loptio).eq.'INFINI' ) then
151             option = 1
152           else
153             codre0 = 5
154           endif
155 c
156         elseif ( loptio.eq.7 ) then
157 c
158 c                                   1234567
159           if ( noptio(1:loptio).eq.'L2_NORM' ) then
160             option = 0
161           elseif ( noptio(1:loptio).eq.'RELATIF' ) then
162             option = 2
163           else
164             codre0 = 5
165           endif
166 c
167         elseif ( loptio.eq.8 ) then
168 c
169 c                                   12345678
170           if ( noptio(1:loptio).eq.'ABSOLUTE' ) then
171             option = 0
172           elseif ( noptio(1:loptio).eq.'NORME_L2' ) then
173             option = 0
174           elseif ( noptio(1:loptio).eq.'INFINITE' ) then
175             option = 1
176           elseif ( noptio(1:loptio).eq.'RELATIVE' ) then
177             option = 2
178           else
179             codre0 = 5
180           endif
181 c
182         elseif ( loptio.eq.13 ) then
183 c
184 c                                   1234567890123
185           if ( noptio(1:loptio).eq.'NORME_INFINIE' ) then
186             option = 1
187           else
188             codre0 = 5
189           endif
190 c
191         else
192           codre0 = 5
193         endif
194 c
195       elseif ( codre0.eq.2 ) then
196         codre0 = 0
197 c
198       else
199         codre0 = 6
200 c
201       endif
202 c
203 #include "utlo01.h"
204 c
205 c====
206 c 3. la fin
207 c====
208 c
209       if ( codret.ne.0 ) then
210 c
211 #include "envex2.h"
212 c
213       write (ulsort,texte(langue,1)) 'Sortie', nompro
214       write (ulsort,texte(langue,2)) codret
215 c
216       endif
217 c
218 #ifdef _DEBUG_HOMARD_
219       write (ulsort,texte(langue,1)) 'Sortie', nompro
220       call dmflsh (iaux)
221 #endif
222 c
223       end