Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_CalcGradFaces.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: compute gradients of any vector or scalar at i, j and k faces
26 ! in one big loop
27 !
28 ! Description: gradients are computed by second order finite volume method
29 ! using auxiliary control volume whose center is cell-face-center
30 ! df/dx = 1/V int(f.(nx,0,0))dS
31 ! df/dy = 1/V int(f.(0,ny,0))dS
32 ! df/dz = 1/V int(f.(0,0,nz))dS
33 !
34 ! Input: region = data of current region.
35 ! ilev = data of current level.
36 ! iBegV, iEndV = begin and end var index
37 ! iBegG, iEndG = begin and end gradient index
38 ! var = variables, the gradient of which to be determined.
39 !
40 ! Output: gradi,j,k = gradients of 'var' at i,j,k-face.
41 !
42 ! Notes: the computation covers region-interior up to -boundaries/sides
43 ! this method also applied at dummy faces of connecting sides
44 ! (subroutine RFLO_CalcGradConnBc)
45 !
46 !******************************************************************************
47 !
48 ! $Id: RFLO_CalcGradFaces.F90,v 1.4 2008/12/06 08:44:06 mtcampbe Exp $
49 !
50 ! Copyright: (c) 2001 by the University of Illinois
51 !
52 !******************************************************************************
53 
54 SUBROUTINE rflo_calcgradfaces( region,ilev,iBegV,iEndV,iBegG,iEndG,var, &
55  gradi,gradj,gradk )
56 
57  USE moddatatypes
58  USE moddatastruct, ONLY : t_region
61  USE moderror
62  USE modparameters
63  IMPLICIT NONE
64 
65 #include "Indexing.h"
66 
67 ! ... parameters
68  TYPE(t_region) :: region
69  INTEGER :: ilev, ibegv, iendv, ibegg, iendg
70  REAL(RFREAL), POINTER :: var(:,:), gradi(:,:),gradj(:,:),gradk(:,:)
71 
72 ! ... loop variables
73  INTEGER :: i, j, k, l, lx, ly, lz
74 
75 ! ... local variables
76  INTEGER :: inbeg, inend, jnbeg, jnend, knbeg, knend
77  INTEGER :: icoff, ijcoff, inoff, ijnoff
78  INTEGER :: ijkc, im1jkc, ijm1kc, ijkm1c, im1jm1kc, im1jkm1c, ijm1km1c
79  INTEGER :: ijkn, im1jkn, ijm1kn, ijkm1n
80  INTEGER :: nvar
81 
82  REAL(RFREAL) :: rvol, fnx, fny, fnz, fface(ibegv:iendv)
83  REAL(RFREAL), POINTER :: aci(:,:), acj(:,:), ack(:,:)
84  REAL(RFREAL), POINTER :: si(:,:), sj(:,:), sk(:,:), vol(:)
85 
86 !******************************************************************************
87 
88  CALL registerfunction( region%global,'RFLO_CalcGradFaces',&
89  'RFLO_CalcGradFaces.F90' )
90 
91 ! get dimensions and pointers -------------------------------------------------
92 
93  nvar = iendv - ibegv + 1
94 
95  aci => region%levels(ilev)%grid%c2eCoI
96  acj => region%levels(ilev)%grid%c2eCoJ
97  ack => region%levels(ilev)%grid%c2eCoK
98  si => region%levels(ilev)%grid%si
99  sj => region%levels(ilev)%grid%sj
100  sk => region%levels(ilev)%grid%sk
101  vol => region%levels(ilev)%grid%vol
102 
103 ! get cell and node dimensions ------------------------------------------------
104 
105  CALL rflo_getdimensphysnodes( region,ilev,inbeg,inend, &
106  jnbeg,jnend,knbeg,knend )
107  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
108  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
109 
110 ! initialize gradients --------------------------------------------------------
111 
112  gradi(ibegg:iendg,:) = 0.0_rfreal
113  gradj(ibegg:iendg,:) = 0.0_rfreal
114  gradk(ibegg:iendg,:) = 0.0_rfreal
115 
116 ! begin gradients computation -------------------------------------------------
117 
118  DO k=knbeg,knend+1
119  DO j=jnbeg,jnend+1
120  DO i=inbeg,inend+1
121 
122  ijkc = indijk(i ,j ,k ,icoff,ijcoff)
123  im1jkc = ijkc-1
124  ijm1kc = ijkc-icoff
125  ijkm1c = ijkc-ijcoff
126  im1jm1kc= im1jkc-icoff
127  im1jkm1c= im1jkc-ijcoff
128  ijm1km1c= ijm1kc-ijcoff
129  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
130  im1jkn = ijkn-1
131  ijm1kn = ijkn-inoff
132  ijkm1n = ijkn-ijnoff
133 
134 ! - gradients at I-Face
135 
136 ! --- i-face of auxiliary control volume (face vectors pointed inwards/negative)
137 
138  fnx = .5_rfreal*(si(xcoord,ijkn)+si(xcoord,im1jkn))
139  fny = .5_rfreal*(si(ycoord,ijkn)+si(ycoord,im1jkn))
140  fnz = .5_rfreal*(si(zcoord,ijkn)+si(zcoord,im1jkn))
141 
142  DO l=ibegv,iendv
143  lx=l+ibegg-ibegv
144  ly=lx+nvar
145  lz=ly+nvar
146  gradi(lx,im1jkn) = gradi(lx,im1jkn) - fnx*var(l,im1jkc)
147  gradi(ly,im1jkn) = gradi(ly,im1jkn) - fny*var(l,im1jkc)
148  gradi(lz,im1jkn) = gradi(lz,im1jkn) - fnz*var(l,im1jkc)
149 
150  gradi(lx,ijkn) = gradi(lx,ijkn) + fnx*var(l,im1jkc)
151  gradi(ly,ijkn) = gradi(ly,ijkn) + fny*var(l,im1jkc)
152  gradi(lz,ijkn) = gradi(lz,ijkn) + fnz*var(l,im1jkc)
153  ENDDO
154 
155 ! --- j-face of auxiliary control volume (face vectors pointed inwards/negative)
156 
157  fnx = .5_rfreal*(sj(xcoord,ijkn)+sj(xcoord,im1jkn))
158  fny = .5_rfreal*(sj(ycoord,ijkn)+sj(ycoord,im1jkn))
159  fnz = .5_rfreal*(sj(zcoord,ijkn)+sj(zcoord,im1jkn))
160 
161  DO l=ibegv,iendv
162  lx=l+ibegg-ibegv
163  ly=lx+nvar
164  lz=ly+nvar
165 ! fface(l) = .25_RFREAL*(var(l,im1jkC)+var(l,ijkC)+ &
166 ! var(l,im1jm1kC)+var(l,ijm1kC))
167 
168  fface(l) = ack(1,ijkn)*var(l,im1jm1kc)+ack(2,ijkn)*var(l,ijm1kc)+ &
169  ack(3,ijkn)*var(l,ijkc)+ack(4,ijkn)*var(l,im1jkc)
170 
171  gradi(lx,ijm1kn) = gradi(lx,ijm1kn) - fnx*fface(l)
172  gradi(ly,ijm1kn) = gradi(ly,ijm1kn) - fny*fface(l)
173  gradi(lz,ijm1kn) = gradi(lz,ijm1kn) - fnz*fface(l)
174 
175  gradi(lx,ijkn) = gradi(lx,ijkn) + fnx*fface(l)
176  gradi(ly,ijkn) = gradi(ly,ijkn) + fny*fface(l)
177  gradi(lz,ijkn) = gradi(lz,ijkn) + fnz*fface(l)
178  ENDDO
179 
180 ! --- k-face of auxiliary control volume (face vectors pointed inwards/negative)
181 
182  fnx = .5_rfreal*(sk(xcoord,im1jkn)+sk(xcoord,ijkn))
183  fny = .5_rfreal*(sk(ycoord,im1jkn)+sk(ycoord,ijkn))
184  fnz = .5_rfreal*(sk(zcoord,im1jkn)+sk(zcoord,ijkn))
185 
186  DO l=ibegv,iendv
187  lx=l+ibegg-ibegv
188  ly=lx+nvar
189  lz=ly+nvar
190 ! fface(l) = .25_RFREAL*(var(l,im1jkC)+var(l,ijkC)+ &
191 ! var(l,im1jkm1C)+var(l,ijkm1C))
192 
193  fface(l) = acj(1,ijkn)*var(l,im1jkm1c)+acj(2,ijkn)*var(l,im1jkc)+ &
194  acj(3,ijkn)*var(l,ijkc)+acj(4,ijkn)*var(l,ijkm1c)
195 
196  gradi(lx,ijkm1n) = gradi(lx,ijkm1n) - fnx*fface(l)
197  gradi(ly,ijkm1n) = gradi(ly,ijkm1n) - fny*fface(l)
198  gradi(lz,ijkm1n) = gradi(lz,ijkm1n) - fnz*fface(l)
199 
200  gradi(lx,ijkn) = gradi(lx,ijkn) + fnx*fface(l)
201  gradi(ly,ijkn) = gradi(ly,ijkn) + fny*fface(l)
202  gradi(lz,ijkn) = gradi(lz,ijkn) + fnz*fface(l)
203  ENDDO
204 
205 ! - gradients at J-Face
206 
207 ! --- j-face of auxiliary control volume (face vectors pointed inwards/negative)
208 
209  fnx = .5_rfreal*(sj(xcoord,ijkn)+sj(xcoord,ijm1kn))
210  fny = .5_rfreal*(sj(ycoord,ijkn)+sj(ycoord,ijm1kn))
211  fnz = .5_rfreal*(sj(zcoord,ijkn)+sj(zcoord,ijm1kn))
212 
213  DO l=ibegv,iendv
214  lx=l+ibegg-ibegv
215  ly=lx+nvar
216  lz=ly+nvar
217  gradj(lx,ijm1kn) = gradj(lx,ijm1kn) - fnx*var(l,ijm1kc)
218  gradj(ly,ijm1kn) = gradj(ly,ijm1kn) - fny*var(l,ijm1kc)
219  gradj(lz,ijm1kn) = gradj(lz,ijm1kn) - fnz*var(l,ijm1kc)
220 
221  gradj(lx,ijkn) = gradj(lx,ijkn) + fnx*var(l,ijm1kc)
222  gradj(ly,ijkn) = gradj(ly,ijkn) + fny*var(l,ijm1kc)
223  gradj(lz,ijkn) = gradj(lz,ijkn) + fnz*var(l,ijm1kc)
224  ENDDO
225 
226 ! --- i-face of auxiliary control volume (face vectors pointed inwards/negative)
227 
228  fnx = .5_rfreal*(si(xcoord,ijkn)+si(xcoord,ijm1kn))
229  fny = .5_rfreal*(si(ycoord,ijkn)+si(ycoord,ijm1kn))
230  fnz = .5_rfreal*(si(zcoord,ijkn)+si(zcoord,ijm1kn))
231 
232  DO l=ibegv,iendv
233  lx=l+ibegg-ibegv
234  ly=lx+nvar
235  lz=ly+nvar
236 ! fface(l) = .25_RFREAL*(var(l,im1jkC)+var(l,ijkC)+ &
237 ! var(l,im1jm1kC)+var(l,ijm1kC))
238 
239  fface(l) = ack(1,ijkn)*var(l,im1jm1kc)+ack(2,ijkn)*var(l,ijm1kc)+ &
240  ack(3,ijkn)*var(l,ijkc)+ack(4,ijkn)*var(l,im1jkc)
241 
242  gradj(lx,im1jkn) = gradj(lx,im1jkn) - fnx*fface(l)
243  gradj(ly,im1jkn) = gradj(ly,im1jkn) - fny*fface(l)
244  gradj(lz,im1jkn) = gradj(lz,im1jkn) - fnz*fface(l)
245 
246  gradj(lx,ijkn) = gradj(lx,ijkn) + fnx*fface(l)
247  gradj(ly,ijkn) = gradj(ly,ijkn) + fny*fface(l)
248  gradj(lz,ijkn) = gradj(lz,ijkn) + fnz*fface(l)
249  ENDDO
250 
251 ! --- k-face of auxiliary control volume (face vectors pointed inwards/negative)
252 
253  fnx = .5_rfreal*(sk(xcoord,ijm1kn)+sk(xcoord,ijkn))
254  fny = .5_rfreal*(sk(ycoord,ijm1kn)+sk(ycoord,ijkn))
255  fnz = .5_rfreal*(sk(zcoord,ijm1kn)+sk(zcoord,ijkn))
256 
257  DO l=ibegv,iendv
258  lx=l+ibegg-ibegv
259  ly=lx+nvar
260  lz=ly+nvar
261 ! fface(l) = .25_RFREAL*(var(l,ijm1kC)+var(l,ijkC)+ &
262 ! var(l,ijm1km1C)+var(l,ijkm1C))
263 
264  fface(l) = aci(1,ijkn)*var(l,ijm1km1c)+aci(2,ijkn)*var(l,ijkm1c)+ &
265  aci(3,ijkn)*var(l,ijkc)+aci(4,ijkn)*var(l,ijm1kc)
266 
267  gradj(lx,ijkm1n) = gradj(lx,ijkm1n) - fnx*fface(l)
268  gradj(ly,ijkm1n) = gradj(ly,ijkm1n) - fny*fface(l)
269  gradj(lz,ijkm1n) = gradj(lz,ijkm1n) - fnz*fface(l)
270 
271  gradj(lx,ijkn) = gradj(lx,ijkn) + fnx*fface(l)
272  gradj(ly,ijkn) = gradj(ly,ijkn) + fny*fface(l)
273  gradj(lz,ijkn) = gradj(lz,ijkn) + fnz*fface(l)
274  ENDDO
275 
276 ! - gradients at K-Face
277 
278 ! --- k-face of auxiliary control volume (face vectors pointed inwards/negative)
279 
280  fnx = .5_rfreal*(sk(xcoord,ijkn)+sk(xcoord,ijkm1n))
281  fny = .5_rfreal*(sk(ycoord,ijkn)+sk(ycoord,ijkm1n))
282  fnz = .5_rfreal*(sk(zcoord,ijkn)+sk(zcoord,ijkm1n))
283 
284  DO l=ibegv,iendv
285  lx=l+ibegg-ibegv
286  ly=lx+nvar
287  lz=ly+nvar
288  gradk(lx,ijkm1n) = gradk(lx,ijkm1n) - fnx*var(l,ijkm1c)
289  gradk(ly,ijkm1n) = gradk(ly,ijkm1n) - fny*var(l,ijkm1c)
290  gradk(lz,ijkm1n) = gradk(lz,ijkm1n) - fnz*var(l,ijkm1c)
291 
292  gradk(lx,ijkn) = gradk(lx,ijkn) + fnx*var(l,ijkm1c)
293  gradk(ly,ijkn) = gradk(ly,ijkn) + fny*var(l,ijkm1c)
294  gradk(lz,ijkn) = gradk(lz,ijkn) + fnz*var(l,ijkm1c)
295  ENDDO
296 
297 ! --- j-face of auxiliary control volume (face vectors pointed inwards/negative)
298 
299  fnx = .5_rfreal*(sj(xcoord,ijkn)+sj(xcoord,ijkm1n))
300  fny = .5_rfreal*(sj(ycoord,ijkn)+sj(ycoord,ijkm1n))
301  fnz = .5_rfreal*(sj(zcoord,ijkn)+sj(zcoord,ijkm1n))
302 
303  DO l=ibegv,iendv
304  lx=l+ibegg-ibegv
305  ly=lx+nvar
306  lz=ly+nvar
307 ! fface(l) = .25_RFREAL*(var(l,ijkm1C)+var(l,ijkC)+ &
308 ! var(l,ijm1km1C)+var(l,ijm1kC))
309 
310  fface(l) = aci(1,ijkn)*var(l,ijm1km1c)+aci(2,ijkn)*var(l,ijkm1c)+ &
311  aci(3,ijkn)*var(l,ijkc)+aci(4,ijkn)*var(l,ijm1kc)
312 
313  gradk(lx,ijm1kn) = gradk(lx,ijm1kn) - fnx*fface(l)
314  gradk(ly,ijm1kn) = gradk(ly,ijm1kn) - fny*fface(l)
315  gradk(lz,ijm1kn) = gradk(lz,ijm1kn) - fnz*fface(l)
316 
317  gradk(lx,ijkn) = gradk(lx,ijkn) + fnx*fface(l)
318  gradk(ly,ijkn) = gradk(ly,ijkn) + fny*fface(l)
319  gradk(lz,ijkn) = gradk(lz,ijkn) + fnz*fface(l)
320  ENDDO
321 
322 ! --- i-face of auxiliary control volume (face vectors pointed inwards/negative)
323 
324  fnx = .5_rfreal*(si(xcoord,ijkm1n)+si(xcoord,ijkn))
325  fny = .5_rfreal*(si(ycoord,ijkm1n)+si(ycoord,ijkn))
326  fnz = .5_rfreal*(si(zcoord,ijkm1n)+si(zcoord,ijkn))
327 
328  DO l=ibegv,iendv
329  lx=l+ibegg-ibegv
330  ly=lx+nvar
331  lz=ly+nvar
332 ! fface(l) = .25_RFREAL*(var(l,im1jkC)+var(l,ijkC)+ &
333 ! var(l,im1jkm1C)+var(l,ijkm1C))
334 
335  fface(l) = acj(1,ijkn)*var(l,im1jkm1c)+acj(2,ijkn)*var(l,im1jkc)+ &
336  acj(3,ijkn)*var(l,ijkc)+acj(4,ijkn)*var(l,ijkm1c)
337 
338  gradk(lx,im1jkn) = gradk(lx,im1jkn) - fnx*fface(l)
339  gradk(ly,im1jkn) = gradk(ly,im1jkn) - fny*fface(l)
340  gradk(lz,im1jkn) = gradk(lz,im1jkn) - fnz*fface(l)
341 
342  gradk(lx,ijkn) = gradk(lx,ijkn) + fnx*fface(l)
343  gradk(ly,ijkn) = gradk(ly,ijkn) + fny*fface(l)
344  gradk(lz,ijkn) = gradk(lz,ijkn) + fnz*fface(l)
345  ENDDO
346 
347  ENDDO ! i
348  ENDDO ! j
349  ENDDO ! k
350 
351 ! - division by face volume
352 
353  DO k=knbeg,knend
354  DO j=jnbeg,jnend
355  DO i=inbeg,inend
356 
357  ijkc = indijk(i ,j ,k ,icoff,ijcoff)
358  im1jkc = ijkc-1
359  ijm1kc = ijkc-icoff
360  ijkm1c = ijkc-ijcoff
361  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
362 
363  rvol = 2.0_rfreal/(vol(im1jkc)+vol(ijkc))
364  DO l=ibegg,iendg
365  gradi(l,ijkn) = gradi(l,ijkn)*rvol
366  ENDDO
367 
368  rvol = 2.0_rfreal/(vol(ijm1kc)+vol(ijkc))
369  DO l=ibegg,iendg
370  gradj(l,ijkn) = gradj(l,ijkn)*rvol
371  ENDDO
372 
373  rvol = 2.0_rfreal/(vol(ijkm1c)+vol(ijkc))
374  DO l=ibegg,iendg
375  gradk(l,ijkn) = gradk(l,ijkn)*rvol
376  ENDDO
377 
378  ENDDO ! i
379  ENDDO ! j
380  ENDDO ! k
381 
382 ! provide approximate gradients at the edge boundaries by copying
383 ! from the adjacent cells
384 
385  CALL rflo_copyedgegrad
386 
387 ! up to this point gradi,j,k are well defined in the following range for
388 ! block interfaces and periodic bc: [knbeg:knend,jnbeg:jnend,inbeg:inend];
389 ! there are incomplete contributions from the auxiliary control volumes
390 ! at the boundaries which will be completed in the dummy treatment of the
391 ! connecting boundary conditions;
392 ! for physical bc, special treatment are needed for the gradients at the patches,
393 ! depending on whether dummy variables are linear or zeroth extrapolated
394 ! (in slip_wall and injection bc).
395 
396 ! finalize --------------------------------------------------------------------
397 
398  CALL deregisterfunction( region%global )
399 
400 !===================================================================
401 ! subroutine providing approximate gradients at the edge boundaries
402 !===================================================================
403 
404 CONTAINS
405 
406  SUBROUTINE rflo_copyedgegrad
407 
408 ! ... local variables
409 
410  INTEGER :: ijkn1
411 
412 ! gradients at juctions edges and corners approximated by copying from
413 ! adjacent interior faces
414 
415 ! lbound=2
416  DO i=inend,inend
417  DO k=knbeg,knend-1
418  ijkn = indijk(i ,jnbeg ,k,inoff,ijnoff)
419  ijkn1 = ijkn+inoff
420  gradj(:,ijkn)=gradj(:,ijkn1)
421  ijkn = indijk(i ,jnend ,k,inoff,ijnoff)
422  ijkn1 = ijkn-inoff
423  gradj(:,ijkn)=gradj(:,ijkn1)
424  END DO
425  DO j=jnbeg,jnend-1
426  ijkn = indijk(i ,j,knbeg ,inoff,ijnoff)
427  ijkn1 = ijkn+ijnoff
428  gradk(:,ijkn)=gradk(:,ijkn1)
429  ijkn = indijk(i ,j,knend ,inoff,ijnoff)
430  ijkn1 = ijkn-ijnoff
431  gradk(:,ijkn)=gradk(:,ijkn1)
432  ENDDO
433  ENDDO
434 
435 ! lbound=4
436  DO j=jnend,jnend
437  DO k=knbeg,knend-1
438  ijkn = indijk(inbeg ,j ,k,inoff,ijnoff)
439  ijkn1 = ijkn+1
440  gradi(:,ijkn)=gradi(:,ijkn1)
441  ijkn = indijk(inend ,j ,k,inoff,ijnoff)
442  ijkn1 = ijkn-1
443  gradi(:,ijkn)=gradi(:,ijkn1)
444  ENDDO
445  DO i=inbeg,inend-1
446  ijkn = indijk(i,j ,knbeg ,inoff,ijnoff)
447  ijkn1 = ijkn+ijnoff
448  gradk(:,ijkn)=gradk(:,ijkn1)
449  ijkn = indijk(i,j ,knend ,inoff,ijnoff)
450  ijkn1 = ijkn-ijnoff
451  gradk(:,ijkn)=gradk(:,ijkn1)
452  ENDDO
453  ENDDO
454 
455 ! lbound=6
456  DO k=knend,knend
457  DO i=inbeg,inend-1
458  ijkn = indijk(i,jnbeg ,k ,inoff,ijnoff)
459  ijkn1 = ijkn+inoff
460  gradj(:,ijkn)=gradj(:,ijkn1)
461  ijkn = indijk(i,jnend ,k ,inoff,ijnoff)
462  ijkn1 = ijkn-inoff
463  gradj(:,ijkn)=gradj(:,ijkn1)
464  ENDDO
465  DO j=jnbeg,jnend-1
466  ijkn = indijk(inbeg ,j,k ,inoff,ijnoff)
467  ijkn1 = ijkn+1
468  gradi(:,ijkn)=gradi(:,ijkn1)
469  ijkn = indijk(inend ,j,k ,inoff,ijnoff)
470  ijkn1 = ijkn-1
471  gradi(:,ijkn)=gradi(:,ijkn1)
472  ENDDO
473  ENDDO
474 
475  END SUBROUTINE rflo_copyedgegrad
476 
477 END SUBROUTINE rflo_calcgradfaces
478 
479 !******************************************************************************
480 !
481 ! RCS Revision history:
482 !
483 ! $Log: RFLO_CalcGradFaces.F90,v $
484 ! Revision 1.4 2008/12/06 08:44:06 mtcampbe
485 ! Updated license.
486 !
487 ! Revision 1.3 2008/11/19 22:17:20 mtcampbe
488 ! Added Illinois Open Source License/Copyright
489 !
490 ! Revision 1.2 2006/04/07 15:19:13 haselbac
491 ! Removed tabs
492 !
493 ! Revision 1.1 2004/11/29 21:25:16 wasistho
494 ! lower to upper case
495 !
496 ! Revision 1.10 2004/08/03 22:48:36 wasistho
497 ! changed cell2edge averaging to grid dependent avg
498 !
499 ! Revision 1.9 2003/11/20 16:40:34 mdbrandy
500 ! Backing out RocfluidMP changes from 11-17-03
501 !
502 ! Revision 1.6 2003/07/31 02:05:50 wasistho
503 ! put bound iBegG:iEndG in zero initialisation
504 !
505 ! Revision 1.5 2003/05/15 02:57:01 jblazek
506 ! Inlined index function.
507 !
508 ! Revision 1.4 2003/01/10 17:58:42 jblazek
509 ! Added missing explicit interfaces.
510 !
511 ! Revision 1.3 2002/10/14 23:47:25 wasistho
512 ! Minor tunning to get speedup
513 !
514 ! Revision 1.2 2002/09/05 17:40:19 jblazek
515 ! Variable global moved into regions().
516 !
517 ! Revision 1.1 2002/09/02 22:58:54 wasistho
518 ! RFLO grad routines migrated from rocflo to libflo
519 !
520 ! Revision 1.4 2002/08/29 18:36:15 wasistho
521 ! Generalized range of fface
522 !
523 ! Revision 1.3 2002/07/22 22:59:11 jblazek
524 ! Some more clean up.
525 !
526 ! Revision 1.2 2002/07/19 23:44:12 wasistho
527 ! made compliant with CODING RULE
528 !
529 !******************************************************************************
530 
531 
532 
533 
534 
535 
536 
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine rflo_copyedgegrad
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 iEndG gradi(:,:)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
j indices j
Definition: Indexing.h:6
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 iEndG gradj(:,:)
subroutine rflo_calcgradfaces(region, ilev, iBegV, iEndV, iBegG, iEndG, var, gradi, gradj, gradk)