Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utlo08.F
1       subroutine utlo08 ( motcle, typemc, ival, dval, option,
2      >                    ulsort, langue, codret )
3 c ______________________________________________________________________
4 c
5 c                             H O M A R D
6 c
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
8 c
9 c Version originale enregistree le 18 juin 1996 sous le numero 96036
10 c aupres des huissiers de justice Simart et Lavoir a Clamart
11 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
12 c aupres des huissiers de justice
13 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
14 c
15 c    HOMARD est une marque deposee d'Electricite de France
16 c
17 c Copyright EDF 1996
18 c Copyright EDF 1998
19 c Copyright EDF 2002
20 c Copyright EDF 2020
21 c ______________________________________________________________________
22 c
23 c   UTilitaire : Lectures des Options - 08
24 c   --           -            -         --
25 c ______________________________________________________________________
26 c
27 c but : decoder les informations temporelles pour l'indicateur d'erreur
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 . typemc . e   .   1    . 1 CCNumPTI : entier                        .
34 c .        .     .        . 2 CCNumOrI : entier                        .
35 c .        .     .        . 3 CCInstaI : reel                          .
36 c . ival   .  s  .   1    . valeur entiere decodee                     .
37 c . dval   .  s  .   1    . valeur reelle decodee                      .
38 c . option .  s  .   1    . type d'option sur le temps :               .
39 c .        .     .        . 0, si aucune valeur n'a ete fournie        .
40 c .        .     .        . 1, si une valeur est fournie               .
41 c .        .     .        . 2, si on prend le dernier instant          .
42 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
43 c . langue . e   .    1   . langue des messages                        .
44 c .        .     .        . 1 : francais, 2 : anglais                  .
45 c . codret . es  .    1   . code de retour des modules                 .
46 c .        .     .        . 0 : pas de probleme                        .
47 c .        .     .        . 6 : impossible de decoder les options      .
48 c ______________________________________________________________________
49 c
50 c====
51 c 0. declarations et dimensionnement
52 c====
53 c
54 c 0.1. ==> generalites
55 c
56       implicit none
57       save
58 c
59       character*6 nompro
60       parameter ( nompro = 'UTLO08' )
61 c
62 #include "nblang.h"
63 c
64 c 0.2. ==> communs
65 c
66 #include "envex1.h"
67 #include "indefi.h"
68 #include "indefr.h"
69 c
70 c 0.3. ==> arguments
71 c
72       character*8 motcle
73 c
74       integer typemc, ival, option
75       double precision dval
76 c
77       integer ulsort, langue, codret
78 c
79 c 0.4. ==> variables locales
80 c
81       integer iaux
82       integer codre0
83       integer loptio
84       integer nbrmin, nbrmax
85 c
86       character*200 noptio
87 c
88       integer nbmess
89       parameter ( nbmess = 15 )
90       character*80 texte(nblang,nbmess)
91 c
92 c 0.5. ==> initialisations
93 c ______________________________________________________________________
94 c
95 c====
96 c 1. messages
97 c====
98 c
99 c 1.1. ==> tout va bien
100 c
101       codret = 0
102 c
103 c 1.2. ==> les messages
104 c
105 #include "impr01.h"
106 c
107 #ifdef _DEBUG_HOMARD_
108       write (ulsort,texte(langue,1)) 'Entree', nompro
109       call dmflsh (iaux)
110 #endif
111 c
112 #include "utlo00.h"
113 #include "utlo02.h"
114 c
115       nbrmin = 0
116       nbrmax = 1
117 c
118 c 1.3. ==> defaut
119 c
120       option = -1
121       ival = iindef
122       dval = rindef
123 c
124 c====
125 c 2. option
126 c====
127 c
128 c 2.1. ==> recherche du texte associe au mot-cle
129 c          code de retour de utfino :
130 c             0 : pas de probleme
131 c             1 : la configuration est perdue
132 c             2 : pas de nom dans la base
133 c     remarque : on recupere le texte en majuscule
134 c
135       iaux = 1
136 #ifdef _DEBUG_HOMARD_
137       write (ulsort,texte(langue,3)) 'UTFIN2', nompro
138 #endif
139       call utfin2 ( motcle, iaux, noptio, loptio,
140      >              nbrmin, nbrmax,
141      >              ulsort, langue, codre0)
142 c
143 c 2.2. ==> decodage de l'option
144 c 2.2.1. ==> un texte eventuel, sauf pour le numero d'ordre
145 c
146       if ( codre0.eq.0 ) then
147 c
148 #include "utlo03.h"
149 c
150         option = 1
151 c
152         if ( loptio.eq.4 ) then
153 c                                   1234
154           if ( noptio(1:loptio).eq.'LAST' ) then
155             if ( typemc.ne.2 ) then
156               option = 2
157             endif
158           endif
159 c
160         elseif ( loptio.eq.7 ) then
161 c                                   1234567
162           if ( noptio(1:loptio).eq.'DERNIER' ) then
163             if ( typemc.ne.2 ) then
164               option = 2
165             endif
166           endif
167         endif
168 c
169       elseif ( codre0.eq.2 ) then
170 c
171         option = 0
172         codre0 = 0
173 c
174       else
175         codre0 = 6
176 c
177       endif
178 c
179 c 2.2.2. ==> des valeurs
180 c
181       if ( codre0.eq.0 ) then
182 c
183       if ( option.eq.1 ) then
184 c
185 c 2.3.2.1 ==> des valeurs entieres
186 c
187         if ( typemc.le.2 ) then
188 c
189 #ifdef _DEBUG_HOMARD_
190       write (ulsort,texte(langue,3)) 'UTMCEN', nompro
191 #endif
192           call utmcen ( motcle, ival, 1,
193      >                  ulsort, langue, codre0 )
194 c
195 c
196 c 2.3.2.2 ==> des valeurs reelles
197 c
198         else
199 c
200 #ifdef _DEBUG_HOMARD_
201       write (ulsort,texte(langue,3)) 'UTMCRE', nompro
202 #endif
203           call utmcre ( motcle, dval,
204      >                  ulsort, langue, codre0 )
205 c
206         endif
207 c
208       endif
209 c
210       endif
211 c
212 #include "utlo01.h"
213 #ifdef _DEBUG_HOMARD_
214       if ( codret.eq.0 ) then
215 c
216       write (ulsort,*) 'motcle =', motcle
217       write (ulsort,*) 'option =', option
218       if ( typemc.le.2 ) then
219         if ( option.eq.1 ) then
220           texte(1,10) = '(''==> valeurs i ='',i12)'
221           texte(2,10) = '(''==> values i ='',i12)'
222           write (ulsort,texte(langue,10)) ival
223         endif
224       else
225         if ( option.eq.1 ) then
226           texte(1,10) = '(''==> valeurs d ='',g18.5)'
227           texte(2,10) = '(''==> values d ='',g18.5)'
228           write (ulsort,texte(langue,10)) dval
229         endif
230       endif
231 c
232       endif
233 #endif
234 c
235 c====
236 c 3. la fin
237 c====
238 c
239 c
240       if ( codret.ne.0 ) then
241 c
242 #include "envex2.h"
243 c
244       write (ulsort,texte(langue,1)) 'Sortie', nompro
245       write (ulsort,texte(langue,2)) codret
246 c
247       endif
248 c
249 #ifdef _DEBUG_HOMARD_
250       write (ulsort,texte(langue,1)) 'Sortie', nompro
251       call dmflsh (iaux)
252 #endif
253 c
254       end