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 ecrlis &
32
nvar , nphas , ndim , ncelet , ncel , &
33
nideve , nrdeve , nituse , nrtuse , irtp , &
34
idevel , ituser , ia , &
26
( nvar , ndim , ncelet , ncel , &
35
28
rtp , rtpa , dt , volume , xyzcen , &
36
rdevel , rtuser , ra )
38
31
!===============================================================================
46
39
!__________________.____._____.________________________________________________.
47
40
! name !type!mode ! role !
48
41
!__________________!____!_____!________________________________________________!
49
! idbia0 ! i ! <-- ! number of first free position in ia !
50
! idbra0 ! i ! <-- ! number of first free position in ra !
51
42
! nvar ! e ! <-- ! nombre de variables !
52
! nphas ! i ! <-- ! number of phases !
53
43
! ndim ! i ! <-- ! spatial dimension !
54
44
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
55
45
! ncel ! i ! <-- ! number of cells !
56
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
57
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
58
46
! irtp ! e ! <-- ! indice de rtp dans ra !
59
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
60
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
61
! ia(*) ! ia ! --- ! main integer work array !
62
47
! rtp ! tr ! <-- ! tableaux des variables au pdt courant !
63
48
! (ncelet,nvar) ! ! ! !
64
49
! rtpa ! tr ! <-- ! tableaux des variables au pdt prec !
79
62
! --- tableau de travail
80
63
!===============================================================================
65
!===============================================================================
67
!===============================================================================
81
!===============================================================================
84
!===============================================================================
86
!===============================================================================
100
!===============================================================================
102
integer idbia0, idbra0, nvar, nphas, ndim, ncelet, ncel
103
integer nideve , nrdeve , nituse , nrtuse
85
integer nvar, ndim, ncelet, ncel
105
integer idevel(nideve), ituser(nituse)
107
87
double precision rtpa(ncelet,nvar), rtp(ncelet,nvar)
108
88
double precision dt(ncelet), volume(ncelet)
109
89
double precision xyzcen(ndim,ncelet)
110
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
90
double precision, dimension(*), target :: ra
114
94
integer ii, jj, ic, icel, ipp, ira, ivrtp, iok
115
integer iphas, kphas, iprnew, ipuvw
116
96
integer icmin, icmax
118
integer idivdt, ixmsdt, idebia, idebra, ifinra, iel
98
integer idivdt, ixmsdt, iel
119
99
double precision petit,xyzmin(3),xyzmax(3)
120
100
character*200 chain, chainc
102
double precision, dimension(:), allocatable, target :: momtmp
103
double precision, dimension(:), pointer :: varptr => null()
123
105
!===============================================================================
124
106
! 0. INITIALISATIONS LOCALES
125
107
!===============================================================================
139
119
varmax(ipp) = petit
140
120
ira = abs(ipp2ra(ipp))
142
! Pour les moments, il faut eventuellement diviser par le temps cumule
122
! For moments, we must divide by the cumulative time
143
123
idivdt = ippmom(ipp)
124
if (idivdt.eq.0) then
125
varptr => ra(ira:ira+ncel)
148
ifinra = ixmsdt + ncel
149
call rasize ('ecrlis', ifinra)
154
ra(ixmsdt+iel-1) = ra(ira+iel-1)/ max(ra(idivdt+iel-1),epzero)
156
elseif(idivdt.lt.0) then
158
ra(ixmsdt+iel-1) = ra(ira+iel-1)/ max(dtcmom(-idivdt),epzero)
161
! ra(ixmsdt+iel-1) = ra(ira+iel-1)
162
! inutile car on a pose ixmsdt = ira
127
allocate(momtmp(ncel))
129
if (idivdt.gt.0) then
131
momtmp(iel) = ra(ira+iel-1)/max(ra(idivdt+iel-1),epzero)
133
elseif (idivdt.lt.0) then
135
momtmp(iel) = ra(ira+iel-1)/max(dtcmom(-idivdt),epzero)
165
140
do icel = 1, ncel
166
if(ra(ixmsdt+icel-1).lt.varmin(ipp)) &
167
varmin(ipp) = ra(ixmsdt+icel-1)
168
if(ra(ixmsdt+icel-1).gt.varmax(ipp)) &
169
varmax(ipp) = ra(ixmsdt+icel-1)
141
if(varptr(icel).lt.varmin(ipp)) varmin(ipp) = varptr(icel)
142
if(varptr(icel).gt.varmax(ipp)) varmax(ipp) = varptr(icel)
145
if (idivdt.ne.0) then
171
149
if (irangp.ge.0) then
172
150
call parmin (varmin(ipp))
174
152
call parmax (varmax(ipp))
345
310
chainc(ic:ic+12) = chain(1:12)
349
if(ipp.eq.ipprtp(ipr(iphas)) .or. &
350
ipp.eq.ipprtp(iu (iphas)) .or. &
351
ipp.eq.ipprtp(iv (iphas)) .or. &
352
ipp.eq.ipprtp(iw (iphas)) ) then
355
! En v2f on ne clippe jamais f_barrre, on ne l'affiche donc pas
356
if (iturb(iphas).eq.50) then
357
if (ipp.eq.ipprtp(ifb(iphas))) ipuvw = 1
360
! En ALE on ne clippe pas la vitesse de maillage
313
if(ipp.eq.ipprtp(ipr) .or. &
314
ipp.eq.ipprtp(iu ) .or. &
315
ipp.eq.ipprtp(iv ) .or. &
316
ipp.eq.ipprtp(iw ) ) then
319
! En v2f phi-fbar on ne clippe jamais f_barre, on ne l'affiche donc pas
320
if (iturb.eq.50) then
321
if (ipp.eq.ipprtp(ifb)) ipuvw = 1
323
! En ALE on ne clippe pas la vitesse de maillage
361
324
if (iale.eq.1) then
362
325
if (ipp.eq.ipprtp(iuma) .or. &
363
326
ipp.eq.ipprtp(ivma) .or. &
399
362
do ipp = 2, nvppmx
402
if(ipp.eq.ipprtp(ipr(iphas)) .or. &
403
ipp.eq.ipprtp(iu (iphas)) .or. &
404
ipp.eq.ipprtp(iv (iphas)) .or. &
405
ipp.eq.ipprtp(iw (iphas)) ) then
364
if(ipp.eq.ipprtp(ipr) .or. &
365
ipp.eq.ipprtp(iu ) .or. &
366
ipp.eq.ipprtp(iv ) .or. &
367
ipp.eq.ipprtp(iw ) ) then
370
! En v2f on ne clippe jamais f_barrre, on ne l'affiche donc pas
371
if (iturb.eq.50) then
372
if (ipp.eq.ipprtp(ifb)) ipuvw = 1
374
! En ALE on ne clippe pas la vitesse de maillage
376
if (ipp.eq.ipprtp(iuma) .or. &
377
ipp.eq.ipprtp(ivma) .or. &
378
ipp.eq.ipprtp(iwma)) ipuvw = 1
381
if(ippmod(icompf).ge.0) then
382
if(ipp.eq.ipprtp(isca(itempk))) then
408
! En v2f on ne clippe jamais f_barrre, on ne l'affiche donc pas
409
if (iturb(iphas).eq.50) then
410
if (ipp.eq.ipprtp(ifb(iphas))) ipuvw = 1
412
! En ALE on ne clippe pas la vitesse de maillage
414
if (ipp.eq.ipprtp(iuma) .or. &
415
ipp.eq.ipprtp(ivma) .or. &
416
ipp.eq.ipprtp(iwma)) ipuvw = 1
419
if(ippmod(icompf).ge.0) then
420
if(ipp.eq.ipprtp(isca(itempk(iphas)))) then
425
386
if(ilisvr(ipp).eq.1.and.itrsvr(ipp).gt.0.and.ipuvw.eq.0) then