58 TYPE(t_region
) :: region
61 INTEGER ::
i,
j,
k, iter
64 INTEGER :: ilev, inoff, ijnoff, icoff, ijcoff
66 INTEGER :: ib, ie, ir, jb, je, jr, kb, ke, kr
67 INTEGER :: ijk, ijkc, ip1, im1, jp1, jm1, kp1, km1
68 INTEGER :: ia1, is1, ja1, js1, ka1, ks1
70 REAL(RFREAL) :: rxi, ryi, rzi, rxj, ryj, rzj, rxk, ryk, rzk, rd, p
71 REAL(RFREAL) :: rmi, rpi, rmj, rpj, rmk, rpk, volmax
72 REAL(RFREAL) :: qmi, qpi, qmj, qpj, qmk, qpk
73 REAL(RFREAL) :: rati, ratj, ratk, dsi, dsj, dsk, dli, dlj, dlk, wi, wj, wk
74 REAL(RFREAL),
POINTER :: xyz(:,:), xyzorig(:,:), xyzold(:,:)
79 'RFLO_GridRemesh.F90' )
83 IF (region%global%verbLevel /= verbose_none)
THEN
84 WRITE(stdout,1000) solver_name,region%iRegionGlobal
96 xyz => region%levels(ilev)%grid%xyz
97 xyzorig => region%levels(ilev)%gridOld%xyz
98 xyzold => region%levels(ilev)%grid%xyzOld
99 p = region%global%moveGridWeight
101 rd = 1._rfreal/3._rfreal
102 volmax = -1.e+30_rfreal
111 dsi= dsi+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
112 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
113 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
115 ijk = indijk(
i ,
jpnbeg ,kpnend ,inoff,ijnoff)
116 ip1 = indijk(
i+1,
jpnbeg ,kpnend ,inoff,ijnoff)
118 dsi= dsi+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
119 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
120 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
122 ijk = indijk(
i ,
jpnend ,kpnend ,inoff,ijnoff)
123 ip1 = indijk(
i+1,
jpnend ,kpnend ,inoff,ijnoff)
125 dsi= dsi+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
126 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
127 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
132 dsi= dsi+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
133 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
134 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
141 dli= dli+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
142 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
143 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
147 dli= dli+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
148 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
149 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
153 dli= dli+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
154 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
155 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
159 dli= dli+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
160 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
161 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
170 dsj= dsj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
171 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
172 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
174 ijk = indijk(
ipnbeg ,
j ,kpnend ,inoff,ijnoff)
175 ip1 = indijk(
ipnbeg ,
j+1 ,kpnend ,inoff,ijnoff)
177 dsj= dsj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
178 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
179 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
181 ijk = indijk(
ipnend ,
j ,kpnend ,inoff,ijnoff)
182 ip1 = indijk(
ipnend ,
j+1 ,kpnend ,inoff,ijnoff)
184 dsj= dsj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
185 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
186 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
191 dsj= dsj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
192 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
193 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
200 dlj= dlj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
201 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
202 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
206 dlj= dlj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
207 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
208 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
212 dlj= dlj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
213 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
214 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
218 dlj= dlj+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
219 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
220 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
229 dsk= dsk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
230 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
231 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
236 dsk= dsk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
237 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
238 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
243 dsk= dsk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
244 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
245 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
250 dsk= dsk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
251 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
252 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
259 dlk= dlk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
260 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
261 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
265 dlk= dlk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
266 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
267 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
271 dlk= dlk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
272 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
273 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
277 dlk= dlk+
sqrt((xyzorig(xcoord,ip1)- xyzorig(xcoord,ijk))**2 + &
278 (xyzorig(ycoord,ip1)- xyzorig(ycoord,ijk))**2 + &
279 (xyzorig(zcoord,ip1)- xyzorig(zcoord,ijk))**2 )
286 IF (rati > ratj .AND. rati > ratk .AND. ratj > ratk)
THEN
290 ELSEIF (rati > ratj .AND. rati > ratk .AND. ratj < ratk)
THEN
294 ELSEIF (ratj > rati .AND. ratj > ratk .AND. rati > ratk)
THEN
298 ELSEIF (ratj > rati .AND. ratj > ratk .AND. rati < ratk)
THEN
302 ELSEIF (ratk > rati .AND. ratk > ratj .AND. rati > ratj)
THEN
306 ELSEIF (ratk > rati .AND. ratk > ratj .AND. rati < ratj)
THEN
315 ijk = indijk(
i ,
j ,
k ,inoff,ijnoff)
316 ip1 = indijk(
ipnend,
j ,
k ,inoff,ijnoff)
317 im1 = indijk(
ipnbeg,
j ,
k ,inoff,ijnoff)
318 jp1 = indijk(
i ,
jpnend,
k ,inoff,ijnoff)
319 jm1 = indijk(
i ,
jpnbeg,
k ,inoff,ijnoff)
320 kp1 = indijk(
i ,
j ,kpnend,inoff,ijnoff)
321 km1 = indijk(
i ,
j ,
kpnbeg,inoff,ijnoff)
323 ia1 = indijk(
i+1 ,
j ,
k ,inoff,ijnoff)
324 is1 = indijk(
i-1 ,
j ,
k ,inoff,ijnoff)
325 ja1 = indijk(
i ,
j+1 ,
k ,inoff,ijnoff)
326 js1 = indijk(
i ,
j-1 ,
k ,inoff,ijnoff)
327 ka1 = indijk(
i ,
j ,
k+1 ,inoff,ijnoff)
328 ks1 = indijk(
i ,
j ,
k-1 ,inoff,ijnoff)
330 qpi= (xyzorig(xcoord,ia1)- xyzorig(xcoord,ijk))**2 + &
331 (xyzorig(ycoord,ia1)- xyzorig(ycoord,ijk))**2 + &
332 (xyzorig(zcoord,ia1)- xyzorig(zcoord,ijk))**2
333 qmi= (xyzorig(xcoord,is1)- xyzorig(xcoord,ijk))**2 + &
334 (xyzorig(ycoord,is1)- xyzorig(ycoord,ijk))**2 + &
335 (xyzorig(zcoord,is1)- xyzorig(zcoord,ijk))**2
337 qpj= (xyzorig(xcoord,ja1)- xyzorig(xcoord,ijk))**2 + &
338 (xyzorig(ycoord,ja1)- xyzorig(ycoord,ijk))**2 + &
339 (xyzorig(zcoord,ja1)- xyzorig(zcoord,ijk))**2
340 qmj= (xyzorig(xcoord,js1)- xyzorig(xcoord,ijk))**2 + &
341 (xyzorig(ycoord,js1)- xyzorig(ycoord,ijk))**2 + &
342 (xyzorig(zcoord,js1)- xyzorig(zcoord,ijk))**2
344 qpk= (xyzorig(xcoord,ka1)- xyzorig(xcoord,ijk))**2 + &
345 (xyzorig(ycoord,ka1)- xyzorig(ycoord,ijk))**2 + &
346 (xyzorig(zcoord,ka1)- xyzorig(zcoord,ijk))**2
347 qmk= (xyzorig(xcoord,ks1)- xyzorig(xcoord,ijk))**2 + &
348 (xyzorig(ycoord,ks1)- xyzorig(ycoord,ijk))**2 + &
349 (xyzorig(zcoord,ks1)- xyzorig(zcoord,ijk))**2
365 rxi = (rpi*xyzorig(xcoord,im1) + rmi*xyzorig(xcoord,ip1))/(rpi+rmi)+&
366 (qpj*xyzorig(xcoord,js1) + qmj*xyzorig(xcoord,ja1))/(qpj+qmj)+&
367 (qpk*xyzorig(xcoord,ks1) + qmk*xyzorig(xcoord,ka1))/(qpk+qmk)
368 ryi = (rpi*xyzorig(ycoord,im1) + rmi*xyzorig(ycoord,ip1))/(rpi+rmi)+&
369 (qpj*xyzorig(ycoord,js1) + qmj*xyzorig(ycoord,ja1))/(qpj+qmj)+&
370 (qpk*xyzorig(ycoord,ks1) + qmk*xyzorig(ycoord,ka1))/(qpk+qmk)
371 rzi = (rpi*xyzorig(zcoord,im1) + rmi*xyzorig(zcoord,ip1))/(rpi+rmi)+&
372 (qpj*xyzorig(zcoord,js1) + qmj*xyzorig(zcoord,ja1))/(qpj+qmj)+&
373 (qpk*xyzorig(zcoord,ks1) + qmk*xyzorig(zcoord,ka1))/(qpk+qmk)
375 rxj = (rpj*xyzorig(xcoord,jm1) + rmj*xyzorig(xcoord,jp1))/(rpj+rmj)+&
376 (qpi*xyzorig(xcoord,is1) + qmi*xyzorig(xcoord,ia1))/(qpi+qmi)+&
377 (qpk*xyzorig(xcoord,ks1) + qmk*xyzorig(xcoord,ka1))/(qpk+qmk)
378 ryj = (rpj*xyzorig(ycoord,jm1) + rmj*xyzorig(ycoord,jp1))/(rpj+rmj)+&
379 (qpi*xyzorig(ycoord,is1) + qmi*xyzorig(ycoord,ia1))/(qpi+qmi)+&
380 (qpk*xyzorig(ycoord,ks1) + qmk*xyzorig(ycoord,ka1))/(qpk+qmk)
381 rzj = (rpj*xyzorig(zcoord,jm1) + rmj*xyzorig(zcoord,jp1))/(rpj+rmj)+&
382 (qpi*xyzorig(zcoord,is1) + qmi*xyzorig(zcoord,ia1))/(qpi+qmi)+&
383 (qpk*xyzorig(zcoord,ks1) + qmk*xyzorig(zcoord,ka1))/(qpk+qmk)
385 rxk = (rpk*xyzorig(xcoord,km1) + rmk*xyzorig(xcoord,kp1))/(rpk+rmk)+&
386 (qpi*xyzorig(xcoord,is1) + qmi*xyzorig(xcoord,ia1))/(qpi+qmi)+&
387 (qpj*xyzorig(xcoord,js1) + qmj*xyzorig(xcoord,ja1))/(qpj+qmj)
388 ryk = (rpk*xyzorig(ycoord,km1) + rmk*xyzorig(ycoord,kp1))/(rpk+rmk)+&
389 (qpi*xyzorig(ycoord,is1) + qmi*xyzorig(ycoord,ia1))/(qpi+qmi)+&
390 (qpj*xyzorig(ycoord,js1) + qmj*xyzorig(ycoord,ja1))/(qpj+qmj)
391 rzk = (rpk*xyzorig(zcoord,km1) + rmk*xyzorig(zcoord,kp1))/(rpk+rmk)+&
392 (qpi*xyzorig(zcoord,is1) + qmi*xyzorig(zcoord,ia1))/(qpi+qmi)+&
393 (qpj*xyzorig(zcoord,js1) + qmj*xyzorig(zcoord,ja1))/(qpj+qmj)
395 xyz(xcoord,ijk) = rd*(wi*rxi+wj*rxj+wk*rxk)/(wi+wj+wk)
396 xyz(ycoord,ijk) = rd*(wi*ryi+wj*ryj+wk*ryk)/(wi+wj+wk)
397 xyz(zcoord,ijk) = rd*(wi*rzi+wj*rzj+wk*rzk)/(wi+wj+wk)
413 1000
FORMAT(
a,1
x,
'Remesh region: ',i6)
subroutine rflo_copygeometrydummy(region)
**********************************************************************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
**********************************************************************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)
**********************************************************************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
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine rflo_generatecoarsegrids(region)
**********************************************************************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_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
subroutine rflo_gridremesh(region)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
subroutine deregisterfunction(global)
**********************************************************************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