Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utalpg.F
1       subroutine utalpg ( oblopg,
2      >                    nolopg, typgeo, ngauss, dimcpg,
3      >                    adcono, adcopg, adpopg,
4      >                    ulsort, langue, codret )
5 c ______________________________________________________________________
6 c
7 c                             H O M A R D
8 c
9 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
10 c
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
16 c
17 c    HOMARD est une marque deposee d'Electricite de France
18 c
19 c Copyright EDF 1996
20 c Copyright EDF 1998
21 c Copyright EDF 2002
22 c Copyright EDF 2020
23 c ______________________________________________________________________
24 c
25 c    UTilitaire - ALlocation de la localisation des Points de Gauss
26 c    --           --                                -         -
27 c ______________________________________________________________________
28 c .        .     .        .                                            .
29 c .  nom   . e/s . taille .           description                      .
30 c .____________________________________________________________________.
31 c . oblopg .   s . char8  . nom de l'objet points de Gauss             .
32 c . nolopg . e   . char64 . nom de la localisation des Points de Gauss .
33 c . typgeo . e   .   1    . type geometrique au sens MED               .
34 c . ngauss . e   .   1    . nombre de points de Gauss                  .
35 c . dimcpg . e   .   1    . dimension des coordonnees des pts de Gauss .
36 c . adcono .   s .   1    . adresse des coordonnees des noeuds         .
37 c . adcopg .   s .   1    . adresse des coordonnees des points de Gauss.
38 c . adpopg .   s .   1    . adresse des poids des points de Gauss      .
39 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
40 c . langue . e   .    1   . langue des messages                        .
41 c .        .     .        . 1 : francais, 2 : anglais                  .
42 c . codret . es  .    1   . code de retour des modules                 .
43 c .        .     .        . 0 : pas de probleme                        .
44 c .        .     .        . 1 : probleme                               .
45 c ______________________________________________________________________
46 c
47 c====
48 c 0. declarations et dimensionnement
49 c====
50 c
51 c 0.1. ==> generalites
52 c
53       implicit none
54       save
55 c
56       character*6 nompro
57       parameter ( nompro = 'UTALPG' )
58 c
59 #include "nblang.h"
60 c
61 c 0.2. ==> communs
62 c
63 #include "envex1.h"
64 c
65 #include "gmstri.h"
66 c
67 c 0.3. ==> arguments
68 c
69       character*8 oblopg
70       character*64 nolopg
71 c
72       integer typgeo, ngauss, dimcpg
73       integer adcono, adcopg, adpopg
74 c
75       integer ulsort, langue, codret
76 c
77 c 0.4. ==> variables locales
78 c
79       integer iaux
80       integer codre1, codre2, codre3, codre4
81       integer codre0
82       integer lgnoml, adnoml
83       integer nbnoeu
84 c
85       integer nbmess
86       parameter ( nbmess = 10 )
87       character*80 texte(nblang,nbmess)
88 c
89 c 0.5. ==> initialisations
90 c ______________________________________________________________________
91 c
92 c====
93 c 1. initialisations
94 c====
95 c
96 c 1.1. ==> messages
97 c
98 #include "impr01.h"
99 c
100 #ifdef _DEBUG_HOMARD_
101       write (ulsort,texte(langue,1)) 'Entree', nompro
102       call dmflsh (iaux)
103 #endif
104 c
105       texte(1,4) = '(''Nom de la localisation : '',a)'
106 c
107       texte(2,4) = '(''Name of the localization : '',a)'
108 c
109 #ifdef _DEBUG_HOMARD_
110       write (ulsort,texte(langue,4)) nolopg
111 #endif
112 c
113 c====
114 c 2. les caracteristiques de cette localisation
115 c====
116 c
117       if ( codret.eq.0 ) then
118 c
119       call utlgut ( lgnoml, nolopg,
120      >              ulsort, langue, codret )
121 c
122       endif
123 c
124       nbnoeu = mod(typgeo,100)
125 C
126 c====
127 c 3. creation de la localisation des points de Gauss
128 c====
129 c
130 c 3.1. ==> structure generale
131 c
132       if ( codret.eq.0 ) then
133 c
134       call gmalot ( oblopg, 'LocaPG', 0, iaux, codret )
135 c
136       endif
137 c
138 c 3.2. ==> les attributs
139 c
140       if ( codret.eq.0 ) then
141 c
142       call gmecat ( oblopg, 1, lgnoml, codre1 )
143       call gmecat ( oblopg, 2, typgeo, codre2 )
144       call gmecat ( oblopg, 3, ngauss, codre3 )
145       call gmecat ( oblopg, 4, dimcpg, codre4 )
146 c
147       codre0 = min ( codre1, codre2, codre3, codre4 )
148       codret = max ( abs(codre0), codret,
149      >               codre1, codre2, codre3, codre4 )
150 c
151       endif
152 c
153       if ( codret.eq.0 ) then
154 c
155       if ( mod(lgnoml,8).eq.0 ) then
156         iaux = lgnoml/8
157       else
158         iaux = (lgnoml-mod(lgnoml,8))/8 + 1
159       endif
160       call gmaloj ( oblopg//'.NomLocPG', ' ', iaux, adnoml, codre1 )
161       iaux = nbnoeu*dimcpg
162       call gmaloj ( oblopg//'.CoorNoeu', ' ', iaux, adcono, codre2 )
163       iaux = ngauss*dimcpg
164       call gmaloj ( oblopg//'.CoorPtGa', ' ', iaux, adcopg, codre3 )
165       call gmaloj ( oblopg//'.PoidPtGa', ' ', ngauss, adpopg, codre4 )
166 c
167       codre0 = min ( codre1, codre2, codre3, codre4 )
168       codret = max ( abs(codre0), codret,
169      >               codre1, codre2, codre3, codre4 )
170 c
171       endif
172 c
173 c 3.3. ==> memorisation du nom
174 c
175       if ( codret.eq.0 ) then
176 c
177       call utchs8 ( nolopg, lgnoml, smem(adnoml),
178      >              ulsort, langue, codret )
179 c
180       endif
181 c
182 c
183 #ifdef _DEBUG_HOMARD_
184       call gmprsx (nompro, oblopg )
185       call gmprsx (nompro, oblopg//'.NomLocPG' )
186 #endif
187 c
188 c====
189 c 4. la fin
190 c====
191 c
192       if ( codret.ne.0 ) then
193 c
194 #include "envex2.h"
195 c
196       write (ulsort,texte(langue,1)) 'Sortie', nompro
197       write (ulsort,texte(langue,2)) codret
198 c
199       endif
200 c
201 #ifdef _DEBUG_HOMARD_
202       write (ulsort,texte(langue,1)) 'Sortie', nompro
203       call dmflsh (iaux)
204 #endif
205 c
206       end