Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floLesUniFiltFFJ.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 face to face uniform filtering in J-direction.
26 !
27 ! Description: The filtering is performed using fixed filter coefficients.
28 ! If filterwidth is zero in this direction the cell-variable is
29 ! simply copied to the filtered cell-variable.
30 !
31 ! Input: global = global data, only used in register function
32 ! i,j,kbeg, i,j,kend = node index boundaries
33 ! iNOff, ijNOff = node Offset
34 ! nDel = three components filter width parameter
35 ! idBeg = begin variable index to be filtered
36 ! idEnd = end variable index to be filtered
37 ! fact1,2 = fixed filter coefficients for uniform grid
38 ! fVar = face variable to be filtered
39 !
40 ! Output: filtVar = filtered face variable
41 !
42 ! Notes: Mother routine = LesUniFiltFF.
43 !
44 !******************************************************************************
45 !
46 ! $Id: TURB_floLesUniFiltFFJ.F90,v 1.4 2008/12/06 08:44:44 mtcampbe Exp $
47 !
48 ! Copyright: (c) 2001 by the University of Illinois
49 !
50 !******************************************************************************
51 
52 SUBROUTINE turb_flolesunifiltffj( global,ibeg,iend,jbeg,jend,kbeg,kend,iNOff, &
53  ijnoff,ndel,idbeg,idend,fact1,fact2,fvar, &
54  filtvar )
55  USE moddatatypes
56  USE modglobal, ONLY : t_global
57  USE modturbulence
58  USE moderror
60  IMPLICIT NONE
61 
62 #include "Indexing.h"
63 
64 ! ... parameters
65  TYPE(t_global), POINTER :: global
66  INTEGER :: ibeg,iend,jbeg,jend,kbeg,kend,inoff,ijnoff
67  INTEGER :: ndel(diri:dirk),idbeg,idend
68  REAL(RFREAL) :: fact1(filwidth_four),fact2(filwidth_four)
69  REAL(RFREAL), POINTER :: fvar(:,:),filtvar(:,:)
70 
71 ! ... loop variables
72  INTEGER :: i, j, k, l, ijkn, ijknb, ijkne
73 
74 ! ... local variables
75  CHARACTER(CHRLEN) :: rcsidentstring
76  REAL(RFREAL) :: tmpb(idbeg:idend),tmpe(idbeg:idend)
77 
78 !******************************************************************************
79 
80  rcsidentstring = '$RCSfile: TURB_floLesUniFiltFFJ.F90,v $'
81 
82  CALL registerfunction( global,'TURB_FloLesUniFiltFFJ',&
83  'TURB_floLesUniFiltFFJ.F90' )
84 
85 ! integration over J-direction -----------------------------------------------
86 
87  IF (ndel(dirj)==filwidth_zero) THEN
88 
89 ! - no filtering in J-direction is needed and we copy fVar into filtVar
90 
91  filtvar = fvar
92 
93  ELSEIF ((ndel(dirj)==filwidth_one) .OR. &
94  (ndel(dirj)==filwidth_two)) THEN
95 
96  DO k=kbeg,kend
97  DO i=ibeg,iend
98 
99 ! ----- perform integration
100 
101  DO j=jbeg,jend
102  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
103  DO l=idbeg,idend
104  filtvar(l,ijkn)=fact1(ndel(dirj))*(fvar(l,ijkn-inoff)+ &
105  fvar(l,ijkn+inoff))+ &
106  fact2(ndel(dirj))*fvar(l,ijkn)
107  END DO ! l
108  ENDDO ! j
109 
110  ENDDO ! i
111  ENDDO ! k
112 
113  ELSEIF (ndel(dirj)==filwidth_four) THEN
114 
115  DO k=kbeg,kend
116  DO i=ibeg,iend
117 
118 ! ----- perform integration
119 
120  DO j=jbeg+1,jend-1
121  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
122  DO l=idbeg,idend
123  filtvar(l,ijkn)=fact1(ndel(dirj))*(fvar(l,ijkn-2*inoff)+ &
124  fvar(l,ijkn+2*inoff))+ &
125  fact2(ndel(dirj))*(fvar(l,ijkn+inoff)+ &
126  fvar(l,ijkn)+fvar(l,ijkn-inoff))
127  ENDDO ! l
128  ENDDO ! j
129 
130 ! ----- perform integration at the edges
131 
132  ijknb = indijk(i ,jbeg ,k ,inoff,ijnoff)
133  ijkne = indijk(i ,jend ,k ,inoff,ijnoff)
134  DO l=idbeg,idend
135  tmpb(l) = 2._rfreal*fvar(l,ijknb-inoff)-fvar(l,ijknb)
136  tmpe(l) = 2._rfreal*fvar(l,ijkne+inoff)-fvar(l,ijkne)
137  filtvar(l,ijknb)=fact1(ndel(dirj))*(tmpb(l)+fvar(l,ijknb+2*inoff))+ &
138  fact2(ndel(dirj))*(fvar(l,ijknb+inoff)+ &
139  fvar(l,ijknb)+fvar(l,ijknb-inoff))
140  filtvar(l,ijkne)=fact1(ndel(dirj))*(tmpe(l)+fvar(l,ijkne-2*inoff))+ &
141  fact2(ndel(dirj))*(fvar(l,ijkne+inoff)+ &
142  fvar(l,ijkne)+fvar(l,ijkne-inoff))
143  ENDDO ! l
144  ENDDO ! i
145  ENDDO ! k
146  ENDIF ! nDel
147 
148 ! finalize --------------------------------------------------------------------
149 
150  CALL deregisterfunction( global )
151 
152 END SUBROUTINE turb_flolesunifiltffj
153 
154 !******************************************************************************
155 !
156 ! RCS Revision history:
157 !
158 ! $Log: TURB_floLesUniFiltFFJ.F90,v $
159 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
160 ! Updated license.
161 !
162 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
163 ! Added Illinois Open Source License/Copyright
164 !
165 ! Revision 1.2 2004/03/12 02:55:36 wasistho
166 ! changed rocturb routine names
167 !
168 ! Revision 1.1 2004/03/08 23:35:45 wasistho
169 ! changed turb nomenclature
170 !
171 ! Revision 1.2 2003/05/15 02:57:06 jblazek
172 ! Inlined index function.
173 !
174 ! Revision 1.1 2002/10/14 23:55:30 wasistho
175 ! Install Rocturb
176 !
177 !******************************************************************************
178 
179 
180 
181 
182 
183 
184 
**********************************************************************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
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 knode iend
blockLoc i
Definition: read.cpp:79
subroutine turb_flolesunifiltffj(global, ibeg, iend, jbeg, jend, kbeg, kend, iNOff, ijNOff, nDel, idBeg, idEnd, fact1, fact2, fVar, filtVar)
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 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