Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_RansZeroDummyCells.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: set dummycells to zero.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: regions%levels%turb%rhs = residual in dummy cells.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: TURB_RansZeroDummyCells.F90,v 1.5 2009/08/26 12:28:52 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003-2005 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE turb_ranszerodummycells( region ) ! PUBLIC
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE moderror
49  USE modparameters
50 #ifdef RFLO
52 #endif
53 #ifdef RFLU
55 #endif
56 
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region), TARGET :: region
61 
62 ! ... local variables
63 #ifdef RFLO
64  INTEGER :: ilev
65  REAL(RFREAL), POINTER :: rhs(:,:), dsterm(:,:)
66 #endif
67  TYPE(t_global), POINTER :: global
68 #ifdef RFLU
69  TYPE(t_region), POINTER :: pregion
70 #endif
71 
72 !******************************************************************************
73 
74  global => region%global
75 
76  CALL registerfunction( global,'TURB_RansZeroDummyCells',&
77  'TURB_RansZeroDummyCells.F90' )
78 
79 ! zero out residuals in dummy cells -------------------------------------------
80 
81 #ifdef RFLO
82  ilev = region%currLevel
83  IF (ASSOCIATED( region%levels(ilev)%turb%rhs ) .eqv. .true.) THEN
84  rhs => region%levels(ilev)%turb%rhs
85  CALL rflo_zerodummycells( region,rhs )
86  ENDIF
87  IF (ASSOCIATED( region%levels(ilev)%turb%dsterm ) .eqv. .true.) THEN
88  dsterm => region%levels(ilev)%turb%dsterm
89  CALL rflo_zerodummycells( region,dsterm )
90  ENDIF
91 #endif
92 
93 #ifdef RFLU
94  pregion => region
95 
96  IF (ASSOCIATED(pregion%turb%rhs) .eqv. .true.) THEN
97  CALL rflu_zerovirtualcellvars(pregion,pregion%turb%rhs)
98  ENDIF
99  IF (ASSOCIATED(pregion%turb%dsterm) .eqv. .true.) THEN
100  CALL rflu_zerovirtualcellvars(pregion,pregion%turb%dsterm)
101  ENDIF
102 #endif
103 
104 ! finalize --------------------------------------------------------------------
105 
106  CALL deregisterfunction( global )
107 
108 END SUBROUTINE turb_ranszerodummycells
109 
110 !******************************************************************************
111 !
112 ! RCS Revision history:
113 !
114 ! $Log: TURB_RansZeroDummyCells.F90,v $
115 ! Revision 1.5 2009/08/26 12:28:52 mtcampbe
116 ! Ported to Hera. Fixed logical expression syntax errors. Replaced all
117 ! IF (logical_variable) with IF (logical_variable .eqv. .true.) as
118 ! consistent with the specification. Also changed: IF( ASSOCIATED(expr) )
119 ! to IF ( ASSOCIATED(expr) .eqv. .true. ). Intel compilers produce code
120 ! which silently fails for some mal-formed expressions, so these changes
121 ! are a net which should ensure that they are evaluated as intended.
122 !
123 ! Revision 1.4 2008/12/06 08:44:42 mtcampbe
124 ! Updated license.
125 !
126 ! Revision 1.3 2008/11/19 22:17:54 mtcampbe
127 ! Added Illinois Open Source License/Copyright
128 !
129 ! Revision 1.2 2005/05/16 20:46:00 haselbac
130 ! Changed RFLU_ZeroDummyCells to RFLU_ZeroVirtualCellVars
131 !
132 ! Revision 1.1 2004/03/19 02:54:58 wasistho
133 ! prepared for RFLU
134 !
135 ! Revision 1.1 2004/03/11 03:26:33 wasistho
136 ! changed rocturb nomenclature
137 !
138 ! Revision 1.1 2004/03/08 23:35:46 wasistho
139 ! changed turb nomenclature
140 !
141 ! Revision 1.2 2003/10/21 20:31:36 wasistho
142 ! added dt relaxation in steady flow due to RANS source term
143 !
144 ! Revision 1.1 2003/10/16 20:20:03 wasistho
145 ! installed RaNS in steady state flow (Exp.Mult.Stg)
146 !
147 !
148 !******************************************************************************
149 
150 
151 
152 
153 
154 
155 
subroutine turb_ranszerodummycells(region)
NT rhs
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_zerovirtualcellvars(pRegion, var)
subroutine rflo_zerodummycells(region, var)
subroutine deregisterfunction(global)
Definition: ModError.F90:469