Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STAT_GenxStatNaming.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: provide name and units of statistics variables
26 !
27 ! Description: strings are defined for the name and units of the time/ensemble
28 ! averaged variables based on the user input statistics
29 !
30 ! Input: global%mixtStatId : mixture statistics ID from user input
31 ! global%turbStatId : TURB statistics ID from user input
32 !
33 ! Output: global%mixtStatNm : mixture statistics names
34 ! global%turbStatNm : TURB statistics names
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: STAT_GenxStatNaming.F90,v 1.3 2008/12/06 08:44:01 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2001 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE genxstatnaming( global, fluidType )
47 
48  USE moddatatypes
49  USE modglobal, ONLY : t_global
50  USE moddatastruct, ONLY : t_region
51  USE moderror
52  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_global), POINTER :: global
57  INTEGER :: fluidtype
58 
59 ! ... loop variables
60  INTEGER :: l
61 
62 ! ... local variables
63  CHARACTER(CHRLEN), POINTER :: statname(:,:,:)
64 
65  INTEGER :: nstat
66  INTEGER, POINTER :: statcode(:,:,:)
67 
68 !******************************************************************************
69 
70  CALL registerfunction( global,'GenxStatNaming',&
71  'STAT_GenxStatNaming.F90' )
72 
73 ! get dimensions and pointers -------------------------------------------------
74 
75  IF (fluidtype == ftype_mixt) THEN
76  nstat = global%mixtNStat
77  statcode => global%mixtStatCode
78  statname => global%mixtStatNm
79  ELSEIF (fluidtype == ftype_turb) THEN
80 #ifdef TURB
81  nstat = global%turbNStat
82  statcode => global%turbStatCode
83  statname => global%turbStatNm
84 #endif
85  ENDIF
86 
87 ! Quantities to be time-averaged is determined from the index selected by user.
88 ! Data accumulation proceeds afterwards for each quantity.
89 
90  DO l=1,nstat
91 
92  IF ((statcode(1,1,l)==stat_none).AND.(statcode(2,1,l)==stat_none)) &
93  goto 999
94 
95  IF (statcode(1,1,l)==stat_none) THEN
96  statname(1,1,l) = '<'//trim(statname(2,1,l))//'>'
97  statname(1,2,l) = trim(statname(2,2,l))
98  ELSEIF (statcode(2,1,l)==stat_none) THEN
99  statname(1,1,l) = '<'//trim(statname(1,1,l))//'>'
100  ELSE
101  IF (statname(2,1,l)==statname(1,1,l)) THEN
102  statname(1,1,l) = '<'//trim(statname(2,1,l))//'^2>'
103  IF (statname(2,2,l)/=' ') THEN
104  statname(1,2,l) = '('//trim(statname(2,2,l))//')^2'
105  ENDIF
106  ELSE
107  IF (len_trim(statname(1,1,l))>1 .OR. len_trim(statname(2,1,l))>1) THEN
108  statname(1,1,l) = '<'//trim(statname(1,1,l))//' '// &
109  trim(statname(2,1,l))//'>'
110  ELSE
111  statname(1,1,l) = '<'//trim(statname(1,1,l))// &
112  trim(statname(2,1,l))//'>'
113  ENDIF
114  statname(1,2,l) = trim(statname(1,2,l))//' '//trim(statname(2,2,l))
115  ENDIF
116  ENDIF
117 
118  ENDDO
119 
120 ! finalize --------------------------------------------------------------------
121 
122 999 CONTINUE
123 
124  CALL deregisterfunction( global )
125 
126 END SUBROUTINE genxstatnaming
127 
128 !******************************************************************************
129 !
130 ! RCS Revision history:
131 !
132 ! $Log: STAT_GenxStatNaming.F90,v $
133 ! Revision 1.3 2008/12/06 08:44:01 mtcampbe
134 ! Updated license.
135 !
136 ! Revision 1.2 2008/11/19 22:17:15 mtcampbe
137 ! Added Illinois Open Source License/Copyright
138 !
139 ! Revision 1.1 2006/01/03 06:34:41 wasistho
140 ! initial import
141 !
142 ! Revision 1.1 2004/12/01 21:23:42 haselbac
143 ! Initial revision after changing case
144 !
145 ! Revision 1.1 2004/06/07 23:05:56 wasistho
146 ! provide Genx statistics names, units, and anytime-activation
147 !
148 !
149 !******************************************************************************
150 
151 
152 
153 
154 
155 
156 
subroutine genxstatnaming(global, fluidType)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469