]> SALOME platform Git repositories - modules/homard.git/blob - src/tool/Utilitaire/utalso.F
Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utalso.F
1       subroutine utalso ( nocsol,
2      >                    nbcham, nbpafo, nbprof, nblopg,
3      >                    adinch, adinpf, adinpr, adinlg,
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 d'une SOlution
26 c    --           --               --
27 c ______________________________________________________________________
28 c .        .     .        .                                            .
29 c .  nom   . e/s . taille .           description                      .
30 c .____________________________________________________________________.
31 c . nocsol .   s . char8  . nom de l'objet solution                    .
32 c . nbcham . e   .   1    . nombre de champs associes                  .
33 c . nbpafo . e   .   1    . nombre d'inf. sur les paquets de fonctions .
34 c . nbprof . e   .   1    . nombre de profils associes                 .
35 c . nblopg . e   .   1    . nombre de localisations de points de Gauss .
36 c . adinch .   s .   1    . adresse de l'information sur les champs    .
37 c . adinpf .   s .   1    . adresse de l'inf. sur paquets de fonctions .
38 c . adinpr .   s .   1    . adresse de l'information sur les profils   .
39 c . adinlg .   s .   1    . adresse de l'information sur les           .
40 c .        .     .        . localisations de points de Gauss           .
41 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
42 c . langue . e   .    1   . langue des messages                        .
43 c .        .     .        . 1 : francais, 2 : anglais                  .
44 c . codret . es  .    1   . code de retour des modules                 .
45 c .        .     .        . 0 : pas de probleme                        .
46 c .        .     .        . 1 : probleme                               .
47 c ______________________________________________________________________
48 c
49 c====
50 c 0. declarations et dimensionnement
51 c====
52 c
53 c 0.1. ==> generalites
54 c
55       implicit none
56       save
57 c
58       character*6 nompro
59       parameter ( nompro = 'UTALSO' )
60 c
61 #include "nblang.h"
62 c
63 c 0.2. ==> communs
64 c
65 #include "envex1.h"
66 c
67 c 0.3. ==> arguments
68 c
69       character*8 nocsol
70 c
71       integer nbcham, nbpafo, nbprof, nblopg
72       integer adinch, adinpf, adinpr, adinlg
73 c
74       integer ulsort, langue, codret
75 c
76 c 0.4. ==> variables locales
77 c
78       integer iaux
79       integer codre1, codre2, codre3, codre4
80       integer codre0
81 c
82       character*08 saux08
83 c
84       integer nbmess
85       parameter ( nbmess = 10 )
86       character*80 texte(nblang,nbmess)
87 c
88 c 0.5. ==> initialisations
89 c ______________________________________________________________________
90 c
91 c====
92 c 1. initialisations
93 c====
94 c
95 c 1.1. ==> messages
96 c
97 #include "impr01.h"
98 c
99 #ifdef _DEBUG_HOMARD_
100       write (ulsort,texte(langue,1)) 'Entree', nompro
101       call dmflsh (iaux)
102 #endif
103 c
104       texte(1,4) = '(''Erreur en allouant '',a)'
105 c
106       texte(2,4) = '(''Error while allocating '',a)'
107 c
108       codret = 0
109 c
110 c====
111 c 2. structure generale
112 c====
113 c
114       if ( codret.eq.0 ) then
115 c
116       call gmalot ( nocsol, 'Solution', 0, iaux, codret )
117 c
118       if ( codret.ne.0 ) then
119         saux08 = 'Solution'
120       endif
121 c
122       endif
123 c
124 c====
125 c 3. les attributs
126 c====
127 c
128       if ( codret.eq.0 ) then
129 c
130       call gmecat ( nocsol, 1, nbcham, codre1 )
131       call gmecat ( nocsol, 2, nbpafo, codre2 )
132       call gmecat ( nocsol, 3, nbprof, codre3 )
133       call gmecat ( nocsol, 4, nblopg, codre4 )
134 c
135       codre0 = min ( codre1, codre2, codre3, codre4 )
136       codret = max ( abs(codre0), codret,
137      >               codre1, codre2, codre3, codre4 )
138 c
139       if ( codret.ne.0 ) then
140         saux08 = 'Attribut'
141       endif
142 c
143       endif
144 c
145 c====
146 c 4. les eventuelles branches
147 c====
148 c
149 c 4.1. ==> l'information sur les champs
150 c
151       if ( codret.eq.0 ) then
152 c
153       if ( nbcham.ne.0 ) then
154         call gmaloj ( nocsol//'.InfoCham', ' ', nbcham, adinch, codret )
155         if ( codret.ne.0 ) then
156           saux08 = 'InfoCham'
157         endif
158       endif
159 c
160       endif
161 c
162 c 4.2. ==> l'information sur les paquets de fonctions
163 c
164       if ( codret.eq.0 ) then
165 c
166       if ( nbpafo.ne.0 ) then
167         call gmaloj ( nocsol//'.InfoPaFo', ' ', nbpafo, adinpf, codret )
168         if ( codret.ne.0 ) then
169           saux08 = 'InfoPaFo'
170         endif
171       endif
172 c
173       endif
174 c
175 c 4.3. ==> l'information sur les profils
176 c
177       if ( codret.eq.0 ) then
178 c
179       if ( nbprof.ne.0 ) then
180         call gmaloj ( nocsol//'.InfoProf', ' ', nbprof, adinpr, codret )
181         if ( codret.ne.0 ) then
182           saux08 = 'InfoProf'
183         endif
184       endif
185 c
186       endif
187 c
188 c 4.4. ==> les localisations de points de Gauss
189 c
190       if ( codret.eq.0 ) then
191 c
192       if ( nblopg.ne.0 ) then
193         call gmaloj ( nocsol//'.InfoLoPG', ' ', nblopg, adinlg, codret )
194         if ( codret.ne.0 ) then
195           saux08 = 'InfoLoPG'
196         endif
197       endif
198 c
199       endif
200 c
201 c====
202 c 5. la fin
203 c====
204 c
205 #ifdef _DEBUG_HOMARD_
206       call gmprsx (nompro, nocsol )
207       call gmprsx (nompro, nocsol//'.InfoCham' )
208       call gmprsx (nompro, nocsol//'.InfoPaFo' )
209       call gmprsx (nompro, nocsol//'.InfoProf' )
210       call gmprsx (nompro, nocsol//'.InfoLoPG' )
211 #endif
212 c
213       if ( codret.ne.0 ) then
214 c
215 #include "envex2.h"
216 c
217       write (ulsort,texte(langue,1)) 'Sortie', nompro
218       write (ulsort,texte(langue,2)) codret
219       write (ulsort,texte(langue,4)) saux08
220 c
221       endif
222 c
223 #ifdef _DEBUG_HOMARD_
224       write (ulsort,texte(langue,1)) 'Sortie', nompro
225       call dmflsh (iaux)
226 #endif
227 c
228       end