~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to src/lagr/lagsta.f90

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-01 17:43:32 UTC
  • mto: (6.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20111101174332-tl4vk45no0x3emc3
Tags: upstream-2.1.0
ImportĀ upstreamĀ versionĀ 2.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
!-------------------------------------------------------------------------------
2
2
 
3
 
!     This file is part of the Code_Saturne Kernel, element of the
4
 
!     Code_Saturne CFD tool.
5
 
 
6
 
!     Copyright (C) 1998-2009 EDF S.A., France
7
 
 
8
 
!     contact: saturne-support@edf.fr
9
 
 
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.
14
 
 
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.
19
 
 
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.
 
4
!
 
5
! Copyright (C) 1998-2011 EDF S.A.
 
6
!
 
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
 
10
! version.
 
11
!
 
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
 
15
! details.
 
16
!
 
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.
25
20
 
26
21
!-------------------------------------------------------------------------------
27
22
 
28
23
subroutine lagsta &
29
24
!================
30
25
 
31
 
 ( idbia0 , idbra0 ,                                              &
32
 
   ndim   , ncelet , ncel   , nfac   , nfabor , nfml   , nprfml , &
33
 
   nnod   , lndfac , lndfbr , ncelbr ,                            &
34
 
   nvar   , nscal  , nphas  ,                                     &
 
26
 ( nvar   , nscal  ,                                              &
35
27
   nbpmax , nvp    , nvp1   , nvep   , nivep  ,                   &
36
28
   ntersl , nvlsta , nvisbr ,                                     &
37
 
   nideve , nrdeve , nituse , nrtuse ,                            &
38
29
   itepa  ,                                                       &
39
 
   idevel , ituser , ia     ,                                     &
40
 
   xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
41
30
   dt     , rtpa   , rtp    , propce , propfa , propfb ,          &
42
31
   ettp   , tepa   , statis , stativ ,                            &
43
 
   w1     ,                                                       &
44
 
   rdevel , rtuser , ra     )
 
32
   w1     )
45
33
 
46
34
!===============================================================================
47
35
! FONCTION :
78
66
!__________________.____._____.________________________________________________.
79
67
! name             !type!mode ! role                                           !
80
68
!__________________!____!_____!________________________________________________!
81
 
! idbia0           ! i  ! <-- ! number of first free position in ia            !
82
 
! idbra0           ! i  ! <-- ! number of first free position in ra            !
83
 
! ndim             ! i  ! <-- ! spatial dimension                              !
84
 
! ncelet           ! i  ! <-- ! number of extended (real + ghost) cells        !
85
 
! ncel             ! i  ! <-- ! number of cells                                !
86
 
! nfac             ! i  ! <-- ! number of interior faces                       !
87
 
! nfabor           ! i  ! <-- ! number of boundary faces                       !
88
 
! nfml             ! i  ! <-- ! number of families (group classes)             !
89
 
! nprfml           ! i  ! <-- ! number of properties per family (group class)  !
90
 
! nnod             ! i  ! <-- ! number of vertices                             !
91
 
! lndfac           ! i  ! <-- ! size of nodfac indexed array                   !
92
 
! lndfbr           ! i  ! <-- ! size of nodfbr indexed array                   !
93
 
! ncelbr           ! i  ! <-- ! number of cells with faces on boundary         !
94
69
! nvar             ! i  ! <-- ! total number of variables                      !
95
70
! nscal            ! i  ! <-- ! total number of scalars                        !
96
 
! nphas            ! i  ! <-- ! number of phases                               !
97
71
! nbpmax           ! e  ! <-- ! nombre max de particulies autorise             !
98
72
! nvp              ! e  ! <-- ! nombre de variables particulaires              !
99
73
! nvp1             ! e  ! <-- ! nvp sans position, vfluide, vpart              !
102
76
! ntersl           ! e  ! <-- ! nbr termes sources de couplage retour          !
103
77
! nvlsta           ! e  ! <-- ! nombre de var statistiques lagrangien          !
104
78
! nvisbr           ! e  ! <-- ! nombre de statistiques aux frontieres          !
105
 
! nideve, nrdeve   ! i  ! <-- ! sizes of idevel and rdevel arrays              !
106
 
! nituse, nrtuse   ! i  ! <-- ! sizes of ituser and rtuser arrays              !
107
79
! itepa            ! te ! <-- ! info particulaires (entiers)                   !
108
80
! (nbpmax,nivep    !    !     !   (cellule de la particule,...)                !
109
 
! idevel(nideve)   ! ia ! <-> ! integer work array for temporary development   !
110
 
! ituser(nituse)   ! ia ! <-> ! user-reserved integer work array               !
111
 
! ia(*)            ! ia ! --- ! main integer work array                        !
112
 
! xyzcen           ! ra ! <-- ! cell centers                                   !
113
 
!  (ndim, ncelet)  !    !     !                                                !
114
 
! surfac           ! ra ! <-- ! interior faces surface vectors                 !
115
 
!  (ndim, nfac)    !    !     !                                                !
116
 
! surfbo           ! ra ! <-- ! boundary faces surface vectors                 !
117
 
!  (ndim, nfabor)  !    !     !                                                !
118
 
! cdgfac           ! ra ! <-- ! interior faces centers of gravity              !
119
 
!  (ndim, nfac)    !    !     !                                                !
120
 
! cdgfbo           ! ra ! <-- ! boundary faces centers of gravity              !
121
 
!  (ndim, nfabor)  !    !     !                                                !
122
 
! xyznod           ! tr ! <-- ! coordonnes des noeuds                          !
123
 
! (ndim,nnod)      !    !     !                                                !
124
 
! volume(ncelet    ! tr ! <-- ! volume d'un des ncelet elements                !
125
81
! dt(ncelet)       ! ra ! <-- ! time step (per cell)                           !
126
82
! rtp, rtpa        ! ra ! <-- ! calculated variables at cell centers           !
127
83
!  (ncelet, *)     !    !     !  (at current and previous time steps)          !
138
94
!(ncelet,          !    !     !    statistiques volumiques                     !
139
95
!   nvlsta-1)      !    !     !                                                !
140
96
! w1(ncelet)       ! tr ! --- ! tableau de travail                             !
141
 
! rdevel(nrdeve)   ! ra ! <-> ! real work array for temporary development      !
142
 
! rtuser(nrtuse)   ! ra ! <-> ! user-reserved real work array                  !
143
 
! ra(*)            ! ra ! --- ! main real work array                           !
144
97
!__________________!____!_____!________________________________________________!
145
98
 
146
99
!     TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
147
100
!            L (LOGIQUE)   .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
148
101
!     MODE : <-- donnee, --> resultat, <-> Donnee modifiee
149
102
!            --- tableau de travail
 
103
!===============================================================================
 
104
 
 
105
!===============================================================================
 
106
! Module files
 
107
!===============================================================================
 
108
 
 
109
use paramx
 
110
use numvar
 
111
use cstnum
 
112
use optcal
 
113
use entsor
 
114
use lagpar
 
115
use lagran
 
116
use cstphy
 
117
use ppppar
 
118
use ppthch
 
119
use mesh
150
120
 
151
121
!===============================================================================
152
122
 
153
123
implicit none
154
124
 
155
 
!===============================================================================
156
 
! Common blocks
157
 
!===============================================================================
158
 
 
159
 
include "paramx.h"
160
 
include "numvar.h"
161
 
include "cstnum.h"
162
 
include "optcal.h"
163
 
include "entsor.h"
164
 
include "lagpar.h"
165
 
include "lagran.h"
166
 
include "cstphy.h"
167
 
include "ppppar.h"
168
 
include "ppthch.h"
169
 
 
170
 
!===============================================================================
171
 
 
172
125
! Arguments
173
126
 
174
 
integer          idbia0 , idbra0
175
 
integer          ndim   , ncelet , ncel   , nfac   , nfabor
176
 
integer          nfml   , nprfml
177
 
integer          nnod   , lndfac , lndfbr , ncelbr
178
 
integer          nvar   , nscal  , nphas
 
127
integer          nvar   , nscal
179
128
integer          nbpmax , nvp    , nvp1   , nvep  , nivep
180
129
integer          ntersl , nvlsta , nvisbr
181
 
integer          nideve , nrdeve , nituse , nrtuse
 
130
 
182
131
integer          itepa(nbpmax,nivep)
183
 
integer          idevel(nideve), ituser(nituse)
184
 
integer          ia(*)
185
132
 
186
 
double precision xyzcen(ndim,ncelet)
187
 
double precision surfac(ndim,nfac) , surfbo(ndim,nfabor)
188
 
double precision cdgfac(ndim,nfac) , cdgfbo(ndim,nfabor)
189
 
double precision xyznod(ndim,nnod) , volume(ncelet)
190
133
double precision dt(ncelet) , rtp(ncelet,*) , rtpa(ncelet,*)
191
134
double precision propce(ncelet,*)
192
135
double precision propfa(nfac,*) , propfb(nfabor,*)
194
137
double precision statis(ncelet,nvlsta)
195
138
double precision stativ(ncelet,nvlsta-1)
196
139
double precision w1(ncelet)
197
 
double precision rdevel(nrdeve), rtuser(nrtuse)
198
 
double precision ra(*)
199
140
 
200
141
! Local variables
201
142
 
202
 
integer          idebia , idebra
203
143
integer          npt , nv , iel, nv1, izcl
204
144
integer          ilvx1 , ilvy1  , ilvz1  , ilpd1  , ilfv1 , ilts1
205
145
integer          iltp1 , ildp1  , ilmp1
215
155
! 0.  GESTION MEMOIRE
216
156
!===============================================================================
217
157
 
218
 
idebia = idbia0
219
 
idebra = idbra0
 
158
! Initialize variables to avoid compiler warnings
 
159
 
 
160
ildck1 = 0
 
161
ilmck1 = 0
 
162
ilmch1 = 0
 
163
 
 
164
! Memoire
 
165
 
220
166
 
221
167
!===============================================================================
222
168
! 1. INCREMENTATION DES COMPTEURS ET INITIALISATION