Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floRansExchangeDummyConf.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: exchange RaNS variables between interior and dummy cells of the
26 ! corresponding patches of the adjacent regions (both regions
27 ! are on the same processor).
28 !
29 ! Description: none.
30 !
31 ! Input: region = current region
32 ! regionSrc = source region
33 ! patch = current patch of region
34 ! patchSrc = source patch of regionSrc.
35 !
36 ! Output: regions%levels%turb%cv = RaNS variables in dummy cells.
37 !
38 ! Notes: intended for conforming grid boundaries only.
39 !
40 !******************************************************************************
41 !
42 ! $Id: TURB_floRansExchangeDummyConf.F90,v 1.4 2008/12/06 08:44:44 mtcampbe Exp $
43 !
44 ! Copyright: (c) 2003 by the University of Illinois
45 !
46 !******************************************************************************
47 
48 SUBROUTINE turb_floransexchangedummyconf( region,regionSrc,patch,patchSrc )
49 
50  USE moddatatypes
51  USE modbndpatch, ONLY : t_patch
52  USE moddatastruct, ONLY : t_region
53  USE modindexing, ONLY : indijkmap
56  USE moderror
57  USE modparameters
58  IMPLICIT NONE
59 
60 #include "Indexing.h"
61 
62 ! ... parameters
63  TYPE(t_region) :: region, regionsrc
64  TYPE(t_patch) :: patch, patchsrc
65 
66 ! ... loop variables
67  INTEGER :: idum, i, j, k, l, ii, jj, kk
68 
69 ! ... local variables
70  INTEGER :: ibeg, iend, jbeg, jend, kbeg, kend, idir, jdir, kdir, &
71  icoff, ijcoff, ijkd, ilev, ncv
72  INTEGER :: ibegsrc, iendsrc, jbegsrc, jendsrc, kbegsrc, kendsrc, &
73  idirsrc, jdirsrc, kdirsrc, icoffsrc, ijcoffsrc, ijkcsrc
74  INTEGER :: lb, lbs, l1srcdir, l2srcdir, mapmat(3,4)
75 
76  LOGICAL :: align
77 
78  REAL(RFREAL), POINTER :: tcv(:,:), tcvsrc(:,:)
79 
80 !******************************************************************************
81 
82  CALL registerfunction( region%global,'TURB_FloRansExchangeDummyConf', &
83  'TURB_floRansExchangeDummyConf.F90' )
84 
85 ! check if the source region is active
86 
87  IF (regionsrc%active == off) THEN
88  CALL errorstop( region%global,err_srcregion_off,__line__ )
89  ENDIF
90 
91 ! get dimensions and pointers
92 
93  ilev = region%currLevel
94 
95  CALL rflo_getpatchindices( region,patch,ilev,ibeg,iend, &
96  jbeg,jend,kbeg,kend )
97  CALL rflo_getpatchindices( regionsrc,patchsrc,ilev,ibegsrc,iendsrc, &
98  jbegsrc,jendsrc,kbegsrc,kendsrc )
100  CALL rflo_getpatchdirection( patchsrc,idirsrc,jdirsrc,kdirsrc )
101  CALL rflo_getcelloffset( region ,ilev,icoff ,ijcoff )
102  CALL rflo_getcelloffset( regionsrc,ilev,icoffsrc,ijcoffsrc )
103 
104  ncv = region%turbInput%nCv
105 
106  tcv => region%levels(ilev)%turb%cv
107  tcvsrc => regionsrc%levels(ilev)%turb%cv
108 
109 ! mapping between patches
110 
111  l1srcdir = 1
112  IF (patch%srcL1beg > patch%srcL1end) l1srcdir = -1
113  l2srcdir = 1
114  IF (patch%srcL2beg > patch%srcL2end) l2srcdir = -1
115 
116  lb = patch%lbound
117  lbs = patch%srcLbound
118  align = patch%align
119 
120  CALL rflo_getpatchmapping( lb,lbs,l1srcdir,l2srcdir,align, &
121  idir,jdir,kdir,idirsrc,jdirsrc,kdirsrc, &
122  ibeg,iend,jbeg,jend,kbeg,kend, &
123  ibegsrc,iendsrc,jbegsrc,jendsrc,kbegsrc,kendsrc, &
124  mapmat )
125 
126 ! loop over dummy nodes of current patch
127 
128  DO idum=1,region%nDumCells
129  DO k=kbeg,kend
130  DO j=jbeg,jend
131  DO i=ibeg,iend
132  ii = i - idum*idir
133  jj = j - idum*jdir
134  kk = k - idum*kdir
135  ijkd = indijk(ii,jj,kk,icoff,ijcoff)
136  ijkcsrc = indijkmap(ii,jj,kk,mapmat,icoffsrc,ijcoffsrc)
137 
138  DO l=1,ncv
139  tcv(l,ijkd) = tcvsrc(l,ijkcsrc)
140  ENDDO
141 
142  ENDDO ! i
143  ENDDO ! j
144  ENDDO ! k
145  ENDDO ! idum
146 
147 ! finalize
148 
149  CALL deregisterfunction( region%global )
150 
151 END SUBROUTINE turb_floransexchangedummyconf
152 
153 !******************************************************************************
154 !
155 ! RCS Revision history:
156 !
157 ! $Log: TURB_floRansExchangeDummyConf.F90,v $
158 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
159 ! Updated license.
160 !
161 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
162 ! Added Illinois Open Source License/Copyright
163 !
164 ! Revision 1.2 2004/03/12 02:55:36 wasistho
165 ! changed rocturb routine names
166 !
167 ! Revision 1.1 2004/03/08 23:35:45 wasistho
168 ! changed turb nomenclature
169 !
170 ! Revision 1.1 2003/10/07 02:17:03 wasistho
171 ! initial installation of RaNS-SA and DES
172 !
173 !
174 !******************************************************************************
175 
176 
177 
178 
179 
180 
181 
**********************************************************************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 rflo_getpatchdirection(patch, idir, jdir, kdir)
j indices k indices k
Definition: Indexing.h:6
INTEGER function indijkmap(i, j, k, mapMat, iOffset, ijOffset)
Definition: ModIndexing.F90:67
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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
Definition: patch.h:74
**********************************************************************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
**********************************************************************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
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
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 kdir
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
**********************************************************************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
subroutine rflo_getpatchmapping(lb, lbs, l1SrcDir, l2SrcDir, align, idir, jdir, kdir, idirSrc, jdirSrc, kdirSrc, ibeg, iend, jbeg, jend, kbeg, kend, ibegSrc, iendSrc, jbegSrc, jendSrc, kbegSrc, kendSrc, mapMat)
**********************************************************************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
subroutine turb_floransexchangedummyconf(region, regionSrc, patch, patchSrc)