Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_ZeroDummyCells.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: set a variable to zero in all dummy cells.
26 !
27 ! Description: this is intended to prevent a change of the solution inside
28 ! the dummy cells (these are set by the boundary conditions).
29 !
30 ! Input: var = variable.
31 !
32 ! Output: var = zeroed out in dummy cells.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLO_ZeroDummyCells.F90,v 1.3 2008/12/06 08:44:08 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflo_zerodummycells( region,var )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
50  USE moderror
51  USE modparameters
52  IMPLICIT NONE
53 
54 #include "Indexing.h"
55 
56 ! ... parameters
57  TYPE(t_region) :: region
58 
59  REAL(RFREAL), POINTER :: var(:,:)
60 
61 ! ... loop variables
62  INTEGER :: i, j, k
63 
64 ! ... local variables
65  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
66  INTEGER :: ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend
67  INTEGER :: ilev, icoff, ijcoff, ijk
68 
69 !******************************************************************************
70 
71  CALL registerfunction( region%global,'RFLO_ZeroDummyCells',&
72  'RFLO_ZeroDummyCells.F90' )
73 
74 ! get dimensions
75 
76  ilev = region%currLevel
77 
78  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
79  jdcbeg,jdcend,kdcbeg,kdcend )
80  CALL rflo_getdimensphys( region,ilev,ipcbeg,ipcend, &
81  jpcbeg,jpcend,kpcbeg,kpcend )
82  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
83 
84 ! side 1 and 2
85 
86  DO i=idcbeg,ipcbeg-1
87  DO k=kpcbeg,kpcend
88  DO j=jpcbeg,jpcend
89  ijk = indijk(i,j,k,icoff,ijcoff)
90  var(:,ijk) = 0._rfreal
91  ENDDO
92  ENDDO
93  ENDDO
94  DO i=ipcend+1,idcend
95  DO k=kpcbeg,kpcend
96  DO j=jpcbeg,jpcend
97  ijk = indijk(i,j,k,icoff,ijcoff)
98  var(:,ijk) = 0._rfreal
99  ENDDO
100  ENDDO
101  ENDDO
102 
103 ! side 3 and 4
104 
105  DO j=jdcbeg,jpcbeg-1
106  DO k=kpcbeg,kpcend
107  DO i=idcbeg,idcend
108  ijk = indijk(i,j,k,icoff,ijcoff)
109  var(:,ijk) = 0._rfreal
110  ENDDO
111  ENDDO
112  ENDDO
113  DO j=jpcend+1,jdcend
114  DO k=kpcbeg,kpcend
115  DO i=idcbeg,idcend
116  ijk = indijk(i,j,k,icoff,ijcoff)
117  var(:,ijk) = 0._rfreal
118  ENDDO
119  ENDDO
120  ENDDO
121 
122 ! side 5 and 6
123 
124  DO k=kdcbeg,kpcbeg-1
125  DO j=jdcbeg,jdcend
126  DO i=idcbeg,idcend
127  ijk = indijk(i,j,k,icoff,ijcoff)
128  var(:,ijk) = 0._rfreal
129  ENDDO
130  ENDDO
131  ENDDO
132  DO k=kpcend+1,kdcend
133  DO j=jdcbeg,jdcend
134  DO i=idcbeg,idcend
135  ijk = indijk(i,j,k,icoff,ijcoff)
136  var(:,ijk) = 0._rfreal
137  ENDDO
138  ENDDO
139  ENDDO
140 
141 ! finalize
142 
143  CALL deregisterfunction( region%global )
144 
145 END SUBROUTINE rflo_zerodummycells
146 
147 !******************************************************************************
148 !
149 ! RCS Revision history:
150 !
151 ! $Log: RFLO_ZeroDummyCells.F90,v $
152 ! Revision 1.3 2008/12/06 08:44:08 mtcampbe
153 ! Updated license.
154 !
155 ! Revision 1.2 2008/11/19 22:17:21 mtcampbe
156 ! Added Illinois Open Source License/Copyright
157 !
158 ! Revision 1.1 2004/11/29 21:25:17 wasistho
159 ! lower to upper case
160 !
161 ! Revision 1.7 2003/11/20 16:40:35 mdbrandy
162 ! Backing out RocfluidMP changes from 11-17-03
163 !
164 ! Revision 1.4 2003/05/15 02:57:01 jblazek
165 ! Inlined index function.
166 !
167 ! Revision 1.3 2002/09/05 17:40:19 jblazek
168 ! Variable global moved into regions().
169 !
170 ! Revision 1.2 2002/02/21 23:25:05 jblazek
171 ! Blocks renamed as regions.
172 !
173 ! Revision 1.1 2002/01/23 03:51:24 jblazek
174 ! Added low-level time-stepping routines.
175 !
176 !******************************************************************************
177 
178 
179 
180 
181 
182 
183 
**********************************************************************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 idcend
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 kpcbeg
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 jpcbeg
**********************************************************************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 ipcend
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************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 kdcbeg
**********************************************************************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 ipcbeg
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 idcbeg
subroutine rflo_zerodummycells(region, var)
**********************************************************************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 jdcend
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 jpcend
**********************************************************************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 jdcbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)