Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RVAV_ReadSectionStream1.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: read in user input related to the type of data in stream1, the
26 ! formats of the grids and solution files for the verification and
27 ! validation operations
28 !
29 ! Description: none.
30 !
31 ! Input: user input file.
32 !
33 ! Output: global% and globalRVAV%
34 !
35 ! Notes: for the moment the vav subroutines are written only for rocflo
36 !
37 !******************************************************************************
38 !
39 ! $Id: RVAV_ReadSectionStream1.F90,v 1.3 2008/12/06 08:45:08 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2002 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rvav_readsectionstream1( global )
46 
47  USE moddatatypes
48  USE modglobal, ONLY : t_global
49  USE modinterfaces, ONLY : readsection
50  USE moderror
51  USE modparameters
53  USE rvav_modglobal
54  IMPLICIT NONE
55 
56 ! ... parameter variables
57  TYPE(t_global), POINTER :: global
58 
59 ! ... local variables
60  INTEGER :: nvals
61  INTEGER, PARAMETER :: nvals_max = 4
62 
63  CHARACTER(CHRLEN) :: keys(nvals_max)
64 
65  LOGICAL :: defined(nvals_max)
66 
67  REAL(RFREAL) :: vals(nvals_max)
68 
69 !******************************************************************************
70 
71  CALL registerfunction( global, 'RVAV_ReadSectiontream1',&
72  'RVAV_ReadSectionStream1.F90' )
73 
74 ! specify keywords and search for them
75 
76  nvals = nvals_max
77 
78  keys(1) = 'RVAV_FLOW_TYPE'
79  keys(2) = 'RVAV_FILE_TYPE'
80  keys(3) = 'RVAV_GRID_TYPE'
81  keys(4) = 'RVAV_SOLUTION_TYPE'
82 
83  CALL readsection( global, if_rvav_input,nvals,keys,vals,defined )
84 
85  IF (defined(1)) THEN
86  globalrvav%FlowTypeS1 = flow_steady
87  IF (vals(1)>0.9 ) globalrvav%FlowTypeS1 = flow_unsteady
88  ENDIF
89 
90  IF (defined(2)) THEN
91  IF (vals(2)>0.0 .AND. vals(2)<10.1) globalrvav%FileTypeS1 = file_computed
92  IF (vals(2)>10.1 .AND. vals(2)<20.1) globalrvav%FileTypeS1 = file_experimental
93  IF (vals(2)>20.1 .AND. vals(2)<30.1) globalrvav%FileTypeS1 = file_analytical
94  ENDIF
95 
96  IF (defined(3)) THEN
97  globalrvav%GridFormatS1 = format_ascii
98  IF (vals(3)>0.9 .AND. vals(3)<1.1) globalrvav%GridFormatS1 = format_binary
99  IF (vals(3)>1.9) globalrvav%GridFormatS1 = format_hdf
100  ENDIF
101 
102  IF (defined(4)) THEN
103  globalrvav%SolutFormatS1 = format_ascii
104  IF (vals(4)>0.9 .AND. vals(4)<1.1) globalrvav%SolutFormatS1 = format_binary
105  IF (vals(4)>1.9) globalrvav%SolutFormatS1 = format_hdf
106  ENDIF
107 
108 ! .. checking if we have read the stough correctly
109 
110  IF ( global%verbLevel/=verbose_none ) THEN
111  WRITE(stdout,'(/,A)') ' readSectionStream1'
112  WRITE(stdout,'(A,I5)') ' FlowTypeS1 = ',globalrvav%FlowTypeS1
113  WRITE(stdout,'(A,I5)') ' FileTypeS1 = ',globalrvav%FileTypeS1
114  WRITE(stdout,'(A,I5)') ' GridFormatS1 = ',globalrvav%GridFormatS1
115  WRITE(stdout,'(A,I5)') ' SolutFormatS1 = ',globalrvav%SolutFormatS1
116  WRITE(stdout,'(A,I5)') ' readSectionStream1'
117  END IF ! verbLevel
118 
119 ! finalize
120 
121  CALL deregisterfunction( global )
122 
123 END SUBROUTINE rvav_readsectionstream1
124 
125 !******************************************************************************
126 !
127 ! RCS Revision history
128 !
129 ! $Log: RVAV_ReadSectionStream1.F90,v $
130 ! Revision 1.3 2008/12/06 08:45:08 mtcampbe
131 ! Updated license.
132 !
133 ! Revision 1.2 2008/11/19 22:18:19 mtcampbe
134 ! Added Illinois Open Source License/Copyright
135 !
136 ! Revision 1.1 2004/12/01 22:43:30 fnajjar
137 ! Initial revision after changing case
138 !
139 ! Revision 1.8 2003/11/20 16:40:41 mdbrandy
140 ! Backing out RocfluidMP changes from 11-17-03
141 !
142 ! Revision 1.4 2003/05/15 02:57:08 jblazek
143 ! Inlined index function.
144 !
145 ! Revision 1.3 2002/09/10 00:01:45 f-najjar
146 ! Variable global moved into regions()
147 !
148 ! Revision 1.2 2002/08/15 19:48:06 jblazek
149 ! Implemented grid deformation capability.
150 !
151 ! Revision 1.1.1.1 2002/06/03 21:41:29 f-najjar
152 ! Initial Import of RocVaV
153 !
154 !
155 !******************************************************************************
156 
157 
158 
159 
160 
161 
162 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rvav_readsectionstream1(global)
subroutine readsection(global, fileID, nvals, keys, vals, defined)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
subroutine deregisterfunction(global)
Definition: ModError.F90:469