Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floRansExchCornEdgeCells.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: copy values to edge and corner cells of an adjacent region.
26 !
27 ! Description: this is for the case if the other region is located
28 ! on the same processor.
29 !
30 ! Input: regions = data of all regions
31 ! iReg = current region.
32 !
33 ! Output: new values of RaNS variables.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: TURB_floRansExchCornEdgeCells.F90,v 1.5 2009/08/26 12:28:53 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE turb_floransexchcornedgecells( regions,iReg )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region, t_level
49  USE modglobal, ONLY : t_global
52  USE moderror
53  USE modparameters
54  IMPLICIT NONE
55 
56 #include "Indexing.h"
57 
58 ! ... parameters
59  TYPE(t_region), POINTER :: regions(:)
60 
61  INTEGER :: ireg
62 
63 ! ... loop variables
64  INTEGER :: iedge, icorner, ijk, i, j, k, l
65 
66 ! ... local variables
67  INTEGER :: icell, iregsrc, ilev, ncv, icoff, ijcoff, ijkd
68  INTEGER :: ibeg, iend, jbeg, jend, kbeg, kend
69 
70  REAL(RFREAL), POINTER :: tcv(:,:), tcvsrc(:,:)
71 
72  TYPE(t_global), POINTER :: global
73  TYPE(t_level), POINTER :: level
74 
75 !******************************************************************************
76 
77  global => regions(ireg)%global
78 
79  CALL registerfunction( global,'TURB_FloRansExchCornEdgeCells',&
80  'TURB_floRansExchCornEdgeCells.F90' )
81 
82 ! get dimensions and pointers
83 
84  ilev = regions(ireg)%currLevel
85  ncv = regions(ireg)%turbInput%nCv
86 
87  CALL rflo_getcelloffset( regions(ireg),ilev,icoff,ijcoff )
88 
89  level => regions(ireg)%levels(ilev)
90  tcv => level%turb%cv
91 
92 ! edge cells
93 
94  DO iedge=1,12
95  IF (level%edgeCells(iedge)%interact.eqv..true.) THEN
96  CALL rflo_getedgecellsindices( regions(ireg),ilev,iedge, &
97  ibeg,iend,jbeg,jend,kbeg,kend )
98  ijk = 0
99  DO k=kbeg,kend
100  DO j=jbeg,jend
101  DO i=ibeg,iend
102  ijk = ijk + 1
103  ijkd = indijk(i,j,k,icoff,ijcoff)
104  icell = level%edgeCells(iedge)%cells(ijk)%srcCell
105  iregsrc = level%edgeCells(iedge)%cells(ijk)%srcRegion
106  IF (iregsrc > 0) THEN
107  IF (regions(iregsrc)%procid == global%myProcid) THEN
108  tcvsrc => regions(iregsrc)%levels(ilev)%turb%cv
109 
110  IF (level%edgeCells(iedge)%cells(ijk)%rotate .eqv. .true.) THEN
111  ! rotational periodicity
112  ELSE
113  DO l=1,ncv
114  tcv(l,ijkd) = tcvsrc(l,icell)
115  ENDDO
116  ENDIF
117  ENDIF
118  ENDIF
119  ENDDO ! i
120  ENDDO ! j
121  ENDDO ! k
122  ENDIF ! interact
123  ENDDO ! iedge
124 
125 ! corner cells (currently not participating)
126 
127 ! DO icorner=1,8
128 ! IF (level%cornerCells(icorner)%interact) THEN
129 ! CALL RFLO_GetCornerCellsIndices( regions(iReg),iLev,icorner, &
130 ! ibeg,iend,jbeg,jend,kbeg,kend )
131 ! ijk = 0
132 ! DO k=kbeg,kend
133 ! DO j=jbeg,jend
134 ! DO i=ibeg,iend
135 ! ijk = ijk + 1
136 ! ijkD = IndIJK(i,j,k,iCOff,ijCOff)
137 ! icell = level%cornerCells(icorner)%cells(ijk)%srcCell
138 ! iRegSrc = level%cornerCells(icorner)%cells(ijk)%srcRegion
139 ! IF (iRegSrc > 0) THEN
140 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
141 ! tcvSrc => regions(iRegSrc)%levels(iLev)%turb%cv
142 
143 ! IF (level%cornerCells(icorner)%cells(ijk)%rotate) THEN
144 ! ! rotational periodicity
145 ! ELSE
146 ! DO l=1,nCv
147 ! tcv(l,ijkD) = tcvSrc(l,icell)
148 ! ENDDO
149 ! ENDIF
150 ! ENDIF
151 ! ENDIF
152 ! ENDDO ! i
153 ! ENDDO ! j
154 ! ENDDO ! k
155 ! ENDIF ! interact
156 ! ENDDO ! icorner
157 
158 ! finalize
159 
160  CALL deregisterfunction( global )
161 
162 END SUBROUTINE turb_floransexchcornedgecells
163 
164 !******************************************************************************
165 !
166 ! RCS Revision history:
167 !
168 ! $Log: TURB_floRansExchCornEdgeCells.F90,v $
169 ! Revision 1.5 2009/08/26 12:28:53 mtcampbe
170 ! Ported to Hera. Fixed logical expression syntax errors. Replaced all
171 ! IF (logical_variable) with IF (logical_variable .eqv. .true.) as
172 ! consistent with the specification. Also changed: IF( ASSOCIATED(expr) )
173 ! to IF ( ASSOCIATED(expr) .eqv. .true. ). Intel compilers produce code
174 ! which silently fails for some mal-formed expressions, so these changes
175 ! are a net which should ensure that they are evaluated as intended.
176 !
177 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
178 ! Updated license.
179 !
180 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
181 ! Added Illinois Open Source License/Copyright
182 !
183 ! Revision 1.2 2004/03/12 02:55:36 wasistho
184 ! changed rocturb routine names
185 !
186 ! Revision 1.1 2004/03/08 23:35:45 wasistho
187 ! changed turb nomenclature
188 !
189 ! Revision 1.1 2004/01/23 00:39:06 wasistho
190 ! added communication routines for RaNS edge/corners
191 !
192 !
193 !******************************************************************************
194 
195 
196 
197 
198 
199 
200 
subroutine rflo_getedgecellsindices(region, iLev, iedge, iebeg, ieend, jebeg, jeend, kebeg, keend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
subroutine turb_floransexchcornedgecells(regions, iReg)
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
blockLoc i
Definition: read.cpp:79
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icorner
subroutine rflo_getcornercellsindices(region, iLev, icorner, icbeg, icend, jcbeg, jcend, kcbeg, kcend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icell
j indices j
Definition: Indexing.h:6
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode kbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469