Salome HOME
Homard executable
[modules/homard.git] / src / tool / ES_HOMARD / esemh2.F
1       subroutine esemh2 ( idfmed, nomamd,
2      >                    nhnoeu, nhmapo, nharet, nhtria, nhquad,
3      >                    nhtetr, nhhexa, nhpyra, nhpent,
4      >                    nhsups,
5      >                    ltbiau, tbiaux, ltbsau, tbsaux,
6      >                    ulsort, langue, codret)
7 c
8 c ______________________________________________________________________
9 c
10 c                             H O M A R D
11 c
12 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
13 c
14 c Version originale enregistree le 18 juin 1996 sous le numero 96036
15 c aupres des huissiers de justice Simart et Lavoir a Clamart
16 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
17 c aupres des huissiers de justice
18 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
19 c
20 c    HOMARD est une marque deposee d'Electricite de France
21 c
22 c Copyright EDF 1996
23 c Copyright EDF 1998
24 c Copyright EDF 2002
25 c Copyright EDF 2020
26 c ______________________________________________________________________
27 c
28 c  Entree-Sortie : Ecriture du Maillage Homard - 2
29 c  -      -        -           -        -        -
30 c ______________________________________________________________________
31 c .  nom   . e/s . taille .           description                      .
32 c .____________________________________________________________________.
33 c . idfmed . e   .   1    . identificateur du fichier MED              .
34 c . nomamd . e   .char64  . nom du maillage MED voulu                  .
35 c . nhsups . e   . char*8 . informations supplementaires caracteres 8  .
36 c . ltbiau . e   .    1   . longueur allouee a tbiaux                  .
37 c . tbiaux .     .    *   . tableau tampon entier                      .
38 c . ltbsau . e   .    1   . longueur allouee a tbsaux                  .
39 c . tbsaux .     .    *   . tableau tampon caracteres                  .
40 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
41 c . langue . e   .    1   . langue des messages                        .
42 c .        .     .        . 1 : francais, 2 : anglais                  .
43 c . codret . es  .    1   . code de retour des modules                 .
44 c .        .     .        . 0 : pas de 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 = 'ESEMH2' )
58 c
59 #include "nblang.h"
60 #include "consts.h"
61 c
62 c 0.2. ==> communs
63 c
64 #include "envex1.h"
65 #include "envca2.h"
66 c
67 c 0.3. ==> arguments
68 c
69       integer*8 idfmed
70       integer ltbiau, tbiaux(ltbiau)
71       integer ltbsau
72 c
73       character*8 tbsaux(*)
74       character*8 nhnoeu, nhmapo, nharet, nhtria, nhquad
75       character*8 nhtetr, nhhexa, nhpyra, nhpent
76       character*8 nhsups
77 c
78       character*64 nomamd
79 c
80       integer ulsort, langue, codret
81 c
82 c 0.4. ==> variables locales
83 c
84 #include "meddc0.h"
85 c
86       integer iaux
87       integer ngro, numfam
88 c
89       character*64 saux64
90       character*80 saux80(2)
91 c
92       integer nbmess
93       parameter ( nbmess = 150 )
94       character*80 texte(nblang,nbmess)
95 c ______________________________________________________________________
96 c
97 c====
98 c 1. initialisations
99 c====
100 c 1.1. ==> messages
101 c
102 #include "impr01.h"
103 c
104 #ifdef _DEBUG_HOMARD_
105       write (ulsort,texte(langue,1)) 'Entree', nompro
106       call dmflsh (iaux)
107 #endif
108 c
109       texte(1,4) = '(''. Ecriture des familles'')'
110 c
111       texte(2,4) = '(''. Writings of families'')'
112 c
113 #ifdef _DEBUG_HOMARD_
114       write (ulsort,texte(langue,4))
115 #endif
116 c
117 #include "esimpr.h"
118 c
119 c====
120 c 2. La famille nulle
121 c====
122 #ifdef _DEBUG_HOMARD_
123       write (ulsort,*) '2. famille nulle ; codret = ', codret
124 #endif
125 c
126       if ( codret.eq.0) then
127 c
128 #ifdef _DEBUG_HOMARD_
129       write (ulsort,*) '. La famille nulle'
130 #endif
131       saux64 = blan64
132 c                     1234567890123
133       saux64(1:13) = 'famille_nulle'
134       numfam = 0
135       ngro = 0
136 c
137 #ifdef _DEBUG_HOMARD_
138       write (ulsort,texte(langue,3)) 'MFACRE', nompro
139 #endif
140       call mfacre ( idfmed, nomamd, saux64, numfam,
141      >              ngro, saux80, codret )
142 c
143       if ( codret.ne.0 ) then
144         write(ulsort,texte(langue,78)) 'mfacre', codret
145       endif
146 c
147       endif
148 c
149 c====
150 c 3. Les familles des entites
151 c====
152 #ifdef _DEBUG_HOMARD_
153       write (ulsort,*) '3. entites ; codret = ', codret
154 #endif
155 c
156       if ( codret.eq.0 ) then
157 c
158 #ifdef _DEBUG_HOMARD_
159       write (ulsort,texte(langue,3)) 'ESECFE', nompro
160 #endif
161       call esecfe ( idfmed, nomamd,
162      >              nhnoeu, nhmapo, nharet, nhtria, nhquad,
163      >              nhtetr, nhhexa, nhpyra, nhpent,
164      >              numfam,
165      >              tbiaux,
166      >              ulsort, langue, codret )
167 c
168       endif
169 c
170 c====
171 c 4. La famille de la date et du titre
172 c====
173 #ifdef _DEBUG_HOMARD_
174       write (ulsort,*) '4. date et titre ; codret = ', codret
175 #endif
176 c
177       if ( codret.eq.0 ) then
178 c
179 #ifdef _DEBUG_HOMARD_
180       write (ulsort,*) '. La famille de la date et du titre'
181 #endif
182       saux64 = blan64
183 c                     1234567890123
184       saux64(1:13) = 'date_et_titre'
185       numfam = numfam - 1
186       ngro = 2
187 c                          90123456789012345678901234567890
188       saux80(1) = ladate//'                                '
189       saux80(2) = titre
190 c
191 #ifdef _DEBUG_HOMARD_
192       write (ulsort,texte(langue,3)) 'MFACRE', nompro
193 #endif
194       call mfacre ( idfmed, nomamd, saux64, numfam,
195      >              ngro, saux80, codret )
196 c
197       if ( codret.ne.0 ) then
198         write(ulsort,texte(langue,78)) 'mfacre', codret
199       endif
200 c
201       endif
202 c
203 c====
204 c 5. Les familles des informations complementaires
205 c====
206 #ifdef _DEBUG_HOMARD_
207       write (ulsort,*) '5. Info supp ; codret = ', codret
208 #endif
209 c
210       if ( codret.eq.0 ) then
211 c
212 #ifdef _DEBUG_HOMARD_
213       write (ulsort,*) '. Familles des informations complementaires'
214 #endif
215 c
216 #ifdef _DEBUG_HOMARD_
217       write (ulsort,texte(langue,3)) 'ESECFS', nompro
218 #endif
219       call esecfs ( idfmed, nomamd,
220      >              nhsups,
221      >              numfam,
222      >              ltbsau, tbsaux,
223      >              ulsort, langue, codret)
224 c
225       endif
226 c
227 c====
228 c 6. la fin
229 c====
230 c
231       if ( codret.ne.0 ) then
232 c
233 #include "envex2.h"
234 c
235       write (ulsort,texte(langue,1)) 'Sortie', nompro
236       write (ulsort,texte(langue,2)) codret
237 c
238       endif
239 c
240 #ifdef _DEBUG_HOMARD_
241       write (ulsort,texte(langue,1)) 'Sortie', nompro
242       call dmflsh (iaux)
243 #endif
244 c
245       end