1
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
3
! This file is part of Code_Saturne, a general-purpose CFD tool.
5
! Copyright (C) 1998-2011 EDF S.A.
7
! This program is free software; you can redistribute it and/or modify it under
8
! the terms of the GNU General Public License as published by the Free Software
9
! Foundation; either version 2 of the License, or (at your option) any later
12
! This program is distributed in the hope that it will be useful, but WITHOUT
13
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17
! You should have received a copy of the GNU General Public License along with
18
! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
19
! Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
21
!-------------------------------------------------------------------------------
28
23
subroutine recvmc &
32
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
33
nnod , lndfac , lndfbr , ncelbr , &
34
nvar , nscal , nphas , &
35
nideve , nrdeve , nituse , nrtuse , &
36
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
37
ipnfac , nodfac , ipnfbr , nodfbr , &
38
idevel , ituser , ia , &
39
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
40
27
rom , flumas , flumab , &
42
bx , by , bz , cocg , &
43
rdevel , rtuser , ra )
45
31
!===============================================================================
54
40
!__________________.____._____.________________________________________________.
55
41
! name !type!mode ! role !
56
42
!__________________!____!_____!________________________________________________!
57
! idbia0 ! i ! <-- ! number of first free position in ia !
58
! idbra0 ! i ! <-- ! number of first free position in ra !
59
! ndim ! i ! <-- ! spatial dimension !
60
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
61
! ncel ! i ! <-- ! number of cells !
62
! nfac ! i ! <-- ! number of interior faces !
63
! nfabor ! i ! <-- ! number of boundary faces !
64
! nfml ! i ! <-- ! number of families (group classes) !
65
! nprfml ! i ! <-- ! number of properties per family (group class) !
66
! nnod ! i ! <-- ! number of vertices !
67
! lndfac ! i ! <-- ! size of nodfac indexed array !
68
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
69
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
70
43
! nvar ! i ! <-- ! total number of variables !
71
44
! nscal ! i ! <-- ! total number of scalars !
72
! nphas ! i ! <-- ! number of phases !
73
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
74
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
75
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
76
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
77
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
78
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
79
! iprfml ! ia ! <-- ! property numbers per family !
80
! (nfml, nprfml) ! ! ! !
81
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
82
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
83
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
84
! nodfbr(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
85
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
86
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
87
! ia(*) ! ia ! --- ! main integer work array !
88
! xyzcen ! ra ! <-- ! cell centers !
89
! (ndim, ncelet) ! ! ! !
90
! surfac ! ra ! <-- ! interior faces surface vectors !
91
! (ndim, nfac) ! ! ! !
92
! surfbo ! ra ! <-- ! boundary faces surface vectors !
93
! (ndim, nfabor) ! ! ! !
94
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
95
! (ndim, nfac) ! ! ! !
96
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
97
! (ndim, nfabor) ! ! ! !
98
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
99
! (ndim, nnod) ! ! ! !
100
! volume(ncelet) ! ra ! <-- ! cell volumes !
101
45
! rom(ncelet ! tr ! <-- ! masse volumique aux cellules !
102
46
! flumas(nfac) ! tr ! <-- ! flux de masse aux faces internes !
103
47
! flumab(nfabor ! tr ! <-- ! flux de masse aux faces de bord !
104
48
! ux uy ! tr ! --> ! vitesse reconstruite !
105
49
! uz (ncelet ! tr ! ! !
106
50
! bx,y,z(ncelet ! tr ! --- ! tableau de travail !
107
! cocg ! tr ! --- ! tableau de travail !
108
! (ncelet,3,3 ! ! ! !
109
! rdevel(nrdeve) ! ra ! <-> ! real work array for temporary development !
110
! rtuser(nrtuse) ! ra ! <-> ! user-reserved real work array !
111
! ra(*) ! ra ! --- ! main real work array !
112
51
!__________________!____!_____!________________________________________________!
114
53
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
115
54
! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
116
55
! MODE : <-- donnee, --> resultat, <-> Donnee modifiee
117
56
! --- tableau de travail
118
!-------------------------------------------------------------------------------
57
!===============================================================================
59
!===============================================================================
61
!===============================================================================
119
66
!===============================================================================
123
!===============================================================================
125
!===============================================================================
129
!===============================================================================
133
integer idbia0 , idbra0
134
integer ndim , ncelet , ncel , nfac , nfabor
135
integer nfml , nprfml
136
integer nnod , lndfac , lndfbr , ncelbr
137
integer nvar , nscal , nphas
138
integer nideve , nrdeve , nituse , nrtuse
140
integer ifacel(2,nfac) , ifabor(nfabor)
141
integer ifmfbr(nfabor) , ifmcel(ncelet)
142
integer iprfml(nfml,nprfml)
143
integer ipnfac(nfac+1), nodfac(lndfac)
144
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
145
integer idevel(nideve), ituser(nituse), ia(*)
147
double precision xyzcen(ndim,ncelet)
148
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
149
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
150
double precision xyznod(ndim,nnod), volume(ncelet)
151
75
double precision rom(ncelet)
152
76
double precision flumas(nfac), flumab(nfabor)
153
77
double precision ux (ncelet), uy (ncelet), uz (ncelet)
154
78
double precision bx(ncelet), by(ncelet), bz(ncelet)
155
double precision cocg(ncelet,3,3)
156
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
161
83
parameter (lbloc = 1024)
163
integer idebia, idebra, ii, jj, iel, ifac
85
integer ii, jj, iel, ifac
164
86
integer ibloc, nbloc, irel, idim1, idim2
165
87
double precision aa(lbloc,3,3)
166
88
double precision a11, a22, a33, a12, a13, a23, unsdet
194
119
do idim2 = idim1, 3
196
if (ivecti.eq.1) then
202
vecfac = surfac(idim1,ifac)*surfac(idim2,ifac)
203
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) + vecfac
204
cocg(jj,idim1,idim2) = cocg(jj,idim1,idim2) + vecfac
209
! VECTORISATION NON FORCEE
213
vecfac = surfac(idim1,ifac)*surfac(idim2,ifac)
214
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) + vecfac
215
cocg(jj,idim1,idim2) = cocg(jj,idim1,idim2) + vecfac
220
if (ivectb.eq.1) then
225
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) &
226
+ surfbo(idim1,ifac)*surfbo(idim2,ifac)
231
! VECTORISATION NON FORCEE
234
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) &
235
+ surfbo(idim1,ifac)*surfbo(idim2,ifac)
124
vecfac = surfac(idim1,ifac)*surfac(idim2,ifac)
125
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) + vecfac
126
cocg(jj,idim1,idim2) = cocg(jj,idim1,idim2) + vecfac
131
cocg(ii,idim1,idim2) = cocg(ii,idim1,idim2) &
132
+ surfbo(idim1,ifac)*surfbo(idim2,ifac)
371
266
! ASSEMBLAGE A PARTIR DES FACETTES FLUIDES
373
if (ivecti.eq.1) then
379
pfacx = flumas(ifac)*surfac(1,ifac)
380
pfacy = flumas(ifac)*surfac(2,ifac)
381
pfacz = flumas(ifac)*surfac(3,ifac)
382
bx(ii) = bx(ii) + pfacx
383
by(ii) = by(ii) + pfacy
384
bz(ii) = bz(ii) + pfacz
385
bx(jj) = bx(jj) + pfacx
386
by(jj) = by(jj) + pfacy
387
bz(jj) = bz(jj) + pfacz
392
! VECTORISATION NON FORCEE
396
pfacx = flumas(ifac)*surfac(1,ifac)
397
pfacy = flumas(ifac)*surfac(2,ifac)
398
pfacz = flumas(ifac)*surfac(3,ifac)
399
bx(ii) = bx(ii) + pfacx
400
by(ii) = by(ii) + pfacy
401
bz(ii) = bz(ii) + pfacz
402
bx(jj) = bx(jj) + pfacx
403
by(jj) = by(jj) + pfacy
404
bz(jj) = bz(jj) + pfacz
271
pfacx = flumas(ifac)*surfac(1,ifac)
272
pfacy = flumas(ifac)*surfac(2,ifac)
273
pfacz = flumas(ifac)*surfac(3,ifac)
274
bx(ii) = bx(ii) + pfacx
275
by(ii) = by(ii) + pfacy
276
bz(ii) = bz(ii) + pfacz
277
bx(jj) = bx(jj) + pfacx
278
by(jj) = by(jj) + pfacy
279
bz(jj) = bz(jj) + pfacz
410
283
! ASSEMBLAGE A PARTIR DES FACETTES DE BORD
412
if (ivectb.eq.1) then
417
bx(ii) = bx(ii) + flumab(ifac)*surfbo(1,ifac)
418
by(ii) = by(ii) + flumab(ifac)*surfbo(2,ifac)
419
bz(ii) = bz(ii) + flumab(ifac)*surfbo(3,ifac)
424
! VECTORISATION NON FORCEE
427
bx(ii) = bx(ii) + flumab(ifac)*surfbo(1,ifac)
428
by(ii) = by(ii) + flumab(ifac)*surfbo(2,ifac)
429
bz(ii) = bz(ii) + flumab(ifac)*surfbo(3,ifac)
287
bx(ii) = bx(ii) + flumab(ifac)*surfbo(1,ifac)
288
by(ii) = by(ii) + flumab(ifac)*surfbo(2,ifac)
289
bz(ii) = bz(ii) + flumab(ifac)*surfbo(3,ifac)
434
292
!===============================================================================