Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floExtrapolFaceVec.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 face vector variable to outerst dummy faces.
26 !
27 ! Description: The values are already available up to second outerst dummy faces.
28 ! Here the values are extrapolated to the outers dummy faces.
29 !
30 ! Input: region = data of current region
31 ! intDIR = identifier for integration direction
32 ! idBeg,idEnd = begin and end variable index of the vector variable
33 ! fVec = vector variable to be extrapolated
34 !
35 ! Output: fVec = values of fVec at the remaining dummy cells are defined.
36 !
37 ! Notes: This routine is used by LesUniFiltFF and LesGenFiltFF.
38 !
39 !******************************************************************************
40 !
41 ! $Id: TURB_floExtrapolFaceVec.F90,v 1.4 2008/12/06 08:44:43 mtcampbe Exp $
42 !
43 ! Copyright: (c) 2001 by the University of Illinois
44 !
45 !******************************************************************************
46 
47 SUBROUTINE turb_floextrapolfacevec( region,intDIR,idBeg,idEnd,fVec )
48 
49  USE moddatatypes
50  USE moddatastruct, ONLY : t_region
51  USE modglobal, ONLY : t_global
53  USE modturbulence
54  USE moderror
56  IMPLICIT NONE
57 
58 #include "Indexing.h"
59 
60 ! ... parameters
61  TYPE(t_region) :: region
62  INTEGER :: intdir,idbeg,idend
63  REAL(RFREAL), POINTER :: fvec(:,:)
64 
65 ! ... loop variables
66  INTEGER :: i, j, k, l, m, ijkn, ijkn0, ijkn1, ijkn2
67  INTEGER :: indxn, indxn0, indxn1, indxn2
68 
69 ! ... local variables
70  CHARACTER(CHRLEN) :: rcsidentstring
71  TYPE(t_global), POINTER :: global
72 
73  INTEGER :: ibeg,iend,jbeg,jend,kbeg,kend
74  INTEGER :: idnbeg,idnend,jdnbeg,jdnend,kdnbeg,kdnend
75  INTEGER :: ilev,inoff,ijnoff,ndum,nadd,sign(2),indx(2)
76  INTEGER, PARAMETER:: two=2
77 
78 !******************************************************************************
79 
80  rcsidentstring = '$RCSfile: TURB_floExtrapolFaceVec.F90,v $'
81 
82  global => region%global
83  CALL registerfunction( global,'TURB_FloExtrapolFaceVec',&
84  'TURB_floExtrapolFaceVec.F90' )
85 
86 ! get indices ---------------------------------------------------------------
87 
88  sign(1)= 1
89  sign(2)=-1
90  ndum = region%nDumCells
91  nadd = -ndum
92  ilev = region%currLevel
93 
94  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
95  jdnbeg,jdnend,kdnbeg,kdnend )
96  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
97 
98  ibeg = idnbeg
99  iend = idnend
100  jbeg = jdnbeg
101  jend = jdnend
102  kbeg = kdnbeg
103  kend = kdnend
104 
105 ! extrapolation to outerst layers
106 
107  IF (intdir==diri) THEN
108  indx(1)=ibeg
109  indx(2)=iend
110  DO m=1,2
111  indxn2 = indx(m)-two*sign(m)*nadd
112  indxn1 = indx(m)-sign(m)*nadd
113  indxn = indx(m)
114  DO k=kbeg,kend
115  DO j=jbeg,jend
116  ijkn = indijk(indxn ,j ,k ,inoff,ijnoff)
117  ijkn1 = ijkn + indxn1-indxn
118  ijkn2 = ijkn + indxn2-indxn
119 
120  DO l=idbeg,idend
121  fvec(l,ijkn)=2._rfreal*fvec(l,ijkn1)-fvec(l,ijkn2)
122  ENDDO ! l
123  ENDDO ! j
124  ENDDO ! k
125  ENDDO ! m
126  ELSEIF (intdir==dirj) THEN
127  indx(1)=jbeg
128  indx(2)=jend
129  DO m=1,2
130  indxn2 = indx(m)-two*sign(m)*nadd
131  indxn1 = indx(m)-sign(m)*nadd
132  indxn = indx(m)
133  DO k=kbeg,kend
134  DO i=ibeg,iend
135  ijkn = indijk(i ,indxn ,k ,inoff,ijnoff)
136  ijkn1 = ijkn + (indxn1-indxn)*inoff
137  ijkn2 = ijkn + (indxn2-indxn)*inoff
138 
139  DO l=idbeg,idend
140  fvec(l,ijkn)=2._rfreal*fvec(l,ijkn1)-fvec(l,ijkn2)
141  ENDDO ! l
142  ENDDO ! i
143  ENDDO ! k
144  ENDDO ! m
145  ELSEIF (intdir==dirk) THEN
146  indx(1)=kbeg
147  indx(2)=kend
148  DO m=1,2
149  indxn2 = indx(m)-two*sign(m)*nadd
150  indxn1 = indx(m)-sign(m)*nadd
151  indxn = indx(m)
152  DO j=jbeg,jend
153  DO i=ibeg,iend
154  ijkn = indijk(i ,j ,indxn ,inoff,ijnoff)
155  ijkn1 = ijkn + (indxn1-indxn)*ijnoff
156  ijkn2 = ijkn + (indxn2-indxn)*ijnoff
157 
158  DO l=idbeg,idend
159  fvec(l,ijkn)=2._rfreal*fvec(l,ijkn1)-fvec(l,ijkn2)
160  ENDDO ! l
161  ENDDO ! i
162  ENDDO ! j
163  ENDDO ! m
164  ENDIF ! intDir
165 
166 ! finalize --------------------------------------------------------------------
167 
168  CALL deregisterfunction( global )
169 
170 END SUBROUTINE turb_floextrapolfacevec
171 
172 !******************************************************************************
173 !
174 ! RCS Revision history:
175 !
176 ! $Log: TURB_floExtrapolFaceVec.F90,v $
177 ! Revision 1.4 2008/12/06 08:44:43 mtcampbe
178 ! Updated license.
179 !
180 ! Revision 1.3 2008/11/19 22:17:55 mtcampbe
181 ! Added Illinois Open Source License/Copyright
182 !
183 ! Revision 1.2 2004/03/12 02:55:35 wasistho
184 ! changed rocturb routine names
185 !
186 ! Revision 1.1 2004/03/08 23:35:45 wasistho
187 ! changed turb nomenclature
188 !
189 ! Revision 1.2 2003/05/15 02:57:06 jblazek
190 ! Inlined index function.
191 !
192 ! Revision 1.1 2002/10/14 23:55:29 wasistho
193 ! Install Rocturb
194 !
195 !
196 !******************************************************************************
197 
198 
199 
200 
201 
202 
203 
**********************************************************************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
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
**********************************************************************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 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
**********************************************************************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 turb_floextrapolfacevec(region, intDIR, idBeg, idEnd, fVec)
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
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
**********************************************************************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
**********************************************************************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