]> SALOME platform Git repositories - modules/homard.git/blob - src/tool/Decision/dehist.F
Salome HOME
Copyright update 2022
[modules/homard.git] / src / tool / Decision / dehist.F
1       subroutine dehist ( nomail,
2      >                    lgopti, taopti, 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 traitement des DEcisions - mise a jour des HISToriques
25 c                --                          ----
26 c ______________________________________________________________________
27 c .        .     .        .                                            .
28 c .  nom   . e/s . taille .           description                      .
29 c .____________________________________________________________________.
30 c . nomail . e   .  ch8   . nom de l'objet contenant le maillage       .
31 c . lgopti . e   .   1    . longueur du tableau des options            .
32 c . taopti . e   . lgopti . tableau des options                        .
33 c . lgetco . e   .   1    . longueur du tableau de l'etat courant      .
34 c . taetco . e   . lgetco . tableau de l'etat courant                  .
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 ______________________________________________________________________
41 c
42 c====
43 c 0. declarations et dimensionnement
44 c====
45 c
46 c 0.1. ==> generalites
47 c
48       implicit none
49       save
50 c
51       character*6 nompro
52       parameter ( nompro = 'DEHIST' )
53 c
54 #include "nblang.h"
55 c
56 c 0.2. ==> communs
57 c
58 #include "envex1.h"
59 c
60 #include "gmenti.h"
61 #include "envca1.h"
62 #include "nombtr.h"
63 #include "nombqu.h"
64 #include "nombte.h"
65 #include "nombhe.h"
66 #include "nombpe.h"
67 #include "nombpy.h"
68 c
69 c 0.3. ==> arguments
70 c
71       character*8 nomail
72 c
73       integer lgopti
74       integer taopti(lgopti)
75 c
76       integer lgetco
77       integer taetco(lgetco)
78 c
79       integer ulsort, langue, codret
80 c
81 c 0.4. ==> variables locales
82 c
83       integer codava
84       integer nrosec
85       integer nretap, nrsset
86       integer iaux
87 c
88       integer phetno, phetar, phettr, phetqu
89       integer phette, phethe, phetpe, phetpy
90       integer codre1, codre2, codre3, codre4, codre5
91       integer codre6, codre7, codre8
92       integer codre0
93 c
94       character*6 saux
95       character*8 norenu
96       character*8 nhnoeu, nhmapo, nharet, nhtria, nhquad
97       character*8 nhtetr, nhhexa, nhpyra, nhpent
98       character*8 nhelig
99       character*8 nhvois, nhsupe, nhsups
100 c
101       integer nbmess
102       parameter ( nbmess = 10 )
103       character*80 texte(nblang,nbmess)
104 c
105 c 0.5. ==> initialisations
106 c ______________________________________________________________________
107 c
108 c====
109 c 1. messages
110 c====
111 c
112       codava = codret
113 c
114 c=======================================================================
115       if ( codava.eq.0 ) then
116 c=======================================================================
117 c
118 c 1.1. ==> le debut des mesures de temps
119 c
120       nrosec = taetco(4)
121       call gtdems (nrosec)
122 c
123 c 1.3. ==> les messages
124 c
125 #include "impr01.h"
126 c
127 #ifdef _DEBUG_HOMARD_
128       write (ulsort,texte(langue,1)) 'Entree', nompro
129       call dmflsh (iaux)
130 #endif
131 c
132       texte(1,4) = '(/,a6,'' MISE A JOUR DES HISTORIQUES'')'
133       texte(1,5) = '(34(''=''),/)'
134 c
135       texte(2,4) = '(/,a6,'' UPDATING OF HISTORY'')'
136       texte(2,5) = '(26(''=''),/)'
137 c
138 c 1.4. ==> le numero de sous-etape
139 c
140       nretap = taetco(1)
141       nrsset = taetco(2) + 1
142       taetco(2) = nrsset
143 c
144       call utcvne ( nretap, nrsset, saux, iaux, codret )
145 c
146 c 1.5. ==> le titre
147 c
148       write (ulsort,texte(langue,4)) saux
149       write (ulsort,texte(langue,5))
150 c
151 c====
152 c 2. recuperation des pointeurs, initialisations
153 c====
154 c
155 c 2.1. ==> structure generale
156 c
157       if ( codret.eq.0 ) then
158 c
159       call utnomh ( nomail,
160      >                sdim,   mdim,
161      >               degre, maconf, homolo, hierar,
162      >              rafdef, nbmane, typcca, typsfr, maextr,
163      >              mailet,
164      >              norenu,
165      >              nhnoeu, nhmapo, nharet,
166      >              nhtria, nhquad,
167      >              nhtetr, nhhexa, nhpyra, nhpent,
168      >              nhelig,
169      >              nhvois, nhsupe, nhsups,
170      >              ulsort, langue, codret)
171 c
172       endif
173 c
174 c 2.2. ==> tableaux
175 c
176       if ( codret.eq.0 ) then
177 c
178       call gmadoj ( nhnoeu//'.HistEtat', phetno, iaux, codre1 )
179       call gmadoj ( nharet//'.HistEtat', phetar, iaux, codre2 )
180       if ( nbtrto.ne.0 ) then
181         call gmadoj ( nhtria//'.HistEtat', phettr, iaux, codre3 )
182       else
183         codre3 = 0
184       endif
185       if ( nbquto.ne.0 ) then
186         call gmadoj ( nhquad//'.HistEtat', phetqu, iaux, codre4 )
187       else
188         codre4 = 0
189       endif
190       if ( nbteto.ne.0 ) then
191         call gmadoj ( nhtetr//'.HistEtat', phette, iaux, codre5 )
192       else
193         codre5 = 0
194       endif
195       if ( nbheto.ne.0 ) then
196         call gmadoj ( nhhexa//'.HistEtat', phethe, iaux, codre6 )
197       else
198         codre6 = 0
199       endif
200       if ( nbpeto.ne.0 ) then
201         call gmadoj ( nhpent//'.HistEtat', phetpe, iaux, codre7 )
202       else
203         codre7 = 0
204       endif
205       if ( nbpyto.ne.0 ) then
206         call gmadoj ( nhpyra//'.HistEtat', phetpy, iaux, codre8 )
207       else
208         codre8 = 0
209       endif
210 c
211       codre0 = min ( codre1, codre2, codre3, codre4, codre5,
212      >               codre6, codre7, codre8 )
213       codret = max ( abs(codre0), codret,
214      >               codre1, codre2, codre3, codre4, codre5,
215      >               codre6, codre7, codre8 )
216 c
217       endif
218 c
219 c====
220 c 3. mise a jour effective
221 c====
222 #ifdef _DEBUG_HOMARD_
223       write (ulsort,*) '3. mise a jour effective ; codret = ', codret
224 #endif
225 c
226       if ( codret.eq.0 ) then
227 c
228       if ( taopti(31).ne.0 .or. taopti(32).ne.0 ) then
229         iaux = 0
230       else
231         iaux = 1
232       endif
233 c
234 #ifdef _DEBUG_HOMARD_
235       write (ulsort,texte(langue,3)) 'DEHMAJ', nompro
236 #endif
237       call dehmaj ( iaux,
238      >              imem(phetno), imem(phetar),
239      >              imem(phettr), imem(phetqu),
240      >              imem(phette), imem(phethe),
241      >              imem(phetpe), imem(phetpy),
242      >              ulsort, langue, codret )
243 c
244       endif
245 c
246 c====
247 c 4. la fin
248 c====
249 c
250 c 4.1. ==> message si erreur
251 c
252       if ( codret.ne.0 ) then
253 c
254 #include "envex2.h"
255 c
256       write (ulsort,texte(langue,1)) 'Sortie', nompro
257         write (ulsort,texte(langue,2)) codret
258 c
259       endif
260 c
261 c 4.2. ==> fin des mesures de temps de la section
262 c
263       call gtfims (nrosec)
264 c
265 #ifdef _DEBUG_HOMARD_
266       write (ulsort,texte(langue,1)) 'Sortie', nompro
267       call dmflsh (iaux)
268 #endif
269 c
270 c=======================================================================
271       endif
272 c=======================================================================
273 c
274       end