Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RVAV_ReadInputFile.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 for ROCVAV.
26 !
27 ! Description: none.
28 !
29 ! Input: user input file.
30 !
31 ! Output: None
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RVAV_ReadInputFile.F90,v 1.3 2008/12/06 08:45:08 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE rvav_readinputfile( global )
44 
45  USE moddatatypes
46  USE modglobal, ONLY : t_global
47  USE moderror
48  USE modparameters
50  USE rvav_modglobal
54  IMPLICIT NONE
55 
56 ! ... parameter variables
57  TYPE(t_global), POINTER :: global
58 
59 ! ... local variables
60  CHARACTER(CHRLEN+4) :: fname
61  CHARACTER(256) :: line
62 
63  INTEGER :: errorflag
64 
65 !******************************************************************************
66 
67  CALL registerfunction( global, 'RVAV_ReadInputFile',&
68  'RVAV_ReadInputFile.F90' )
69 
70 ! open file
71 
72  WRITE(fname,'(A,I5.5,A,1PE11.5)') trim(global%casename)//'.inp_RVAV'
73 
74  OPEN(if_rvav_input,file=fname,form='formatted',status='old',iostat=errorflag)
75  global%error = errorflag
76  IF (global%error /= 0) &
77  CALL errorstop( global, err_file_open,__line__,'File: '//trim(fname) )
78 
79 ! read file looking for keywords
80 
81  DO
82  READ(if_rvav_input,'(A256)',err=10,end=999) line
83 
84  SELECT CASE(trim(line))
85  CASE ('# RVAV_STREAM1')
86  IF ( global%verbLevel/=verbose_none ) &
87  WRITE(stdout,'(/,A)') ' RVAV_ReadSectionStream1 ...'
88  CALL rvav_readsectionstream1( global ) ! reads everything specified about stream1
89  ! in the input file RVAV_Input.inp
90 
91  CASE ('# RVAV_STREAM2')
92  IF ( global%verbLevel/=verbose_none ) &
93  WRITE(stdout,'(/,A)') ' RVAV_ReadStream2Section ...'
94  CALL rvav_readsectionstream2( global ) ! reads everything specified about stream2
95  ! in the input file RVAV_Input.inp
96 
97  CASE ('# RVAV_COMPARISONS')
98  IF ( global%verbLevel/=verbose_none ) &
99  WRITE(stdout,'(/,A)') ' RVAV_ReadComparisonSection ...'
100  CALL rvav_readcomparisonssection( global ) ! reads everything about the comparison
101  ! to be made with the available data
102 
103 ! if there are more details in the input file put in the appropriate
104 ! subroutine calls here
105 
106  END SELECT
107  ENDDO
108 
109  IF ( global%verbLevel/=verbose_none ) &
110  WRITE(stdout,'(/,A)') 'Closing IF_RVAV_INPUT ...'
111 
112  CLOSE(if_rvav_input,iostat=errorflag)
113  global%error = errorflag
114  IF (global%error /= 0) &
115  CALL errorstop( global,err_file_close,__line__,'File: '//trim(fname) )
116 
117  goto 999
118 
119 ! error handling
120 
121 10 CONTINUE
122  CALL errorstop( global,err_file_read,__line__,'File: '//trim(fname) )
123 
124 999 CONTINUE
125 
126  CALL deregisterfunction( global )
127 
128 END SUBROUTINE rvav_readinputfile
129 
130 !******************************************************************************
131 !
132 ! RCS Revision history:
133 !
134 ! $Log: RVAV_ReadInputFile.F90,v $
135 ! Revision 1.3 2008/12/06 08:45:08 mtcampbe
136 ! Updated license.
137 !
138 ! Revision 1.2 2008/11/19 22:18:19 mtcampbe
139 ! Added Illinois Open Source License/Copyright
140 !
141 ! Revision 1.1 2004/12/01 22:43:29 fnajjar
142 ! Initial revision after changing case
143 !
144 ! Revision 1.5 2003/05/15 02:57:08 jblazek
145 ! Inlined index function.
146 !
147 ! Revision 1.4 2002/10/12 03:20:51 jblazek
148 ! Replaced [io]stat=global%error with local errorFlag for Rocflo.
149 !
150 ! Revision 1.3 2002/09/10 00:01:45 f-najjar
151 ! Variable global moved into regions()
152 !
153 ! Revision 1.2 2002/08/15 19:48:06 jblazek
154 ! Implemented grid deformation capability.
155 !
156 ! Revision 1.1.1.1 2002/06/03 21:41:29 f-najjar
157 ! Initial Import of RocVaV
158 !
159 !******************************************************************************
160 
161 
162 
163 
164 
165 
166 
CImg< T > & line(const unsigned int y0)
Get a line.
Definition: CImg.h:18421
subroutine rvav_readsectionstream2(global)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine rvav_readcomparisonssection(global)
subroutine rvav_readinputfile(global)
subroutine rvav_readsectionstream1(global)
**********************************************************************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 SUBROUTINE form
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469