Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_AllocateMemoryVert.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 mixture memory for vertex variables.
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_AllocateMemoryVert.F90,v 1.8 2008/12/06 08:45:05 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2004-2005 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_allocatememoryvert(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_AllocateMemoryVert.F90,v $ $Revision: 1.8 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'RFLU_AllocateMemoryVert', &
87  'RFLU_AllocateMemoryVert.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  ALLOCATE(pregion%mixt%cvVert(cv_mixt_dens:cv_mixt_ener,pgrid%nVertTot), &
105  stat=errorflag)
106  global%error = errorflag
107  IF ( global%error /= err_none ) THEN
108  CALL errorstop(global,err_allocate,__line__,'pRegion%mixt%cvVert')
109  END IF ! global%error
110 
111 ! ==============================================================================
112 ! Dependent variables
113 ! ==============================================================================
114 
115  ALLOCATE(pregion%mixt%dvVert(pmixtinput%nDv,pgrid%nVertTot),stat=errorflag)
116  global%error = errorflag
117  IF ( global%error /= err_none ) THEN
118  CALL errorstop(global,err_allocate,__line__,'pRegion%mixt%dvVert')
119  END IF ! global%error
120 
121 ! ==============================================================================
122 ! Gas variables
123 ! ==============================================================================
124 
125  IF ( pmixtinput%nGvAct == 0 ) THEN
126  ALLOCATE(pregion%mixt%gvVert(pmixtinput%nGv,0:1),stat=errorflag)
127  ELSE
128  ALLOCATE(pregion%mixt%gvVert(pmixtinput%nGv,pgrid%nVertTot),stat=errorflag)
129  END IF ! pMixtInput%nGvAct
130  global%error = errorflag
131  IF ( global%error /= err_none ) THEN
132  CALL errorstop(global,err_allocate,__line__,'pRegion%mixt%gvVert')
133  END IF ! global%error
134 
135 ! ******************************************************************************
136 ! End
137 ! ******************************************************************************
138 
139  CALL deregisterfunction(global)
140 
141 END SUBROUTINE rflu_allocatememoryvert
142 
143 ! ******************************************************************************
144 !
145 ! RCS Revision history:
146 !
147 ! $Log: RFLU_AllocateMemoryVert.F90,v $
148 ! Revision 1.8 2008/12/06 08:45:05 mtcampbe
149 ! Updated license.
150 !
151 ! Revision 1.7 2008/11/19 22:18:16 mtcampbe
152 ! Added Illinois Open Source License/Copyright
153 !
154 ! Revision 1.6 2006/04/07 15:19:26 haselbac
155 ! Removed tabs
156 !
157 ! Revision 1.5 2006/03/13 15:39:21 haselbac
158 ! Bug fix: Incorrect allocation of gvVert
159 !
160 ! Revision 1.4 2005/11/14 17:04:43 haselbac
161 ! Generalized to support pseudo-gas model
162 !
163 ! Revision 1.3 2005/11/10 02:46:22 haselbac
164 ! Cosmetics only
165 !
166 ! Revision 1.2 2005/10/31 21:09:39 haselbac
167 ! Changed specModel and SPEC_MODEL_NONE
168 !
169 ! Revision 1.1 2004/02/26 21:01:21 haselbac
170 ! Initial revision
171 !
172 ! ******************************************************************************
173 
174 
175 
176 
177 
178 
179 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_allocatememoryvert(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469