Salome HOME
Homard executable
[modules/homard.git] / src / tool / ES_HOMARD / esle03.F
1       subroutine esle03 ( idfmed,
2      >                    nbnoto, sdim, coonoe, dimcst,
3      >                    coocst,
4      >                    ulsort, langue, codret)
5 c
6 c ______________________________________________________________________
7 c
8 c                             H O M A R D
9 c
10 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
11 c
12 c Version originale enregistree le 18 juin 1996 sous le numero 96036
13 c aupres des huissiers de justice Simart et Lavoir a Clamart
14 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
15 c aupres des huissiers de justice
16 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
17 c
18 c    HOMARD est une marque deposee d'Electricite de France
19 c
20 c Copyright EDF 1996
21 c Copyright EDF 1998
22 c Copyright EDF 2002
23 c Copyright EDF 2020
24 c ______________________________________________________________________
25 c
26 c  Entree-Sortie : LEcture - 03
27 c  -      -        --        --
28 c ______________________________________________________________________
29 c .  nom   . e/s . taille .           description                      .
30 c .____________________________________________________________________.
31 c . idfmed . e   .   1    . identificateur du fichier MED              .
32 c . nbnoto . e   .   1    . nombre total de noeuds                     .
33 c . sdim   . e   .   1    . dimension du maillage HOMARD               .
34 c . coonoe . e   . nbnoto . coordonnees des noeuds                     .
35 c .        .     . * sdim .                                            .
36 c . dimcst . e   .    1   . dimension de la coordonnee constante       .
37 c .        .     .        . eventuelle, 0 si toutes varient            .
38 c . coocst .  s  .   11   . 1 : coordonnee constante eventuelle        .
39 c .        .     .        . 2, 3, 4 : xmin, ymin, zmin                 .
40 c .        .     .        . 5, 6, 7 : xmax, ymax, zmax                 .
41 c .        .     .        . 8, 9, 10 : -1 si constant, max-min sinon   .
42 c .        .     .        . 11 : max des (max-min)                     .
43 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
44 c . langue . e   .    1   . langue des messages                        .
45 c .        .     .        . 1 : francais, 2 : anglais                  .
46 c . codret . es  .    1   . code de retour des modules                 .
47 c .        .     .        . 0 : pas de probleme                        .
48 c ______________________________________________________________________
49 c
50 c====
51 c 0. declarations et dimensionnement
52 c====
53 c
54 c 0.1. ==> generalites
55 c
56       implicit none
57       save
58 c
59       character*6 nompro
60       parameter ( nompro = 'ESLE03' )
61 c
62 #include "nblang.h"
63 #include "consts.h"
64 c
65 c 0.2. ==> communs
66 c
67 #include "envex1.h"
68 c
69 c 0.3. ==> arguments
70 c
71       integer*8 idfmed
72       integer nbnoto, sdim, dimcst
73 c
74       double precision coonoe(nbnoto,sdim)
75       double precision coocst(11)
76 c
77       integer ulsort, langue, codret
78 c
79 c 0.4. ==> variables locales
80 c
81 #include "meddc0.h"
82 c
83       integer iaux
84       integer numdt, numit
85 c
86       double precision daux
87 c
88       character*64 novals
89 c
90       integer nbmess
91       parameter ( nbmess = 150 )
92       character*80 texte(nblang,nbmess)
93 c ______________________________________________________________________
94 c
95 c====
96 c 1. initialisation
97 c====
98 c
99 #include "impr01.h"
100 c
101 #ifdef _DEBUG_HOMARD_
102       write (ulsort,texte(langue,1)) 'Entree', nompro
103       call dmflsh (iaux)
104 #endif
105 c
106       texte(1,5) = '(''... Coordonnes extremes'')'
107       texte(1,4) =
108      > '(''Direction '',a1,'' : mini = '',g12.5,'' maxi = '',g12.5)'
109 c
110       texte(2,5) = '(''... Extreme coordinates'')'
111       texte(2,4) =
112      > '(a1,''direction '','' : mini = '',g12.5,'' maxi = '',g12.5)'
113 c
114 #ifdef _DEBUG_HOMARD_
115       write (ulsort,texte(langue,5))
116 #endif
117 c
118 #include "esimpr.h"
119 c
120 c====
121 c 2. Si une des coordonnees est constante, lecture de la valeur
122 c    sous forme de valeur scalaire
123 c====
124 c
125       if ( dimcst.gt.0 ) then
126 c
127         novals = blan64
128 c                       1234567890123
129         novals(1:13) = 'Dim_Constante'
130 c
131         numdt = ednodt
132         numit = ednoit
133 c
134 #ifdef _DEBUG_HOMARD_
135         write (ulsort,texte(langue,3)) 'MPRRVR', nompro
136 #endif
137         call mprrvr ( idfmed, novals, numdt, numit,
138      >                daux, codret )
139 c
140         if ( codret.eq.0 ) then
141         coocst(1) = daux
142         endif
143 c
144       endif
145 c
146 c====
147 c 3. Les extrema
148 c====
149 c 3.1. ==> La fonction de calcul
150 c
151       if ( codret.eq.0 ) then
152 c
153 #ifdef _DEBUG_HOMARD_
154       write (ulsort,texte(langue,3)) 'UTMMCO', nompro
155 #endif
156       call utmmco ( coocst(2), coocst(5), coocst(8),
157      >              nbnoto, sdim, coonoe,
158      >              ulsort, langue, codret )
159 c
160       endif
161 c
162 c 3.2. ==> Un rangement different si la coordonnee X ou Y est constante
163 c
164       if ( codret.eq.0 ) then
165 c
166       if ( dimcst.eq.1 ) then
167 c
168 c 3.2.1. ==> x est constant : il faut decaler y en z et x en y,
169 c                             puis affecter la constante a x
170 c
171         coocst(10) = coocst(9)
172         coocst(9) = coocst(8)
173         coocst(7) = coocst(6)
174         coocst(6) = coocst(5)
175         coocst(4) = coocst(3)
176         coocst(3) = coocst(2)
177         coocst(8) = -1.d0
178         coocst(5) = coocst(1)
179         coocst(2) = coocst(1)
180 c
181       elseif ( dimcst.eq.2 ) then
182 c
183 c 3.2.2. ==> y est constant : il faut decaler y en z,
184 c                             puis affecter la constante a y
185 c
186         coocst(10) = coocst(9)
187         coocst(7) = coocst(6)
188         coocst(4) = coocst(3)
189         coocst(9) = -1.d0
190         coocst(6) = coocst(1)
191         coocst(3) = coocst(1)
192 c
193       endif
194 c
195 #ifdef _DEBUG_HOMARD_
196       if ( codret.eq.0 ) then
197       write (ulsort,texte(langue,4)) 'x', coocst(2), coocst(5)
198       write (ulsort,texte(langue,4)) 'y', coocst(3), coocst(6)
199       write (ulsort,texte(langue,4)) 'z', coocst(4), coocst(7)
200       endif
201 #endif
202 c
203       endif
204 c
205 c====
206 c 4. la fin
207 c====
208 c
209       if ( codret.ne.0 ) then
210 c
211 #include "envex2.h"
212 c
213       write (ulsort,texte(langue,1)) 'Sortie', nompro
214       write (ulsort,texte(langue,2)) codret
215 c
216       endif
217 c
218 #ifdef _DEBUG_HOMARD_
219       write (ulsort,texte(langue,1)) 'Sortie', nompro
220       call dmflsh (iaux)
221 #endif
222 c
223       end