Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_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 boundary conditions pertinent to
26 ! rocturb (done on all processors).
27 !
28 ! Description: none.
29 !
30 ! Input: boundary condition file.
31 !
32 ! Output: regions = TURB-BC data for all regions.
33 !
34 ! Notes: none
35 !
36 !******************************************************************************
37 !
38 ! $Id: TURB_ReadBcInputFile.F90,v 1.6 2008/12/06 08:44:42 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE turb_readbcinputfile( regions )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
50  USE moderror
51  USE modmpi
52  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_region), POINTER :: regions(:)
57 
58 ! ... local variables
59  CHARACTER(CHRLEN) :: rcsidentstring
60  CHARACTER(2*CHRLEN+9) :: fname
61  CHARACTER(256) :: line
62  TYPE(t_global), POINTER :: global
63 
64  INTEGER :: errorflag
65 
66 !******************************************************************************
67 
68  rcsidentstring = '$RCSfile: TURB_ReadBcInputFile.F90,v $'
69 
70  global => regions(1)%global
71 
72  CALL registerfunction( global,'TURB_ReadBcInputFile',&
73  'TURB_ReadBcInputFile.F90' )
74 
75  IF ( global%myProcid == masterproc .AND. &
76  global%verbLevel > verbose_none ) THEN
77  WRITE(stdout,'(A,1X,A)') solver_name,'Entering TURB_ReadBcInputFile...'
78  END IF ! global%verbLevel
79 
80 ! open file
81 
82  WRITE(fname,'(A)') trim(global%inDir)//trim(global%casename)//'.bc'
83  OPEN(if_input,file=fname,form='formatted',status='old',iostat=errorflag)
84  global%error = errorflag
85  IF (global%error /= 0) &
86  CALL errorstop( global,err_file_open,__line__,'File: '//trim(fname) )
87 
88 ! read file looking for keywords
89 
90  DO
91  READ(if_input,'(A256)',err=10,end=99) line
92  SELECT CASE(trim(line))
93 
94  CASE ('# BC_WALLMODEL')
95  CALL turb_cowlmreadbcsection( regions )
96 
97  END SELECT
98  ENDDO
99 
100 99 CONTINUE
101  CLOSE(if_input,iostat=errorflag)
102  global%error = errorflag
103  IF (global%error /= 0) &
104  CALL errorstop( global,err_file_close,__line__,'File: '//trim(fname) )
105 
106 ! finalization & error handling -----------------------------------------------
107 
108  goto 999
109 
110 10 CONTINUE
111  CALL errorstop( global,err_file_read,__line__,'File: '//trim(fname) )
112 
113 999 CONTINUE
114 
115  IF ( global%myProcid == masterproc .AND. &
116  global%verbLevel > verbose_none ) THEN
117  WRITE(stdout,'(A,1X,A)') solver_name,'Leaving TURB_ReadBcInputFile.'
118  END IF ! global%verbLevel
119 
120  CALL deregisterfunction( global )
121 
122 END SUBROUTINE turb_readbcinputfile
123 
124 !******************************************************************************
125 !
126 ! RCS Revision history:
127 !
128 ! $Log: TURB_ReadBcInputFile.F90,v $
129 ! Revision 1.6 2008/12/06 08:44:42 mtcampbe
130 ! Updated license.
131 !
132 ! Revision 1.5 2008/11/19 22:17:54 mtcampbe
133 ! Added Illinois Open Source License/Copyright
134 !
135 ! Revision 1.4 2006/02/04 04:59:42 wasistho
136 ! added enter and leave statements
137 !
138 ! Revision 1.3 2004/03/13 03:15:43 wasistho
139 ! get rid of flo/flu identifier in TURB_Co.. routines
140 !
141 ! Revision 1.2 2004/03/08 23:31:05 wasistho
142 ! changed turb nomenclature
143 !
144 ! Revision 1.1 2004/03/05 04:37:00 wasistho
145 ! changed nomenclature
146 !
147 ! Revision 1.1 2003/05/31 01:48:23 wasistho
148 ! installed turb. wall layer model
149 !
150 !
151 !******************************************************************************
152 
153 
154 
155 
156 
157 
158 
CImg< T > & line(const unsigned int y0)
Get a line.
Definition: CImg.h:18421
subroutine turb_cowlmreadbcsection(regions)
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 errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine turb_readbcinputfile(regions)
subroutine deregisterfunction(global)
Definition: ModError.F90:469