Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_ExchangeCornerEdgeCells.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 smoke 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: region%levels%peul%cv = cv variables in dummy cells.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: PEUL_ExchangeCornerEdgeCells.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2004 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE peul_exchangecorneredgecells( 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  INTEGER, INTENT(IN) :: ireg
61 
62 ! ... loop variables
63  INTEGER :: iedge, icorner, ijk, i, j, k
64 
65 ! ... local variables
66  CHARACTER(CHRLEN) :: rcsidentstring
67 
68  INTEGER :: icell, iregsrc, ilev, icoff, ijcoff, ijkd
69  INTEGER :: ibeg, iend, jbeg, jend, kbeg, kend
70 
71  REAL(RFREAL), POINTER :: cv(:,:), cvsrc(:,:)
72 
73  TYPE(t_global), POINTER :: global
74  TYPE(t_level), POINTER :: level
75 
76 !******************************************************************************
77 
78  rcsidentstring = &
79  '$RCSfile: PEUL_ExchangeCornerEdgeCells.F90,v $ $Revision: 1.3 $'
80 
81  global => regions(ireg)%global
82 
83  CALL registerfunction( global,'PEUL_ExchangeCornerEdgeCells',&
84  'PEUL_ExchangeCornerEdgeCells.F90' )
85 
86 ! get dimensions and pointers -------------------------------------------------
87 
88  ilev = regions(ireg)%currLevel
89 
90  CALL rflo_getcelloffset( regions(ireg),ilev,icoff,ijcoff )
91 
92  level => regions(ireg)%levels(ilev)
93  cv => level%peul%cv
94 
95 ! edge cells
96 
97  DO iedge=1,12
98  IF (level%edgeCells(iedge)%interact) THEN
99  CALL rflo_getedgecellsindices( regions(ireg),ilev,iedge, &
100  ibeg,iend,jbeg,jend,kbeg,kend )
101  ijk = 0
102  DO k=kbeg,kend
103  DO j=jbeg,jend
104  DO i=ibeg,iend
105  ijk = ijk + 1
106  ijkd = indijk(i,j,k,icoff,ijcoff)
107  icell = level%edgeCells(iedge)%cells(ijk)%srcCell
108  iregsrc = level%edgeCells(iedge)%cells(ijk)%srcRegion
109  IF (iregsrc > 0) THEN
110  IF (regions(iregsrc)%procid == global%myProcid) THEN
111  cvsrc => regions(iregsrc)%levels(ilev)%peul%cv
112 
113  IF (level%edgeCells(iedge)%cells(ijk)%rotate) THEN
114  ! rotational periodicity
115  ELSE
116  cv(:,ijkd) = cvsrc(:,icell)
117  ENDIF
118 
119  ENDIF
120  ENDIF
121  ENDDO ! i
122  ENDDO ! j
123  ENDDO ! k
124  ENDIF ! interact
125  ENDDO ! iedge
126 
127 ! corner cells
128 
129  DO icorner=1,8
130  IF (level%cornerCells(icorner)%interact) THEN
131  CALL rflo_getcornercellsindices( regions(ireg),ilev,icorner, &
132  ibeg,iend,jbeg,jend,kbeg,kend )
133  ijk = 0
134  DO k=kbeg,kend
135  DO j=jbeg,jend
136  DO i=ibeg,iend
137  ijk = ijk + 1
138  ijkd = indijk(i,j,k,icoff,ijcoff)
139  icell = level%cornerCells(icorner)%cells(ijk)%srcCell
140  iregsrc = level%cornerCells(icorner)%cells(ijk)%srcRegion
141  IF (iregsrc > 0) THEN
142  IF (regions(iregsrc)%procid == global%myProcid) THEN
143  cvsrc => regions(iregsrc)%levels(ilev)%peul%cv
144 
145  IF (level%cornerCells(icorner)%cells(ijk)%rotate) THEN
146  ! rotational periodicity
147  ELSE
148  cv(:,ijkd) = cvsrc(:,icell)
149  ENDIF
150 
151  ENDIF
152  ENDIF
153  ENDDO ! i
154  ENDDO ! j
155  ENDDO ! k
156  ENDIF ! interact
157  ENDDO ! icorner
158 
159 ! finalize --------------------------------------------------------------------
160 
161  CALL deregisterfunction( global )
162 
163 END SUBROUTINE peul_exchangecorneredgecells
164 
165 !******************************************************************************
166 !
167 ! RCS Revision history:
168 !
169 ! $Log: PEUL_ExchangeCornerEdgeCells.F90,v $
170 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
171 ! Updated license.
172 !
173 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
174 ! Added Illinois Open Source License/Copyright
175 !
176 ! Revision 1.1 2004/12/01 21:09:34 haselbac
177 ! Initial revision after changing case
178 !
179 ! Revision 1.1 2004/03/02 21:44:07 jferry
180 ! Added corner and edge cell data structures and routines
181 !
182 !******************************************************************************
183 
184 
185 
186 
187 
188 
189 
subroutine rflo_getedgecellsindices(region, iLev, iedge, iebeg, ieend, jebeg, jeend, kebeg, keend)
subroutine peul_exchangecorneredgecells(regions, iReg)
**********************************************************************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
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