Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utilities/rocflu/cells/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.3 2008/12/06 08:44:54 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 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 
55 
57 
58  IMPLICIT NONE
59 
60 ! ******************************************************************************
61 ! Declarations and definitions
62 ! ******************************************************************************
63 
64 ! ==============================================================================
65 ! Arguments
66 ! ==============================================================================
67 
68  TYPE(t_region), POINTER :: pregion
69 
70 ! ==============================================================================
71 ! Locals
72 ! ==============================================================================
73 
74  CHARACTER(CHRLEN) :: rcsidentstring
75  TYPE(t_global), POINTER :: global
76 
77 ! *****************************************************************************
78 ! Start
79 ! *****************************************************************************
80 
81  rcsidentstring = &
82  '$RCSfile: RFLU_DeallocateMemoryWrapper.F90,v $ $Revision: 1.3 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'RFLU_DeallocateMemoryWrapper', &
87  'RFLU_DeallocateMemoryWrapper.F90')
88 
89  IF ( global%myProcid == masterproc .AND. &
90  global%verbLevel > verbose_none ) THEN
91  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory...'
92  END IF ! global%verbLevel
93 
94 ! ******************************************************************************
95 ! Destroy data structure
96 ! ******************************************************************************
97 
98  CALL rflu_destroycellmapping(pregion)
99  CALL rflu_destroyfacelist(pregion,destroy_face_all)
100 
101 ! ******************************************************************************
102 ! Destroy grid
103 ! ******************************************************************************
104 
105  CALL rflu_destroygrid(pregion)
106 
107 ! *****************************************************************************
108 ! End
109 ! *****************************************************************************
110 
111  IF ( global%myProcid == masterproc .AND. &
112  global%verbLevel > verbose_none ) THEN
113  WRITE(stdout,'(A,1X,A)') solver_name,'Deallocating memory done.'
114  END IF ! global%verbLevel
115 
116  CALL deregisterfunction(global)
117 
118 END SUBROUTINE rflu_deallocatememorywrapper
119 
120 !******************************************************************************
121 !
122 ! RCS Revision history:
123 !
124 ! $Log: RFLU_DeallocateMemoryWrapper.F90,v $
125 ! Revision 1.3 2008/12/06 08:44:54 mtcampbe
126 ! Updated license.
127 !
128 ! Revision 1.2 2008/11/19 22:18:04 mtcampbe
129 ! Added Illinois Open Source License/Copyright
130 !
131 ! Revision 1.1 2003/04/01 17:02:46 haselbac
132 ! Initial revision
133 !
134 !******************************************************************************
135 
136 
137 
138 
139 
140 
141 
subroutine rflu_destroygrid(pRegion)
subroutine, public rflu_destroyfacelist(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_deallocatememory(pRegion)
subroutine rflu_deallocatememorywrapper(pRegion)
subroutine, public rflu_destroycellmapping(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469