Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_rFLO_RansBndConditionsSend.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: send RaNS data to dummy cells of adjacent regions being located
26 ! on another processor.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = RaNS data of all regions
31 ! iReg = index of current region.
32 !
33 ! Output: RaNS data to other processors.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: TURB_rFLO_RansBndConditionsSend.F90,v 1.4 2008/12/06 08:44:44 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2003 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE turb_rflo_ransbndconditionssend( regions,iReg ) ! PUBLIC
46 
47  USE moddatatypes
48  USE modglobal, ONLY : t_global
49  USE modbndpatch, ONLY : t_patch
50  USE moddatastruct, ONLY : t_region
53  USE moderror
54  USE modparameters
56  IMPLICIT NONE
57 
58 ! ... parameters
59  TYPE(t_region), POINTER :: regions(:)
60 
61  INTEGER :: ireg
62 
63 ! ... loop variables
64  INTEGER :: ipatch
65 
66 ! ... local variables
67  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
68 
69  TYPE(t_patch), POINTER :: patch, patchsrc
70  TYPE(t_global), POINTER :: global
71 
72 !******************************************************************************
73 
74  global => regions(ireg)%global
75 
76  CALL registerfunction( global,'TURB_RFLO_RansBndConditionsSend',&
77  'TURB_rFLO_RansBndConditionsSend.F90' )
78 
79  IF (regions(ireg)%turbInput%modelClass /= model_rans) goto 999
80 
81 ! get dimensions --------------------------------------------------------------
82 
83  ilev = regions(ireg)%currLevel
84  npatches = regions(ireg)%nPatches
85 
86 ! send data for edge and corner cells -----------------------------------------
87 
88  CALL turb_floranssendcornedgecells( regions,ireg )
89 
90 ! loop over patches -----------------------------------------------------------
91 
92  DO ipatch=1,npatches
93 
94  patch => regions(ireg)%levels(ilev)%patches(ipatch)
95 
96  bctype = patch%bcType
97  iregsrc = patch%srcRegion
98  ipatchsrc = patch%srcPatch
99 
100 ! - conforming region interface
101 
102  IF (bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) THEN
103  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
104 
105  IF (regions(iregsrc)%procid /= global%myProcid) THEN
106  CALL turb_floranssenddummyconf( regions(ireg),regions(iregsrc),patch )
107  ENDIF
108 
109 ! - non-conforming region interface (integer)
110 
111  ELSE IF (bctype>=bc_regionint .AND. bctype<=bc_regionint+bc_range) THEN
112  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
113 
114 ! IF (regions(iRegSrc)%procid /= global%myProcid) THEN
115 ! CALL TURB_FloRansSendDummyInt( regions(iReg),regions(iRegSrc),patch )
116 ! ENDIF
117  CALL errorstop( global,err_unknown_bc,__line__, &
118  'non-conforming integer bc is not ready yet for RaNS.' )
119 
120 ! - non-conforming region interface (irregular)
121 
122  ELSE IF (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) THEN
123  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
124 
125 ! IF (regions(iRegSrc)%procid /= global%myProcid) THEN
126 ! CALL TURB_FloRansSendDummyIreg( regions(iReg),regions(iRegSrc),patch )
127 ! ENDIF
128  CALL errorstop( global,err_unknown_bc,__line__, &
129  'non-conforming irregular bc is not ready yet for RaNS.' )
130 
131 ! - translational periodicity
132 
133  ELSE IF (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri+bc_range) THEN
134  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
135 
136  IF (regions(iregsrc)%procid /= global%myProcid) THEN
137  CALL turb_floranssenddummyconf( regions(ireg),regions(iregsrc),patch )
138  ENDIF
139 
140 ! - rotational periodicity
141 
142  ELSE IF (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri+bc_range) THEN
143  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
144 
145 ! CALL TURB_FloRansSendDummyRot( regions(iReg),regions(iRegSrc), &
146 ! patch,patchSrc )
147  CALL errorstop( global,err_unknown_bc,__line__, &
148  'rotational periodic bc is not ready yet for RaNS.' )
149 
150  ENDIF ! bcType
151 
152  ENDDO ! iPatch
153 
154 ! finalize --------------------------------------------------------------------
155 
156 999 CONTINUE
157 
158  CALL deregisterfunction( global )
159 
160 END SUBROUTINE turb_rflo_ransbndconditionssend
161 
162 !******************************************************************************
163 !
164 ! RCS Revision history:
165 !
166 ! $Log: TURB_rFLO_RansBndConditionsSend.F90,v $
167 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
168 ! Updated license.
169 !
170 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
171 ! Added Illinois Open Source License/Copyright
172 !
173 ! Revision 1.2 2004/03/12 02:55:36 wasistho
174 ! changed rocturb routine names
175 !
176 ! Revision 1.1 2004/03/11 03:26:33 wasistho
177 ! changed rocturb nomenclature
178 !
179 ! Revision 1.1 2004/03/08 23:35:45 wasistho
180 ! changed turb nomenclature
181 !
182 ! Revision 1.2 2004/01/23 00:32:07 wasistho
183 ! added sending RaNS edge/corner variables
184 !
185 ! Revision 1.1 2003/10/07 02:17:03 wasistho
186 ! initial installation of RaNS-SA and DES
187 !
188 !
189 !******************************************************************************
190 
191 
192 
193 
194 
195 
196 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
Definition: patch.h:74
subroutine turb_floranssenddummyconf(region, regionSrc, patch)
subroutine turb_rflo_ransbndconditionssend(regions, iReg)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine turb_floranssendcornedgecells(regions, iReg)