1 subroutine utapte ( nomobj, typnom, choix,
4 > ulsort, langue, codret )
5 c ______________________________________________________________________
9 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
11 c Version originale enregistree le 18 juin 1996 sous le numero 96036
12 c aupres des huissiers de justice Simart et Lavoir a Clamart
13 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
14 c aupres des huissiers de justice
15 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
17 c HOMARD est une marque deposee d'Electricite de France
23 c ______________________________________________________________________
25 c UTilitaire : Allocation d'un objet de type PtTabEnt
27 c ______________________________________________________________________
29 c . nom . e/s . taille . description .
30 c .____________________________________________________________________.
31 c . nomobj . es . char8 . nom de l'objet PtTabEnt .
32 c . typnom . e . 1 . type du nom de l'objet PtTabEnt .
33 c . . . . 0 : le nom est a creer automatiquement .
34 c . . . . 1 : le nom est impose par l'appel .
35 c . choix . e . 1 . option du travail : .
36 c . . . . 0 : on fait tout .
37 c . . . . 1 : on n'alloue que la tete .
38 c . . . . 2 : on n'alloue que les branches .
39 c . . . . 3 : on modifie les longueurs .
40 c . nombre . e . 1 . nombre d'entrees ; le tableau Pointeur est .
41 c . . . . dimensionne (0:nombre) .
42 c . lgtabl . e . 1 . longueur de la Table .
43 c . adpoin . s . 1 . adresse de Pointeur .
44 c . adtabl . s . 1 . adresse de Table .
45 c . ulsort . e . 1 . numero d'unite logique de la liste standard.
46 c . langue . e . 1 . langue des messages .
47 c . . . . 1 : francais, 2 : anglais .
48 c . codret . es . 1 . code de retour des modules .
49 c . . . . 0 : pas de probleme .
50 c ______________________________________________________________________
53 c 0. declarations et dimensionnement
56 c 0.1. ==> generalites
62 parameter ( nompro = 'UTAPTE' )
78 integer nombre, lgtabl
79 integer adpoin, adtabl
81 integer ulsort, langue, codret
83 c 0.4. ==> variables locales
85 integer codre1, codre2, codre3, codre4
90 parameter ( nbmess = 10 )
91 character*80 texte(nblang,nbmess)
93 c 0.5. ==> initialisations
94 c ______________________________________________________________________
100 c 1.1. ==> tout va bien
104 c 1.2. ==> les messages
108 #ifdef _DEBUG_HOMARD_
109 write (ulsort,texte(langue,1)) 'Entree', nompro
113 texte(1,10) = '(''Mauvaise demande de type de nom :'',i6)'
114 texte(1,4) = '(''Probleme pour allouer l''''objet '',a8)'
115 texte(1,5) = '(''typnom = '',i3,'', choix = '',i3)'
116 texte(1,6) = '(''nombre = '',i3,'', lgtabl = '',i3)'
117 texte(1,7) = '(''Avant modification de tailles :'')'
119 texte(2,10) = '(''Bad request for the type of the name :'',i6)'
120 texte(2,4) = '(''Problem while allocating object '',a8)'
121 texte(2,5) = '(''typnom = '',i3,'', choix = '',i3)'
122 texte(2,6) = '(''nombre = '',i3,'', lgtabl = '',i3)'
123 texte(2,7) = '(''Before size modification :'')'
125 #ifdef _DEBUG_HOMARD_
126 write (ulsort,texte(langue,5)) typnom, choix
127 write (ulsort,texte(langue,6)) nombre, lgtabl
131 c 2. Allocation de l'objet de tete
136 if ( choix.eq.0 .or. choix.eq.1 ) then
138 if ( typnom.eq.0 ) then
140 call gmalot ( nomobj, 'PtTabEnt', 0, iaux, codre1 )
143 elseif ( typnom.eq.1 ) then
145 call gmaloj ( nomobj, 'PtTabEnt', 0, iaux, codre1 )
154 if ( codret.eq.0 ) then
156 call gmecat ( nomobj, 1, nombre, codret )
170 if ( choix.eq.0 .or. choix.eq.2 ) then
172 if ( codret.eq.0 ) then
174 call gmecat ( nomobj, 1, nombre, codre1 )
176 call gmaloj ( nomobj//'.Pointeur', ' ', iaux, adpoin, codre2 )
177 call gmecat ( nomobj, 2, lgtabl, codre3 )
178 call gmaloj ( nomobj//'.Table' , ' ', lgtabl, adtabl, codre4 )
180 codre0 = min ( codre1, codre2, codre3, codre4 )
181 codret = max ( abs(codre0), codret,
182 > codre1, codre2, codre3, codre4 )
186 if ( codret.eq.0 ) then
198 if ( choix.eq.3 ) then
200 if ( codret.eq.0 ) then
202 call gmliat ( nomobj, 1, iaux, codre1 )
203 call gmliat ( nomobj, 2, jaux, codre2 )
205 codre0 = min ( codre1, codre2 )
206 codret = max ( abs(codre0), codret,
211 if ( codret.eq.0 ) then
213 #ifdef _DEBUG_HOMARD_
214 write (ulsort,texte(langue,7))
215 call gmprsx (nompro, nomobj )
216 call gmprsx (nompro, nomobj//'.Pointeur' )
217 call gmprsx (nompro, nomobj//'.Table' )
220 call gmecat ( nomobj, 1, nombre, codre1 )
221 call gmecat ( nomobj, 2, lgtabl, codre2 )
222 call gmmod ( nomobj//'.Pointeur', adpoin,
223 > iaux+1, nombre+1, 1, 1, codre3 )
224 call gmmod ( nomobj//'.Table', adtabl,
225 > jaux, lgtabl, 1, 1, codre4 )
227 codre0 = min ( codre1, codre2, codre3, codre4 )
228 codret = max ( abs(codre0), codret,
229 > codre1, codre2, codre3, codre4 )
239 #ifdef _DEBUG_HOMARD_
240 call gmprsx (nompro, nomobj )
241 call gmprsx (nompro, nomobj//'.Pointeur' )
242 call gmprsx (nompro, nomobj//'.Table' )
245 if ( codret.ne.0 ) then
249 write (ulsort,texte(langue,1)) 'Sortie', nompro
250 write (ulsort,texte(langue,2)) codret
251 if ( codret.eq.-1 ) then
252 write (ulsort,texte(langue,10)) typnom
254 write (ulsort,texte(langue,4)) nomobj
259 #ifdef _DEBUG_HOMARD_
260 write (ulsort,texte(langue,1)) 'Sortie', nompro