1 subroutine hoapcv ( codret )
2 c ______________________________________________________________________
6 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
8 c Version originale enregistree le 18 juin 1996 sous le numero 96036
9 c aupres des huissiers de justice Simart et Lavoir a Clamart
10 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
11 c aupres des huissiers de justice
12 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
14 c HOMARD est une marque deposee d'Electricite de France
20 c ______________________________________________________________________
22 c HOMARD : interface APres adaptation : ConVersions
24 c ______________________________________________________________________
26 c . nom . e/s . taille . description .
27 c .____________________________________________________________________.
28 c . codret . es . 1 . code de retour des modules .
29 c . . . . en entree = celui du module d'avant .
30 c . . . . en sortie = celui du module en cours .
31 c . . . . 0 : pas de probleme .
32 c . . . . 1 : manque de temps cpu .
33 c . . . . 2x : probleme dans les memoires .
34 c . . . . 3x : probleme dans les fichiers .
35 c . . . . 5 : mauvaises options .
36 c . . . . 6 : problemes dans les noms d'objet .
37 c ______________________________________________________________________
40 c 0. declarations et dimensionnement
43 c 0.1. ==> generalites
49 parameter ( nompro = 'HOAPCV' )
67 c 0.4. ==> variables locales
69 integer ulsort, langue, codava
70 integer adopti, lgopti
71 integer adoptr, lgoptr
72 integer adopts, lgopts
73 integer adetco, lgetco
74 integer nrsect, nrssse
75 integer nretap, nrsset
80 character*8 typobs, nohmap
83 parameter ( nbmess = 10 )
84 character*80 texte(nblang,nbmess)
86 character*50 commen(nblang)
88 c 0.5. ==> initialisations
89 c ______________________________________________________________________
92 c 1. les initialisations
97 c=======================================================================
98 if ( codava.eq.0 ) then
99 c=======================================================================
101 #ifdef _DEBUG_HOMARD_
102 call gmprsx (nompro, nndoad )
103 call gmprsx (nompro, nndoad//'.OptEnt' )
104 call gmprsx (nompro, nndoad//'.OptRee' )
105 call gmprsx (nompro, nndoad//'.OptCar' )
106 call gmprsx (nompro, nndoad//'.EtatCour' )
109 c 1.2. ==> le numero d'unite logique de la liste standard
111 call utulls ( ulsort, codret )
113 c 1.3. ==> la langue des messages
115 if ( codret.eq.0 ) then
117 call gmadoj ( nndoad//'.OptEnt', adopti, lgopti, codret )
118 if ( codret.eq.0 ) then
119 langue = imem(adopti)
127 c 1.4. ==> l'etat courant
129 if ( codret.eq.0 ) then
131 call gmadoj ( nndoad//'.EtatCour', adetco, lgetco, codret )
132 if ( codret.eq.0 ) then
133 nretap = imem(adetco) + 1
134 imem(adetco) = nretap
136 imem(adetco+1) = nrsset
137 nrsect = imem(adetco+2) + 10
138 imem(adetco+2) = nrsect
140 imem(adetco+3) = nrssse
151 c 1.4. ==> le debut des mesures de temps
155 c 1.5. ==> les messages
159 #ifdef _DEBUG_HOMARD_
160 write (ulsort,texte(langue,1)) 'Entree', nompro
166 >''' C O N V E R S I O N S A P R E S A D A P T A T I O N'')'
167 texte(1,5) = '(62(''=''),/)'
171 >''' C O N V E R S I O N S A F T E R A D A P T A T I O N'')'
172 texte(2,5) = '(62(''=''),/)'
176 if ( codret.eq.0 ) then
178 call utcvne ( nretap, nrsset, saux, iaux, codret )
180 write (ulsort,texte(langue,4)) saux
181 write (ulsort,texte(langue,5))
184 imem(adetco+1) = nrsset
188 c 1.7. ==> les options reelles
190 call gmadoj ( nndoad//'.OptRee', adoptr, lgoptr, codret )
191 if ( codret.ne.0 ) then
195 c 1.8. ==> les noms d'objets a conserver
197 if ( codret.eq.0 ) then
198 call gmadoj ( nndoad//'.OptCar', adopts, lgopts, codret )
199 if ( codret.ne.0 ) then
207 c 2. compactage des tableaux
209 #ifdef _DEBUG_HOMARD_
210 write (ulsort,90002) '2. compactage tableaux ; codret', codret
213 if ( imem(adopti+21).eq.1 .or. imem(adopti+27).eq.1 ) then
215 if ( codret.eq.0 ) then
217 #ifdef _DEBUG_HOMARD_
218 write (ulsort,texte(langue,3)) 'UTCOMP', nompro
221 call utcomp (ulsort, langue, codret)
228 c 3. conversion eventuelle du maillage
230 #ifdef _DEBUG_HOMARD_
231 write (ulsort,90002) '3. conversion maillage ; codret', codret
234 if ( codret.eq.0 ) then
236 imem(adetco+3) = imem(adetco+3) + 1
238 if ( imem(adopti+21).eq.1 ) then
240 #ifdef _DEBUG_HOMARD_
241 write (ulsort,90002) 'imem(adopti+38)', imem(adopti+38)
242 write (ulsort,90002) 'imem(adopti+10)', imem(adopti+10)
245 nrssse = imem(adetco+3)
248 c 3.1. ==> le cas extrude, non saturne, non neptune
250 if ( imem(adopti+38).ne.0 .and.
251 > imem(adopti+10).ne.26 .and.
252 > imem(adopti+10).ne.46 ) then
254 if ( codret.eq.0 ) then
256 #ifdef _DEBUG_HOMARD_
257 write (ulsort,texte(langue,3)) 'PCMEXT', nompro
259 call pcmext ( lgopti, imem(adopti),
260 > lgetco, imem(adetco),
261 > ulsort, langue, codret )
267 c 3.2. ==> conversion vers le format externe
269 if ( codret.eq.0 ) then
271 #ifdef _DEBUG_HOMARD_
272 write (ulsort,texte(langue,3)) 'PCMAIL', nompro
275 call pcmail ( lgopti, imem(adopti), lgopts, smem(adopts),
276 > lgetco, imem(adetco),
277 > ulsort, langue, codret )
281 c 3.2. ==> modification pour le cas non conforme
282 c ou saturne/neptune 2D
284 #ifdef _DEBUG_HOMARD_
285 write (ulsort,90002) 'imem(adopti+29)', imem(adopti+29)
286 write (ulsort,90002) 'imem(adopti+10)', imem(adopti+10)
289 if ( imem(adopti+29).eq.-2 .or.
290 > imem(adopti+29).eq.1 .or.
291 > imem(adopti+29).eq.2 .or.
292 > imem(adopti+29).eq.3 .or.
293 > imem(adopti+10).eq.26 .or.
294 > imem(adopti+10).eq.46 ) then
296 if ( codret.eq.0 ) then
298 #ifdef _DEBUG_HOMARD_
299 write (ulsort,texte(langue,3)) 'PCMANC', nompro
301 call pcmanc ( lgopti, imem(adopti), lgoptr, rmem(adoptr),
302 > lgopts, smem(adopts),
303 > lgetco, imem(adetco),
304 > ulsort, langue, codret )
317 c 4. conversion eventuelle d'une solution
321 c si aucune solution n'est presente, hoapls modifiera
322 c l'indicateur de conversion, imem(adopti+27).
323 #ifdef _DEBUG_HOMARD_
324 write (ulsort,90002) '4.1. lecture solution ; codret', codret
325 write (ulsort,90002) 'imem(adopti+27)', imem(adopti+27)
326 write (ulsort,90002) 'imem(adopti+38)', imem(adopti+38)
329 if ( codret.eq.0 ) then
331 imem(adetco+3) = imem(adetco+3) + 1
333 if ( imem(adopti+27).eq.1 ) then
335 #ifdef _DEBUG_HOMARD_
336 write (ulsort,texte(langue,3)) 'HOAPLS', nompro
339 call hoapls ( lgopti, imem(adopti), lgopts, smem(adopts),
340 > lgetco, imem(adetco),
341 > ulsort, langue, codret )
347 c 4.2. ==> conversion
348 #ifdef _DEBUG_HOMARD_
349 write (ulsort,90002) '4.2. conversion solution ; codret', codret
352 if ( codret.eq.0 ) then
354 imem(adetco+3) = imem(adetco+3) + 1
356 if ( imem(adopti+27).eq.1 ) then
358 nrssse = imem(adetco+3)
361 c 4.2.1 ==> pour le cas extrude, passage du 3D au 2D
363 if ( codret.eq.0 ) then
365 if ( imem(adopti+38).ne.0 ) then
367 #ifdef _DEBUG_HOMARD_
368 write (ulsort,texte(langue,3)) 'UTSEXT', nompro
371 call utsext ( smem(adopts+8), iaux, imem(adopti+10),
372 > lgetco, imem(adetco),
373 > ulsort, langue, codret )
379 c 4.2.2. ==> conversion vraie
381 if ( codret.eq.0 ) then
383 #ifdef _DEBUG_HOMARD_
384 write (ulsort,texte(langue,3)) 'PCSOLU', nompro
387 call pcsolu ( lgopti, imem(adopti), lgopts, smem(adopts),
388 > lgetco, imem(adetco),
389 > ulsort, langue, codret )
393 c 4.2.3 ==> pour le cas extrude, passage du 2D au 3D
395 if ( codret.eq.0 ) then
397 if ( imem(adopti+38).ne.0 ) then
399 #ifdef _DEBUG_HOMARD_
400 write (ulsort,texte(langue,3)) 'UTSEXT', nompro
403 call utsext ( smem(adopts+9), iaux, imem(adopti+10),
404 > lgetco, imem(adetco),
405 > ulsort, langue, codret )
419 c 5. analyse du maillage converti
420 c Il faut le faire seulement ici car certaines conversions
421 c modifient les familles
423 #ifdef _DEBUG_HOMARD_
424 write (ulsort,90002) '5. analyse ; codret', codret
427 if ( codret.eq.0 ) then
429 imem(adetco+3) = imem(adetco+3) + 1
430 nrssse = imem(adetco+3)
434 if ( codret.eq.0 ) then
437 call utosno ( typobs, nohmap, iaux, ulsort, langue, codret )
440 if ( imem(adopti+3).eq.3 ) then
441 commen(1) = 'Maillage apres modification '
442 commen(2) = 'Mesh after modification '
443 elseif ( imem(adopti+21).eq.1 ) then
444 commen(1) = 'Maillage apres adaptation '
445 commen(2) = 'Mesh after adaptation '
447 commen(1) = 'Maillage '
448 commen(2) = 'Maillage '
451 if ( codret.eq.0 ) then
453 action = smem(adopts+29)
454 if ( action.eq.'homa ' ) then
457 #ifdef _DEBUG_HOMARD_
458 write (ulsort,texte(langue,3)) 'UTBILM', nompro
460 call utbilm ( nohmap, commen(langue), imem(adopti+2), action,
461 > lgetco, imem(adetco),
462 > ulsort, langue, codret )
473 c 7.1. ==> message si erreur
475 if ( codret.ne.0 ) then
479 write (ulsort,texte(langue,1)) 'Sortie', nompro
480 write (ulsort,texte(langue,2)) codret
484 c 7.2. ==> fin des mesures de temps de la section
488 #ifdef _DEBUG_HOMARD_
489 write (ulsort,texte(langue,1)) 'Sortie', nompro
493 c=======================================================================
495 c=======================================================================