Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_DeallocateMemoryVert.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 mixture memory.
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_DeallocateMemoryVert.F90,v 1.4 2008/12/06 08:45:05 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2004 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflu_deallocatememoryvert(pRegion)
45 
46  USE moddatatypes
47  USE moderror
48  USE modglobal, ONLY: t_global
49  USE modparameters
50  USE modgrid, ONLY: t_grid
51  USE moddatastruct, ONLY: t_region
52  USE modmixture, ONLY: t_mixt_input
53  USE modmpi
54 
55  IMPLICIT NONE
56 
57 ! ******************************************************************************
58 ! Declarations and definitions
59 ! ******************************************************************************
60 
61 ! ==============================================================================
62 ! Parameters
63 ! ==============================================================================
64 
65  TYPE(t_region), POINTER :: pregion
66 
67 ! ==============================================================================
68 ! Locals
69 ! ==============================================================================
70 
71  CHARACTER(CHRLEN) :: rcsidentstring
72  INTEGER :: errorflag
73  TYPE(t_grid), POINTER :: pgrid
74  TYPE(t_mixt_input), POINTER :: pmixtinput
75  TYPE(t_global), POINTER :: global
76 
77 ! ******************************************************************************
78 ! Start
79 ! ******************************************************************************
80 
81  rcsidentstring = &
82  '$RCSfile: RFLU_DeallocateMemoryVert.F90,v $ $Revision: 1.4 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'RFLU_DeallocateMemoryVert', &
87  'RFLU_DeallocateMemoryVert.F90')
88 
89 ! ******************************************************************************
90 ! Set pointers
91 ! ******************************************************************************
92 
93  pgrid => pregion%grid
94  pmixtinput => pregion%mixtInput
95 
96 ! ******************************************************************************
97 ! Allocate memory
98 ! ******************************************************************************
99 
100 ! ==============================================================================
101 ! Conserved variables
102 ! ==============================================================================
103 
104  DEALLOCATE(pregion%mixt%cvVert,stat=errorflag)
105  global%error = errorflag
106  IF ( global%error /= err_none ) THEN
107  CALL errorstop(global,err_deallocate,__line__,'pRegion%mixt%cvVert')
108  END IF ! global%error
109 
110 ! ==============================================================================
111 ! Dependent variables
112 ! ==============================================================================
113 
114  DEALLOCATE(pregion%mixt%dvVert,stat=errorflag)
115  global%error = errorflag
116  IF ( global%error /= err_none ) THEN
117  CALL errorstop(global,err_deallocate,__line__,'pRegion%mixt%dvVert')
118  END IF ! global%error
119 
120 ! ==============================================================================
121 ! Gas variable
122 ! ==============================================================================
123 
124  DEALLOCATE(pregion%mixt%gvVert,stat=errorflag)
125  global%error = errorflag
126  IF ( global%error /= err_none ) THEN
127  CALL errorstop(global,err_deallocate,__line__,'pRegion%mixt%gvVert')
128  END IF ! global%error
129 
130 ! ******************************************************************************
131 ! End
132 ! ******************************************************************************
133 
134  CALL deregisterfunction(global)
135 
136 END SUBROUTINE rflu_deallocatememoryvert
137 
138 !******************************************************************************
139 !
140 ! RCS Revision history:
141 !
142 ! $Log: RFLU_DeallocateMemoryVert.F90,v $
143 ! Revision 1.4 2008/12/06 08:45:05 mtcampbe
144 ! Updated license.
145 !
146 ! Revision 1.3 2008/11/19 22:18:16 mtcampbe
147 ! Added Illinois Open Source License/Copyright
148 !
149 ! Revision 1.2 2006/04/07 15:19:26 haselbac
150 ! Removed tabs
151 !
152 ! Revision 1.1 2004/02/26 21:01:27 haselbac
153 ! Initial revision
154 !
155 !******************************************************************************
156 
157 
158 
159 
160 
161 
162 
subroutine rflu_deallocatememoryvert(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469