]> SALOME platform Git repositories - modules/homard.git/blob - src/tool/Utilitaire/utpr04.F
Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utpr04.F
1       subroutine utpr04 ( obpro1, obpro2,
2      >                    bilan,
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    UTilitaire - PRofil operation 04
25 c    --           --               --
26 c
27 c  Compare deux profils
28 c ______________________________________________________________________
29 c .        .     .        .                                            .
30 c .  nom   . e/s . taille .           description                      .
31 c .____________________________________________________________________.
32 c . obpro1 . e   . char*8 . nom de l'objet de type 'Profil' numero 1   .
33 c . obpro2 . e   . char*8 . nom de l'objet de type 'Profil' numero 2   .
34 c . bilan  .   s .   1    . bilan de la comparaison :                  .
35 c .        .     .        . 0 : identite totale                        .
36 c .        .     .        . 1 : liste identique, mais noms differents  .
37 c .        .     .        . 2 : liste differente avec meme nombre      .
38 c .        .     .        .  de valeurs                                .
39 c .        .     .        . 3 : nombre de valeurs differents           .
40 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
41 c . langue . e   .    1   . langue des messages                        .
42 c .        .     .        . 1 : francais, 2 : anglais                  .
43 c . codret . es  .    1   . code de retour des modules                 .
44 c .        .     .        . 0 : pas de probleme                        .
45 c .        .     .        . autre : probleme dans l'allocation         .
46 c ______________________________________________________________________
47 c
48 c====
49 c 0. declarations et dimensionnement
50 c====
51 c
52 c 0.1. ==> generalites
53 c
54       implicit none
55       save
56 c
57       character*6 nompro
58       parameter ( nompro = 'UTPR04' )
59 c
60 #include "nblang.h"
61 c
62 c 0.2. ==> communs
63 c
64 #include "envex1.h"
65 c
66 #include "gmenti.h"
67 c
68 c 0.3. ==> arguments
69 c
70       integer bilan
71 c
72       character*8 obpro1, obpro2
73 c
74       integer ulsort, langue, codret
75 c
76 c 0.4. ==> variables locales
77 c
78       integer iaux
79       integer nbvap1, adlip1, lgnop1
80       integer nbvap2, adlip2, lgnop2
81 c
82       character*64 nopro1, nopro2
83 c
84       integer nbmess
85       parameter ( nbmess = 10 )
86       character*80 texte(nblang,nbmess)
87 c
88 c 0.5. ==> initialisations
89 c ______________________________________________________________________
90 c
91 c====
92 c 1. messages
93 c====
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       texte(1,4) = '(''Profil numero '',i1)'
103       texte(1,5) = '(''. Objet de type ''''Profil'''' associe : '',a)'
104       texte(1,6) = '(''. Longueur : '',i10)'
105       texte(1,7) = '(''. Nom      : '',a)'
106       texte(1,8) = '(''. 1ere valeur     : '',i10)'
107       texte(1,9) = '(''. Derniere valeur : '',i10)'
108 c
109       texte(2,4) = '(''Profil # '',i1)'
110       texte(2,5) =
111      > '(''. Object of type ''''Profil'''' connected to : '',a)'
112       texte(2,6) = '(''. Length : '',i10)'
113       texte(2,7) = '(''. Name   : '',a)'
114       texte(2,8) = '(''. First value   : '',i10)'
115       texte(2,9) = '(''. Last value    : '',i10)'
116 c
117 c====
118 c 2. caracteristiques
119 c====
120 c 2.1. ==> profil 1
121 c
122 #ifdef _DEBUG_HOMARD_
123       write (ulsort,texte(langue,4)) 1
124       write (ulsort,texte(langue,5)) obpro1
125 #endif
126 c
127 #ifdef _DEBUG_HOMARD_
128       write (ulsort,texte(langue,3)) 'UTCAPR', nompro
129 #endif
130       call utcapr ( obpro1,
131      >              nbvap1, nopro1, adlip1,
132      >              ulsort, langue, codret )
133 c
134 #ifdef _DEBUG_HOMARD_
135       write (ulsort,texte(langue,6)) nbvap1
136       write (ulsort,texte(langue,7)) nopro1
137       write (ulsort,texte(langue,8)) imem(adlip1)
138       write (ulsort,texte(langue,9)) imem(adlip1+nbvap1-1)
139 #endif
140 c
141 c 2.2. ==> profil 2
142 c
143       if ( codret.eq.0 ) then
144 c
145 #ifdef _DEBUG_HOMARD_
146       write (ulsort,texte(langue,4)) 2
147       write (ulsort,texte(langue,5)) obpro2
148 #endif
149 c
150 #ifdef _DEBUG_HOMARD_
151       write (ulsort,texte(langue,3)) 'UTCAPR', nompro
152 #endif
153       call utcapr ( obpro2,
154      >              nbvap2, nopro2, adlip2,
155      >              ulsort, langue, codret )
156 c
157 #ifdef _DEBUG_HOMARD_
158       write (ulsort,texte(langue,6)) nbvap2
159       write (ulsort,texte(langue,7)) nopro2
160       write (ulsort,texte(langue,8)) imem(adlip2)
161       write (ulsort,texte(langue,9)) imem(adlip2+nbvap2-1)
162 #endif
163 c
164       endif
165 c
166 c====
167 c 3. tri sur le nombre de valeurs
168 c====
169 c
170       if ( codret.eq.0 ) then
171 c
172       if ( nbvap1.ne.nbvap2 ) then
173 c
174         bilan = 3
175         goto 9999
176 c
177       endif
178 c
179       endif
180 c
181 c====
182 c 4. tri sur les valeurs
183 c====
184 c
185       if ( codret.eq.0 ) then
186 c
187       do 41 , iaux = 0 , nbvap1-1
188 c
189         if ( imem(adlip1+iaux).ne.imem(adlip2+iaux) ) then
190 c
191           bilan = 2
192           goto 9999
193 c
194         endif
195 c
196    41 continue
197 c
198       endif
199 c
200 c====
201 c 5. tri sur le nom
202 c====
203 c
204       if ( codret.eq.0 ) then
205 c
206       call utlgut ( lgnop1, nopro1,
207      >              ulsort, langue, codret )
208 c
209       endif
210 c
211       if ( codret.eq.0 ) then
212 c
213       call utlgut ( lgnop2, nopro2,
214      >              ulsort, langue, codret )
215 c
216       endif
217 c
218       if ( codret.eq.0 ) then
219 c
220       if ( lgnop1.eq.lgnop2 ) then
221 c
222         if ( nopro1.eq.nopro2 ) then
223           bilan = 0
224         else
225           bilan = 1
226         endif
227 c
228       else
229 c
230           bilan = 1
231 c
232       endif
233 c
234       endif
235 c
236 c====
237 c 6. la fin
238 c====
239 c
240  9999 continue
241 c
242       if ( codret.ne.0 ) then
243 c
244 #include "envex2.h"
245 c
246       write (ulsort,texte(langue,1)) 'Sortie', nompro
247       write (ulsort,texte(langue,2)) codret
248 c
249       endif
250 c
251 #ifdef _DEBUG_HOMARD_
252       write (ulsort,texte(langue,1)) 'Sortie', nompro
253       call dmflsh (iaux)
254 #endif
255 c
256       end