Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fluid_postHdfOutput.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: treatments after solution dump to Hdf files.
26 !
27 ! Description: none.
28 !
29 ! Input: globalGenx = global data structure (contains name of the window)
30 !
31 ! Output: none.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: Fluid_postHdfOutput.F90,v 1.4 2008/12/06 08:44:00 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE fluid_posthdfoutput( globalGenx )
44 
45  USE moddatatypes
46  USE modrocstar, ONLY : t_globalgenx
47  USE modglobal, ONLY : t_global
48  USE moddatastruct, ONLY : t_region
49  USE moderror
50  USE modparameters
51 
52  IMPLICIT NONE
53  include 'roccomf90.h'
54 
55 ! ... parameters
56  TYPE(t_globalgenx), POINTER :: globalgenx
57  TYPE(t_global), POINTER :: global
58  TYPE(t_region), POINTER :: regions(:)
59 
60 ! ... loop variables
61  INTEGER :: ireg, istat
62 
63 ! ... local variables
64  INTEGER :: ilev
65  REAL(RFREAL) :: eps
66 
67 !******************************************************************************
68 
69  global => globalgenx%global
70 
71 #ifdef RFLO
72  regions => globalgenx%regions
73 #endif
74 #ifdef RFLU
75  regions => globalgenx%levels(1)%regions
76 #endif
77 
78  CALL registerfunction( global,'Fluid_preHdfOutput',&
79  'Fluid_postHdfOutput.F90' )
80 
81 ! set tav from accumulated values ---------------------------------------------
82 ! to be moved to a wrapper
83 
84  eps = 100._rfreal*epsilon( 1._rfreal )
85 
86 #ifdef STATS
87 
88 #ifdef RFLO
89  DO ireg=1,global%nRegions
90  IF (regions(ireg)%procid==global%myProcid .AND. & ! region active and
91  regions(ireg)%active==active) THEN ! on my processor
92  ilev = regions(ireg)%currLevel
93 #endif
94 #ifdef RFLU
95  DO ireg=1,global%nRegionsLocal
96 #endif
97 
98  IF ((global%flowType==flow_unsteady) .AND. (global%doStat==active)) THEN
99  IF (global%integrTime > eps) THEN
100  IF (global%mixtNStat > 0) THEN
101  DO istat=1,global%mixtNStat
102 
103 #ifdef RFLO
104  regions(ireg)%levels(ilev)%mixt%tav(istat,:) = &
105  regions(ireg)%levels(ilev)%mixt%tav(istat,:)*global%integrTime
106 #endif
107 #ifdef RFLU
108  regions(ireg)%mixt%tav(istat,:) = &
109  regions(ireg)%mixt%tav(istat,:)*global%integrTime
110 #endif
111 
112  ENDDO
113  ENDIF ! mixtNstat
114 
115 #ifdef TURB
116  IF ((global%turbActive .EQV. .true.) .AND. (global%turbNStat > 0)) THEN
117  DO istat=1,global%turbNStat
118 
119 #ifdef RFLO
120  regions(ireg)%levels(ilev)%turb%tav(istat,:) = &
121  regions(ireg)%levels(ilev)%turb%tav(istat,:)*global%integrTime
122 #endif
123 #ifdef RFLU
124  regions(ireg)%turb%tav(istat,:) = &
125  regions(ireg)%turb%tav(istat,:)*global%integrTime
126 #endif
127 
128  ENDDO
129  ENDIF ! turbNstat
130 #endif
131 
132  ENDIF ! integrTime
133  ENDIF ! unsteady and dostat
134 
135 #ifdef RFLO
136  ENDIF ! region on this processor and active
137  ENDDO ! iReg
138 #endif
139 #ifdef RFLU
140  ENDDO ! iReg
141 #endif
142 
143 #endif
144 
145  CALL deregisterfunction( global )
146 
147 END SUBROUTINE fluid_posthdfoutput
148 
149 !******************************************************************************
150 !
151 ! RCS Revision history:
152 !
153 ! $Log: Fluid_postHdfOutput.F90,v $
154 ! Revision 1.4 2008/12/06 08:44:00 mtcampbe
155 ! Updated license.
156 !
157 ! Revision 1.3 2008/11/19 22:17:14 mtcampbe
158 ! Added Illinois Open Source License/Copyright
159 !
160 ! Revision 1.2 2006/01/07 10:19:56 wasistho
161 ! added Rocflu treatment
162 !
163 ! Revision 1.1 2005/12/08 19:58:26 wasistho
164 ! initial import
165 !
166 !
167 !
168 !******************************************************************************
169 
170 
171 
172 
173 
174 
175 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine fluid_posthdfoutput(globalGenx)
subroutine deregisterfunction(global)
Definition: ModError.F90:469