Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PERI_ReadPeriSection.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 within PERI section (done on all processors).
26 !
27 ! Description: none.
28 !
29 ! Input: regions = user input file of all regions.
30 !
31 ! Output: regions = PERI input parameters.
32 !
33 ! Notes: Mother routine = ReadInputFile.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PERI_ReadPeriSection.F90,v 1.4 2008/12/06 08:44:36 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE peri_readperisection( regions )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48 #ifdef RFLO
50 #endif
51 #ifdef RFLU
52  USE modinterfaces, ONLY : readsection
53 #endif
54  USE moderror
55  USE modparameters
57 
58  IMPLICIT NONE
59 
60 ! ... parameters
61  TYPE(t_region), POINTER :: regions(:)
62 
63 ! ... local variables
64  CHARACTER(CHRLEN) :: rcsidentstring
65  TYPE(t_global), POINTER :: global
66 
67 
68  INTEGER :: nvals
69  INTEGER :: brbeg, brend
70  INTEGER, PARAMETER :: nvals_max = 6
71 
72  LOGICAL :: defined(nvals_max)
73  REAL(RFREAL) :: vals(nvals_max)
74  CHARACTER(15) :: keys(nvals_max)
75 
76 !******************************************************************************
77 
78  rcsidentstring = '$RCSfile: PERI_ReadPeriSection.F90,v $'
79 
80  global => regions(1)%global
81  CALL registerfunction( global,'PERI_ReadPeriSection',&
82  'PERI_ReadPeriSection.F90' )
83 
84 ! specify keywords and search for them
85 
86  nvals = nvals_max
87  keys( 1) = 'FLOWKIND'
88  keys( 2) = 'ISPLIT'
89  keys( 3) = 'JSPLIT'
90  keys( 4) = 'KSPLIT'
91  keys( 5) = 'CPREPSILON'
92  keys( 6) = 'PGRADTYPE'
93 
94 #ifdef RFLO
95 
96  CALL readregionsection( global,if_input,nvals,keys(1:nvals),vals(1:nvals), &
97  brbeg,brend,defined(1:nvals) )
98 #endif
99 #ifdef RFLU
100  CALL readsection( global,if_input,nvals,keys(1:nvals),vals(1:nvals), &
101  defined(1:nvals) )
102 
103  brbeg = lbound(regions,1) ! temporary for now before zonal modeling apply
104  brend = ubound(regions,1)
105 #endif
106 
107  IF (defined(1)) THEN
108  regions(brbeg:brend)%periInput%flowKind = int(vals(1)+0.5_rfreal)
109  ENDIF
110  IF (defined(2)) THEN
111  regions(brbeg:brend)%periInput%split(icoord) = int(vals(2)+0.5_rfreal)
112  ENDIF
113  IF (defined(3)) THEN
114  regions(brbeg:brend)%periInput%split(jcoord) = int(vals(3)+0.5_rfreal)
115  ENDIF
116  IF (defined(4)) THEN
117  regions(brbeg:brend)%periInput%split(kcoord) = int(vals(4)+0.5_rfreal)
118  ENDIF
119  IF (defined(5)) THEN
120  regions(brbeg:brend)%periInput%cprEpsilon = abs(vals(5))
121  ENDIF
122  IF (defined(6)) THEN
123  regions(brbeg:brend)%periInput%pgradType = int(vals(6)+0.5_rfreal)
124  ENDIF
125 
126 ! finalize -------------------------------------------------------
127 
128  CALL deregisterfunction( global )
129 
130 END SUBROUTINE peri_readperisection
131 
132 !******************************************************************************
133 !
134 ! RCS Revision history:
135 !
136 ! $Log: PERI_ReadPeriSection.F90,v $
137 ! Revision 1.4 2008/12/06 08:44:36 mtcampbe
138 ! Updated license.
139 !
140 ! Revision 1.3 2008/11/19 22:17:49 mtcampbe
141 ! Added Illinois Open Source License/Copyright
142 !
143 ! Revision 1.2 2004/06/11 21:49:40 wasistho
144 ! prepared for RFLU
145 !
146 ! Revision 1.1 2004/06/08 23:56:56 wasistho
147 ! changed nomenclature
148 !
149 ! Revision 1.3 2003/09/18 01:57:04 wasistho
150 ! added ijksplit and pgradType in PERI_PgradUpdate
151 !
152 ! Revision 1.2 2003/04/02 01:48:22 wasistho
153 ! minimize CPR user input
154 !
155 ! Revision 1.1.1.1 2003/03/29 03:36:30 wasistho
156 ! install ROCPERI
157 !
158 !
159 !
160 !******************************************************************************
161 
162 
163 
164 
165 
166 
167 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************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 brbeg
subroutine peri_readperisection(regions)
subroutine readsection(global, fileID, nvals, keys, vals, defined)
subroutine readregionsection(global, fileID, nvals, keys, vals, brbeg, brend, 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