Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_CopyGeometryDummy.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 grid coordinates from boundary to all dummy nodes.
26 !
27 ! Description: none.
28 !
29 ! Input: region%levels%grid = coordinates (physical cells) and dimensions
30 !
31 ! Output: region%levels%grid%xyz = coordinates (dummy cells)
32 !
33 ! Notes: boundaries between regions or periodic boundaries are treated
34 ! later. Thus, this routine does not distinguish between boundary
35 ! types.
36 !
37 !******************************************************************************
38 !
39 ! $Id: RFLO_CopyGeometryDummy.F90,v 1.3 2008/12/06 08:44:06 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rflo_copygeometrydummy( region )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region
51  USE moderror
52  USE modparameters
53  IMPLICIT NONE
54 
55 #include "Indexing.h"
56 
57 ! ... parameters
58  TYPE(t_region) :: region
59 
60 ! ... loop variables
61  INTEGER :: ilev, i, j, k
62 
63 ! ... local variables
64  INTEGER :: idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend, inoff, ijnoff
65  INTEGER :: ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend, ijk, ijkd
66 
67  REAL(RFREAL), POINTER :: xyz(:,:)
68 
69 !******************************************************************************
70 
71  CALL registerfunction( region%global,'RFLO_CopyGeometryDummy',&
72  'RFLO_CopyGeometryDummy.F90' )
73 
74 ! loop over all grid levels ---------------------------------------------------
75 
76  DO ilev=1,region%nGridLevels
77 
78  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
79  jdnbeg,jdnend,kdnbeg,kdnend )
80  CALL rflo_getdimensphysnodes( region,ilev,ipnbeg,ipnend, &
81  jpnbeg,jpnend,kpnbeg,kpnend )
82  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
83 
84  xyz => region%levels(ilev)%grid%xyz
85 
86 ! - side 1 and 2
87 
88  DO i=idnbeg,ipnbeg-1
89  DO k=kpnbeg,kpnend
90  DO j=jpnbeg,jpnend
91  ijk = indijk(ipnbeg,j,k,inoff,ijnoff) ! boundary node
92  ijkd = indijk(i ,j,k,inoff,ijnoff) ! dummy node
93  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
94  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
95  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
96  ENDDO
97  ENDDO
98  ENDDO
99  DO i=ipnend+1,idnend
100  DO k=kpnbeg,kpnend
101  DO j=jpnbeg,jpnend
102  ijk = indijk(ipnend,j,k,inoff,ijnoff) ! boundary node
103  ijkd = indijk(i ,j,k,inoff,ijnoff) ! dummy node
104  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
105  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
106  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
107  ENDDO
108  ENDDO
109  ENDDO
110 
111 ! - side 3 and 4
112 
113  DO j=jdnbeg,jpnbeg-1
114  DO k=kpnbeg,kpnend
115  DO i=idnbeg,idnend
116  ijk = indijk(i,jpnbeg,k,inoff,ijnoff) ! boundary node
117  ijkd = indijk(i,j ,k,inoff,ijnoff) ! dummy node
118  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
119  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
120  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
121  ENDDO
122  ENDDO
123  ENDDO
124  DO j=jpnend+1,jdnend
125  DO k=kpnbeg,kpnend
126  DO i=idnbeg,idnend
127  ijk = indijk(i,jpnend,k,inoff,ijnoff) ! boundary node
128  ijkd = indijk(i,j ,k,inoff,ijnoff) ! dummy node
129  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
130  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
131  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
132  ENDDO
133  ENDDO
134  ENDDO
135 
136 ! - side 5 and 6
137 
138  DO k=kdnbeg,kpnbeg-1
139  DO j=jdnbeg,jdnend
140  DO i=idnbeg,idnend
141  ijk = indijk(i,j,kpnbeg,inoff,ijnoff) ! boundary node
142  ijkd = indijk(i,j,k ,inoff,ijnoff) ! dummy node
143  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
144  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
145  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
146  ENDDO
147  ENDDO
148  ENDDO
149  DO k=kpnend+1,kdnend
150  DO j=jdnbeg,jdnend
151  DO i=idnbeg,idnend
152  ijk = indijk(i,j,kpnend,inoff,ijnoff) ! boundary node
153  ijkd = indijk(i,j,k ,inoff,ijnoff) ! dummy node
154  xyz(xcoord,ijkd) = xyz(xcoord,ijk)
155  xyz(ycoord,ijkd) = xyz(ycoord,ijk)
156  xyz(zcoord,ijkd) = xyz(zcoord,ijk)
157  ENDDO
158  ENDDO
159  ENDDO
160 
161  ENDDO ! iLev
162 
163 ! finalize --------------------------------------------------------------------
164 
165  CALL deregisterfunction( region%global )
166 
167 END SUBROUTINE rflo_copygeometrydummy
168 
169 !******************************************************************************
170 !
171 ! RCS Revision history:
172 !
173 ! $Log: RFLO_CopyGeometryDummy.F90,v $
174 ! Revision 1.3 2008/12/06 08:44:06 mtcampbe
175 ! Updated license.
176 !
177 ! Revision 1.2 2008/11/19 22:17:20 mtcampbe
178 ! Added Illinois Open Source License/Copyright
179 !
180 ! Revision 1.1 2004/11/29 21:25:16 wasistho
181 ! lower to upper case
182 !
183 ! Revision 1.6 2003/11/20 16:40:34 mdbrandy
184 ! Backing out RocfluidMP changes from 11-17-03
185 !
186 ! Revision 1.3 2003/05/15 02:57:01 jblazek
187 ! Inlined index function.
188 !
189 ! Revision 1.2 2002/09/05 17:40:19 jblazek
190 ! Variable global moved into regions().
191 !
192 ! Revision 1.1 2002/08/15 19:48:05 jblazek
193 ! Implemented grid deformation capability.
194 !
195 ! Revision 1.3 2002/03/18 23:11:33 jblazek
196 ! Finished multiblock and MPI.
197 !
198 ! Revision 1.2 2002/02/21 23:25:06 jblazek
199 ! Blocks renamed as regions.
200 !
201 ! Revision 1.1 2002/01/23 03:51:25 jblazek
202 ! Added low-level time-stepping routines.
203 !
204 ! Revision 1.2 2002/01/08 22:09:17 jblazek
205 ! Added calculation of face vectors and volumes.
206 !
207 ! Revision 1.1 2002/01/02 16:04:20 jblazek
208 ! Added routines to generate geometry for dummy cells.
209 !
210 !******************************************************************************
211 
212 
213 
214 
215 
216 
217 
subroutine rflo_copygeometrydummy(region)
**********************************************************************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 jpnbeg
j indices k indices k
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 kpnbeg
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 jdnbeg
**********************************************************************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 jpnend
**********************************************************************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 idnend
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 jdnend
**********************************************************************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 idnbeg
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 ipnbeg
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
j indices j
Definition: Indexing.h:6
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
**********************************************************************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 ipnend
**********************************************************************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 kdnbeg