Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_LaplaceGridSolve.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: conduct one Jacobi iteration to obtain new grid movements
26 ! in the flow domain (boundaries included).
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region, old grid coordinates.
31 !
32 ! Output: region%levels%grid%xyz = grid movements.
33 !
34 ! Notes: on entry, xyz holds node coordinates from a previous smoothing
35 ! step. On exit however, xyz contains only the grid motion.
36 !
37 !******************************************************************************
38 !
39 ! $Id: RFLO_LaplaceGridSolve.F90,v 1.7 2008/12/06 08:44:07 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2003 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rflo_laplacegridsolve( region )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region
51  USE moderror
52  USE modparameters
53  IMPLICIT NONE
54 
55 #include "Indexing.h"
56 
57 ! ... parameters
58  TYPE(t_region) :: region
59 
60 ! ... loop variables
61  INTEGER :: i, j, k
62 
63 ! ... local variables
64  INTEGER :: idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend, ilev, inoff, ijnoff
65  INTEGER :: ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend, ibn, ien
66  INTEGER :: ijk, ip1, ip2, im1, im2, jp1, jp2, jm1, jm2, kp1, kp2, km1, km2
67  INTEGER :: moveblock, method, in, ico, ic(8)
68 
69  LOGICAL, POINTER :: bndmoved(:)
70 
71  REAL(RFREAL) :: rxi, ryi, rzi, rxj, ryj, rzj, rxk, ryk, rzk, wi, wj, wk, &
72  si, sj, sk, sim, sjm, skm, sip, sjp, skp, d, p
73  REAL(RFREAL) :: denom(8), dist(8,8)
74  REAL(RFREAL), POINTER :: xyz(:,:), xyzold(:,:), xyzorig(:,:)
75 
76 !******************************************************************************
77 
78  CALL registerfunction( region%global,'RFLO_LaplaceGridSolve',&
79  'RFLO_LaplaceGridSolve.F90' )
80 
81 ! get dimensions and pointers -------------------------------------------------
82 
83  ilev = 1
84 
85  CALL rflo_getdimensdummynodes( region,ilev,idnbeg,idnend, &
86  jdnbeg,jdnend,kdnbeg,kdnend )
88  kpnbeg,kpnend )
89  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
90  ibn = indijk(idnbeg,jdnbeg,kdnbeg,inoff,ijnoff)
91  ien = indijk(idnend,jdnend,kdnend,inoff,ijnoff)
92 
93  xyz => region%levels(ilev)%grid%xyz
94  xyzold => region%levels(ilev)%grid%xyzOld
95  xyzorig => region%levels(ilev)%gridOld%xyz
96  bndmoved => region%levels(ilev)%grid%boundMoved
97  p = region%global%moveGridWeight
98 
99 ! reset motion vectors --------------------------------------------------------
100 
101  DO ijk=ibn,ien
102  xyzold(xcoord,ijk) = xyz(xcoord,ijk) - xyzorig(xcoord,ijk)
103  xyzold(ycoord,ijk) = xyz(ycoord,ijk) - xyzorig(ycoord,ijk)
104  xyzold(zcoord,ijk) = xyz(zcoord,ijk) - xyzorig(zcoord,ijk)
105  ENDDO
106 
107 ! move block corners locally
108 
109  moveblock = 0
110  method = 1
111 
112  IF (moveblock==1) THEN
113  ic(1) = indijk(ipnbeg ,jpnbeg ,kpnbeg ,inoff,ijnoff)
114  ic(2) = indijk(ipnbeg ,jpnbeg ,kpnend ,inoff,ijnoff)
115  ic(3) = indijk(ipnbeg ,jpnend ,kpnend ,inoff,ijnoff)
116  ic(4) = indijk(ipnbeg ,jpnend ,kpnbeg ,inoff,ijnoff)
117  ic(5) = indijk(ipnend ,jpnbeg ,kpnbeg ,inoff,ijnoff)
118  ic(6) = indijk(ipnend ,jpnbeg ,kpnend ,inoff,ijnoff)
119  ic(7) = indijk(ipnend ,jpnend ,kpnend ,inoff,ijnoff)
120  ic(8) = indijk(ipnend ,jpnend ,kpnbeg ,inoff,ijnoff)
121 
122  DO ico = 1,8
123  denom(ico) = 0._rfreal
124  DO in = 1,8
125  IF (ico/=in) THEN
126  dist(in,ico) = sqrt( (xyz(xcoord,ic(in))-xyz(xcoord,ic(ico)))**2 + &
127  (xyz(ycoord,ic(in))-xyz(ycoord,ic(ico)))**2 + &
128  (xyz(zcoord,ic(in))-xyz(zcoord,ic(ico)))**2 )
129  dist(in,ico) = 1._rfreal/dist(in,ico)
130  denom(ico) = denom(ico) + dist(in,ico)
131  ENDIF
132  ENDDO
133  ENDDO
134 
135  IF (.NOT. bndmoved(1)) THEN
136  IF ((.NOT. bndmoved(3)).AND.(.NOT. bndmoved(5))) THEN
137  xyz(xcoord,ic(1)) = 0._rfreal
138  xyz(ycoord,ic(1)) = 0._rfreal
139  xyz(zcoord,ic(1)) = 0._rfreal
140  DO in=1,8
141  IF (in/=1) THEN
142  xyz(xcoord,ic(1))= xyz(xcoord,ic(1))+dist(in,1)*xyzold(xcoord,ic(in))
143  xyz(ycoord,ic(1))= xyz(ycoord,ic(1))+dist(in,1)*xyzold(ycoord,ic(in))
144  xyz(zcoord,ic(1))= xyz(zcoord,ic(1))+dist(in,1)*xyzold(zcoord,ic(in))
145  ENDIF
146  ENDDO
147  xyzold(xcoord,ic(1)) = xyz(xcoord,ic(1))/denom(1)
148  xyzold(ycoord,ic(1)) = xyz(ycoord,ic(1))/denom(1)
149  xyzold(zcoord,ic(1)) = xyz(zcoord,ic(1))/denom(1)
150  ENDIF
151  IF ((.NOT. bndmoved(3)).AND.(.NOT. bndmoved(6))) THEN
152  xyz(xcoord,ic(2)) = 0._rfreal
153  xyz(ycoord,ic(2)) = 0._rfreal
154  xyz(zcoord,ic(2)) = 0._rfreal
155  DO in=1,8
156  IF (in/=2) THEN
157  xyz(xcoord,ic(2))= xyz(xcoord,ic(2))+dist(in,2)*xyzold(xcoord,ic(in))
158  xyz(ycoord,ic(2))= xyz(ycoord,ic(2))+dist(in,2)*xyzold(ycoord,ic(in))
159  xyz(zcoord,ic(2))= xyz(zcoord,ic(2))+dist(in,2)*xyzold(zcoord,ic(in))
160  ENDIF
161  ENDDO
162  xyzold(xcoord,ic(2)) = xyz(xcoord,ic(2))/denom(2)
163  xyzold(ycoord,ic(2)) = xyz(ycoord,ic(2))/denom(2)
164  xyzold(zcoord,ic(2)) = xyz(zcoord,ic(2))/denom(2)
165  ENDIF
166  IF ((.NOT. bndmoved(4)).AND.(.NOT. bndmoved(6))) THEN
167  xyz(xcoord,ic(3)) = 0._rfreal
168  xyz(ycoord,ic(3)) = 0._rfreal
169  xyz(zcoord,ic(3)) = 0._rfreal
170  DO in=1,8
171  IF (in/=3) THEN
172  xyz(xcoord,ic(3))= xyz(xcoord,ic(3))+dist(in,3)*xyzold(xcoord,ic(in))
173  xyz(ycoord,ic(3))= xyz(ycoord,ic(3))+dist(in,3)*xyzold(ycoord,ic(in))
174  xyz(zcoord,ic(3))= xyz(zcoord,ic(3))+dist(in,3)*xyzold(zcoord,ic(in))
175  ENDIF
176  ENDDO
177  xyzold(xcoord,ic(3)) = xyz(xcoord,ic(3))/denom(3)
178  xyzold(ycoord,ic(3)) = xyz(ycoord,ic(3))/denom(3)
179  xyzold(zcoord,ic(3)) = xyz(zcoord,ic(3))/denom(3)
180  ENDIF
181  IF ((.NOT. bndmoved(4)).AND.(.NOT. bndmoved(5))) THEN
182  xyz(xcoord,ic(4)) = 0._rfreal
183  xyz(ycoord,ic(4)) = 0._rfreal
184  xyz(zcoord,ic(4)) = 0._rfreal
185  DO in=1,8
186  IF (in/=4) THEN
187  xyz(xcoord,ic(4))= xyz(xcoord,ic(4))+dist(in,4)*xyzold(xcoord,ic(in))
188  xyz(ycoord,ic(4))= xyz(ycoord,ic(4))+dist(in,4)*xyzold(ycoord,ic(in))
189  xyz(zcoord,ic(4))= xyz(zcoord,ic(4))+dist(in,4)*xyzold(zcoord,ic(in))
190  ENDIF
191  ENDDO
192  xyzold(xcoord,ic(4)) = xyz(xcoord,ic(4))/denom(4)
193  xyzold(ycoord,ic(4)) = xyz(ycoord,ic(4))/denom(4)
194  xyzold(zcoord,ic(4)) = xyz(zcoord,ic(4))/denom(4)
195  ENDIF
196  ENDIF
197 
198  IF (.NOT. bndmoved(2)) THEN
199  IF ((.NOT. bndmoved(3)).AND.(.NOT. bndmoved(5))) THEN
200  xyz(xcoord,ic(5)) = 0._rfreal
201  xyz(ycoord,ic(5)) = 0._rfreal
202  xyz(zcoord,ic(5)) = 0._rfreal
203  DO in=1,8
204  IF (in/=5) THEN
205  xyz(xcoord,ic(5))= xyz(xcoord,ic(5))+dist(in,5)*xyzold(xcoord,ic(in))
206  xyz(ycoord,ic(5))= xyz(ycoord,ic(5))+dist(in,5)*xyzold(ycoord,ic(in))
207  xyz(zcoord,ic(5))= xyz(zcoord,ic(5))+dist(in,5)*xyzold(zcoord,ic(in))
208  ENDIF
209  ENDDO
210  xyzold(xcoord,ic(5)) = xyz(xcoord,ic(5))/denom(5)
211  xyzold(ycoord,ic(5)) = xyz(ycoord,ic(5))/denom(5)
212  xyzold(zcoord,ic(5)) = xyz(zcoord,ic(5))/denom(5)
213  ENDIF
214  IF ((.NOT. bndmoved(3)).AND.(.NOT. bndmoved(6))) THEN
215  xyz(xcoord,ic(6)) = 0._rfreal
216  xyz(ycoord,ic(6)) = 0._rfreal
217  xyz(zcoord,ic(6)) = 0._rfreal
218  DO in=1,8
219  IF (in/=6) THEN
220  xyz(xcoord,ic(6))= xyz(xcoord,ic(6))+dist(in,6)*xyzold(xcoord,ic(in))
221  xyz(ycoord,ic(6))= xyz(ycoord,ic(6))+dist(in,6)*xyzold(ycoord,ic(in))
222  xyz(zcoord,ic(6))= xyz(zcoord,ic(6))+dist(in,6)*xyzold(zcoord,ic(in))
223  ENDIF
224  ENDDO
225  xyzold(xcoord,ic(6)) = xyz(xcoord,ic(6))/denom(6)
226  xyzold(ycoord,ic(6)) = xyz(ycoord,ic(6))/denom(6)
227  xyzold(zcoord,ic(6)) = xyz(zcoord,ic(6))/denom(6)
228  ENDIF
229  IF ((.NOT. bndmoved(4)).AND.(.NOT. bndmoved(6))) THEN
230  xyz(xcoord,ic(7)) = 0._rfreal
231  xyz(ycoord,ic(7)) = 0._rfreal
232  xyz(zcoord,ic(7)) = 0._rfreal
233  DO in=1,8
234  IF (in/=7) THEN
235  xyz(xcoord,ic(7))= xyz(xcoord,ic(7))+dist(in,7)*xyzold(xcoord,ic(in))
236  xyz(ycoord,ic(7))= xyz(ycoord,ic(7))+dist(in,7)*xyzold(ycoord,ic(in))
237  xyz(zcoord,ic(7))= xyz(zcoord,ic(7))+dist(in,7)*xyzold(zcoord,ic(in))
238  ENDIF
239  ENDDO
240  xyzold(xcoord,ic(7)) = xyz(xcoord,ic(7))/denom(7)
241  xyzold(ycoord,ic(7)) = xyz(ycoord,ic(7))/denom(7)
242  xyzold(zcoord,ic(7)) = xyz(zcoord,ic(7))/denom(7)
243  ENDIF
244  IF ((.NOT. bndmoved(4)).AND.(.NOT. bndmoved(5))) THEN
245  xyz(xcoord,ic(8)) = 0._rfreal
246  xyz(ycoord,ic(8)) = 0._rfreal
247  xyz(zcoord,ic(8)) = 0._rfreal
248  DO in=1,8
249  IF (in/=8) THEN
250  xyz(xcoord,ic(8))= xyz(xcoord,ic(8))+dist(in,8)*xyzold(xcoord,ic(in))
251  xyz(ycoord,ic(8))= xyz(ycoord,ic(8))+dist(in,8)*xyzold(ycoord,ic(in))
252  xyz(zcoord,ic(8))= xyz(zcoord,ic(8))+dist(in,8)*xyzold(zcoord,ic(in))
253  ENDIF
254  ENDDO
255  xyzold(xcoord,ic(8)) = xyz(xcoord,ic(8))/denom(8)
256  xyzold(ycoord,ic(8)) = xyz(ycoord,ic(8))/denom(8)
257  xyzold(zcoord,ic(8)) = xyz(zcoord,ic(8))/denom(8)
258  ENDIF
259  ENDIF ! bndMoved
260  ENDIF ! moveBlock corners
261 
262 ! compute new coordinates -----------------------------------------------------
263 
264  IF (method==1) THEN
265 
266 ! - New weighted Laplacian Smoothing of Bono Wasistho:
267 
268  DO k=kpnbeg,kpnend
269  DO j=jpnbeg,jpnend
270  DO i=ipnbeg,ipnend
271  ijk = indijk(i ,j ,k ,inoff,ijnoff)
272  ip1 = indijk(i+1,j ,k ,inoff,ijnoff)
273  ip2 = indijk(i+2,j ,k ,inoff,ijnoff)
274  im1 = indijk(i-1,j ,k ,inoff,ijnoff)
275  im2 = indijk(i-2,j ,k ,inoff,ijnoff)
276  jp1 = indijk(i ,j+1,k ,inoff,ijnoff)
277  jp2 = indijk(i ,j+2,k ,inoff,ijnoff)
278  jm1 = indijk(i ,j-1,k ,inoff,ijnoff)
279  jm2 = indijk(i ,j-2,k ,inoff,ijnoff)
280  kp1 = indijk(i ,j ,k+1,inoff,ijnoff)
281  kp2 = indijk(i ,j ,k+2,inoff,ijnoff)
282  km1 = indijk(i ,j ,k-1,inoff,ijnoff)
283  km2 = indijk(i ,j ,k-2,inoff,ijnoff)
284 
285  sim = sqrt( (xyzorig(xcoord,im1)+xyzold(xcoord,im1)-xyzorig(xcoord,ijk)- &
286  xyzold(xcoord,ijk))**2 + &
287  (xyzorig(ycoord,im1)+xyzold(ycoord,im1)-xyzorig(ycoord,ijk)- &
288  xyzold(ycoord,ijk))**2 + &
289  (xyzorig(zcoord,im1)+xyzold(zcoord,im1)-xyzorig(zcoord,ijk)- &
290  xyzold(zcoord,ijk))**2 )**p
291  sip = sqrt( (xyzorig(xcoord,ip1)+xyzold(xcoord,ip1)-xyzorig(xcoord,ijk)- &
292  xyzold(xcoord,ijk))**2 + &
293  (xyzorig(ycoord,ip1)+xyzold(ycoord,ip1)-xyzorig(ycoord,ijk)- &
294  xyzold(ycoord,ijk))**2 + &
295  (xyzorig(zcoord,ip1)+xyzold(zcoord,ip1)-xyzorig(zcoord,ijk)- &
296  xyzold(zcoord,ijk))**2 )**p
297 
298  sjm = sqrt( (xyzorig(xcoord,jm1)+xyzold(xcoord,jm1)-xyzorig(xcoord,ijk)- &
299  xyzold(xcoord,ijk))**2 + &
300  (xyzorig(ycoord,jm1)+xyzold(ycoord,jm1)-xyzorig(ycoord,ijk)- &
301  xyzold(ycoord,ijk))**2 + &
302  (xyzorig(zcoord,jm1)+xyzold(zcoord,jm1)-xyzorig(zcoord,ijk)- &
303  xyzold(zcoord,ijk))**2 )**p
304  sjp = sqrt( (xyzorig(xcoord,jp1)+xyzold(xcoord,jp1)-xyzorig(xcoord,ijk)- &
305  xyzold(xcoord,ijk))**2 + &
306  (xyzorig(ycoord,jp1)+xyzold(ycoord,jp1)-xyzorig(ycoord,ijk)- &
307  xyzold(ycoord,ijk))**2 + &
308  (xyzorig(zcoord,jp1)+xyzold(zcoord,jp1)-xyzorig(zcoord,ijk)- &
309  xyzold(zcoord,ijk))**2 )**p
310 
311  skm = sqrt( (xyzorig(xcoord,km1)+xyzold(xcoord,km1)-xyzorig(xcoord,ijk)- &
312  xyzold(xcoord,ijk))**2 + &
313  (xyzorig(ycoord,km1)+xyzold(ycoord,km1)-xyzorig(ycoord,ijk)- &
314  xyzold(ycoord,ijk))**2 + &
315  (xyzorig(zcoord,km1)+xyzold(zcoord,km1)-xyzorig(zcoord,ijk)- &
316  xyzold(zcoord,ijk))**2 )**p
317  skp = sqrt( (xyzorig(xcoord,kp1)+xyzold(xcoord,kp1)-xyzorig(xcoord,ijk)- &
318  xyzold(xcoord,ijk))**2 + &
319  (xyzorig(ycoord,kp1)+xyzold(ycoord,kp1)-xyzorig(ycoord,ijk)- &
320  xyzold(ycoord,ijk))**2 + &
321  (xyzorig(zcoord,kp1)+xyzold(zcoord,kp1)-xyzorig(zcoord,ijk)- &
322  xyzold(zcoord,ijk))**2 )**p
323 
324  sim = 1._rfreal/sim
325  sip = 1._rfreal/sip
326  sjm = 1._rfreal/sjm
327  sjp = 1._rfreal/sjp
328  skm = 1._rfreal/skm
329  skp = 1._rfreal/skp
330 
331  rxi = sim*xyzold(xcoord,im1) + sip*xyzold(xcoord,ip1)
332  ryi = sim*xyzold(ycoord,im1) + sip*xyzold(ycoord,ip1)
333  rzi = sim*xyzold(zcoord,im1) + sip*xyzold(zcoord,ip1)
334 
335  rxj = sjm*xyzold(xcoord,jm1) + sjp*xyzold(xcoord,jp1)
336  ryj = sjm*xyzold(ycoord,jm1) + sjp*xyzold(ycoord,jp1)
337  rzj = sjm*xyzold(zcoord,jm1) + sjp*xyzold(zcoord,jp1)
338 
339  rxk = skm*xyzold(xcoord,km1) + skp*xyzold(xcoord,kp1)
340  ryk = skm*xyzold(ycoord,km1) + skp*xyzold(ycoord,kp1)
341  rzk = skm*xyzold(zcoord,km1) + skp*xyzold(zcoord,kp1)
342 
343  d = 1._rfreal/(sim+sip+sjm+sjp+skm+skp)
344 
345  xyz(xcoord,ijk) = (rxi+rxj+rxk)*d
346  xyz(ycoord,ijk) = (ryi+ryj+ryk)*d
347  xyz(zcoord,ijk) = (rzi+rzj+rzk)*d
348 
349  ENDDO ! i
350  ENDDO ! j
351  ENDDO ! k
352 
353  ELSEIF (method==2) THEN
354 
355 ! - Old method by Jiri Blazek
356 
357  DO k=kpnbeg,kpnend
358  DO j=jpnbeg,jpnend
359  DO i=ipnbeg,ipnend
360  ijk = indijk(i ,j ,k ,inoff,ijnoff)
361  ip1 = indijk(i+1,j ,k ,inoff,ijnoff)
362  ip2 = indijk(i+2,j ,k ,inoff,ijnoff)
363  im1 = indijk(i-1,j ,k ,inoff,ijnoff)
364  im2 = indijk(i-2,j ,k ,inoff,ijnoff)
365  jp1 = indijk(i ,j+1,k ,inoff,ijnoff)
366  jp2 = indijk(i ,j+2,k ,inoff,ijnoff)
367  jm1 = indijk(i ,j-1,k ,inoff,ijnoff)
368  jm2 = indijk(i ,j-2,k ,inoff,ijnoff)
369  kp1 = indijk(i ,j ,k+1,inoff,ijnoff)
370  kp2 = indijk(i ,j ,k+2,inoff,ijnoff)
371  km1 = indijk(i ,j ,k-1,inoff,ijnoff)
372  km2 = indijk(i ,j ,k-2,inoff,ijnoff)
373 
374  rxi = xyzold(xcoord,im1) + xyzold(xcoord,ip1)
375  ryi = xyzold(ycoord,im1) + xyzold(ycoord,ip1)
376  rzi = xyzold(zcoord,im1) + xyzold(zcoord,ip1)
377 
378  rxj = xyzold(xcoord,jm1) + xyzold(xcoord,jp1)
379  ryj = xyzold(ycoord,jm1) + xyzold(ycoord,jp1)
380  rzj = xyzold(zcoord,jm1) + xyzold(zcoord,jp1)
381 
382  rxk = xyzold(xcoord,km1) + xyzold(xcoord,kp1)
383  ryk = xyzold(ycoord,km1) + xyzold(ycoord,kp1)
384  rzk = xyzold(zcoord,km1) + xyzold(zcoord,kp1)
385 
386  si = (xyzold(xcoord,ip1)+xyzorig(xcoord,ip1)- &
387  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
388  (xyzold(ycoord,ip1)+xyzorig(ycoord,ip1)- &
389  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
390  (xyzold(zcoord,ip1)+xyzorig(zcoord,ip1)- &
391  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
392  (xyzold(xcoord,im1)+xyzorig(xcoord,im1)- &
393  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
394  (xyzold(ycoord,im1)+xyzorig(ycoord,im1)- &
395  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
396  (xyzold(zcoord,im1)+xyzorig(zcoord,im1)- &
397  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
398  (xyzold(xcoord,ip2)+xyzorig(xcoord,ip2)- &
399  xyzold(xcoord,ip1)-xyzorig(xcoord,ip1))**2 + &
400  (xyzold(ycoord,ip2)+xyzorig(ycoord,ip2)- &
401  xyzold(ycoord,ip1)-xyzorig(ycoord,ip1))**2 + &
402  (xyzold(zcoord,ip2)+xyzorig(zcoord,ip2)- &
403  xyzold(zcoord,ip1)-xyzorig(zcoord,ip1))**2 + &
404  (xyzold(xcoord,im2)+xyzorig(xcoord,im2)- &
405  xyzold(xcoord,im1)-xyzorig(xcoord,im1))**2 + &
406  (xyzold(ycoord,im2)+xyzorig(ycoord,im2)- &
407  xyzold(ycoord,im1)-xyzorig(ycoord,im1))**2 + &
408  (xyzold(zcoord,im2)+xyzorig(zcoord,im2)- &
409  xyzold(zcoord,im1)-xyzorig(zcoord,im1))**2
410 
411  sj = (xyzold(xcoord,jp1)+xyzorig(xcoord,jp1)- &
412  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
413  (xyzold(ycoord,jp1)+xyzorig(ycoord,jp1)- &
414  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
415  (xyzold(zcoord,jp1)+xyzorig(zcoord,jp1)- &
416  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
417  (xyzold(xcoord,jm1)+xyzorig(xcoord,jm1)- &
418  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
419  (xyzold(ycoord,jm1)+xyzorig(ycoord,jm1)- &
420  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
421  (xyzold(zcoord,jm1)+xyzorig(zcoord,jm1)- &
422  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
423  (xyzold(xcoord,jp2)+xyzorig(xcoord,jp2)- &
424  xyzold(xcoord,jp1)-xyzorig(xcoord,jp1))**2 + &
425  (xyzold(ycoord,jp2)+xyzorig(ycoord,jp2)- &
426  xyzold(ycoord,jp1)-xyzorig(ycoord,jp1))**2 + &
427  (xyzold(zcoord,jp2)+xyzorig(zcoord,jp2)- &
428  xyzold(zcoord,jp1)-xyzorig(zcoord,jp1))**2 + &
429  (xyzold(xcoord,jm2)+xyzorig(xcoord,jm2)- &
430  xyzold(xcoord,jm1)-xyzorig(xcoord,jm1))**2 + &
431  (xyzold(ycoord,jm2)+xyzorig(ycoord,jm2)- &
432  xyzold(ycoord,jm1)-xyzorig(ycoord,jm1))**2 + &
433  (xyzold(zcoord,jm2)+xyzorig(zcoord,jm2)- &
434  xyzold(zcoord,jm1)-xyzorig(zcoord,jm1))**2
435 
436  sk = (xyzold(xcoord,kp1)+xyzorig(xcoord,kp1)- &
437  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
438  (xyzold(ycoord,kp1)+xyzorig(ycoord,kp1)- &
439  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
440  (xyzold(zcoord,kp1)+xyzorig(zcoord,kp1)- &
441  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
442  (xyzold(xcoord,km1)+xyzorig(xcoord,km1)- &
443  xyzold(xcoord,ijk)-xyzorig(xcoord,ijk))**2 + &
444  (xyzold(ycoord,km1)+xyzorig(ycoord,km1)- &
445  xyzold(ycoord,ijk)-xyzorig(ycoord,ijk))**2 + &
446  (xyzold(zcoord,km1)+xyzorig(zcoord,km1)- &
447  xyzold(zcoord,ijk)-xyzorig(zcoord,ijk))**2 + &
448  (xyzold(xcoord,kp2)+xyzorig(xcoord,kp2)- &
449  xyzold(xcoord,kp1)-xyzorig(xcoord,kp1))**2 + &
450  (xyzold(ycoord,kp2)+xyzorig(ycoord,kp2)- &
451  xyzold(ycoord,kp1)-xyzorig(ycoord,kp1))**2 + &
452  (xyzold(zcoord,kp2)+xyzorig(zcoord,kp2)- &
453  xyzold(zcoord,kp1)-xyzorig(zcoord,kp1))**2 + &
454  (xyzold(xcoord,km2)+xyzorig(xcoord,km2)- &
455  xyzold(xcoord,km1)-xyzorig(xcoord,km1))**2 + &
456  (xyzold(ycoord,km2)+xyzorig(ycoord,km2)- &
457  xyzold(ycoord,km1)-xyzorig(ycoord,km1))**2 + &
458  (xyzold(zcoord,km2)+xyzorig(zcoord,km2)- &
459  xyzold(zcoord,km1)-xyzorig(zcoord,km1))**2
460 
461  wi = 1._rfreal/(si)**p
462  wj = 1._rfreal/(sj)**p
463  wk = 1._rfreal/(sk)**p
464  d = 2._rfreal*(wi+wj+wk)
465 
466  xyz(xcoord,ijk) = (wi*rxi+wj*rxj+wk*rxk)/d
467  xyz(ycoord,ijk) = (wi*ryi+wj*ryj+wk*ryk)/d
468  xyz(zcoord,ijk) = (wi*rzi+wj*rzj+wk*rzk)/d
469  ENDDO ! i
470  ENDDO ! j
471  ENDDO ! k
472  ENDIF ! method
473 
474 ! finalize --------------------------------------------------------------------
475 
476  CALL deregisterfunction( region%global )
477 
478 END SUBROUTINE rflo_laplacegridsolve
479 
480 !******************************************************************************
481 !
482 ! RCS Revision history:
483 !
484 ! $Log: RFLO_LaplaceGridSolve.F90,v $
485 ! Revision 1.7 2008/12/06 08:44:07 mtcampbe
486 ! Updated license.
487 !
488 ! Revision 1.6 2008/11/19 22:17:20 mtcampbe
489 ! Added Illinois Open Source License/Copyright
490 !
491 ! Revision 1.5 2005/06/03 01:56:48 wasistho
492 ! gather specifying moveBlock and method on top
493 !
494 ! Revision 1.4 2005/06/02 04:55:25 wasistho
495 ! provide moveBlock and method as internal options
496 !
497 ! Revision 1.3 2005/05/28 08:54:02 wasistho
498 ! use im1,ip1,etc i.o. im2,ip2 for weights
499 !
500 ! Revision 1.2 2005/05/28 05:40:45 wasistho
501 ! move block corners and new weighted Laplacian smoothing
502 !
503 ! Revision 1.1 2004/11/29 21:25:16 wasistho
504 ! lower to upper case
505 !
506 ! Revision 1.5 2003/11/20 16:40:34 mdbrandy
507 ! Backing out RocfluidMP changes from 11-17-03
508 !
509 ! Revision 1.2 2003/08/25 21:51:23 jblazek
510 ! Full version of global grid motion scheme.
511 !
512 ! Revision 1.1 2003/08/11 21:51:17 jblazek
513 ! Added basic global grid smoothing scheme.
514 !
515 !******************************************************************************
516 
517 
518 
519 
520 
521 
522 
**********************************************************************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 jpnbeg
const NT & d
j indices k indices k
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 kpnbeg
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 ic
double sqrt(double d)
Definition: double.h:73
**********************************************************************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 jpnend
**********************************************************************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
blockLoc i
Definition: read.cpp:79
**********************************************************************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 ipnbeg
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
j indices j
Definition: Indexing.h:6
subroutine rflo_laplacegridsolve(region)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
long double dist(long double *coord1, long double *coord2, int size)
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 ipnend
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
**********************************************************************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