1 subroutine hoavcv ( 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 AVant 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 . . . . 7 : problemes dans les noms d'objet .
37 c ______________________________________________________________________
40 c 0. declarations et dimensionnement
43 c 0.1. ==> generalites
49 parameter ( nompro = 'HOAVCV' )
68 c 0.4. ==> variables locales
70 integer ulsort, langue, codava
71 integer adopti, lgopti
72 integer adoptr, lgoptr
73 integer adopts, lgopts
74 integer adetco, lgetco
75 integer nrsect, nrssse
76 integer nretap, nrsset
81 character*8 typobs, nohman, nocman, nosvmn
84 parameter ( nbmess = 20 )
85 character*80 texte(nblang,nbmess)
87 character*50 commen(nblang)
89 c 0.5. ==> initialisations
90 c ______________________________________________________________________
93 c 1. les initialisations
98 c=======================================================================
99 if ( codava.eq.0 ) then
100 c=======================================================================
102 #ifdef _DEBUG_HOMARD_
103 call gmprsx (nompro, nndoad )
104 call gmprsx (nompro, nndoad//'.OptEnt' )
105 call gmprsx (nompro, nndoad//'.OptRee' )
106 call gmprsx (nompro, nndoad//'.OptCar' )
107 call gmprsx (nompro, nndoad//'.EtatCour' )
110 c 1.2. ==> le numero d'unite logique de la liste standard
112 call utulls ( ulsort, codret )
114 c 1.3. ==> la langue des messages
116 if ( codret.eq.0 ) then
118 call gmadoj ( nndoad//'.OptEnt', adopti, lgopti, codret )
119 if ( codret.eq.0 ) then
120 langue = imem(adopti)
128 c 1.4. ==> l'etat courant
130 if ( codret.eq.0 ) then
132 call gmadoj ( nndoad//'.EtatCour', adetco, lgetco, codret )
133 if ( codret.eq.0 ) then
134 nretap = imem(adetco) + 1
135 imem(adetco) = nretap
137 imem(adetco+1) = nrsset
138 nrsect = imem(adetco+2) + 10
139 imem(adetco+2) = nrsect
141 imem(adetco+3) = nrssse
152 c 1.4. ==> le debut des mesures de temps
156 c 1.5. ==> les messages
160 #ifdef _DEBUG_HOMARD_
161 write (ulsort,texte(langue,1)) 'Entree', nompro
167 >''' C O N V E R S I O N S A V A N T A D A P T A T I O N'')'
168 texte(1,5) = '(62(''=''),/)'
172 >''' C O N V E R S I O N S B E F O R E A D A P T A T I O N'')'
173 texte(2,5) = '(64(''=''),/)'
179 if ( codret.eq.0 ) then
181 call utcvne ( nretap, nrsset, saux, iaux, codret )
183 write (ulsort,texte(langue,4)) saux
184 write (ulsort,texte(langue,5))
187 imem(adetco+1) = nrsset
191 c 1.7. ==> les options reelles
193 call gmadoj ( nndoad//'.OptRee', adoptr, lgoptr, codret )
194 if ( codret.ne.0 ) then
198 c 1.8. ==> les noms d'objets a conserver
200 if ( codret.eq.0 ) then
201 call gmadoj ( nndoad//'.OptCar', adopts, lgopts, codret )
202 if ( codret.ne.0 ) then
207 c 1.9. ==> la date courante
209 call utdhlg ( ladate, langue )
212 c 2. conversion du maillage
214 #ifdef _DEBUG_HOMARD_
215 write (ulsort,90002) '2. conversion ; codret', codret
218 if ( codret.eq.0 ) then
220 imem(adetco+3) = imem(adetco+3) + 1
222 nrssse = imem(adetco+3)
225 c 2.1. ==> prealable pour le suivi de frontiere
226 #ifdef _DEBUG_HOMARD_
227 write (ulsort,90002) '2.2. prealable frontiere ; codret', codret
230 if ( ( ( mod(imem(adopti+28),2).eq.0 ) .and.
231 > ( imem(adopti+28).lt.0 ) ) .or.
232 > ( ( mod(imem(adopti+28),5).eq.0 ) .and.
233 > ( imem(adopti+9).eq.0 ) ) ) then
235 if ( codret.eq.0 ) then
237 #ifdef _DEBUG_HOMARD_
238 write (ulsort,texte(langue,3)) 'SFDEFG', nompro
241 call sfdefg ( imem(adopti+28),
242 > smem(adopts), smem(adopts+15), smem(adopts+16),
243 > ulsort, langue, codret)
249 if ( imem(adopti+20).eq.1 ) then
251 c 2.2. ==> prealable pour le cas saturne/neptune 2D
252 #ifdef _DEBUG_HOMARD_
253 write (ulsort,90002) '2.2. prealable sat/nep ; codret', codret
256 if ( imem(adopti+10).eq.26 .or.
257 > imem(adopti+10).eq.46 ) then
259 if ( codret.eq.0 ) then
261 #ifdef _DEBUG_HOMARD_
262 write (ulsort,texte(langue,3)) 'VCMS2D', nompro
265 call vcms2d ( lgopti, imem(adopti), lgopts, smem(adopts),
266 > lgetco, imem(adetco),
267 > ulsort, langue, codret )
273 c 2.3. ==> conversion vraie
274 #ifdef _DEBUG_HOMARD_
275 write (ulsort,90002) '2.3. conversion ; codret', codret
278 if ( codret.eq.0 ) then
280 #ifdef _DEBUG_HOMARD_
281 write (ulsort,texte(langue,3)) 'VCMAIL', nompro
283 call vcmail ( lgopti, imem(adopti), lgopts, smem(adopts),
284 > lgetco, imem(adetco),
285 > ulsort, langue, codret )
294 c 3. Le cas extrude, non saturne, non neptune
296 #ifdef _DEBUG_HOMARD_
297 write (ulsort,90002) '3. cas extrude ; codret', codret
300 if ( imem(adopti+38).ne.0 .and.
301 > imem(adopti+10).ne.26 .and.
302 > imem(adopti+10).ne.46 ) then
304 c 3.1. ==> Conversion complete
306 if ( imem(adopti+20).eq.1 ) then
308 if ( codret.eq.0 ) then
310 #ifdef _DEBUG_HOMARD_
311 write (ulsort,texte(langue,3)) 'VCMEXT', nompro
314 call vcmext ( lgopti, imem(adopti), lgopts, smem(adopts),
315 > lgetco, imem(adetco),
316 > ulsort, langue, codret )
320 c 3.2. ==> Conversion partielle
324 if ( codret.eq.0 ) then
326 #ifdef _DEBUG_HOMARD_
327 write (ulsort,texte(langue,3)) 'VCMEXA', nompro
330 call vcmexa ( lgopti, imem(adopti), lgopts, smem(adopts),
331 > lgetco, imem(adetco),
332 > ulsort, langue, codret )
341 c 4. s'il y a conversion de solution, on cree une structure de
342 c memorisation du maillage n
345 if ( imem(adopti+20).eq.1.and. imem(adopti+27).eq.1 ) then
347 if ( codret.eq.0 ) then
349 nohman = smem(adopts+2)
351 #ifdef _DEBUG_HOMARD_
352 write (ulsort,texte(langue,3)) 'UTSVMN', nompro
354 call utsvmn ( nohman, nosvmn,
355 > ulsort, langue, codret )
359 if ( codret.eq.0 ) then
361 smem(adopts+13) = nosvmn
368 c 5. Informations sur le maillage
370 #ifdef _DEBUG_HOMARD_
371 write (ulsort,90002) '5. Informations ; codret', codret
373 c 5.1. ==> analyse du maillage
374 #ifdef _DEBUG_HOMARD_
375 write (ulsort,90002) '5.1. analyse ; codret', codret
378 if ( imem(adopti+20).eq.1 ) then
380 if ( codret.eq.0 ) then
382 commen(1) = 'Maillage converti au format HOMARD '
383 commen(2) = 'Mesh converted to the HOMARD format '
385 #ifdef _DEBUG_HOMARD_
386 call utbica ( commen(langue),
387 > ulsort, langue, codret )
396 commen(1) = 'Maillage lu au format HOMARD '
397 commen(2) = 'Mesh read with HOMARD format '
401 c 5.2. ==> Nom du maillage au format HOMARD
402 #ifdef _DEBUG_HOMARD_
403 write (ulsort,90002) '5.2. nom du maillage ; codret', codret
406 if ( codret.eq.0 ) then
410 call utosno ( typobs, nohman, iaux, ulsort, langue, codret )
415 c 6. Prise en compte eventuelle du suivi de frontiere
418 #ifdef _DEBUG_HOMARD_
419 write (ulsort,90002) '6. frontiere ; codret', codret
422 if ( codret.eq.0 ) then
424 imem(adetco+3) = imem(adetco+3) + 1
425 nrssse = imem(adetco+3)
427 if ( mod(imem(adopti+28),2).eq.0 .or.
428 > mod(imem(adopti+28),3).eq.0 .or.
429 > mod(imem(adopti+28),5).eq.0 ) then
433 #ifdef _DEBUG_HOMARD_
434 write (ulsort,texte(langue,3)) 'SFCOIN', nompro
436 call sfcoin ( nohman,
437 > lgopti, imem(adopti), lgopts, smem(adopts),
438 > lgetco, imem(adetco),
439 > ulsort, langue, codret )
448 c 7. analyse du maillage
451 #ifdef _DEBUG_HOMARD_
452 write (ulsort,90002) '7. analyse du maillage ; codret', codret
455 if ( codret.eq.0 ) then
457 imem(adetco+3) = imem(adetco+3) + 1
458 nrssse = imem(adetco+3)
462 if ( codret.eq.0 ) then
464 action = smem(adopts+29)
465 if ( action.eq.'homa ' ) then
468 #ifdef _DEBUG_HOMARD_
469 write (ulsort,texte(langue,3)) 'UTBILM', nompro
471 call utbilm ( nohman, commen(langue), imem(adopti+2), action,
472 > lgetco, imem(adetco),
473 > ulsort, langue, codret )
481 c 8. Filtrages de l'adaptation
484 #ifdef _DEBUG_HOMARD_
485 write (ulsort,90002) '8. filtrage ; codret', codret
488 if ( codret.eq.0 ) then
490 imem(adetco+3) = imem(adetco+3) + 1
492 if ( imem(adopti+18).gt.0 .or.
493 > rmem(adoptr+2).gt.0.d0 ) then
495 #ifdef _DEBUG_HOMARD_
496 write (ulsort,texte(langue,3)) 'VCFIAD', nompro
498 call vcfiad ( lgopti, imem(adopti), lgoptr, rmem(adoptr),
499 > lgopts, smem(adopts),
500 > lgetco, imem(adetco),
501 > ulsort, langue, codret )
508 c 9. conversion eventuelle de l'indicateur d'erreur
511 #ifdef _DEBUG_HOMARD_
512 write (ulsort,90002) '9. indicateur erreur ; codret', codret
515 if ( imem(adopti+26).eq.1 ) then
519 if ( codret.eq.0 ) then
521 imem(adetco+3) = imem(adetco+3) + 1
523 #ifdef _DEBUG_HOMARD_
524 write (ulsort,texte(langue,3)) 'HOAVLI', nompro
526 call hoavli ( lgopti, imem(adopti), lgoptr, rmem(adoptr),
527 > lgopts, smem(adopts),
528 > lgetco, imem(adetco),
529 > ulsort, langue, codret )
533 c 9.2. ==> prealable pour le cas extrude
535 if ( codret.eq.0 ) then
537 if ( imem(adopti+38).ne.0 ) then
539 #ifdef _DEBUG_HOMARD_
540 write (ulsort,texte(langue,3)) 'UTSEXT', nompro
543 call utsext ( smem(adopts+6), iaux, imem(adopti+10),
544 > lgetco, imem(adetco),
545 > ulsort, langue, codret )
551 c 9.3. ==> conversion vraie
553 if ( codret.eq.0 ) then
555 imem(adetco+3) = imem(adetco+3) + 1
557 nrssse = imem(adetco+3)
560 #ifdef _DEBUG_HOMARD_
561 write (ulsort,texte(langue,3)) 'VCINDI', nompro
563 call vcindi ( lgopti, imem(adopti), lgopts, smem(adopts),
564 > lgetco, imem(adetco),
565 > ulsort, langue, codret )
568 #ifdef _DEBUG_HOMARD_
569 call gmprsx (nompro,smem(adopts+7))
570 cgn call gmprsx (nompro,smem(adopts+7)//'.Quadr')
571 cgn call gmprsx (nompro,smem(adopts+7)//'.Quadr.Support')
572 cgn call gmprsx (nompro,smem(adopts+7)//'.Quadr.ValeursR')
580 c 10. menage des structures liees au calcul
583 #ifdef _DEBUG_HOMARD_
584 write (ulsort,90002) '10. menage ; codret', codret
587 if ( imem(adopti+20).eq.1 ) then
589 if ( codret.eq.0 ) then
591 #ifdef _DEBUG_HOMARD_
592 write (ulsort,texte(langue,3)) 'GMSGOJ', nompro
594 nocman = smem(adopts)
595 call gmsgoj ( nocman, codret )
605 #ifdef _DEBUG_HOMARD_
606 write (ulsort,90002) '11. la fin ; codret', codret
609 c 11.1. ==> message si erreur
611 if ( codret.ne.0 ) then
615 write (ulsort,texte(langue,1)) 'Sortie', nompro
616 write (ulsort,texte(langue,2)) codret
620 c 11.2. ==> fin des mesures de temps de la section
624 #ifdef _DEBUG_HOMARD_
625 write (ulsort,texte(langue,1)) 'Sortie', nompro
629 c=======================================================================
631 c=======================================================================