Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_UserInput.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 RADI user input and store it in RADI data structure.
26 !
27 ! Description: RADI simulation parameters are first set to default values.
28 ! They are then overruled by user input parameters. Based
29 ! on this, derived RADI variables are defined. Finally,
30 ! necessary checkings are performed against inconsistencies.
31 !
32 ! Input: regions = user input in all regions
33 !
34 ! Output: regions = RADI user input, parameters and derived variables
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: RADI_UserInput.F90,v 1.3 2008/12/06 08:44:38 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2001 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 #ifdef RFLO
47 SUBROUTINE radi_userinput( regions )
48 #endif
49 #ifdef RFLU
50 SUBROUTINE radi_userinput
51 #endif
52 
53  USE moddatastruct, ONLY : t_region
54  USE modglobal, ONLY : t_global
57  USE moderror
58  USE modparameters
60  IMPLICIT NONE
61 
62 ! ... parameters
63  TYPE (t_region), POINTER :: regions(:)
64 
65 ! ... loop variables
66  INTEGER :: ireg
67 
68 ! ... local variables
69  TYPE(t_global), POINTER :: global
70 
71 !******************************************************************************
72 
73  global => regions(1)%global
74  CALL registerfunction( global,'RADI_UserInput',&
75  'RADI_UserInput.F90' )
76 
77 ! initialize parameters --------------------------------------------------
78 
79 #ifdef RFLO
80  CALL radi_initinputvalues( regions )
81 #endif
82 #ifdef RFLU
84 #endif
85 
86 ! read user input
87 
88 #ifdef RFLO
89  CALL radi_readinputfile( regions )
90 #endif
91 #ifdef RFLU
93 #endif
94 
95 ! perform global test whether radiation is active in any region
96 
97  DO ireg=1,global%nRegions
98  IF (regions(ireg)%radiInput%radiModel /= radi_model_none) THEN
99  global%radiActive = .true.
100  ENDIF
101  ENDDO
102 
103  IF (global%radiActive) THEN
104 
105 ! - set RADI derived parameters or variables based on user input
106 
107 #ifdef RFLO
108  CALL radi_derivedinputvalues( regions )
109 #endif
110 #ifdef RFLU
112 #endif
113 
114 ! - check user input and parameters set in the code
115 
116 #ifdef RFLO
117  CALL radi_checkparaminput( regions )
118 #endif
119 #ifdef RFLU
121 #endif
122 
123  ENDIF ! radiActive
124 
125 ! finalize --------------------------------------------------------
126 
127  CALL deregisterfunction( global )
128 
129 END SUBROUTINE radi_userinput
130 
131 !******************************************************************************
132 !
133 ! RCS Revision history:
134 !
135 ! $Log: RADI_UserInput.F90,v $
136 ! Revision 1.3 2008/12/06 08:44:38 mtcampbe
137 ! Updated license.
138 !
139 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
140 ! Added Illinois Open Source License/Copyright
141 !
142 ! Revision 1.1 2004/09/22 02:35:50 wasistho
143 ! changed file nomenclature from lower to upper case
144 !
145 ! Revision 1.2 2003/08/01 22:16:25 wasistho
146 ! prepared rocrad for Genx
147 !
148 ! Revision 1.1 2003/07/17 01:16:59 wasistho
149 ! initial activation rocrad
150 !
151 !
152 !
153 !******************************************************************************
154 
155 
156 
157 
158 
159 
160 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469