Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_InterpolateWrapper.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: Compute variables other than conserved variables at vertices
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_InterpolateWrapper.F90,v 1.15 2008/12/06 08:45:05 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003-2006 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_interpolatewrapper(pRegion)
45 
46  USE moddatatypes
47  USE modglobal, ONLY: t_global
48  USE modparameters
49  USE moderror
50  USE moddatastruct, ONLY: t_region
51  USE modgrid, ONLY: t_grid
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 ! Local variables
72 ! ==============================================================================
73 
74  CHARACTER(CHRLEN) :: rcsidentstring
75  TYPE(t_global), POINTER :: global
76  TYPE(t_grid), POINTER :: pgrid
77 
78 ! ******************************************************************************
79 ! Start
80 ! ******************************************************************************
81 
82  rcsidentstring = '$RCSfile: RFLU_InterpolateWrapper.F90,v $ $Revision: 1.15 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'RFLU_InterpolateWrapper', &
87  'RFLU_InterpolateWrapper.F90')
88 
89 ! ******************************************************************************
90 ! Set pointers and variables
91 ! ******************************************************************************
92 
93  pgrid => pregion%grid
94 
95 ! ******************************************************************************
96 ! Mixture
97 ! ******************************************************************************
98 
99 ! ==============================================================================
100 ! Conserved variables
101 ! ==============================================================================
102 
103  IF ( global%postInterpType == interp_type_proper ) THEN
104  CALL rflu_interpcells2verts(pregion,global%postInterpOrder, &
105  pregion%mixtInput%nCv,pregion%mixt%cv, &
106  pregion%mixt%cvVert)
107  ELSE IF ( global%postInterpType == interp_type_simple ) THEN
108  CALL rflu_interpsimplecells2verts(pregion,pregion%mixtInput%nCv, &
109  pregion%mixt%cv,pregion%mixt%cvVert)
110  ELSE
111  CALL errorstop(global,err_reached_default,__line__)
112  END IF ! global%postInterpType
113 
114 ! ==============================================================================
115 ! Gas variables
116 ! ==============================================================================
117 
118  SELECT CASE ( pregion%mixtInput%fluidModel )
119  CASE ( fluid_model_comp )
120  IF ( pregion%mixtInput%nGvAct == 0 ) THEN
121  pregion%mixt%gvVert(gv_mixt_cp ,:) = pregion%mixt%gv(gv_mixt_cp ,:)
122  pregion%mixt%gvVert(gv_mixt_mol,:) = pregion%mixt%gv(gv_mixt_mol,:)
123  ELSE
124  IF ( global%postInterpType == interp_type_proper ) THEN
125  CALL rflu_interpcells2verts(pregion,global%postInterpOrder, &
126  pregion%mixtInput%nGv,pregion%mixt%gv, &
127  pregion%mixt%gvVert)
128  ELSE IF ( global%postInterpType == interp_type_simple ) THEN
129  CALL rflu_interpsimplecells2verts(pregion,pregion%mixtInput%nGv, &
130  pregion%mixt%gv,pregion%mixt%gvVert)
131  ELSE
132  CALL errorstop(global,err_reached_default,__line__)
133  END IF ! global%postInterpType
134  END IF ! pRegion%mixtInput%nGvAct
135  CASE default
136  CALL errorstop(global,err_reached_default,__line__)
137  END SELECT ! pRegion%mixtInput%fluidModel
138 
139 ! ******************************************************************************
140 ! Physical modules
141 ! ******************************************************************************
142 
143 #ifdef SPEC
144  IF ( global%specUsed .EQV. .true. ) THEN
145 
146 ! ==============================================================================
147 ! Conserved variables
148 ! ==============================================================================
149 
150  IF ( global%postInterpType == interp_type_proper ) THEN
151  CALL rflu_interpcells2verts(pregion,global%postInterpOrder, &
152  pregion%specInput%nSpecies, &
153  pregion%spec%cv,pregion%spec%cvVert)
154  ELSE IF ( global%postInterpType == interp_type_simple ) THEN
155  CALL rflu_interpsimplecells2verts(pregion,pregion%specInput%nSpecies, &
156  pregion%spec%cv,pregion%spec%cvVert)
157  ELSE
158  CALL errorstop(global,err_reached_default,__line__)
159  END IF ! global%postInterpType
160  END IF ! global%specUsed
161 #endif
162 
163 ! ******************************************************************************
164 ! Compute remaining vertex variables
165 ! ******************************************************************************
166 
167  CALL rflu_computevertexvariables(pregion)
168 
169 ! ******************************************************************************
170 ! Interpolate plotting variables from cell centroids to vertices
171 ! ******************************************************************************
172 
173  IF ( pregion%mixtInput%fluidModel == fluid_model_comp ) THEN
174  IF ( global%postInterpType == interp_type_proper ) THEN
175  CALL rflu_interpcells2verts(pregion,global%postInterpOrder, &
176  pregion%plot%nPv,pregion%plot%pv, &
177  pregion%plot%pvVert)
178  ELSE IF ( global%postInterpType == interp_type_simple ) THEN
179  CALL rflu_interpsimplecells2verts(pregion,pregion%plot%nPv, &
180  pregion%plot%pv,pregion%plot%pvVert)
181  ELSE
182  CALL errorstop(global,err_reached_default,__line__)
183  END IF ! global%postInterpType
184  END IF ! pRegion%mixtInput%fluidModel
185 
186 ! ******************************************************************************
187 ! End
188 ! ******************************************************************************
189 
190  CALL deregisterfunction(global)
191 
192 END SUBROUTINE rflu_interpolatewrapper
193 
194 ! ******************************************************************************
195 !
196 ! RCS Revision history:
197 !
198 ! $Log: RFLU_InterpolateWrapper.F90,v $
199 ! Revision 1.15 2008/12/06 08:45:05 mtcampbe
200 ! Updated license.
201 !
202 ! Revision 1.14 2008/11/19 22:18:16 mtcampbe
203 ! Added Illinois Open Source License/Copyright
204 !
205 ! Revision 1.13 2007/03/19 21:41:44 haselbac
206 ! Adapted to changes related to plotting variables
207 !
208 ! Revision 1.12 2006/03/26 20:22:33 haselbac
209 ! Added support for GL model, changed order
210 !
211 ! Revision 1.11 2005/11/14 17:05:01 haselbac
212 ! Generalized to support pseudo-gas model
213 !
214 ! Revision 1.10 2005/11/10 02:47:52 haselbac
215 ! Added support for gas models
216 !
217 ! Revision 1.9 2005/10/31 21:09:39 haselbac
218 ! Changed specModel and SPEC_MODEL_NONE
219 !
220 ! Revision 1.8 2005/05/28 18:02:33 haselbac
221 ! Replaced CV_MIXT_ENER by pRegion%mixtInput%nCv
222 !
223 ! Revision 1.7 2005/05/01 14:22:19 haselbac
224 ! Added interp of plotting vars
225 !
226 ! Revision 1.6 2004/11/14 19:57:14 haselbac
227 ! Added IF for fluid model
228 !
229 ! Revision 1.5 2004/07/28 15:29:21 jferry
230 ! created global variable for spec use
231 !
232 ! Revision 1.4 2004/07/21 14:56:59 haselbac
233 ! Added capability of using simple interpolation
234 !
235 ! Revision 1.3 2004/03/18 03:34:11 haselbac
236 ! Changed call to renamed interpolation function
237 !
238 ! Revision 1.2 2003/12/04 03:29:32 haselbac
239 ! Adapted to changes in RFLU_ModInterpolation
240 !
241 ! Revision 1.1 2003/11/25 21:04:05 haselbac
242 ! Initial revision
243 !
244 ! ******************************************************************************
245 
246 
247 
248 
249 
250 
251 
subroutine, public rflu_interpsimplecells2verts(pRegion, nVar, src, dst)
subroutine rflu_computevertexvariables(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
subroutine rflu_interpolatewrapper(pRegion)
subroutine, public rflu_interpcells2verts(pRegion, orderNominal, nVar, src, dst)