Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floLesGenFiltCC.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: Perform cell to cell non-uniform filtering.
26 !
27 ! Description: The filtering is performed in i, j and k direction, subsequently.
28 ! For each direction, distinction is made between homogeneous
29 ! and non-homogeneous direction. If the filtering direction is
30 ! homogeneous, uniform filtering is carried out, otherwise
31 ! nonuniform filtering.
32 !
33 ! Input: region = data of current region
34 ! nDel = three components filter width parameter
35 ! idBeg = begin variable index to be filtered
36 ! idEnd = end variable index to be filtered
37 ! fVar = cell variable to be filtered
38 !
39 ! Output: fbVar = filtered cell variable
40 !
41 ! Notes: This routine is only relevant if non-uniform filter is selected.
42 !
43 !******************************************************************************
44 !
45 ! $Id: TURB_floLesGenFiltCC.F90,v 1.5 2008/12/06 08:44:43 mtcampbe Exp $
46 !
47 ! Copyright: (c) 2001 by the University of Illinois
48 !
49 !******************************************************************************
50 
51 SUBROUTINE turb_flolesgenfiltcc( region,nDel,idBeg,idEnd,fVar,fbVar )
52 
53  USE moddatatypes
54  USE modglobal, ONLY : t_global
55  USE moddatastruct, ONLY : t_region
61  USE modturbulence
62  USE moderror
63  USE modparameters
65  IMPLICIT NONE
66 
67 #include "Indexing.h"
68 
69 ! ... parameters
70  TYPE(t_region) :: region
71  INTEGER :: ndel(diri:dirk),idbeg,idend
72  REAL(RFREAL), POINTER :: fvar(:,:),fbvar(:,:)
73 
74 ! ... loop variables
75  INTEGER :: i, j, k, l, ijkc
76 
77 ! ... local variables
78  CHARACTER(CHRLEN) :: rcsidentstring
79  TYPE(t_global), POINTER :: global
80 
81  INTEGER :: ibeg,iend,jbeg,jend,kbeg,kend
82  INTEGER :: idcbeg,idcend,jdcbeg,jdcend,kdcbeg,kdcend
83  INTEGER :: ilev,icoff,ijcoff,ibc,iec,ndum
84  INTEGER :: homdir(diri:dirk)
85 
86  REAL(RFREAL) :: fact1(filwidth_four),fact2(filwidth_four)
87  REAL(RFREAL), POINTER :: wrkbar(:,:)
88 
89 !******************************************************************************
90 
91  rcsidentstring = '$RCSfile: TURB_floLesGenFiltCC.F90,v $'
92 
93  global => region%global
94  CALL registerfunction( global,'TURB_FloLesGenFiltCC',&
95  'TURB_floLesGenFiltCC.F90' )
96 
97 ! get indices, parameters and pointers ----------------------------------------
98 
99  ndum = region%nDumCells
100  ilev = region%currLevel
101  homdir(:) = region%turbInput%homDir(:)
102  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
103  jdcbeg,jdcend,kdcbeg,kdcend )
104  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
105  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
106  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
107 
108  ALLOCATE( wrkbar(idbeg:idend,ibc:iec) )
109 
110  fact1(filwidth_one) = 0.125_rfreal
111  fact2(filwidth_one) = 0.75_rfreal
112  fact1(filwidth_two) = 0.25_rfreal
113  fact2(filwidth_two) = 0.50_rfreal
114  fact1(filwidth_four) = 0.125_rfreal
115  fact2(filwidth_four) = 0.25_rfreal
116 
117  ibeg = idcbeg
118  iend = idcend
119  jbeg = jdcbeg
120  jend = jdcend
121  kbeg = kdcbeg
122  kend = kdcend
123 
124 ! we begin with integration over I-direction
125 
126  IF (homdir(diri) /= off) THEN
127  CALL turb_flolesunifiltcci( global,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
128  icoff,ijcoff,ndel,idbeg,idend,fact1,fact2,fvar, &
129  fbvar )
130  ELSE
131  CALL turb_flolesgenfiltcci( region,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
132  icoff,ijcoff,ndel,idbeg,idend,fvar,fbvar )
133  ENDIF
134 
135 ! next, integrate over J-direction
136 
137  IF (homdir(dirj) /= off) THEN
138  CALL turb_flolesunifiltccj( global,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
139  icoff,ijcoff,ndel,idbeg,idend,fact1,fact2,fbvar, &
140  wrkbar )
141  ELSE
142  CALL turb_flolesgenfiltccj( region,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
143  icoff,ijcoff,ndel,idbeg,idend,fbvar,wrkbar )
144  ENDIF
145 
146 ! finally, integrate over K-direction
147 
148  IF (homdir(dirk) /= off) THEN
149  CALL turb_flolesunifiltcck( global,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
150  icoff,ijcoff,ndel,idbeg,idend,fact1,fact2,wrkbar, &
151  fbvar )
152  ELSE
153  CALL turb_flolesgenfiltcck( region,ndum,ibeg,iend,jbeg,jend,kbeg,kend, &
154  icoff,ijcoff,ndel,idbeg,idend,wrkbar,fbvar )
155  ENDIF
156 
157 ! deallocate temporary arrays
158 
159  DEALLOCATE( wrkbar )
160 
161 ! finalize --------------------------------------------------------------------
162 
163  CALL deregisterfunction( global )
164 
165 END SUBROUTINE turb_flolesgenfiltcc
166 
167 !******************************************************************************
168 !
169 ! RCS Revision history:
170 !
171 ! $Log: TURB_floLesGenFiltCC.F90,v $
172 ! Revision 1.5 2008/12/06 08:44:43 mtcampbe
173 ! Updated license.
174 !
175 ! Revision 1.4 2008/11/19 22:17:55 mtcampbe
176 ! Added Illinois Open Source License/Copyright
177 !
178 ! Revision 1.3 2004/06/03 02:13:11 wasistho
179 ! expand CC-filtering to all dummy layers
180 !
181 ! Revision 1.2 2004/03/12 02:55:36 wasistho
182 ! changed rocturb routine names
183 !
184 ! Revision 1.1 2004/03/08 23:35:45 wasistho
185 ! changed turb nomenclature
186 !
187 ! Revision 1.2 2003/05/15 02:57:06 jblazek
188 ! Inlined index function.
189 !
190 ! Revision 1.1 2002/10/14 23:55:29 wasistho
191 ! Install Rocturb
192 !
193 !******************************************************************************
194 
195 
196 
197 
198 
199 
200 
**********************************************************************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
**********************************************************************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
subroutine turb_flolesgenfiltcc(region, nDel, idBeg, idEnd, fVar, fbVar)
subroutine turb_flolesunifiltccj(global, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fact1, fact2, fVar, filtVar)
j indices k indices k
Definition: Indexing.h:6
subroutine turb_flolesgenfiltcck(region, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fVar, filtVar)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
subroutine turb_flolesgenfiltccj(region, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fVar, filtVar)
**********************************************************************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
**********************************************************************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
subroutine turb_flolesunifiltcck(global, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fact1, fact2, fVar, filtVar)
**********************************************************************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
subroutine turb_flolesgenfiltcci(region, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fVar, filtVar)
subroutine turb_flolesunifiltcci(global, nDum, ibeg, iend, jbeg, jend, kbeg, kend, iCOff, ijCOff, nDel, idBeg, idEnd, fact1, fact2, fVar, filtVar)