Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utcapr.F
1       subroutine utcapr ( obprof,
2      >                    nbvapr, noprof, adlipr,
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 - CAracteristiques d'un PRofil
25 c    --           --                    --
26 c ______________________________________________________________________
27 c .        .     .        .                                            .
28 c .  nom   . e/s . taille .           description                      .
29 c .____________________________________________________________________.
30 c . obprof . e   . char8  . nom de l'objet profil                      .
31 c . nbvapr .  s  .   1    . nombre de valeurs                          .
32 c . noprof .   s . char64 . nom du profil                              .
33 c . adlipr .   s .   1    . adresse de la liste des entites            .
34 c . langue . e   .    1   . langue des messages                        .
35 c .        .     .        . 1 : francais, 2 : anglais                  .
36 c . codret . es  .    1   . code de retour des modules                 .
37 c .        .     .        . 0 : pas de probleme                        .
38 c .        .     .        . 1 : probleme                               .
39 c ______________________________________________________________________
40 c
41 c====
42 c 0. declarations et dimensionnement
43 c====
44 c
45 c 0.1. ==> generalites
46 c
47       implicit none
48       save
49 c
50       character*6 nompro
51       parameter ( nompro = 'UTCAPR' )
52 c
53 #include "nblang.h"
54 #include "consts.h"
55 c
56 c 0.2. ==> communs
57 c
58 #include "envex1.h"
59 c
60 #include "gmstri.h"
61 c
62 c 0.3. ==> arguments
63 c
64       character*8 obprof
65       character*64 noprof
66 c
67       integer nbvapr
68       integer adlipr
69 c
70       integer ulsort, langue, codret
71 c
72 c 0.4. ==> variables locales
73 c
74       integer iaux
75       integer codre1, codre2, codre3, codre4
76       integer codre0
77       integer lgnomp, adnomp
78 c
79       integer nbmess
80       parameter ( nbmess = 10 )
81       character*80 texte(nblang,nbmess)
82 c
83 c 0.5. ==> initialisations
84 c ______________________________________________________________________
85 c
86 c====
87 c 1. initialisations
88 c====
89 c
90 c 1.1. ==> messages
91 c
92 #include "impr01.h"
93 c
94 #ifdef _DEBUG_HOMARD_
95       write (ulsort,texte(langue,1)) 'Entree', nompro
96       call dmflsh (iaux)
97 #endif
98 c
99       texte(1,4) = '(''Nom du profil : '',a)'
100       texte(1,5) = '(''Longueur du nom du profil : '',i10)'
101 c
102       texte(2,4) = '(''Name of the profile : '',a)'
103       texte(2,5) = '(''Longueur du nom du profil : '',i10)'
104 c
105 #ifdef _DEBUG_HOMARD_
106       call gmprsx (nompro, obprof )
107       call gmprsx (nompro, obprof//'.NomProfi' )
108       call gmprot (nompro, obprof//'.ListEnti', 1, 10 )
109 #endif
110 c
111 c====
112 c 2. caracteristiques du profil
113 c====
114 c
115       if ( codret.eq.0 ) then
116 c
117       call gmliat ( obprof, 1, lgnomp, codre1 )
118       call gmliat ( obprof, 2, nbvapr, codre2 )
119       call gmadoj ( obprof//'.NomProfi', adnomp, iaux, codre3 )
120       call gmadoj ( obprof//'.ListEnti', adlipr, iaux, codre4 )
121 c
122       codre0 = min ( codre1, codre2, codre3, codre4 )
123       codret = max ( abs(codre0), codret,
124      >               codre1, codre2, codre3, codre4 )
125 c
126       endif
127 c
128 c====
129 c 3. le nom du profil
130 c====
131 c
132       if ( codret.eq.0 ) then
133 #ifdef _DEBUG_HOMARD_
134       write (ulsort,texte(langue,5)) lgnomp
135 #endif
136 c
137       if ( lgnomp.gt.0 ) then
138 c
139         call uts8ch ( smem(adnomp), lgnomp, noprof,
140      >                ulsort, langue, codret )
141 c
142       else
143 c
144         noprof = blan64
145 c
146       endif
147 c
148       endif
149 c
150 #ifdef _DEBUG_HOMARD_
151       write (ulsort,texte(langue,4)) noprof
152 #endif
153 c
154 c====
155 c 4. la fin
156 c====
157 c
158       if ( codret.ne.0 ) then
159 c
160 #include "envex2.h"
161 c
162       write (ulsort,texte(langue,1)) 'Sortie', nompro
163       write (ulsort,texte(langue,2)) codret
164 c
165       endif
166 c
167 #ifdef _DEBUG_HOMARD_
168       write (ulsort,texte(langue,1)) 'Sortie', nompro
169       call dmflsh (iaux)
170 #endif
171 c
172       end