Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadFormatsSection.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 formats of grid and solution file.
26 !
27 ! Description: none.
28 !
29 ! Input: user input file.
30 !
31 ! Output: global = format of grid and solution file.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: ReadFormatsSection.F90,v 1.4 2008/12/06 08:44:09 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE readformatssection( global )
44 
45  USE moddatatypes
46  USE modglobal, ONLY : t_global
47  USE modinterfaces, ONLY : readsection
48  USE moderror
49  USE modparameters
50  IMPLICIT NONE
51 
52 ! ... parameters
53  TYPE(t_global), POINTER :: global
54 
55 ! ... local variables
56  INTEGER :: nvals
57  INTEGER, PARAMETER :: nvals_max = 3
58 
59  CHARACTER(10) :: keys(nvals_max)
60 
61  LOGICAL :: defined(nvals_max)
62 
63  REAL(RFREAL) :: vals(nvals_max)
64 
65 !******************************************************************************
66 
67  CALL registerfunction( global,'ReadFormatsSection',&
68  'ReadFormatsSection.F90' )
69 
70 ! specify keywords and search for them
71 
72  nvals = nvals_max
73 
74  keys(1) = 'GRID'
75  keys(2) = 'SOLUTION'
76 
77 #ifdef RFLU
78  keys(3) = 'GRIDSRC'
79 #endif
80 
81  CALL readsection( global,if_input,nvals,keys(1:nvals),vals(1:nvals), &
82  defined(1:nvals) )
83 
84  IF (defined(1).eqv. .true.) THEN
85  global%gridFormat = format_ascii
86  IF (vals(1)>0.9 .AND. vals(1)<1.1) global%gridFormat = format_binary
87  IF (vals(1) > 1.9) global%gridFormat = format_hdf
88  ENDIF
89  IF (defined(2).eqv. .true.) THEN
90  global%solutFormat = format_ascii
91  IF (vals(2)>0.9 .AND. vals(2)<1.1) global%solutFormat = format_binary
92  IF (vals(2) > 1.9) global%solutFormat = format_hdf
93  ENDIF
94 
95 #ifdef RFLU
96  IF (defined(3).eqv. .true.) THEN
97  global%gridSource = nint(vals(3))
98  ENDIF ! defined
99 #endif
100 
101 ! finalize
102 
103  CALL deregisterfunction( global )
104 
105 END SUBROUTINE readformatssection
106 
107 !******************************************************************************
108 !
109 ! RCS Revision history:
110 !
111 ! $Log: ReadFormatsSection.F90,v $
112 ! Revision 1.4 2008/12/06 08:44:09 mtcampbe
113 ! Updated license.
114 !
115 ! Revision 1.3 2008/11/19 22:17:23 mtcampbe
116 ! Added Illinois Open Source License/Copyright
117 !
118 ! Revision 1.2 2008/10/23 18:20:55 mtcampbe
119 ! Crazy number of changes to track and fix initialization and
120 ! restart bugs. Many improperly formed logical expressions
121 ! were fixed, and bug in allocation for data associated with
122 ! the BC_INFLOWVELTEMP boundary condition squashed in
123 ! RFLO_ReadBcInflowVelSection.F90.
124 !
125 ! Revision 1.1 2004/12/01 16:50:18 haselbac
126 ! Initial revision after changing case
127 !
128 ! Revision 1.11 2003/11/20 16:40:35 mdbrandy
129 ! Backing out RocfluidMP changes from 11-17-03
130 !
131 ! Revision 1.8 2003/05/16 02:27:43 haselbac
132 ! Removed KIND=RFREAL from NINT statements
133 !
134 ! Revision 1.7 2003/05/15 02:57:02 jblazek
135 ! Inlined index function.
136 !
137 ! Revision 1.6 2003/03/15 16:23:51 haselbac
138 ! Added KIND qualifyer
139 !
140 ! Revision 1.5 2002/09/05 17:40:20 jblazek
141 ! Variable global moved into regions().
142 !
143 ! Revision 1.4 2002/03/26 19:02:34 haselbac
144 ! Added ROCFLU functionality
145 !
146 ! Revision 1.3 2002/01/11 17:18:31 jblazek
147 ! Updated description of I/O variables.
148 !
149 ! Revision 1.2 2001/12/22 00:09:38 jblazek
150 ! Added routines to store grid and solution.
151 !
152 ! Revision 1.1 2001/12/07 16:54:31 jblazek
153 ! Added files to read user input.
154 !
155 !******************************************************************************
156 
157 
158 
159 
160 
161 
162 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine readformatssection(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