62 CHARACTER(CHRLEN) :: RCSIdentString = &
63 '$RCSfile: RFLO_ModMoveGridUtil.F90,v $ $Revision: 1.5 $'
100 TYPE(t_region
) :: region
108 INTEGER :: ijkn, ijkn1, ijknb, ijkne, inoff, ijnoff, errorflag
109 INTEGER :: l1b, l1e, l2b, l2e, lc, dir1, dir2, k1, k2, switch(6,7)
111 REAL(RFREAL) :: arclen, ds1,
s
112 REAL(RFREAL) :: dnbeg(xcoord:zcoord), dnend(xcoord:zcoord), dn(xcoord:zcoord)
113 REAL(RFREAL),
POINTER :: xyz(:,:), xyzref(:,:)
114 REAL(RFREAL),
POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
115 REAL(RFREAL),
ALLOCATABLE :: ds2(:)
121 global => region%global
124 'RFLO_ModMoveGridUtil.F90' )
129 lbound =
patch%lbound
135 xyzref => region%levels(ilev)%gridOld%xyzOld
136 xyz => region%levels(ilev)%grid%xyz
137 arclen12 => region%levels(ilev)%grid%arcLen12
138 arclen34 => region%levels(ilev)%grid%arcLen34
139 arclen56 => region%levels(ilev)%grid%arcLen56
154 dir1 = switch(lbound,1)
155 dir2 = switch(lbound,2)
156 l1b = switch(lbound,3)
157 l1e = switch(lbound,4)
158 l2b = switch(lbound,5)
159 l2e = switch(lbound,6)
160 lc = switch(lbound,7)
162 ALLOCATE( ds2(l1b:l1e), stat=errorflag )
163 global%error = errorflag
164 IF (global%error /= 0) CALL
errorstop( global,err_allocate,&
177 IF (lbound==1 .OR. lbound==2)
THEN
178 IF (
patch%dirFlat==dir1)
THEN
179 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
180 ijkn1 = indijk(lc,l1-1 ,l2 ,inoff,ijnoff)
181 ijknb = indijk(lc,l1b ,l2 ,inoff,ijnoff)
182 ijkne = indijk(lc,l1e ,l2 ,inoff,ijnoff)
183 arclen =
patch%arcLen1(k2)
184 ELSEIF (
patch%dirFlat==dir2)
THEN
185 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
186 ijkn1 = indijk(lc,l1 ,l2-1 ,inoff,ijnoff)
187 ijknb = indijk(lc,l1 ,l2b ,inoff,ijnoff)
188 ijkne = indijk(lc,l1 ,l2e ,inoff,ijnoff)
189 arclen =
patch%arcLen2(k1)
191 ELSEIF (lbound==3 .OR. lbound==4)
THEN
192 IF (
patch%dirFlat==dir1)
THEN
193 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
194 ijkn1 = indijk(l2 ,lc,l1-1 ,inoff,ijnoff)
195 ijknb = indijk(l2 ,lc,l1b ,inoff,ijnoff)
196 ijkne = indijk(l2 ,lc,l1e ,inoff,ijnoff)
197 arclen =
patch%arcLen1(k2)
198 ELSEIF (
patch%dirFlat==dir2)
THEN
199 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
200 ijkn1 = indijk(l2-1 ,lc,l1 ,inoff,ijnoff)
201 ijknb = indijk(l2b ,lc,l1 ,inoff,ijnoff)
202 ijkne = indijk(l2e ,lc,l1 ,inoff,ijnoff)
203 arclen =
patch%arcLen2(k1)
205 ELSEIF (lbound==5 .OR. lbound==6)
THEN
206 IF (
patch%dirFlat==dir1)
THEN
207 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
208 ijkn1 = indijk(l1-1 ,l2 ,lc,inoff,ijnoff)
209 ijknb = indijk(l1b ,l2 ,lc,inoff,ijnoff)
210 ijkne = indijk(l1e ,l2 ,lc,inoff,ijnoff)
211 arclen =
patch%arcLen1(k2)
212 ELSEIF (
patch%dirFlat==dir2)
THEN
213 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
214 ijkn1 = indijk(l1 ,l2-1 ,lc,inoff,ijnoff)
215 ijknb = indijk(l1 ,l2b ,lc,inoff,ijnoff)
216 ijkne = indijk(l1 ,l2e ,lc,inoff,ijnoff)
217 arclen =
patch%arcLen2(k1)
221 dnbeg(:) = xyz(:,ijknb)
222 dnend(:) = xyz(:,ijkne)
224 IF (
patch%dirFlat==dir1)
THEN
226 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn1))**2 + &
227 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn1))**2 + &
228 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn1))**2)
230 ELSEIF (
patch%dirFlat==dir2)
THEN
231 ds2(l1) = ds2(l1) + &
232 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn1))**2 + &
233 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn1))**2 + &
234 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn1))**2)
246 DEALLOCATE( ds2, stat=errorflag )
247 global%error = errorflag
248 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
282 #include "Indexing.h"
286 TYPE(t_region
) :: region
295 INTEGER :: l1b, l1e, l2b, l2e, lc, ijkn, ijke(4), ijkem(4), inoff, ijnoff
296 INTEGER :: h1, h2, switch(6,5)
299 REAL(RFREAL) :: arclen(4), ds(4),
s(4)
300 REAL(RFREAL) :: e1(xcoord:zcoord), e2(xcoord:zcoord), &
301 e3(xcoord:zcoord), e4(xcoord:zcoord), &
302 p1(xcoord:zcoord), p2(xcoord:zcoord), &
303 p3(xcoord:zcoord), p4(xcoord:zcoord), dn(xcoord:zcoord)
304 REAL(RFREAL),
POINTER :: xyz(:,:), xyzref(:,:)
309 'RFLO_ModMoveGridUtil.F90' )
313 lbound =
patch%lbound
320 xyzref => region%levels(ilev)%gridOld%xyzOld
321 xyz => region%levels(ilev)%grid%xyz
335 l1b = switch(lbound,1)
336 l1e = switch(lbound,2)
337 l2b = switch(lbound,3)
338 l2e = switch(lbound,4)
339 lc = switch(lbound,5)
343 p1(:) = xyz(:,
patch%corns(1)) - xyzref(:,
patch%corns(1))
344 p2(:) = xyz(:,
patch%corns(4)) - xyzref(:,
patch%corns(4))
345 p3(:) = xyz(:,
patch%corns(3)) - xyzref(:,
patch%corns(3))
346 p4(:) = xyz(:,
patch%corns(2)) - xyzref(:,
patch%corns(2))
350 arclen(1) =
patch%arclen2(1)
351 arclen(2) =
patch%arclen2(h1)
352 arclen(3) =
patch%arclen1(1)
353 arclen(4) =
patch%arclen1(h2)
363 IF (lbound==1 .OR. lbound==2)
THEN
364 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
365 ijke(1) = indijk(lc,
jbeg ,l2 ,inoff,ijnoff)
366 ijkem(1) = indijk(lc,
jbeg ,l2-1 ,inoff,ijnoff)
367 ijke(2) = indijk(lc,
jend ,l2 ,inoff,ijnoff)
368 ijkem(2) = indijk(lc,
jend ,l2-1 ,inoff,ijnoff)
369 ijke(3) = indijk(lc,l1 ,
kbeg ,inoff,ijnoff)
370 ijkem(3) = indijk(lc,l1-1 ,
kbeg ,inoff,ijnoff)
371 ijke(4) = indijk(lc,l1 ,kend ,inoff,ijnoff)
372 ijkem(4) = indijk(lc,l1-1 ,kend ,inoff,ijnoff)
373 ELSE IF (lbound==3 .OR. lbound==4)
THEN
374 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
375 ijke(1) = indijk(l2 ,lc,
kbeg ,inoff,ijnoff)
376 ijkem(1) = indijk(l2-1 ,lc,
kbeg ,inoff,ijnoff)
377 ijke(2) = indijk(l2 ,lc,kend ,inoff,ijnoff)
378 ijkem(2) = indijk(l2-1 ,lc,kend ,inoff,ijnoff)
379 ijke(3) = indijk(
ibeg ,lc,l1 ,inoff,ijnoff)
380 ijkem(3) = indijk(
ibeg ,lc,l1-1 ,inoff,ijnoff)
381 ijke(4) = indijk(
iend ,lc,l1 ,inoff,ijnoff)
382 ijkem(4) = indijk(
iend ,lc,l1-1 ,inoff,ijnoff)
383 ELSE IF (lbound==5 .OR. lbound==6)
THEN
384 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
385 ijke(1) = indijk(
ibeg ,l2 ,lc,inoff,ijnoff)
386 ijkem(1) = indijk(
ibeg ,l2-1 ,lc,inoff,ijnoff)
387 ijke(2) = indijk(
iend ,l2 ,lc,inoff,ijnoff)
388 ijkem(2) = indijk(
iend ,l2-1 ,lc,inoff,ijnoff)
389 ijke(3) = indijk(l1 ,
jbeg ,lc,inoff,ijnoff)
390 ijkem(3) = indijk(l1-1 ,
jbeg ,lc,inoff,ijnoff)
391 ijke(4) = indijk(l1 ,
jend ,lc,inoff,ijnoff)
392 ijkem(4) = indijk(l1-1 ,
jend ,lc,inoff,ijnoff)
396 sqrt((xyzref(xcoord,ijke(1))-xyzref(xcoord,ijkem(1)))**2 + &
397 (xyzref(ycoord,ijke(1))-xyzref(ycoord,ijkem(1)))**2 + &
398 (xyzref(zcoord,ijke(1))-xyzref(zcoord,ijkem(1)))**2)
400 sqrt((xyzref(xcoord,ijke(2))-xyzref(xcoord,ijkem(2)))**2 + &
401 (xyzref(ycoord,ijke(2))-xyzref(ycoord,ijkem(2)))**2 + &
402 (xyzref(zcoord,ijke(2))-xyzref(zcoord,ijkem(2)))**2)
406 sqrt((xyzref(xcoord,ijke(3))-xyzref(xcoord,ijkem(3)))**2 + &
407 (xyzref(ycoord,ijke(3))-xyzref(ycoord,ijkem(3)))**2 + &
408 (xyzref(zcoord,ijke(3))-xyzref(zcoord,ijkem(3)))**2)
410 sqrt((xyzref(xcoord,ijke(4))-xyzref(xcoord,ijkem(4)))**2 + &
411 (xyzref(ycoord,ijke(4))-xyzref(ycoord,ijkem(4)))**2 + &
412 (xyzref(zcoord,ijke(4))-xyzref(zcoord,ijkem(4)))**2)
413 s(:) = ds(:)/arclen(:)
414 e1(:) = xyz(:,ijke(1)) - xyzref(:,ijke(1))
415 e2(:) = xyz(:,ijke(2)) - xyzref(:,ijke(2))
416 e3(:) = xyz(:,ijke(3)) - xyzref(:,ijke(3))
417 e4(:) = xyz(:,ijke(4)) - xyzref(:,ijke(4))
418 CALL
rflo_tfint2d(
s(1),
s(2),
s(3),
s(4),e1,e2,e3,e4,
p1,p2,p3,p4,dn )
419 xyz(:,ijkn) = dn(:) + xyzref(:,ijkn)
**********************************************************************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
subroutine rflo_tfint2d(s1, s2, s3, s4, e1, e2, e3, e4, p1, p2, p3, p4, xyz)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_tfint1d(s, p1, p2, xyz)
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 knode iend
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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
subroutine, public rflo_movegridqflatpatch(region, patch, iPatch)
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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)
subroutine, public rflo_movegridcurvedpatch(region, patch, iPatch)