Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floFaceWidthDummyConn.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: Extrapolate face widths from the interior domain or at the patch
26 ! to the dummy points at connecting boundaries.
27 !
28 ! Description: Dummy values of connecting bnd has been computed in prev. step
29 ! up to second outerst layer. They are copied to the
30 ! outerst layer in this routine.
31 !
32 ! Input: region = current region data
33 ! lbound = patch boundary ID
34 ! i,j,kdir = direction identifier
35 ! i,j,kndBeg = i,j,k begin index
36 ! i,j,kndEnd = i,j,k end index
37 !
38 ! Output: Face widths workI, workJ, workK at outerst layer of conn. bc.
39 !
40 ! Notes: Mother routine = TURB_FloFaceWidth.
41 ! This routine is only called to complete the face widths at the
42 ! right outerst faces (lbound = 2, 4 and 6).
43 !
44 !******************************************************************************
45 !
46 ! $Id: TURB_floFaceWidthDummyConn.F90,v 1.5 2008/12/06 08:44:43 mtcampbe Exp $
47 !
48 ! Copyright: (c) 2001 by the University of Illinois
49 !
50 !******************************************************************************
51 
52 SUBROUTINE turb_flofacewidthdummyconn( region,lbound,idir,jdir,kdir, &
53  indbeg,indend,jndbeg,jndend,kndbeg,kndend )
54 
55  USE moddatatypes
56  USE moddatastruct, ONLY : t_region
57  USE modglobal, ONLY : t_global
59  USE moderror
60  USE modparameters
61  IMPLICIT NONE
62 
63 #include "Indexing.h"
64 
65 ! ... parameters
66  TYPE(t_region) :: region
67  INTEGER :: lbound,idir,jdir,kdir
68  INTEGER :: indbeg, indend, jndbeg, jndend, kndbeg, kndend
69 
70 ! ... loop variables
71  INTEGER :: i, j, k, idum, jdum, kdum
72 
73 ! ... local variables
74  CHARACTER(CHRLEN) :: rcsidentstring
75  TYPE(t_global), POINTER :: global
76 
77 
78  INTEGER :: ilev, inoff, ijnoff
79  INTEGER :: ijkni, ijknj, ijknk, ijknd
80  INTEGER :: ig(3), jg(3), kg(3)
81  INTEGER :: idumb(3), jdumb(3), kdumb(3), idume(3), jdume(3), kdume(3)
82 
83 !******************************************************************************
84 
85  rcsidentstring = '$RCSfile: TURB_floFaceWidthDummyConn.F90,v $'
86 
87  global => region%global
88  CALL registerfunction( global,'TURB_FloFaceWidthDummyConn',&
89  'TURB_floFaceWidthDummyConn.F90' )
90 
91 ! get dimensions -------------------------------------------------------------
92 
93  ilev = region%currLevel
94  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
95 
96  idumb(:) = -idir*region%nDumCells
97  jdumb(:) = -jdir*region%nDumCells
98  kdumb(:) = -kdir*region%nDumCells
99  idume(:) = idumb(:)
100  jdume(:) = jdumb(:)
101  kdume(:) = kdumb(:)
102 
103  ig(:) = -idir*(region%nDumCells-1)
104  jg(:) = -jdir*(region%nDumCells-1)
105  kg(:) = -kdir*(region%nDumCells-1)
106 
107 ! 2D loop over patch nodes ----------------------------------------------------
108 
109  DO k=kndbeg,kndend
110  DO j=jndbeg,jndend
111  DO i=indbeg,indend
112 
113  ijkni = indijk(i+ig(1),j+jg(1),k+kg(1),inoff,ijnoff) ! i reference
114  ijknj = indijk(i+ig(2),j+jg(2),k+kg(2),inoff,ijnoff) ! j reference
115  ijknk = indijk(i+ig(3),j+jg(3),k+kg(3),inoff,ijnoff) ! k reference
116 
117 ! ----- 1D loop in direction normal to patch to define grads at dummy faces
118 
119  DO idum=idumb(1),idume(1)
120  DO jdum=jdumb(1),jdume(1)
121  DO kdum=kdumb(1),kdume(1)
122  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff)
123  region%levels(ilev)%turb%workI(1,ijknd) = &
124  region%levels(ilev)%turb%workI(1,ijkni)
125  region%levels(ilev)%turb%workI(2,ijknd) = &
126  region%levels(ilev)%turb%workI(2,ijkni)
127  ENDDO
128  ENDDO
129  ENDDO
130 
131  DO idum=idumb(2),idume(2)
132  DO jdum=jdumb(2),jdume(2)
133  DO kdum=kdumb(2),kdume(2)
134  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff)
135  region%levels(ilev)%turb%workJ(1,ijknd) = &
136  region%levels(ilev)%turb%workJ(1,ijknj)
137  region%levels(ilev)%turb%workJ(2,ijknd) = &
138  region%levels(ilev)%turb%workJ(2,ijknj)
139  ENDDO
140  ENDDO
141  ENDDO
142 
143  DO idum=idumb(3),idume(3)
144  DO jdum=jdumb(3),jdume(3)
145  DO kdum=kdumb(3),kdume(3)
146  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff)
147  region%levels(ilev)%turb%workK(1,ijknd) = &
148  region%levels(ilev)%turb%workK(1,ijknk)
149  region%levels(ilev)%turb%workK(2,ijknd) = &
150  region%levels(ilev)%turb%workK(2,ijknk)
151  ENDDO
152  ENDDO
153  ENDDO
154 
155  ENDDO ! i
156  ENDDO ! j
157  ENDDO ! k
158 
159 ! finalize --------------------------------------------------------------------
160 
161  CALL deregisterfunction( global )
162 
163 END SUBROUTINE turb_flofacewidthdummyconn
164 
165 !******************************************************************************
166 !
167 ! RCS Revision history:
168 !
169 ! $Log: TURB_floFaceWidthDummyConn.F90,v $
170 ! Revision 1.5 2008/12/06 08:44:43 mtcampbe
171 ! Updated license.
172 !
173 ! Revision 1.4 2008/11/19 22:17:55 mtcampbe
174 ! Added Illinois Open Source License/Copyright
175 !
176 ! Revision 1.3 2004/08/04 02:49:32 wasistho
177 ! removed turb%avgCoI,J,K as it is defined as grid%c2fCoI,J,K
178 !
179 ! Revision 1.2 2004/03/12 02:55:35 wasistho
180 ! changed rocturb routine names
181 !
182 ! Revision 1.1 2004/03/08 23:35:45 wasistho
183 ! changed turb nomenclature
184 !
185 ! Revision 1.2 2003/05/15 02:57:06 jblazek
186 ! Inlined index function.
187 !
188 ! Revision 1.1 2002/10/14 23:55:29 wasistho
189 ! Install Rocturb
190 !
191 !
192 !******************************************************************************
193 
194 
195 
196 
197 
198 
199 
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine turb_flofacewidthdummyconn(region, lbound, idir, jdir, kdir, indBeg, indEnd, jndBeg, jndEnd, kndBeg, kndEnd)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdir
blockLoc i
Definition: read.cpp:79
**********************************************************************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 idir
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 kdir
subroutine deregisterfunction(global)
Definition: ModError.F90:469