1 subroutine sfgrfb ( nocmaf, ncafdg,
3 > ulsort, langue, codret)
4 c ______________________________________________________________________
8 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
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
16 c HOMARD est une marque deposee d'Electricite de France
22 c ______________________________________________________________________
24 c Suivi de Frontiere - GRoupes de la Frontiere - phase B
26 c remarque : sfgrfa et sfgrfb sont des clones
27 c ______________________________________________________________________
28 c . nom . e/s . taille . description .
29 c .____________________________________________________________________.
30 c . nocmaf . e . char*8 . nom de l'objet maillage de la frontiere .
31 c . ncafdg . es . char*8 . nom de l'objet groupes/attributs frontiere .
32 c . nblign . s . 1 . nombre de lignes a considerer .
33 c . nbf . e . 1 . nombre de familles du maillage frontiere .
34 c . nbgrmx . e . 1 . nombre maxi de groupes dans les familles .
35 c . langue . e . 1 . langue des messages .
36 c . . . . 1 : francais, 2 : anglais .
37 c . codret . es . 1 . code de retour des modules .
38 c . . . . 0 : pas de probleme .
39 c . . . . 2 : probleme avec la memoire .
40 c . . . . 3 : probleme avec le fichier .
41 c . . . . 5 : contenu incorrect .
42 c ______________________________________________________________________
45 c 0. declarations et dimensionnement
48 c 0.1. ==> generalites
54 parameter ( nompro = 'SFGRFB' )
67 integer nblign, nbf, nbgrmx
69 character*8 nocmaf, ncafdg
71 integer ulsort, langue, codret
73 c 0.4. ==> variables locales
77 integer adtyel, adfael
78 integer pointl, pttgrl, ptngrl
79 integer adgrtb, adgrpo, adnufa
80 integer nbmail, nbfseg
81 integer ptrav1, ptrav2
82 integer codre1, codre2
85 character*8 ntrav1, ntrav2
88 parameter ( nbmess = 10 )
89 character*80 texte(nblang,nbmess)
91 c 0.5. ==> initialisations
92 c ______________________________________________________________________
100 #ifdef _DEBUG_HOMARD_
101 write (ulsort,texte(langue,1)) 'Entree', nompro
110 c 2. recuperation des adresses
112 #ifdef _DEBUG_HOMARD_
113 write (ulsort,90002) '2. adresses et reperage ; codret', codret
116 c 2.1. ==> le tableau trav1 contiendra la liste des familles du maillage
117 c frontiere qui contiennent au moins un groupe. Il est alloue
118 c au maximum theorique qui vaut le nombre total de groupes
119 c constituant les familles + 1 pour la famille nulle
120 c le tableau trav2 contiendra la liste des numeros des groupes
121 c voulus et qui sont effectivement un groupe frontiere
123 if ( codret.eq.0 ) then
126 call gmalot ( ntrav1, 'entier ', iaux, ptrav1, codre1 )
127 call gmalot ( ntrav2, 'entier ', nblign, ptrav2, codre2)
129 codre0 = min ( codre1, codre2 )
130 codret = max ( abs(codre0), codret,
135 c 2.2. ==> adresses et filtrage
137 if ( codret.eq.0 ) then
139 #ifdef _DEBUG_HOMARD_
140 call gmprsx (nompro,nocmaf )
143 #ifdef _DEBUG_HOMARD_
144 write (ulsort,texte(langue,3)) 'SFGRF0', nompro
146 call sfgrf0 ( nocmaf,
149 > adnufa, adgrpo, adgrtb,
150 > nbfseg, imem(ptrav1),
151 > ulsort, langue, codret)
153 #ifdef _DEBUG_HOMARD_
154 call gmprsx (nompro,ntrav1 )
155 call gmprsx (nompro,ntrav2 )
161 c 3. recuperation des caracteristiques de la liste
163 #ifdef _DEBUG_HOMARD_
164 write (ulsort,90002) '3. recuperation ; codret', codret
167 if ( codret.eq.0 ) then
169 #ifdef _DEBUG_HOMARD_
170 call gmprsx (nompro,ncafdg )
171 call gmprsx (nompro,ncafdg//'.Pointeur' )
172 call gmprsx (nompro,ncafdg//'.Table' )
173 call gmprsx (nompro,ncafdg//'.Taille' )
176 #ifdef _DEBUG_HOMARD_
177 write (ulsort,texte(langue,3)) 'UTADPT', nompro
179 call utadpt ( ncafdg, iaux,
181 > pointl, pttgrl, ptngrl,
182 > ulsort, langue, codret )
187 c 4. on verifie les tableaux
189 #ifdef _DEBUG_HOMARD_
190 write (ulsort,90002) '4. remplissage ; codret', codret
193 if ( codret.eq.0 ) then
195 cgn call gmprsx (nompro, ncfami//'.Groupe.Pointeur' )
196 cgn call gmprsx (nompro, ncfami//'.Groupe.Table' )
197 cgn call gmprsx (nompro, ncfami//'.Numero' )
198 #ifdef _DEBUG_HOMARD_
199 write (ulsort,texte(langue,3)) 'SFGRF3', nompro
201 call sfgrf3 ( nbfseg,
202 > nbf, nbgrmx, nblign, lgtabl,
203 > imem(pointl), imem(pttgrl), smem(ptngrl),
204 > imem(adgrpo), smem(adgrtb), imem(adnufa),
205 > imem(ptrav1), imem(ptrav2), ncafdg,
206 > ulsort, langue, codret )
208 #ifdef _DEBUG_HOMARD_
209 call gmprsx (nompro,ncafdg )
210 call gmprsx (nompro,ncafdg//'.Pointeur' )
211 call gmprsx (nompro,ncafdg//'.Table' )
212 call gmprsx (nompro,ncafdg//'.Taille' )
221 if ( codret.eq.0 ) then
223 call gmlboj ( ntrav1 , codre1 )
224 call gmlboj ( ntrav2 , codre2 )
226 codre0 = min ( codre1, codre2 )
227 codret = max ( abs(codre0), codret,
236 if ( codret.ne.0 ) then
240 write (ulsort,texte(langue,1)) 'Sortie', nompro
241 write (ulsort,texte(langue,2)) codret
245 #ifdef _DEBUG_HOMARD_
246 write (ulsort,texte(langue,1)) 'Sortie', nompro