Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SPEC_RFLU_AllocateMemoryEEv.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 memory for Equilibrium Eulerian variables of species
26 ! solution.
27 !
28 ! Description: None.
29 !
30 ! Input:
31 ! pRegion Region pointer
32 !
33 ! Output: None.
34 !
35 ! Notes: None.
36 !
37 ! ******************************************************************************
38 !
39 ! $Id: SPEC_RFLU_AllocateMemoryEEv.F90,v 1.3 2008/12/06 08:44:40 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2005 by the University of Illinois
42 !
43 ! ******************************************************************************
44 
45 SUBROUTINE spec_rflu_allocatememoryeev(pRegion)
46 
47  USE moddatatypes
48  USE moderror
49  USE modparameters
50  USE modglobal, ONLY: t_global
51  USE modgrid, ONLY: t_grid
52  USE moddatastruct, ONLY: t_region
53 
55 
56  IMPLICIT NONE
57 
58 ! ******************************************************************************
59 ! Definitions and declarations
60 ! ******************************************************************************
61 
62 ! ==============================================================================
63 ! Arguments
64 ! ==============================================================================
65 
66  TYPE(t_region), POINTER :: pregion
67 
68 ! ==============================================================================
69 ! Locals
70 ! ==============================================================================
71 
72  CHARACTER(CHRLEN) :: rcsidentstring
73  INTEGER :: errorflag,icg,ispecee,nspeciesee
74  TYPE(t_grid), POINTER :: pgrid
75  TYPE(t_global), POINTER :: global
76 
77 ! ******************************************************************************
78 ! Start
79 ! ******************************************************************************
80 
81  rcsidentstring = '$RCSfile: SPEC_RFLU_AllocateMemoryEEv.F90,v $ $Revision: 1.3 $'
82 
83  global => pregion%global
84 
85  CALL registerfunction(global,'SPEC_RFLU_AllocateMemoryEEv',&
86  'SPEC_RFLU_AllocateMemoryEEv.F90')
87 
88 ! ******************************************************************************
89 ! Set pointers and variables
90 ! ******************************************************************************
91 
92  pgrid => pregion%grid
93 
94  nspeciesee = pregion%specInput%nSpeciesEE
95 
96 ! ******************************************************************************
97 ! Allocate and initialize memory
98 ! ******************************************************************************
99 
100  IF ( nspeciesee > 0 ) THEN
101  ALLOCATE(pregion%spec%eev(eev_spec_xvel:eev_spec_temp,nspeciesee, &
102  pgrid%nCellsTot),stat=errorflag)
103  global%error = errorflag
104  IF (global%error /= err_none) THEN
105  CALL errorstop(global,err_allocate,__line__,'pRegion%spec%eev')
106  END IF ! global%error
107 
108  DO icg = 1,pgrid%nCellsTot
109  DO ispecee = 1,nspeciesee
110  pregion%spec%eev(eev_spec_xvel,ispecee,icg) = 0.0_rfreal
111  pregion%spec%eev(eev_spec_yvel,ispecee,icg) = 0.0_rfreal
112  pregion%spec%eev(eev_spec_zvel,ispecee,icg) = 0.0_rfreal
113  pregion%spec%eev(eev_spec_temp,ispecee,icg) = 0.0_rfreal
114  END DO ! iSpecEE
115  END DO ! icg
116  END IF ! nSpeciesEE
117 
118 ! ******************************************************************************
119 ! End
120 ! ******************************************************************************
121 
122  CALL deregisterfunction(global)
123 
124 END SUBROUTINE spec_rflu_allocatememoryeev
125 
126 ! ******************************************************************************
127 !
128 ! RCS Revision history:
129 !
130 ! $Log: SPEC_RFLU_AllocateMemoryEEv.F90,v $
131 ! Revision 1.3 2008/12/06 08:44:40 mtcampbe
132 ! Updated license.
133 !
134 ! Revision 1.2 2008/11/19 22:17:52 mtcampbe
135 ! Added Illinois Open Source License/Copyright
136 !
137 ! Revision 1.1 2005/11/27 01:47:26 haselbac
138 ! Initial revision
139 !
140 ! ******************************************************************************
141 
142 
143 
144 
145 
146 
147 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine spec_rflu_allocatememoryeev(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469