Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_DeallocateMemory.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 for mixture.
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_DeallocateMemory.F90,v 1.14 2008/12/06 08:44:29 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003-2006 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_deallocatememory(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 ! Declarations and definitions
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 = &
83  '$RCSfile: RFLU_DeallocateMemory.F90,v $ $Revision: 1.14 $'
84 
85  global => pregion%global
86 
87  CALL registerfunction(global,'RFLU_DeallocateMemory',&
88  'RFLU_DeallocateMemory.F90')
89 
90  IF ( global%myProcid == masterproc .AND. &
91  global%verbLevel >= verbose_high ) THEN
92  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory for mixture...'
93  END IF ! global%verbLevel
94 
95 ! ******************************************************************************
96 ! Deallocate memory
97 ! ******************************************************************************
98 
99  SELECT CASE ( pregion%mixtInput%fluidModel )
100 
101 ! ==============================================================================
102 ! Compressible fluid
103 ! ==============================================================================
104 
105  CASE ( fluid_model_comp )
106  CALL rflu_deallocatememorysol(pregion)
107  CALL rflu_deallocatememorytstep(pregion)
108  CALL rflu_deallocatememorytstep_c(pregion)
109  CALL rflu_deallocatememorygspeeds(pregion)
110 
111 ! ==============================================================================
112 ! Incompressible fluid
113 ! ==============================================================================
114 
115  CASE ( fluid_model_incomp )
116  CALL rflu_deallocatememorysol(pregion)
117  CALL rflu_deallocatememorytstep(pregion)
118  CALL rflu_deallocatememorytstep_i(pregion)
119  CALL rflu_deallocatememorygspeeds(pregion)
120 
121 ! ==============================================================================
122 ! Default
123 ! ==============================================================================
124 
125  CASE default
126  CALL errorstop(global,err_reached_default,__line__)
127  END SELECT ! pRegion%mixtInput%fluidModel
128 
129 ! ******************************************************************************
130 ! End
131 ! ******************************************************************************
132 
133  IF ( global%myProcid == masterproc .AND. &
134  global%verbLevel >= verbose_high ) THEN
135  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory for mixture done.'
136  END IF ! global%verbLevel
137 
138  CALL deregisterfunction(global)
139 
140 END SUBROUTINE rflu_deallocatememory
141 
142 ! ******************************************************************************
143 !
144 ! RCS Revision history:
145 !
146 ! $Log: RFLU_DeallocateMemory.F90,v $
147 ! Revision 1.14 2008/12/06 08:44:29 mtcampbe
148 ! Updated license.
149 !
150 ! Revision 1.13 2008/11/19 22:17:42 mtcampbe
151 ! Added Illinois Open Source License/Copyright
152 !
153 ! Revision 1.12 2006/03/26 20:22:14 haselbac
154 ! Removed error trap for GL model
155 !
156 ! Revision 1.11 2004/12/19 15:49:11 haselbac
157 ! Modified so can select different fluid models
158 !
159 ! Revision 1.10 2004/03/19 21:21:06 haselbac
160 ! Complete rewrite
161 !
162 ! Revision 1.9 2004/03/03 23:55:40 jferry
163 ! Allowed particles to be run with Euler case
164 !
165 ! Revision 1.8 2004/01/29 23:04:11 haselbac
166 ! Added/deleted deallocation for mfMixt/vfMixt arrays, clean-up
167 !
168 ! Revision 1.7 2003/12/04 03:30:00 haselbac
169 ! Added memory deallocation for gradients, cleaned up
170 !
171 ! Revision 1.6 2003/11/25 21:04:38 haselbac
172 ! Added deallocation for mass and volume fluxes on patches
173 !
174 ! Revision 1.5 2003/11/03 03:50:33 haselbac
175 ! Removed deallocation of bf2bg list
176 !
177 ! Revision 1.4 2003/03/31 16:16:49 haselbac
178 ! Added disp array, some cosmetics
179 !
180 ! Revision 1.3 2003/03/25 19:16:09 haselbac
181 ! Fixed typo in output string
182 !
183 ! Revision 1.2 2003/03/15 18:34:31 haselbac
184 ! Adaptation for parallel computations
185 !
186 ! Revision 1.1 2003/01/28 14:59:34 haselbac
187 ! Initial revision
188 !
189 ! ******************************************************************************
190 
191 
192 
193 
194 
195 
196 
subroutine, public rflu_deallocatememorytstep(pRegion)
subroutine, public rflu_deallocatememorysol(pRegion)
subroutine, public rflu_deallocatememorygspeeds(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_deallocatememory(pRegion)
subroutine, public rflu_deallocatememorytstep_i(pRegion)
subroutine, public rflu_deallocatememorytstep_c(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469