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

« back to all changes in this revision

Viewing changes to users/base/usnpst.f90

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
!-------------------------------------------------------------------------------
2
 
 
3
 
!VERS
4
 
 
5
 
 
6
 
!     This file is part of the Code_Saturne Kernel, element of the
7
 
!     Code_Saturne CFD tool.
8
 
 
9
 
!     Copyright (C) 1998-2009 EDF S.A., France
10
 
 
11
 
!     contact: saturne-support@edf.fr
12
 
 
13
 
!     The Code_Saturne Kernel is free software; you can redistribute it
14
 
!     and/or modify it under the terms of the GNU General Public License
15
 
!     as published by the Free Software Foundation; either version 2 of
16
 
!     the License, or (at your option) any later version.
17
 
 
18
 
!     The Code_Saturne Kernel is distributed in the hope that it will be
19
 
!     useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20
 
!     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 
!     GNU General Public License for more details.
22
 
 
23
 
!     You should have received a copy of the GNU General Public License
24
 
!     along with the Code_Saturne Kernel; if not, write to the
25
 
!     Free Software Foundation, Inc.,
26
 
!     51 Franklin St, Fifth Floor,
27
 
!     Boston, MA  02110-1301  USA
28
 
 
29
 
!-------------------------------------------------------------------------------
30
 
 
31
 
subroutine usnpst &
32
 
!================
33
 
 
34
 
 ( idbia0 , idbra0 ,                                              &
35
 
   ndim   , ncelet , ncel   , nfac   , nfabor , nfml   , nprfml , &
36
 
   nnod   , lndfac , lndfbr , ncelbr ,                            &
37
 
   nvar   , nscal  , nphas  , nvlsta ,                            &
38
 
   nideve , nrdeve , nituse , nrtuse ,                            &
39
 
   ifacel , ifabor , ifmfbr , ifmcel , iprfml ,                   &
40
 
   ipnfac , nodfac , ipnfbr , nodfbr ,                            &
41
 
   idevel , ituser , ia     ,                                     &
42
 
   xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
43
 
   dt     , rtpa   , rtp    , propce , propfa , propfb ,          &
44
 
   coefa  , coefb  , statis ,                                     &
45
 
   rdevel , rtuser , ra     )
46
 
 
47
 
!===============================================================================
48
 
! Purpose:
49
 
! -------
50
 
 
51
 
!    User subroutine.
52
 
 
53
 
!    Force or inhibit post-processing output at the current time step.
54
 
 
55
 
! This subroutine is called at the end of each time step.
56
 
 
57
 
! We pass all the usual arguments to this routine to allow writing of complex
58
 
! tests if necessary (for example, output when a given variable reaches a
59
 
! given threshold).
60
 
 
61
 
! We may also use the following variables from optcal.h:
62
 
 
63
 
! ntpabs <-- Absolute number of the last time step of the previous calculation
64
 
!            in case of restart (0 otherwise)
65
 
! ntcabs <-- Absolute number of the current time step
66
 
! ntmabs <-- Absolute number of the last desired time step
67
 
! ttpabs <-- Absolute time of at the end of the previous calculation
68
 
!            in case of restart (0 otherwise)
69
 
! ttcabs <-- Absolute time at the current time step
70
 
 
71
 
!-------------------------------------------------------------------------------
72
 
! Arguments
73
 
!__________________.____._____.________________________________________________.
74
 
! name             !type!mode ! role                                           !
75
 
!__________________!____!_____!________________________________________________!
76
 
! idbia0           ! i  ! <-- ! number of first free position in ia            !
77
 
! idbra0           ! i  ! <-- ! number of first free position in ra            !
78
 
! ndim             ! i  ! <-- ! spatial dimension                              !
79
 
! ncelet           ! i  ! <-- ! number of extended (real + ghost) cells        !
80
 
! ncel             ! i  ! <-- ! number of cells                                !
81
 
! nfac             ! i  ! <-- ! number of interior faces                       !
82
 
! nfabor           ! i  ! <-- ! number of boundary faces                       !
83
 
! nfml             ! i  ! <-- ! number of families (group classes)             !
84
 
! nprfml           ! i  ! <-- ! number of properties per family (group class)  !
85
 
! nnod             ! i  ! <-- ! number of vertices                             !
86
 
! lndfac           ! i  ! <-- ! size of nodfac indexed array                   !
87
 
! lndfbr           ! i  ! <-- ! size of nodfbr indexed array                   !
88
 
! ncelbr           ! i  ! <-- ! number of cells with faces on boundary         !
89
 
! nvar             ! i  ! <-- ! total number of variables                      !
90
 
! nscal            ! i  ! <-- ! total number of scalars                        !
91
 
! nphas            ! i  ! <-- ! number of phases                               !
92
 
! nvlsta           ! i  ! <-- ! number of Lagrangian statistical variables     !
93
 
! nideve, nrdeve   ! i  ! <-- ! sizes of idevel and rdevel arrays              !
94
 
! nituse, nrtuse   ! i  ! <-- ! sizes of ituser and rtuser arrays              !
95
 
! ifacel(2, nfac)  ! ia ! <-- ! interior faces -> cells connectivity           !
96
 
! ifabor(nfabor)   ! ia ! <-- ! boundary faces -> cells connectivity           !
97
 
! ifmfbr(nfabor)   ! ia ! <-- ! boundary face family numbers                   !
98
 
! ifmcel(ncelet)   ! ia ! <-- ! cell family numbers                            !
99
 
! iprfml           ! ia ! <-- ! property numbers per family                    !
100
 
!  (nfml, nprfml)  !    !     !                                                !
101
 
! ipnfac(nfac+1)   ! ia ! <-- ! interior faces -> vertices index (optional)    !
102
 
