Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_ReadBcInputFile.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 PEUL boundary conditions
26 ! (done on all processors).
27 !
28 ! Description: none.
29 !
30 ! Input: boundary condition file.
31 !
32 ! Output: regions = BC data for all regions.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: PEUL_ReadBcInputFile.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2002 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE peul_readbcinputfile( regions )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE moderror
50  USE modparameters
52 
56  IMPLICIT NONE
57 
58 ! ... parameters
59  TYPE(t_region), POINTER :: regions(:)
60 
61 ! ... local variables
62  CHARACTER(CHRLEN) :: rcsidentstring
63  CHARACTER(2*CHRLEN+9) :: fname
64  CHARACTER(256) :: line
65 
66  INTEGER :: errorflag
67 
68  TYPE(t_global), POINTER :: global
69 
70 !******************************************************************************
71 
72  rcsidentstring = '$RCSfile: PEUL_ReadBcInputFile.F90,v $ $Revision: 1.3 $'
73 
74  global => regions(1)%global
75 
76  CALL registerfunction( global,'PEUL_ReadBcInputFile',&
77  'PEUL_ReadBcInputFile.F90' )
78 
79 ! open file
80 
81  WRITE(fname,'(A)') trim(global%inDir)//trim(global%casename)//'.bc'
82  OPEN(if_input,file=fname,form='formatted',status='old',iostat=errorflag)
83  global%error = errorflag
84  IF (global%error /= 0) &
85  CALL errorstop( global,err_file_open,__line__,'File: '//trim(fname) )
86 
87 ! read file looking for keywords
88 
89  DO
90  READ(if_input,'(A256)',err=10,end=86) line
91 
92  SELECT CASE(trim(line))
93 
94  CASE ('# BC_PEUL_INFLOW')
95  CALL peul_readbcinflowsection( regions )
96 
97  CASE ('# BC_PEUL_FARF')
98  CALL peul_readbcfarfsection( regions )
99 
100  CASE ('# BC_PEUL_INJECT')
101  CALL peul_readbcinjectsection( regions )
102 
103  END SELECT
104  ENDDO
105 
106 86 CONTINUE
107 
108 ! close file ------------------------------------------------------------------
109 
110  CLOSE(if_input,iostat=errorflag)
111  global%error = errorflag
112  IF (global%error /= 0) &
113  CALL errorstop( global,err_file_close,__line__,'File: '//trim(fname) )
114 
115 ! finalization & error handling -----------------------------------------------
116 
117  CALL deregisterfunction( global )
118  goto 999
119 
120 10 CONTINUE
121  CALL errorstop( global,err_file_read,__line__,'File: '//trim(fname) )
122 
123 999 CONTINUE
124 
125 END SUBROUTINE peul_readbcinputfile
126 
127 !******************************************************************************
128 !
129 ! RCS Revision history:
130 !
131 ! $Log: PEUL_ReadBcInputFile.F90,v $
132 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
133 ! Updated license.
134 !
135 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
136 ! Added Illinois Open Source License/Copyright
137 !
138 ! Revision 1.1 2004/12/01 21:09:43 haselbac
139 ! Initial revision after changing case
140 !
141 ! Revision 1.3 2003/02/26 23:38:30 jferry
142 ! eliminated end=999 convention to ensure that files get closed
143 !
144 ! Revision 1.2 2003/02/12 23:34:48 jferry
145 ! Replaced [io]stat=global%error with local errorFlag
146 !
147 ! Revision 1.1 2003/02/11 22:52:51 jferry
148 ! Initial import of Rocsmoke
149 !
150 !
151 !******************************************************************************
152 
153 
154 
155 
156 
157 
158 
subroutine peul_readbcinputfile(regions)
CImg< T > & line(const unsigned int y0)
Get a line.
Definition: CImg.h:18421
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
**********************************************************************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 peul_readbcinjectsection(regions)
subroutine peul_readbcfarfsection(regions)
subroutine peul_readbcinflowsection(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469