Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_AllocateMemory.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: Allocate memory for Rocflu.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Region pointer
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLU_AllocateMemory.F90,v 1.25 2008/12/06 08:44:29 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2002-2006 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflu_allocatememory(pRegion)
45 
46  USE moddatatypes
47  USE moderror
48  USE modglobal, ONLY: t_global
49  USE modparameters
50  USE moddatastruct, ONLY: t_region
51  USE modmpi
52 
58 
59  IMPLICIT NONE
60 
61 ! ******************************************************************************
62 ! Definitions and declarations
63 ! ******************************************************************************
64 
65 ! ==============================================================================
66 ! Arguments
67 ! ==============================================================================
68 
69  TYPE(t_region), POINTER :: pregion
70 
71 ! ==============================================================================
72 ! Locals
73 ! ==============================================================================
74 
75  CHARACTER(CHRLEN) :: rcsidentstring
76  TYPE(t_global), POINTER :: global
77 
78 ! ******************************************************************************
79 ! Start
80 ! ******************************************************************************
81 
82  rcsidentstring = '$RCSfile: RFLU_AllocateMemory.F90,v $ $Revision: 1.25 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'RFLU_AllocateMemory',&
87  'RFLU_AllocateMemory.F90')
88 
89  IF ( global%myProcid == masterproc .AND. &
90  global%verbLevel >= verbose_high ) THEN
91  WRITE(stdout,'(A,1X,A)') solver_name,'Allocating memory for mixture...'
92  END IF ! global%verbLevel
93 
94 ! ******************************************************************************
95 ! Allocate memory
96 ! ******************************************************************************
97 
98  SELECT CASE ( pregion%mixtInput%fluidModel )
99 
100 ! ==============================================================================
101 ! Compressible fluid
102 ! ==============================================================================
103 
104  CASE ( fluid_model_comp )
105  CALL rflu_allocatememorysol(pregion)
106  CALL rflu_allocatememorytstep(pregion)
107  CALL rflu_allocatememorytstep_c(pregion)
108  CALL rflu_allocatememorygspeeds(pregion)
109 
110 ! ==============================================================================
111 ! Incompressible fluid
112 ! ==============================================================================
113 
114  CASE ( fluid_model_incomp )
115  CALL rflu_allocatememorysol(pregion)
116  CALL rflu_allocatememorytstep(pregion)
117  CALL rflu_allocatememorytstep_i(pregion)
118  CALL rflu_allocatememorygspeeds(pregion)
119 
120 ! ==============================================================================
121 ! Default
122 ! ==============================================================================
123 
124  CASE default
125  CALL errorstop(global,err_reached_default,__line__)
126  END SELECT ! pRegion%mixtInput%fluidModel
127 
128 ! ******************************************************************************
129 ! End
130 ! ******************************************************************************
131 
132  IF ( global%myProcid == masterproc .AND. &
133  global%verbLevel >= verbose_high ) THEN
134  WRITE(stdout,'(A,1X,A)') solver_name,'Allocating memory for mixture done.'
135  END IF ! global%verbLevel
136 
137  CALL deregisterfunction(global)
138 
139 END SUBROUTINE rflu_allocatememory
140 
141 !******************************************************************************
142 !
143 ! RCS Revision history:
144 !
145 ! $Log: RFLU_AllocateMemory.F90,v $
146 ! Revision 1.25 2008/12/06 08:44:29 mtcampbe
147 ! Updated license.
148 !
149 ! Revision 1.24 2008/11/19 22:17:39 mtcampbe
150 ! Added Illinois Open Source License/Copyright
151 !
152 ! Revision 1.23 2006/03/26 20:22:12 haselbac
153 ! Removed error trap for GL model
154 !
155 ! Revision 1.22 2004/12/19 15:48:55 haselbac
156 ! Modified so can select different fluid models
157 !
158 ! Revision 1.21 2004/03/19 21:21:06 haselbac
159 ! Complete rewrite
160 !
161 ! Revision 1.20 2004/03/03 23:55:40 jferry
162 ! Allowed particles to be run with Euler case
163 !
164 ! Revision 1.19 2004/01/29 22:59:15 haselbac
165 ! Added/deleted allocation for mfMixt/vfMixt arrays, clean-up
166 !
167 ! Revision 1.18 2003/12/04 03:29:57 haselbac
168 ! Added memory allocation for gradients, cleaned up
169 !
170 ! Revision 1.17 2003/11/25 21:04:34 haselbac
171 ! Added allocation for mass and volume fluxes on patches
172 !
173 ! Revision 1.16 2003/11/03 03:50:15 haselbac
174 ! Removed allocation of bf2bg list
175 !
176 ! Revision 1.15 2003/05/13 23:48:36 haselbac
177 ! Changed allocation of gs for GENX
178 !
179 ! Revision 1.14 2003/04/18 20:00:42 haselbac
180 ! Added explicit initialization (prevent Frost-problem)
181 !
182 ! Revision 1.13 2003/03/31 16:16:26 haselbac
183 ! Added disp array, some cosmetics
184 !
185 ! Revision 1.12 2003/03/15 18:24:04 haselbac
186 ! Some changes for parallel computations
187 !
188 ! Revision 1.11 2003/01/28 14:20:33 haselbac
189 ! Consolidation of allocation, some clean-up
190 !
191 ! Revision 1.10 2002/11/02 02:03:09 wasistho
192 ! Added TURB statistics
193 !
194 ! Revision 1.9 2002/10/27 19:11:01 haselbac
195 ! Proper allocation of grid motion variables
196 !
197 ! Revision 1.8 2002/10/08 15:49:29 haselbac
198 ! {IO}STAT=global%error replaced by {IO}STAT=errorFlag - SGI problem
199 !
200 ! Revision 1.7 2002/09/09 15:26:31 haselbac
201 ! global and mixtInput now under regions, new allocation statements
202 !
203 ! Revision 1.6 2002/07/25 14:26:42 haselbac
204 ! Added allocation for cell gradients
205 !
206 ! Revision 1.5 2002/06/27 15:25:54 haselbac
207 ! Changed allocation to *Tot for parallelization
208 !
209 ! Revision 1.4 2002/06/17 13:34:12 haselbac
210 ! Prefixed SOLVER_NAME to all screen output
211 !
212 ! Revision 1.3 2002/06/14 21:54:35 wasistho
213 ! Added time avg statistics
214 !
215 ! Revision 1.2 2002/06/14 20:21:19 haselbac
216 ! Added grid speed stuff
217 !
218 ! Revision 1.1 2002/05/04 17:01:59 haselbac
219 ! Initial revision
220 !
221 !******************************************************************************
222 
223 
224 
225 
226 
227 
228 
subroutine rflu_allocatememory(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine, public rflu_allocatememorysol(pRegion)
subroutine, public rflu_allocatememorytstep_i(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine, public rflu_allocatememorygspeeds(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine, public rflu_allocatememorytstep_c(pRegion)
subroutine, public rflu_allocatememorytstep(pRegion)