Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floExtrapIntCellScal.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 scalar variable defined at cells to outer dummy cells.
26 !
27 ! Description: The values are only available in the interior cells.
28 ! Here the values are extrapolated to first up to nDum cells.
29 !
30 ! Input: region = data of current region
31 ! fVec = scalar variable to be extrapolated
32 !
33 ! Output: fVec = values of fVec at the remaining dummy cells are defined.
34 !
35 !******************************************************************************
36 !
37 ! $Id: TURB_floExtrapIntCellScal.F90,v 1.4 2008/12/06 08:44:43 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE turb_floextrapintcellscal( region,fVec )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
49  USE modturbulence
50  USE moderror
51  IMPLICIT NONE
52 
53 #include "Indexing.h"
54 
55 ! ... parameters
56  TYPE(t_region) :: region
57  REAL(RFREAL), POINTER :: fvec(:)
58 
59 ! ... loop variables
60  INTEGER :: i, j, k, l, m, ijkc, ijkc0, ijkc1, ijkc2, ijkc3
61  INTEGER :: indxc, indxc0, indxc1, indxc2, indxc3
62 
63 ! ... local variables
64  CHARACTER(CHRLEN) :: rcsidentstring
65  TYPE(t_global), POINTER :: global
66 
67  INTEGER :: ibeg,iend,jbeg,jend,kbeg,kend
68  INTEGER :: idcbeg,idcend,jdcbeg,jdcend,kdcbeg,kdcend
69  INTEGER :: ilev,icoff,ijcoff,ndum,nadd,sign(2),indx(2)
70  INTEGER :: idum
71 
72 !******************************************************************************
73 
74  rcsidentstring = '$RCSfile: TURB_floExtrapIntCellScal.F90,v $'
75 
76  global => region%global
77  CALL registerfunction( global,'TURB_FloExtrapIntCellScal',&
78  'TURB_floExtrapIntCellScal.F90' )
79 
80 ! get indices ---------------------------------------------------------------
81 
82  sign(1)= 1
83  sign(2)=-1
84  ndum = region%nDumCells
85  nadd = -ndum
86  ilev = region%currLevel
87 
88  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
89  jdcbeg,jdcend,kdcbeg,kdcend )
90  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
91 
92  ibeg = idcbeg
93  iend = idcend
94  jbeg = jdcbeg
95  jend = jdcend
96  kbeg = kdcbeg
97  kend = kdcend
98 
99 ! extrapolation to dummy layers, first in I direction
100 
101  indx(1)=ibeg
102  indx(2)=iend
103  DO m=1,2
104  DO idum=2,ndum
105  indxc3 = indx(m)-sign(m)*(nadd-idum+1)
106  indxc2 = indx(m)-sign(m)*nadd+sign(m)
107  indxc1 = indx(m)-sign(m)*nadd
108  indxc0 = indx(m)-sign(m)*nadd-sign(m)
109  indxc = indx(m)-sign(m)*(nadd+idum)
110  DO k=kbeg,kend
111  DO j=jbeg,jend
112  ijkc = indijk(indxc ,j ,k ,icoff,ijcoff)
113  ijkc0 = ijkc + indxc0-indxc
114  ijkc1 = ijkc + indxc1-indxc
115  ijkc2 = ijkc + indxc2-indxc
116  ijkc3 = ijkc + indxc3-indxc
117 
118  fvec(ijkc0) = 2._rfreal*fvec(ijkc1)-fvec(ijkc2)
119  fvec(ijkc) = fvec(ijkc0)+fvec(ijkc1)-fvec(ijkc3)
120  ENDDO ! j
121  ENDDO ! k
122  ENDDO ! iDum
123  ENDDO ! m
124 
125 ! then in J direction
126 
127  indx(1)=jbeg
128  indx(2)=jend
129  DO m=1,2
130  DO idum=2,ndum
131  indxc3 = indx(m)-sign(m)*(nadd-idum+1)
132  indxc2 = indx(m)-sign(m)*nadd+sign(m)
133  indxc1 = indx(m)-sign(m)*nadd
134  indxc0 = indx(m)-sign(m)*nadd-sign(m)
135  indxc = indx(m)-sign(m)*(nadd+idum)
136  DO k=kbeg,kend
137  DO i=ibeg,iend
138  ijkc = indijk(i ,indxc ,k ,icoff,ijcoff)
139  ijkc0 = ijkc + (indxc0-indxc)*icoff
140  ijkc1 = ijkc + (indxc1-indxc)*icoff
141  ijkc2 = ijkc + (indxc2-indxc)*icoff
142  ijkc3 = ijkc + (indxc3-indxc)*icoff
143 
144  fvec(ijkc0) = 2._rfreal*fvec(ijkc1)-fvec(ijkc2)
145  fvec(ijkc) = fvec(ijkc0)+fvec(ijkc1)-fvec(ijkc3)
146  ENDDO ! i
147  ENDDO ! k
148  ENDDO ! iDum
149  ENDDO ! m
150 
151 ! then in K direction
152 
153  indx(1)=kbeg
154  indx(2)=kend
155  DO m=1,2
156  DO idum=2,ndum
157  indxc3 = indx(m)-sign(m)*(nadd-idum+1)
158  indxc2 = indx(m)-sign(m)*nadd+sign(m)
159  indxc1 = indx(m)-sign(m)*nadd
160  indxc0 = indx(m)-sign(m)*nadd-sign(m)
161  indxc = indx(m)-sign(m)*(nadd+idum)
162  DO j=jbeg,jend
163  DO i=ibeg,iend
164  ijkc = indijk(i ,j ,indxc ,icoff,ijcoff)
165  ijkc0 = ijkc + (indxc0-indxc)*ijcoff
166  ijkc1 = ijkc + (indxc1-indxc)*ijcoff
167  ijkc2 = ijkc + (indxc2-indxc)*ijcoff
168  ijkc3 = ijkc + (indxc3-indxc)*ijcoff
169 
170  fvec(ijkc0) = 2._rfreal*fvec(ijkc1)-fvec(ijkc2)
171  fvec(ijkc) = fvec(ijkc0)+fvec(ijkc1)-fvec(ijkc3)
172  ENDDO ! i
173  ENDDO ! j
174  ENDDO ! iDum
175  ENDDO ! m
176 
177 ! finalize --------------------------------------------------------------------
178 
179  CALL deregisterfunction( global )
180 
181 END SUBROUTINE turb_floextrapintcellscal
182 
183 !******************************************************************************
184 !
185 ! RCS Revision history:
186 !
187 ! $Log: TURB_floExtrapIntCellScal.F90,v $
188 ! Revision 1.4 2008/12/06 08:44:43 mtcampbe
189 ! Updated license.
190 !
191 ! Revision 1.3 2008/11/19 22:17:55 mtcampbe
192 ! Added Illinois Open Source License/Copyright
193 !
194 ! Revision 1.2 2004/03/12 02:55:35 wasistho
195 ! changed rocturb routine names
196 !
197 ! Revision 1.1 2004/03/08 23:35:45 wasistho
198 ! changed turb nomenclature
199 !
200 ! Revision 1.1 2004/02/12 03:47:36 wasistho
201 ! filled in RaNS lengthscale in dummy cells
202 !
203 !
204 !
205 !******************************************************************************
206 
207 
208 
209 
210 
211 
212 
**********************************************************************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
FT m(int i, int j) const
**********************************************************************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
static SURF_BEGIN_NAMESPACE double sign(double x)
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
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 knode iend
**********************************************************************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
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 turb_floextrapintcellscal(region, fVec)
**********************************************************************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 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 jdcbeg
**********************************************************************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