Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rocflu/RFLU_DeallocateMemoryWrapper.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: Deallocate memory wrapper.
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_DeallocateMemoryWrapper.F90,v 1.16 2008/12/06 08:44:29 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003-2005 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_deallocatememorywrapper(pRegion)
45 
46  USE moddatatypes
47  USE moderror
48  USE modglobal, ONLY: t_global
49  USE moddatastruct, ONLY: t_region
50  USE modparameters
51  USE modmpi
52 
53 #ifdef PLAG
54  USE modpartlag, ONLY: t_plag
55 #endif
56 
59 
60 #ifdef PLAG
66 #endif
67 
68 #ifdef PERI
70 #endif
71 
72 #ifdef SPEC
75 #endif
76 
77 #ifdef TURB
79 #endif
80 
81  IMPLICIT NONE
82 
83 ! ******************************************************************************
84 ! Declarations and definitions
85 ! ******************************************************************************
86 
87 ! ==============================================================================
88 ! Arguments
89 ! ==============================================================================
90 
91  TYPE(t_region), POINTER :: pregion
92 
93 ! ==============================================================================
94 ! Locals
95 ! ==============================================================================
96 
97  CHARACTER(CHRLEN) :: rcsidentstring
98  TYPE(t_global), POINTER :: global
99 #ifdef PLAG
100  TYPE(t_plag), POINTER :: pplag
101 #endif
102 
103 ! ******************************************************************************
104 ! Start
105 ! ******************************************************************************
106 
107  rcsidentstring = &
108  '$RCSfile: RFLU_DeallocateMemoryWrapper.F90,v $ $Revision: 1.16 $'
109 
110  global => pregion%global
111 
112  CALL registerfunction(global,'RFLU_DeallocateMemoryWrapper',&
113  'RFLU_DeallocateMemoryWrapper.F90')
114 
115  IF ( global%myProcid == masterproc .AND. &
116  global%verbLevel >= verbose_high ) THEN
117  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory...'
118  END IF ! global%verbLevel
119 
120 ! ******************************************************************************
121 ! Deallocate memory
122 ! ******************************************************************************
123 
124 ! ==============================================================================
125 ! Mixture
126 ! ==============================================================================
127 
128  CALL rflu_deallocatememory(pregion)
129 
130 ! ******************************************************************************
131 ! Physical modules
132 ! ******************************************************************************
133 
134 #ifdef PLAG
135 ! ==============================================================================
136 ! Particles
137 ! ==============================================================================
138 
139  IF ( global%plagUsed .EQV. .true. ) THEN
140  pplag => pregion%plag
141  CALL plag_rflu_deallocmemsol(pregion,pplag)
142  CALL plag_rflu_deallocmemsoltile(pregion)
143  CALL plag_rflu_deallocmemtstep(pregion,pplag)
144  CALL plag_rflu_deallocmemtsteptile(pregion)
145  CALL plag_inrt_deallocmemtstep(pregion,pplag)
146  END IF ! plagUsed
147 #endif
148 
149 #ifdef RADI
150 ! ==============================================================================
151 ! Radiation
152 ! ==============================================================================
153 
154  CALL radi_deallocatememory(pregion)
155 #endif
156 
157 #ifdef SPEC
158 ! ==============================================================================
159 ! Species
160 ! ==============================================================================
161 
162  IF ( global%specUsed .EQV. .true. ) THEN
163  CALL spec_rflu_deallocatememory(pregion)
164  CALL spec_rflu_deallocatememoryeev(pregion)
165  END IF ! global%specUsed
166 #endif
167 
168 #ifdef TURB
169 ! ==============================================================================
170 ! Turbulence
171 ! ==============================================================================
172 
173  IF ( (pregion%mixtInput%flowModel == flow_navst) .AND. &
174  (pregion%mixtInput%turbModel /= turb_model_none) ) THEN
175  CALL turb_rflu_deallocatememory(pregion)
176  END IF ! pRegion%mixtInput%flowModel
177 #endif
178 
179 #ifdef PERI
180  IF ( pregion%periInput%flowKind /= off ) THEN
181  CALL peri_rflu_deallocatememory(pregion)
182  END IF ! pRegion%periInput%flowKind
183 #endif
184 
185 ! ******************************************************************************
186 ! End
187 ! ******************************************************************************
188 
189  IF ( global%myProcid == masterproc .AND. &
190  global%verbLevel >= verbose_high ) THEN
191  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory done.'
192  END IF ! global%verbLevel
193 
194  CALL deregisterfunction(global)
195 
196 END SUBROUTINE rflu_deallocatememorywrapper
197 
198 ! ******************************************************************************
199 !
200 ! RCS Revision history:
201 !
202 ! $Log: RFLU_DeallocateMemoryWrapper.F90,v $
203 ! Revision 1.16 2008/12/06 08:44:29 mtcampbe
204 ! Updated license.
205 !
206 ! Revision 1.15 2008/11/19 22:17:42 mtcampbe
207 ! Added Illinois Open Source License/Copyright
208 !
209 ! Revision 1.14 2005/11/27 01:52:19 haselbac
210 ! Added deallocate call for EEv
211 !
212 ! Revision 1.13 2004/10/19 19:29:11 haselbac
213 ! Adapted to GENX changes, no longer create grid
214 !
215 ! Revision 1.12 2004/07/28 15:29:20 jferry
216 ! created global variable for spec use
217 !
218 ! Revision 1.11 2004/07/26 19:02:24 fnajjar
219 ! Included call to PLAG_INRT_DeallocMemTStep routine
220 !
221 ! Revision 1.10 2004/07/23 22:43:16 jferry
222 ! Integrated rocspecies into rocinteract
223 !
224 ! Revision 1.9 2004/06/17 23:06:20 wasistho
225 ! added memory deallocation for rocperi
226 !
227 ! Revision 1.8 2004/03/27 03:03:24 wasistho
228 ! added TURB_RFLU_DeallocateMemory
229 !
230 ! Revision 1.7 2004/03/19 21:21:30 haselbac
231 ! Cosmetics only
232 !
233 ! Revision 1.6 2004/03/05 22:09:03 jferry
234 ! created global variables for peul, plag, and inrt use
235 !
236 ! Revision 1.5 2004/02/26 21:02:08 haselbac
237 ! Added PLAG support
238 !
239 ! Revision 1.4 2004/02/02 22:51:25 haselbac
240 ! Commented out PLAG_DeallocateMemory - temporary measure
241 !
242 ! Revision 1.3 2003/11/25 21:04:39 haselbac
243 ! Added call to SPEC_RFLU_DeallocateMemory
244 !
245 ! Revision 1.2 2003/03/15 18:35:03 haselbac
246 ! Adaptation for parallel computations
247 !
248 ! Revision 1.1 2003/01/28 14:59:34 haselbac
249 ! Initial revision
250 !
251 ! ******************************************************************************
252 
253 
254 
255 
256 
257 
258 
subroutine spec_rflu_deallocatememoryeev(pRegion)
subroutine plag_rflu_deallocmemsol(pRegion, pPlag)
subroutine plag_rflu_deallocmemtstep(pRegion, pPlag)
subroutine plag_inrt_deallocmemtstep(pRegion, pPlag)
subroutine rflu_destroygrid(pRegion)
subroutine spec_rflu_deallocatememory(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_deallocatememory(pRegion)
subroutine plag_rflu_deallocmemsoltile(pRegion)
subroutine rflu_deallocatememorywrapper(pRegion)
subroutine turb_rflu_deallocatememory(region)
subroutine peri_rflu_deallocatememory(region)
subroutine plag_rflu_deallocmemtsteptile(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469