1 subroutine utmclc ( nbseal, majsol, nochso,
2 > ulsort, langue, codret )
3 c ______________________________________________________________________
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
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
15 c HOMARD est une marque deposee d'Electricite de France
21 c ______________________________________________________________________
23 c UTilitaire : Mot-Cle - Liste des Champs a mettre a jour
25 c ______________________________________________________________________
27 c but : creer une structure de type ChampMAJ qui memorise les
28 c caracteristiques des champs a mettre a jour
29 c ______________________________________________________________________
31 c . nom . e/s . taille . description .
32 c .____________________________________________________________________.
33 c . nbseal . es . 1 . En entree : .
34 c . . . . 0 : aucune demande particuliere .
35 c . . . . 1 : on a demande la mise a jour de tous .
36 c . . . . les champs .
37 c . . . . En sortie : .
38 c . . . . -1 : tous les champs sont a lire .
39 c . . . . 0 : aucun champ n'est a lire .
40 c . . . . >0 : nombre de champs a mettre a jour .
41 c . majsol . s . 1 . conversion de la solution 0 : non, 1 : oui .
42 c . nochso . es . char*8 . nom de l'objet qui memorise les champs .
43 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
44 c . langue . e . 1 . langue des messages .
45 c . . . . 1 : francais, 2 : anglais .
46 c . codret . es . 1 . code de retour des modules .
47 c . . . . 0 : pas de probleme .
48 c . . . . 1 : la configuration est perdue .
49 c . . . . 2 : probleme de lecture .
50 c . . . . 8 : Allocation impossible .
51 c . . . . 9 : incoherence de donnees .
52 c ______________________________________________________________________
55 c 0. declarations et dimensionnement
58 c 0.1. ==> generalites
64 parameter ( nompro = 'UTMCLC' )
79 integer nbseal, majsol
83 integer ulsort, langue, codret
85 c 0.4. ==> variables locales
89 integer codre1, codre2, codre3, codre4
95 integer adcaet, adcact, adcart
96 integer adnore, adlono, adpono, adnofi, adnoos
102 parameter ( nbmess = 20 )
103 character*80 texte(nblang,nbmess)
105 c 0.5. ==> initialisations
106 c ______________________________________________________________________
112 c 1.1. ==> tout va bien
116 c 1.2. ==> les messages
120 #ifdef _DEBUG_HOMARD_
121 write (ulsort,texte(langue,1)) 'Entree', nompro
125 texte(1,10) = '(''Nombre de champs a mettre a jour :'',i8)'
126 texte(1,11) = '(''La configuration est perdue ?'')'
127 texte(1,12) = '(''Probleme de lecture.'')'
129 >'(''Impossible d''''allouer la structure memorisant les choix.'')'
131 > '(''Mise a jour de tous les champs ou de certains ?'')'
133 texte(2,10) = '(''Number of fields to update :'',i8)'
134 texte(2,11) = '(''Configuration is lost ?'')'
135 texte(2,12) = '(''Problem while reading.'')'
136 texte(2,18) = '(''Structure of choices cannot be allocated.'')'
137 texte(2,19) = '(''Updating of all fields or someone ?'')'
140 c 2. recherche du nombre d'occurences du mot-cle
143 if ( codret.eq.0 ) then
145 c 2.1. ==> on recherche la premiere occurence associe au mot-cle
150 call utfin1 ( motcle, numero,
151 > iaux, option, loptio,
152 > ulsort, langue, codre0 )
154 c 2.2. ==> aucune option n'a ete precisee
156 if ( codre0.eq.2 ) then
160 c 2.3. ==> probleme de lecture
162 elseif ( codre0.ne.0 ) then
166 c 2.4. ==> on peut y aller
174 if ( codret.ne.0 ) then
180 c 2.5. ==> coherence avec la demande globale de mise a jour des champs
182 if ( codret.eq.0 ) then
184 if ( nbseal.eq.0 ) then
187 if ( iaux.eq.0 ) then
196 #ifdef _DEBUG_HOMARD_
197 write (ulsort,texte(langue,10)) nbseal
201 c 3. Les caracteristiques des champs quand on en lit quelques uns
204 if ( nbseal.gt.0 ) then
206 c 3.1. ==> on alloue le receptacle des caracteristiques des champs
208 if ( codret.eq.0 ) then
209 call gmalot ( nochso, 'ChampMAJ', 0, iaux, codret )
212 if ( codret.eq.0 ) then
215 call gmecat ( nochso, 1, nbseal, codre1 )
216 call gmaloj ( nochso//'.CarCaChp', ' ', iaux, adcact, codre2 )
218 call gmaloj ( nochso//'.CarEnChp', ' ', iaux, adcaet, codre3 )
220 call gmaloj ( nochso//'.CarReChp', ' ', iaux, adcart, codre4 )
222 codre0 = min ( codre1, codre2, codre3, codre4 )
223 codret = max ( abs(codre0), codret,
224 > codre1, codre2, codre3, codre4 )
226 if ( codret.ne.0 ) then
232 c 3.2. ==> adresses des objets GM lies aux noms des fichiers
234 if ( codret.eq.0 ) then
236 #ifdef _DEBUG_HOMARD_
237 write (ulsort,texte(langue,3)) 'UTAD80', nompro
239 call utad80 ( nbfich,
240 > adnore, adlono, adpono, adnofi, adnoos,
241 > ulsort, langue, codret )
245 c 3.3. ==> remplissage des tableaux
247 if ( codret.eq.0 ) then
249 #ifdef _DEBUG_HOMARD_
250 write (ulsort,texte(langue,3)) 'UTMCC0', nompro
252 call utmcc0 ( nbseal,
253 > imem(adcaet), smem(adcact), rmem(adcart),
255 > smem(adnore), imem(adlono), imem(adpono),
256 > smem(adnofi), smem(adnoos),
257 > ulsort, langue, codret )
263 #ifdef _DEBUG_HOMARD_
264 if ( nbseal.gt.0 ) then
265 cgn call gmprsx (nompro, nochso )
266 call gmprsx (nompro, nochso//'.CarCaChp' )
267 call gmprsx (nompro, nochso//'.CarEnChp' )
268 call gmprsx (nompro, nochso//'.CarReChp' )
273 c 4. consequence sur la conversion de solution
276 if ( codret.eq.0 ) then
278 c 4.1. ==> pointeur sur la conversion de solution
280 if ( nbseal.eq.0 ) then
286 c 4.2. ==> si tous les champs sont concernes, on met un nom blanc pour
287 c la structure de stockage car c'est ainsi que l'on se repere
290 if ( nbseal.eq.-1 ) then
301 if ( codret.ne.0 ) then
305 write (ulsort,texte(langue,1)) 'Sortie', nompro
306 write (ulsort,texte(langue,2)) codret
307 write (ulsort,texte(langue,10+codret))
311 #ifdef _DEBUG_HOMARD_
312 write (ulsort,texte(langue,1)) 'Sortie', nompro