! nodfac(lndfac)   ! ia ! <-- ! interior faces -> vertices list (optional)     !
103
 
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional)    !
104
 
! nodfbr(lndfbr)   ! ia ! <-- ! boundary faces -> vertices list (optional)     !
105
 
! idevel(nideve)   ! ia ! <-> ! integer work array for temporary development   !
106
 
! ituser(nituse)   ! ia ! <-> ! user-reserved integer work array               !
107
 
! ia(*)            ! ia ! --- ! main integer work array                        !
108
 
! xyzcen           ! ra ! <-- ! cell centers                                   !
109
 
!  (ndim, ncelet)  !    !     !                                                !
110
 
! surfac           ! ra ! <-- ! interior faces surface vectors                 !
111
 
!  (ndim, nfac)    !    !     !                                                !
112
 
! surfbo           ! ra ! <-- ! boundary faces surface vectors                 !
113
 
!  (ndim, nfabor)  !    !     !                                                !
114
 
! cdgfac           ! ra ! <-- ! interior faces centers of gravity              !
115
 
!  (ndim, nfac)    !    !     !                                                !
116
 
! cdgfbo           ! ra ! <-- ! boundary faces centers of gravity              !
117
 
!  (ndim, nfabor)  !    !     !                                                !
118
 
! xyznod           ! ra ! <-- ! vertex coordinates (optional)                  !
119
 
!  (ndim, nnod)    !    !     !                                                !
120
 
! volume(ncelet)   ! ra ! <-- ! cell volumes                                   !
121
 
! dt(ncelet)       ! ra ! <-- ! time step (per cell)                           !
122
 
! rtp, rtpa        ! ra ! <-- ! calculated variables at cell centers           !
123
 
!  (ncelet, *)     !    !     !  (at current and previous time steps)          !
124
 
! propce(ncelet, *)! ra ! <-- ! physical properties at cell centers            !
125
 
! propfa(nfac, *)  ! ra ! <-- ! physical properties at interior face centers   !
126
 
! propfb(nfabor, *)! ra ! <-- ! physical properties at boundary face centers   !
127
 
! coefa, coefb     ! ra ! <-- ! boundary conditions                            !
128
 
!  (nfabor, *)     !    !     !                                                !
129
 
! rdevel(nrdeve)   ! ra ! <-> ! real work array for temporary development      !
130
 
! rtuser(nrtuse)   ! ra ! <-> ! user-reserved real work array                  !
131
 
! ra(*)            ! ra ! --- ! main real work array                           !
132
 
!__________________!____!_____!________________________________________________!
133
 
 
134
 
!     Type: i (integer), r (real), s (string), a (array), l (logical),
135
 
!           and composite types (ex: ra real array)
136
 
!     mode: <-- input, --> output, <-> modifies data, --- work array
137
 
!===============================================================================
138
 
 
139
 
implicit none
140
 
 
141
 
!===============================================================================
142
 
! Common blocks
143
 
!===============================================================================
144
 
 
145
 
include "paramx.h"
146
 
include "pointe.h"
147
 
include "entsor.h"
148
 
include "optcal.h"
149
 
include "parall.h"
150
 
include "period.h"
151
 
 
152
 
!===============================================================================
153
 
 
154
 
! Arguments
155
 
 
156
 
integer          idbia0 , idbra0
157
 
integer          ndim   , ncelet , ncel   , nfac   , nfabor
158
 
integer          nfml   , nprfml
159
 
integer          nnod   , lndfac , lndfbr , ncelbr
160
 
integer          nvar   , nscal  , nphas  , nvlsta
161
 
integer          nideve , nrdeve , nituse , nrtuse
162
 
 
163
 
integer          ifacel(2,nfac) , ifabor(nfabor)
164
 
integer          ifmfbr(nfabor) , ifmcel(ncelet)
165
 
integer          iprfml(nfml,nprfml)
166
 
integer          ipnfac(nfac+1), nodfac(lndfac)
167
 
integer          ipnfbr(nfabor+1), nodfbr(lndfbr)
168
 
integer          idevel(nideve), ituser(nituse), ia(*)
169
 
 
170
 
double precision xyzcen(ndim,ncelet)
171
 
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
172
 
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
173
 
double precision xyznod(ndim,nnod), volume(ncelet)
174
 
double precision dt(ncelet), rtp(ncelet,*), rtpa(ncelet,*)
175
 
double precision propce(ncelet,*)
176
 
double precision propfa(nfac,*), propfb(nfabor,*)
177
 
double precision coefa(nfabor,*), coefb(nfabor,*)
178
 
double precision statis(ncelet,nvlsta)
179
 
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
180
 
 
181
 
! Local variables
182
 
 
183
 
integer          indwri, indact
184
 
 
185
 
!===============================================================================
186
 
! Activate or inhibit output
187
 
!===============================================================================
188
 
 
189
 
! For any given writer, default output is activated for time steps which are
190
 
! multiples of the writer's output frequency.
191
 
 
192
 
call pstntc(ntcabs)
193
 
!==========
194
 
 
195
 
! We may force the activation or deactivation of a given writer at a
196
 
! given time step:
197
 
 
198
 
! indwri = 0 to activate all writers, or a writer number for a specific writer
199
 
! indact = 1 to activate for the current time step, 0 to deactivate.
200
 
 
201
 
! By default, all writers are active at the last time step:
202
 
 
203
 
if (ntcabs .eq. ntmabs) then
204
 
  indwri = 0
205
 
  indact = 1
206
 
  call pstact(indwri, indact)
207
 
  !==========
208
 
endif
209
 
 
210
 
return
211
 
end subroutine