Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_CheckPositivityWrapper.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: Wrapper for check for posivity of variables
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Region data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_CheckPositivityWrapper.F90,v 1.6 2008/12/06 08:44:11 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2004-2006 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_checkpositivitywrapper(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 
56 
57 #ifdef SPEC
59 #endif
60 
61 #ifdef PLAG
63 #endif
64 
65  IMPLICIT NONE
66 
67 ! ******************************************************************************
68 ! Definitions and declarations
69 ! ******************************************************************************
70 
71 ! ==============================================================================
72 ! Arguments
73 ! ==============================================================================
74 
75  TYPE(t_region), POINTER :: pregion
76 
77 ! ==============================================================================
78 ! Locals
79 ! ==============================================================================
80 
81  CHARACTER(CHRLEN) :: rcsidentstring
82  TYPE(t_global), POINTER :: global
83 
84 ! ******************************************************************************
85 ! Start
86 ! ******************************************************************************
87 
88  rcsidentstring = &
89  '$RCSfile: RFLU_CheckPositivityWrapper.F90,v $ $Revision: 1.6 $'
90 
91  global => pregion%global
92 
93  CALL registerfunction(global,'RFLU_CheckPositivityWrapper',&
94  'RFLU_CheckPositivityWrapper.F90')
95 
96 ! ******************************************************************************
97 ! Mixture
98 ! ******************************************************************************
99 
100  SELECT CASE ( pregion%mixtInput%fluidModel )
101 
102 ! ==============================================================================
103 ! Incompressible fluid model
104 ! ==============================================================================
105 
106  CASE ( fluid_model_incomp )
107 
108 ! ==============================================================================
109 ! Compressible fluid model. NOTE check state of solution vector.
110 ! ==============================================================================
111 
112  CASE ( fluid_model_comp )
113  SELECT CASE ( pregion%mixtInput%gasModel )
114  CASE ( gas_model_tcperf, &
115  gas_model_mixt_tcperf, &
116  gas_model_mixt_tperf, &
117  gas_model_mixt_pseudo )
118  CALL rflu_checkpositivity(pregion)
119  CASE ( gas_model_mixt_gasliq )
120  CALL rflu_checkpositivity_gl(pregion)
121  CASE default
122  CALL errorstop(global,err_reached_default,__line__)
123  END SELECT ! pRegion%mixtInput%gasModel
124 
125 ! ==============================================================================
126 ! Default
127 ! ==============================================================================
128 
129  CASE default
130  CALL errorstop(global,err_reached_default,__line__)
131  END SELECT ! pRegion%mixtInput%fluidModel
132 
133 
134 ! ******************************************************************************
135 ! Multiphysics modules
136 ! ******************************************************************************
137 
138 #ifdef SPEC
139 ! ==============================================================================
140 ! Species
141 ! ==============================================================================
142 
143  IF ( global%specUsed .EQV. .true. ) THEN
144  CALL rflu_scalarcheckpositivity(pregion,ftype_spec, &
145  pregion%specInput%nSpecies, &
146  pregion%spec%cv)
147  END IF ! global%specUsed
148 #endif
149 
150 #ifdef PLAG
151 ! ==============================================================================
152 ! Particles
153 ! ==============================================================================
154 
155  IF ( global%plagUsed .EQV. .true. ) THEN
156  CALL plag_checkpositivity(pregion)
157  END IF ! global%plagUsed
158 #endif
159 
160 ! ******************************************************************************
161 ! End
162 ! ******************************************************************************
163 
164  CALL deregisterfunction(global)
165 
166 END SUBROUTINE rflu_checkpositivitywrapper
167 
168 ! ******************************************************************************
169 !
170 ! RCS Revision history:
171 !
172 ! $Log: RFLU_CheckPositivityWrapper.F90,v $
173 ! Revision 1.6 2008/12/06 08:44:11 mtcampbe
174 ! Updated license.
175 !
176 ! Revision 1.5 2008/11/19 22:17:25 mtcampbe
177 ! Added Illinois Open Source License/Copyright
178 !
179 ! Revision 1.4 2006/03/26 20:21:27 haselbac
180 ! Rewrite bcos of GL model, cosmetics
181 !
182 ! Revision 1.3 2005/12/01 21:54:43 fnajjar
183 ! Added call to PLAG_CheckPositivity
184 !
185 ! Revision 1.2 2004/07/28 15:29:19 jferry
186 ! created global variable for spec use
187 !
188 ! Revision 1.1 2004/01/29 22:55:50 haselbac
189 ! Initial revision
190 !
191 ! ******************************************************************************
192 
193 
194 
195 
196 
197 
198 
subroutine rflu_scalarcheckpositivity(pRegion, moduleType, nVarScal, cvScal)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_checkpositivitywrapper(pRegion)
subroutine, public plag_checkpositivity(pRegion)
subroutine rflu_checkpositivity_gl(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine rflu_checkpositivity(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflu_checkvalidity_gl(pRegion)