Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_InitSolution.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: calls routines for initialisation of RADI solutions
26 !
27 ! Description: Initiate solution variables (qr, radInd, radCoef) to zero.
28 ! No initial work required for diffusion approximation method of
29 ! radiation. For general (RTE) methods, angular discretization
30 ! is done once in initialisation, while directional weights are
31 ! computed for each mesh configuration (once in initialisation and
32 ! called again when the grid move).
33 !
34 ! Input: iReg = index of current region
35 ! region = data of current region
36 !
37 ! Output: for diffusion approximation: none.
38 ! for general method (RTE): angular mesh and directional weights.
39 !
40 ! Notes: none.
41 !
42 !******************************************************************************
43 !
44 ! $Id: RADI_InitSolution.F90,v 1.3 2008/12/06 08:44:37 mtcampbe Exp $
45 !
46 ! Copyright: (c) 2001 by the University of Illinois
47 !
48 !******************************************************************************
49 
50 #ifdef RFLO
51 SUBROUTINE radi_initsolution( iReg,region )
52 #endif
53 #ifdef RFLU
54 SUBROUTINE radi_initsolution
55 #endif
56 
57  USE moddatatypes
58 #ifdef RFLO
59  USE moddatastruct, ONLY : t_region
60 
61 #include "Indexing.h"
62 #endif
63  USE modglobal, ONLY : t_global
64 ! USE RADI_ModInterfaces, ONLY : RADI_AngularMesh, RADI_CalcDirWeights
65  USE moderror
67  IMPLICIT NONE
68 
69 ! ... parameters
70  TYPE(t_region) :: region
71  INTEGER :: ireg
72 
73 ! ... local variables
74  TYPE(t_global), POINTER :: global
75 
76  INTEGER :: ilev, radimodel
77 
78 !******************************************************************************
79 
80  global => region%global
81  CALL registerfunction( global,'RADI_InitSolution',&
82  'RADI_InitSolution.F90' )
83 
84 ! initiate solution, perform initial works and works needed to be done
85 ! everytime the grid change
86 
87 #ifdef RFLO
88  ilev = region%currLevel
89  radimodel = region%radiInput%radiModel
90 
91  region%levels(ilev)%radi%qri = 0._rfreal
92  region%levels(ilev)%radi%qrj = 0._rfreal
93  region%levels(ilev)%radi%qrk = 0._rfreal
94  region%levels(ilev)%radi%radInt = 0._rfreal
95  region%levels(ilev)%radi%radCoef = 0._rfreal
96  region%levels(ilev)%radi%wvInt = 0._rfreal
97  region%levels(ilev)%radi%goFact = 0._rfreal
98 
99  IF ((radimodel == radi_model_rtegray) .OR. &
100  (radimodel == radi_model_rteband)) THEN
101 ! CALL RADI_angularMesh( region )
102 ! CALL RADI_calcDirWeights( region )
103  ENDIF
104 
105 #endif
106 #ifdef RFLU
107  radimodel = radiinput%radiModel
108 
109 #endif
110 
111 ! finalize --------------------------------------------------------
112 
113  CALL deregisterfunction( global )
114 
115 END SUBROUTINE radi_initsolution
116 
117 !******************************************************************************
118 !
119 ! RCS Revision history:
120 !
121 ! $Log: RADI_InitSolution.F90,v $
122 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
123 ! Updated license.
124 !
125 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
126 ! Added Illinois Open Source License/Copyright
127 !
128 ! Revision 1.1 2004/09/22 02:35:49 wasistho
129 ! changed file nomenclature from lower to upper case
130 !
131 ! Revision 1.3 2003/07/30 22:22:53 wasistho
132 ! enter part and smoke data into radiation
133 !
134 ! Revision 1.2 2003/07/23 03:14:10 wasistho
135 ! cured baby illness
136 !
137 ! Revision 1.1 2003/07/17 01:16:59 wasistho
138 ! initial activation rocrad
139 !
140 !
141 !
142 !******************************************************************************
143 
144 
145 
146 
147 
148 
149 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469