Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utbilm.F
1       subroutine utbilm ( nomail, commen, typbil, action,
2      >                    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    UTilitaire - BILan sur le Maillage
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 . commen . e   . ch80   . commentaire a ecrire en tete               .
32 c . typbil . e   .   1    . type de bilan                              .
33 c .        .     .        . la valeur de typbil est le produit de :    .
34 c .        .     .        .  0 : rien du tout                          .
35 c .        .     .        .  2 : nombre d'entites homard               .
36 c .        .     .        .  3 : interpenetration des mailles          .
37 c .        .     .        .  5 : qualite des mailles                   .
38 c .        .     .        .  7 : nombre d'entites du calcul            .
39 c .        .     .        . 11 : connexite                             .
40 c .        .     .        . 13 : tailles des sous-domaines             .
41 c . action . e   .char8/10. action en cours                            .
42 c . lgetco . e   .   1    . longueur du tableau de l'etat courant      .
43 c . taetco . e   . lgetco . tableau de l'etat courant                  .
44 c . ulsort . e   .   1    . unite logique de la sortie generale        .
45 c . langue . e   .    1   . langue des messages                        .
46 c .        .     .        . 1 : francais, 2 : anglais                  .
47 c . codret .  s  .    1   . code de retour des modules                 .
48 c .        .     .        . 0 : pas de probleme                        .
49 c .        .     .        . 1 : probleme                               .
50 c .____________________________________________________________________.
51 c
52 c====
53 c 0. declarations et dimensionnement
54 c====
55 c
56 c 0.1. ==> generalites
57 c
58       implicit none
59       save
60 c
61       character*6 nompro
62       parameter ( nompro = 'UTBILM' )
63 c
64 #include "nblang.h"
65 c
66 c 0.2. ==> communs
67 c
68 #include "envex1.h"
69 c
70 c 0.3. ==> arguments
71 c
72       character*8 nomail
73       character*(*) action
74       character*(*) commen
75 c
76       integer typbil
77       integer lgetco
78       integer taetco(lgetco)
79 c
80       integer ulsort, langue, codret
81 c
82 c 0.4. ==> variables locales
83 c
84       integer nretap, nrsset
85 c
86       integer codava
87       integer iaux
88 c
89       character*6 saux06
90 c
91       integer nbmess
92       parameter (nbmess = 10 )
93       character*80 texte(nblang,nbmess)
94 c
95 c 0.5. ==> initialisations
96 c
97 c ______________________________________________________________________
98 c
99       codava = codret
100 c
101 c=======================================================================
102       if ( codava.eq.0 ) then
103 c=======================================================================
104 c
105 c====
106 c 1. messages
107 c====
108 c
109 #include "impr01.h"
110 c
111 #ifdef _DEBUG_HOMARD_
112       write (ulsort,texte(langue,1)) 'Entree', nompro
113       call dmflsh (iaux)
114 #endif
115 c
116       texte(1,4) = '(/,a6,'' ANALYSE DU MAILLAGE'')'
117       texte(1,5) = '(26(''=''),/)'
118       texte(1,6) = '(''Erreur dans la verification du maillage.'')'
119 c
120       texte(2,4) = '(/,a6,'' MESH ANALYSIS'')'
121       texte(2,5) = '(20(''=''),/)'
122       texte(2,6) = '(''Error in the verification of the mesh.'')'
123 c
124 c 1.4. ==> le numero de sous-etape
125 c
126       nretap = taetco(1)
127       nrsset = taetco(2) + 1
128       taetco(2) = nrsset
129 c
130       call utcvne ( nretap, nrsset, saux06, iaux, codret )
131 c
132 c 1.5 ==> le titre
133 c
134       write (ulsort,texte(langue,4)) saux06
135       write (ulsort,texte(langue,5))
136 c
137 #include "impr03.h"
138 c
139 c====
140 c 2. verifications
141 c====
142 c
143       if ( action(1:4).eq.'info' ) then
144 c
145         if ( codret.eq.0 ) then
146 c
147 #ifdef _DEBUG_HOMARD_
148         write (ulsort,texte(langue,3)) 'UTVERI', nompro
149 #endif
150 c
151         iaux = 0
152         call utveri ( action, nomail, nompro, iaux,
153      >                ulsort, langue, codret )
154 c
155         if ( codret.ne.0 ) then
156 c
157           write (ulsort,texte(langue,6))
158           codret = 0
159           goto 40
160 c
161         endif
162 c
163         endif
164 c
165       endif
166 c
167 c====
168 c 3. Bilan reel
169 c====
170 #ifdef _DEBUG_HOMARD_
171       write (ulsort,90002) '3. Bilan reel ; codret', codret
172 #endif
173 c
174 c 3.1. ==> Pour la conversion avant l'adaptation, on ne fait le bilan
175 c          que si c'est explictement demande
176 c
177       if ( codret.eq.0 ) then
178 c
179       iaux = abs(typbil)
180       if ( action(1:4).eq.'avad' ) then
181         if ( typbil.gt.0 ) then
182           iaux = 0
183         endif
184       endif
185 c
186       endif
187 c
188 c 3.2. ==> Appel du programme de base
189 c
190       if ( codret.eq.0 ) then
191 c
192       if ( iaux.ne.0 ) then
193 c
194 #ifdef _DEBUG_HOMARD_
195         write (ulsort,texte(langue,3)) 'UTBIL1', nompro
196 #endif
197         call utbil1 ( nomail, commen, iaux, action,
198      >                lgetco, taetco,
199      >                ulsort, langue, codret)
200 c
201       endif
202 c
203       endif
204 c
205 c====
206 c 4. on impose un code de retour toujours nul
207 c====
208 c
209    40 continue
210 #ifdef _DEBUG_HOMARD_
211       write (ulsort,90002) '40 continue ; codret', codret
212 #endif
213 c
214       if ( codret.ne.0 ) then
215 c
216 #include "envex2.h"
217 c
218 #ifdef _DEBUG_HOMARD_
219       write (ulsort,texte(langue,1)) 'Sortie', nompro
220       write (ulsort,texte(langue,2)) codret
221 #endif
222 c
223       endif
224 c
225       codret = 0
226 c
227 #ifdef _DEBUG_HOMARD_
228       write (ulsort,texte(langue,1)) 'Sortie', nompro
229       call dmflsh (iaux)
230 #endif
231 c
232 c=======================================================================
233       endif
234 c=======================================================================
235 c
236       end