1 subroutine esecfs ( idfmed, nomamd,
5 > ulsort, langue, codret)
7 c ______________________________________________________________________
11 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
13 c Version originale enregistree le 18 juin 1996 sous le numero 96036
14 c aupres des huissiers de justice Simart et Lavoir a Clamart
15 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
16 c aupres des huissiers de justice
17 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
19 c HOMARD est une marque deposee d'Electricite de France
25 c ______________________________________________________________________
27 c Entree-Sortie : ECriture des Familles Supplementaires
29 c ______________________________________________________________________
30 c . nom . e/s . taille . description .
31 c .____________________________________________________________________.
32 c . idfmed . e . 1 . identificateur du fichier MED .
33 c . nomamd . e . char64 . nom du maillage MED voulu .
34 c . nhsups . e . char*8 . informations supplementaires caracteres 8 .
35 c . numfam . es . 1 . numero de famille .
36 c . ltbsau . e . 1 . longueur allouee a tbsaux .
37 c . tbsaux . . * . tableau tampon caracteres .
38 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
39 c . langue . e . 1 . langue des messages .
40 c . . . . 1 : francais, 2 : anglais .
41 c . codret . es . 1 . code de retour des modules .
42 c . . . . 0 : pas de probleme .
43 c ______________________________________________________________________
46 c 0. declarations et dimensionnement
49 c 0.1. ==> generalites
55 parameter ( nompro = 'ESECFS' )
76 integer ulsort, langue, codret
78 c 0.4. ==> variables locales
82 integer iaux, jaux, kaux
83 integer codre1, codre2
93 parameter ( nbmess = 150 )
94 character*80 texte(nblang,nbmess)
95 c ______________________________________________________________________
103 #ifdef _DEBUG_HOMARD_
104 write (ulsort,texte(langue,1)) 'Entree', nompro
110 texte(1,4) = '(''. Ecriture des familles supplementaires'')'
111 texte(1,5) = '(''... InfoSupS.Tab'',i2)'
112 texte(1,81) = '(''Longueur allouee pour tbsaux : '',i10)'
113 texte(1,82) = '(''Longueur necessaire pour tbsaux : '',i10)'
115 texte(2,4) = '(''. Writings of aditional families'')'
116 texte(2,5) = '(''... InfoSupS.Tab'',i2)'
117 texte(2,81) = '(''Allocated length for tbsaux : '',i10)'
118 texte(2,82) = '(''Used length for tbsaux : '',i10)'
122 1002 format(10(a8,'+'))
124 #ifdef _DEBUG_HOMARD_
125 write (ulsort,texte(langue,4))
126 call gmprsx ( nompro, nhsups )
127 call gmprsx ( nompro, nhsups//'.Tab2' )
128 call gmprsx ( nompro, nhsups//'.Tab3' )
129 call gmprsx ( nompro, nhsups//'.Tab4' )
130 call gmprsx ( nompro, nhsups//'.Tab10' )
138 do 21 , iaux = 1 , 10
140 c 2.1. ==> decodage des caracteristiques
141 #ifdef _DEBUG_HOMARD_
142 write (ulsort,90002) '2.1. ==> decodage ; codret', codret
145 if ( codret.eq.0 ) then
146 #ifdef _DEBUG_HOMARD_
147 write (ulsort,texte(langue,5)) iaux
151 call utench ( jaux, 'g', kaux, saux02,
152 > ulsort, langue, codret )
156 if ( codret.eq.0 ) then
158 call gmobal ( nhsups//'.Tab'//saux02(1:kaux), codre0 )
160 if ( codre0.eq.2 ) then
162 call gmliat ( nhsups, jaux, nbval, codre1 )
163 call gmadoj ( nhsups//'.Tab'//saux02(1:kaux),
164 > adress, kaux, codre2 )
166 codre0 = min ( codre1, codre2 )
167 codret = max ( abs(codre0), codret,
176 c 2.2. ==> creation de la famille eventuelle
177 c La convention MED veut que le nom d'un groupe soit
179 #ifdef _DEBUG_HOMARD_
180 write (ulsort,90002) '2.2. ==> creation ; codret', codret
182 cgn call gmprsx ( nompro, nhsups//'.Tab'//saux02 )
184 if ( nbval.gt.0 ) then
186 c 2.2.1. ==> controle
188 if ( codret.eq.0 ) then
189 #ifdef _DEBUG_HOMARD_
190 write (ulsort,90002) 'nbval', nbval
193 if ( (nbval+11).gt.ltbsau ) then
194 call gmprsx ( nompro, nhsups )
195 write (ulsort,texte(langue,81)) ltbsau
196 write (ulsort,texte(langue,82)) nbval+11
197 write (ulsort,*) 'Probleme pour Tab', saux02
203 c 2.2.2. ==> un premier groupe : le nombre de valeurs
205 if ( codret.eq.0 ) then
207 call utench ( nbval, 'd', jaux, saux32,
208 > ulsort, langue, codret )
210 tbsaux(1) = 'Nombre d'
211 tbsaux(2) = 'e valeur'
213 tbsaux(4) = saux32( 1: 8)
214 tbsaux(5) = saux32( 9:16)
215 tbsaux(6) = saux32(17:24)
216 tbsaux(7) = saux32(25:32)
217 do 222 , jaux = 8, 10
218 tbsaux(jaux) = blan08
223 c 2.2.3. ==> les groupes suivants : le texte
225 if ( codret.eq.0 ) then
228 if ( kaux.eq.0 ) then
231 jaux = (nbval-kaux)/10 + 1
235 do 2231 , jaux = 1 , nbval
236 tbsaux(10+jaux) = smem(adress+jaux-1)
239 do 2232 , jaux = 10+nbval+1 , 10*ngro
240 tbsaux(jaux) = blan08
245 c 2.2.4. ==> ecriture
247 if ( codret.eq.0 ) then
252 saux64( 1:12) = 'InfoSupS_Tab'
253 saux64(13:14) = saux02
255 #ifdef _DEBUG_HOMARD_
256 write (ulsort,*) 'Famille ', saux64
257 write (ulsort,90002) 'ngro', ngro
258 do 224 , jaux = 1 , ngro
259 write (ulsort,1002) (tbsaux(kaux),kaux=10*(jaux-1)+1,10*jaux)
262 #ifdef _DEBUG_HOMARD_
263 write (ulsort,texte(langue,3)) 'MFACRE', nompro
265 call mfacre ( idfmed, nomamd, saux64, numfam,
266 > ngro, tbsaux, codret )
278 if ( codret.ne.0 ) then
282 write (ulsort,texte(langue,1)) 'Sortie', nompro
283 write (ulsort,texte(langue,2)) codret
287 #ifdef _DEBUG_HOMARD_
288 write (ulsort,texte(langue,1)) 'Sortie', nompro