Salome HOME
Homard executable
[modules/homard.git] / src / tool / Decision / deelig.F
1       subroutine deelig ( nomail,
2      >                    lgopts, taopts,
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 - ELements IGnores
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 . lgopts . e   .   1    . longueur du tableau des options caracteres .
32 c . taopts . e   . lgopts . tableau des options caracteres             .
33 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
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 : il existe encore des non conformites   .
39 c .        .     .        . 2 : probleme de memoire                    .
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 = 'DEELIG' )
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 c
62 #include "envca1.h"
63 c
64 c 0.3. ==> arguments
65 c
66       character*8 nomail
67 c
68       integer lgopts
69       character*8 taopts(lgopts)
70 c
71       integer ulsort, langue, codret
72 c
73 c 0.4. ==> variables locales
74 c
75       integer iaux
76 c
77       integer phetar, pdecar
78       integer adars2, nbelig
79 c
80       integer codre0, codre1, codre2, codre3
81 c
82       character*8 ntrav1
83       character*8 norenu
84       character*8 nhnoeu, nhmapo, nharet, nhtria, nhquad
85       character*8 nhtetr, nhhexa, nhpyra, nhpent
86       character*8 nhelig
87       character*8 nhvois, nhsupe, nhsups
88 c
89       integer nbmess
90       parameter ( nbmess = 10 )
91       character*80 texte(nblang,nbmess)
92 c
93 c 0.5. ==> initialisations
94 c ______________________________________________________________________
95 c
96 c====
97 c 1. messages
98 c====
99 c
100 #include "impr01.h"
101 c
102 #ifdef _DEBUG_HOMARD_
103       write (ulsort,texte(langue,1)) 'Entree', nompro
104       call dmflsh (iaux)
105 #endif
106 c
107       texte(1,4) = '(''Code retour de '',a6,'' ='',i4,/)'
108 c
109       texte(2,4) = '(''Error code from '',a6,'' ='',i4,/)'
110 c
111 #include "impr03.h"
112 c
113 c====
114 c 2. recuperation des pointeurs, initialisations
115 c====
116 c
117 c 2.1. ==> structure generale
118 c
119       if ( codret.eq.0 ) then
120 c
121       call utnomh ( nomail,
122      >                sdim,   mdim,
123      >               degre, maconf, homolo, hierar,
124      >              rafdef, nbmane, typcca, typsfr, maextr,
125      >              mailet,
126      >              norenu,
127      >              nhnoeu, nhmapo, nharet,
128      >              nhtria, nhquad,
129      >              nhtetr, nhhexa, nhpyra, nhpent,
130      >              nhelig,
131      >              nhvois, nhsupe, nhsups,
132      >              ulsort, langue, codret)
133 c
134       endif
135 c
136 c 2.2. ==> tableaux
137 c
138       if ( codret.eq.0 ) then
139 c
140       call gmliat ( nhelig, 1, nbelig, codret )
141 c
142       endif
143 #ifdef _DEBUG_HOMARD_
144       write (ulsort,90002) 'nbelig', nbelig
145 #endif
146 c
147       if ( codret.eq.0 ) then
148 c
149       if ( nbelig.ne.0 ) then
150 c
151       call gmadoj ( nharet//'.HistEtat', phetar, iaux, codre1 )
152       ntrav1 = taopts(11)
153       call gmadoj ( ntrav1, pdecar, iaux, codre2 )
154       call gmadoj ( nharet//'.InfoSup2', adars2, iaux, codre3 )
155 c
156       codre0 = min ( codre1, codre2, codre3)
157       codret = max ( abs(codre0), codret,
158      >               codre1, codre2, codre3)
159 c
160       endif
161 c
162       endif
163 c
164 c====
165 c 3. bilan des decisions
166 c====
167 #ifdef _DEBUG_HOMARD_
168       write (ulsort,90002) '3. bilan des decisions ; codret', codret
169 #endif
170 c
171       if ( codret.eq.0 ) then
172 c
173       if ( nbelig.ne.0 ) then
174 c
175 #ifdef _DEBUG_HOMARD_
176       write (ulsort,texte(langue,3)) 'DEELI1', nompro
177 #endif
178         call deeli1
179      >        ( imem(adars2), imem(pdecar),imem(phetar),
180      >          ulsort, langue, codret )
181 c
182 #ifdef _DEBUG_HOMARD_
183         write (ulsort,texte(langue,4)) 'DEELI1', codret
184 #endif
185 c
186       endif
187 c
188       else
189 c
190         codret = 2
191 c
192       endif
193 c
194 c====
195 c 4. la fin
196 c====
197 c
198       if ( codret.ne.0 ) then
199 c
200 #include "envex2.h"
201 c
202       write (ulsort,texte(langue,1)) 'Sortie', nompro
203         write (ulsort,texte(langue,2)) codret
204 c
205       endif
206 c
207 cgn      print *,nompro,nbelig,codret
208 #ifdef _DEBUG_HOMARD_
209       write (ulsort,texte(langue,1)) 'Sortie', nompro
210       call dmflsh (iaux)
211 #endif
212 c
213       end