1
!-------------------------------------------------------------------------------
3
! This file is part of the Code_Saturne Kernel, element of the
4
! Code_Saturne CFD tool.
6
! Copyright (C) 1998-2009 EDF S.A., France
8
! contact: saturne-support@edf.fr
10
! The Code_Saturne Kernel is free software; you can redistribute it
11
! and/or modify it under the terms of the GNU General Public License
12
! as published by the Free Software Foundation; either version 2 of
13
! the License, or (at your option) any later version.
15
! The Code_Saturne Kernel is distributed in the hope that it will be
16
! useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
! GNU General Public License for more details.
20
! You should have received a copy of the GNU General Public License
21
! along with the Code_Saturne Kernel; if not, write to the
22
! Free Software Foundation, Inc.,
23
! 51 Franklin St, Fifth Floor,
24
! Boston, MA 02110-1301 USA
26
!-------------------------------------------------------------------------------
31
( ndim , ncelet , ncel , nfac , nfabor , &
32
nprfml , nfml , nsom , lndfac , lndfbr )
34
!===============================================================================
38
! LECTURE DES DIMENSIONS DES TABLEAUX ENTITES GEOMETRIQUES
40
!-------------------------------------------------------------------------------
42
!__________________.____._____.________________________________________________.
43
! name !type!mode ! role !
44
!__________________!____!_____!________________________________________________!
45
! ndim ! e ! --> ! dimension de l'espace (=3) !
46
! ncelet ! e ! --> ! nombre d'elements halo compris !
47
! ncel ! e ! --> ! nombre d'elements actifs !
48
! nfac ! e ! --> ! nombre de faces internes !
49
! nfabor ! e ! --> ! nombre de faces de bord !
50
! nprfml ! e ! --> ! nombre de propietes des familles !
51
! ! ! ! de faces de bord !
52
! nfml ! e ! --> ! nombre de familles de faces de bord !
53
! nsom ! e ! --> ! nombre de sommets du maillage !
54
! lndfac ! e ! --> ! longueur du tableau nodfac (optionnel !
55
! lndfbr ! e ! --> ! longueur du tableau nodfbr (optionnel !
56
!__________________!____!_____!________________________________________________!
58
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
59
! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
60
! MODE : <-- donnee, --> resultat, <-> Donnee modifiee
61
! --- tableau de travail
62
!===============================================================================
66
!===============================================================================
68
!===============================================================================
73
!===============================================================================
77
integer ndim , ncelet , ncel , nfac , nfabor
78
integer nprfml , nfml , nsom , lndfac , lndfbr
82
integer iel , ifac , ifml , nn , n1 , ip
83
integer ntetra , npyram , nprism , nhexae
85
!===============================================================================
98
!===============================================================================
99
! 1. Ouverture de FICGEO et lecture des entetes principales
100
!===============================================================================
104
OPEN (FILE=FICGEO,UNIT=IMPGEO,FORM='formatted',ERR=9000)
106
!---> Ecriture avec rubrique ... avant
110
read (impgeo, *,err=9002,end=9003)
111
read (impgeo, *,err=9002,end=9003)
112
read (impgeo,1100,err=9002,end=9003) ncel, nfac, nfabor, nsom
114
read (impgeo, *,err=9002,end=9003)
115
read (impgeo, *,err=9002,end=9003)
116
read (impgeo,1100,err=9002,end=9003) ntetra,npyram,nprism,nhexae
118
read (impgeo, *,err=9002,end=9003)
119
read (impgeo, *,err=9002,end=9003)
120
read (impgeo,1100,err=9002,end=9003) nprfml, nfml
122
!===============================================================================
123
! 2. Positionnement dans FICGEO pour la lecture des tableaux optionnels
124
! de connectivites faces sommets (IPNFAC, IPNFBR, NODFAC, NODFBR)
125
!===============================================================================
127
!--> Positionnement dans le fichier avant lecture
129
! Connectivite faces internes - cellules
136
! Connectivite faces de bord - cellule
143
! Coordonnees du centre des cellules
150
! Surfaces des faces internes
157
! Surfaces des faces de bord
164
! Coordonnees du centre des faces
171
! Coordonnees du centre des faces de bord
178
! Familles des faces de bord
185
! Proprietes des familles
192
! Coordonnees des noeuds
199
! Connectivite cellules points
206
!===============================================================================
207
! 3. Calcul des dimensions LNDFAC et LNDFBR si possible
208
!===============================================================================
210
! Remarque : si les tableaux ne sont pas disponibles,
211
! on aura une erreur de fin de fichier.
212
! Dans ce cas, on sort en fermant normalement
213
! le fichier, en mettant LNDFAC et LNDFBR � 0.
215
!--> Dimension du tableau de connectivite faces de bord -> points
217
read(impgeo,*,err=9000,end=100)
218
read(impgeo,*,err=9000,end=100)
221
read(impgeo,1200,err=9000,end=100) nn , ip
225
!--> Dimension du tableau de connectivite faces internes -> points
227
read(impgeo,*,err=9000,end=100)
228
read(impgeo,*,err=9000,end=100)
231
read(impgeo,1200,err=9000,end=100) nn , ip
235
!--> Si l'on a pu lire les tableaux de connectivite faces -> points,
236
! on conserve les dimensions LNDFBR et LNDFAC calculees ;
237
! sinon, on les remet a zero
246
!===============================================================================
247
! 3. Fermeture du fichier et mise a jour des structures C
248
!===============================================================================
252
!---> MISE A JOUR STRUCTURES C
258
(ndim , ncelet, ncel , nfac , nfabor , nsom , &
259
lndfac, lndfbr, nfml , nprfml, &
260
ntetra, npyram, nprism, nhexae)
272
write(nfecra,8000)ficgeo
276
ficgeo,ndim,ncel,nfac,nfabor,nprfml,nfml ,nsom
280
ficgeo,ndim,ncel,nfac,nfabor,nprfml,nfml ,nsom
285
#if defined(_CS_LANG_FR)
289
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
291
'@ @@ ATTENTION : ARRET A L''OUVERTURE DU FICHIER GEOMETRIE ',/,&
293
'@ ERREUR DANS ledgeo POUR LE FICHIER ',A6 ,/,&
295
'@ Le calcul ne peut etre execute. ',/,&
297
'@ Verifier le fichier geometrie (existence, droits ',/,&
298
'@ d''acces, recopie correcte dans le repertoire de ',/,&
301
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
305
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
307
'@ @@ ATTENTION : ARRET A LA LECTURE DU FICHIER GEOMETRIE ',/,&
309
'@ ERREUR DANS ledgeo POUR LE FICHIER ',A6 ,/,&
311
'@ L''etat des dimensions lues est le suivant : ',/,&
312
'@ NDIM NCEL NFAC NFABOR ',/,&
314
'@ NPRFML NFML NSOM ',/,&
317
'@ Le calcul ne peut etre execute. ',/,&
319
'@ Verifier le fichier geometrie (existence, droits ',/,&
320
'@ d''acces, format...). ',/,&
322
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
326
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
328
'@ @@ ATTENTION : ARRET A LA LECTURE DU FICHIER GEOMETRIE ',/,&
330
'@ FIN PREMATUREE DANS ledgeo POUR LE FICHIER ',A6 ,/,&
332
'@ L''etat des dimensions lues est le suivant : ',/,&
333
'@ NDIM NCEL NFAC NFABOR ',/,&
335
'@ NPRFML NFML NSOM ',/,&
338
'@ Le calcul ne peut etre execute. ',/,&
340
'@ Verifier le fichier geometrie (existence, droits ',/,&
341
'@ d''acces, format...). ',/,&
343
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
350
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
352
'@ @@ WARNING: ABORT WHILE OPENING THE GEOMETRY FILE ',/,&
354
'@ ERROR IN ledgeo FOR FILE ',A6 ,/,&
356
'@ The calculation will not be run. ',/,&
358
'@ Verify the geometry file (existence, access ',/,&
359
'@ permission, correct copy in the working directory) ',/,&
361
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
365
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
367
'@ @@ WARNING: ABORT WHILE READING THE GEOMETRY FILE ',/,&
369
'@ ERROR IN ledgeo FOR FILE ',A6 ,/,&
371
'@ The state of the read dimensions is: ',/,&
372
'@ NDIM NCEL NFAC NFABOR ',/,&
374
'@ NPRFML NFML NSOM ',/,&
377
'@ The calculation will not be run. ',/,&
379
'@ Verify the geometry file (existence, access ',/,&
380
'@ permission, format...) ',/,&
382
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
386
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
388
'@ @@ WARNING: ABORT WHILE READING THE GEOMETRY FILE ',/,&
390
'@ UNEXPECTED END OF FILE in ledgeo FOR FILE ',A6 ,/,&
392
'@ The state of the read dimensions is: ',/,&
393
'@ NDIM NCEL NFAC NFABOR ',/,&
395
'@ NPRFML NFML NSOM ',/,&
398
'@ The calculation will not be run. ',/,&
400
'@ Verify the geometry file (existence, access ',/,&
401
'@ permission, format...) ',/,&
403
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&