67 CHARACTER(CHRLEN) :: RCSIdentString = &
68 '$RCSfile: RFLO_ModGridControlMap.F90,v $ $Revision: 1.9 $'
102 TYPE(t_region
) :: region
106 REAL(RFREAL),
POINTER :: stu(:,:), stui(:,:), stuj(:,:), stuk(:,:)
112 global => region%global
115 'RFLO_ModGridControlMap.F90' )
124 ndum = region%nDumCells
128 stu => region%levels(1)%grid%stu
129 stui => region%levels(1)%grid%stui
130 stuj => region%levels(1)%grid%stuj
131 stuk => region%levels(1)%grid%stuk
136 inoff,ijnoff,xcoord,zcoord,stu,stui )
141 inoff,ijnoff,xcoord,zcoord,stu,stuj )
146 inoff,ijnoff,xcoord,zcoord,stu,stuk )
181 #include "Indexing.h"
184 TYPE(t_region
) :: region
188 REAL(RFREAL),
POINTER :: xyz(:,:), stui(:,:), stuj(:,:), stuk(:,:)
194 global => region%global
197 'RFLO_ModGridControlMap.F90' )
206 ndum = region%nDumCells
210 xyz => region%levels(1)%gridOld%xyz
211 stui => region%levels(1)%grid%stui
212 stuj => region%levels(1)%grid%stuj
213 stuk => region%levels(1)%grid%stuk
222 inoff,ijnoff,xcoord,zcoord,xyz,stui )
227 inoff,ijnoff,xcoord,zcoord,xyz,stuj )
232 inoff,ijnoff,xcoord,zcoord,xyz,stuk )
267 #include "Indexing.h"
270 TYPE(t_region
) :: region
276 INTEGER :: ilev, ijkn, xco, yco, zco, ibn, ien, errfl
278 REAL(RFREAL) :: determ, rndet, a11, a12, a13, a21, a22, a23, a31, a32, a33
279 REAL(RFREAL),
POINTER :: stu(:,:), stui(:,:), stuj(:,:), stuk(:,:)
280 REAL(RFREAL),
POINTER :: stuii(:,:), stujj(:,:), stukk(:,:)
281 REAL(RFREAL),
POINTER :: stuij(:,:), stuik(:,:), stujk(:,:), pmat(:,:,:)
288 global => region%global
291 'RFLO_ModGridControlMap.F90' )
307 ndum = region%nDumCells
311 grid => region%levels(ilev)%grid
313 ALLOCATE(
grid%stuii( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
314 ALLOCATE(
grid%stujj( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
315 ALLOCATE(
grid%stukk( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
316 ALLOCATE(
grid%stuij( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
317 ALLOCATE(
grid%stuik( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
318 ALLOCATE(
grid%stujk( 3,ibn:ien),stat=errfl );
IF (errfl>0) goto 88
322 stu => region%levels(ilev)%grid%stu
323 stui => region%levels(ilev)%grid%stui
324 stuj => region%levels(ilev)%grid%stuj
325 stuk => region%levels(ilev)%grid%stuk
326 stuii => region%levels(ilev)%grid%stuii
327 stujj => region%levels(ilev)%grid%stujj
328 stukk => region%levels(ilev)%grid%stukk
329 stuij => region%levels(ilev)%grid%stuij
330 stuik => region%levels(ilev)%grid%stuik
331 stujk => region%levels(ilev)%grid%stujk
332 pmat => region%levels(ilev)%grid%pmat
337 inoff,ijnoff,xcoord,zcoord,stu,stuii )
342 inoff,ijnoff,xcoord,zcoord,stu,stujj )
347 inoff,ijnoff,xcoord,zcoord,stu,stukk )
352 inoff,ijnoff,xcoord,zcoord,stui,stuij )
357 inoff,ijnoff,xcoord,zcoord,stui,stuik )
362 inoff,ijnoff,xcoord,zcoord,stuj,stujk )
369 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
370 determ = stui(xco,ijkn)*(stuj(yco,ijkn)*stuk(zco,ijkn)- &
371 stuk(yco,ijkn)*stuj(zco,ijkn))+ &
372 stuj(xco,ijkn)*(stuk(yco,ijkn)*stui(zco,ijkn)- &
373 stui(yco,ijkn)*stuk(zco,ijkn))+ &
374 stuk(xco,ijkn)*(stui(yco,ijkn)*stuj(zco,ijkn)- &
375 stuj(yco,ijkn)*stui(zco,ijkn))
376 rndet = -1._rfreal/determ
377 a11 = stuj(yco,ijkn)*stuk(zco,ijkn)-stuk(yco,ijkn)*stuj(zco,ijkn)
378 a12 = stuk(xco,ijkn)*stuj(zco,ijkn)-stuj(xco,ijkn)*stuk(zco,ijkn)
379 a13 = stuj(xco,ijkn)*stuk(yco,ijkn)-stuk(xco,ijkn)*stuj(yco,ijkn)
380 a21 = stuk(yco,ijkn)*stui(zco,ijkn)-stui(yco,ijkn)*stuk(zco,ijkn)
381 a22 = stui(xco,ijkn)*stuk(zco,ijkn)-stuk(xco,ijkn)*stui(zco,ijkn)
382 a23 = stuk(xco,ijkn)*stui(yco,ijkn)-stui(xco,ijkn)*stuk(yco,ijkn)
383 a31 = stui(yco,ijkn)*stuj(zco,ijkn)-stuj(yco,ijkn)*stui(zco,ijkn)
384 a32 = stuj(xco,ijkn)*stui(zco,ijkn)-stui(xco,ijkn)*stuj(zco,ijkn)
385 a33 = stui(xco,ijkn)*stuj(yco,ijkn)-stuj(xco,ijkn)*stui(yco,ijkn)
387 pmat(xco,1,ijkn) = (stuii(xco,ijkn)*a11+ &
388 stuii(yco,ijkn)*a12+ &
389 stuii(zco,ijkn)*a13)*rndet
390 pmat(yco,1,ijkn) = (stuii(xco,ijkn)*a21+ &
391 stuii(yco,ijkn)*a22+ &
392 stuii(zco,ijkn)*a23)*rndet
393 pmat(zco,1,ijkn) = (stuii(xco,ijkn)*a31+ &
394 stuii(yco,ijkn)*a32+ &
395 stuii(zco,ijkn)*a33)*rndet
397 pmat(xco,2,ijkn) = (stuij(xco,ijkn)*a11+ &
398 stuij(yco,ijkn)*a12+ &
399 stuij(zco,ijkn)*a13)*rndet
400 pmat(yco,2,ijkn) = (stuij(xco,ijkn)*a21+ &
401 stuij(yco,ijkn)*a22+ &
402 stuij(zco,ijkn)*a23)*rndet
403 pmat(zco,2,ijkn) = (stuij(xco,ijkn)*a31+ &
404 stuij(yco,ijkn)*a32+ &
405 stuij(zco,ijkn)*a33)*rndet
407 pmat(xco,3,ijkn) = (stuik(xco,ijkn)*a11+ &
408 stuik(yco,ijkn)*a12+ &
409 stuik(zco,ijkn)*a13)*rndet
410 pmat(yco,3,ijkn) = (stuik(xco,ijkn)*a21+ &
411 stuik(yco,ijkn)*a22+ &
412 stuik(zco,ijkn)*a23)*rndet
413 pmat(zco,3,ijkn) = (stuik(xco,ijkn)*a31+ &
414 stuik(yco,ijkn)*a32+ &
415 stuik(zco,ijkn)*a33)*rndet
417 pmat(xco,4,ijkn) = (stujj(xco,ijkn)*a11+ &
418 stujj(yco,ijkn)*a12+ &
419 stujj(zco,ijkn)*a13)*rndet
420 pmat(yco,4,ijkn) = (stujj(xco,ijkn)*a21+ &
421 stujj(yco,ijkn)*a22+ &
422 stujj(zco,ijkn)*a23)*rndet
423 pmat(zco,4,ijkn) = (stujj(xco,ijkn)*a31+ &
424 stujj(yco,ijkn)*a32+ &
425 stujj(zco,ijkn)*a33)*rndet
427 pmat(xco,5,ijkn) = (stujk(xco,ijkn)*a11+ &
428 stujk(yco,ijkn)*a12+ &
429 stujk(zco,ijkn)*a13)*rndet
430 pmat(yco,5,ijkn) = (stujk(xco,ijkn)*a21+ &
431 stujk(yco,ijkn)*a22+ &
432 stujk(zco,ijkn)*a23)*rndet
433 pmat(zco,5,ijkn) = (stujk(xco,ijkn)*a31+ &
434 stujk(yco,ijkn)*a32+ &
435 stujk(zco,ijkn)*a33)*rndet
437 pmat(xco,6,ijkn) = (stukk(xco,ijkn)*a11+ &
438 stukk(yco,ijkn)*a12+ &
439 stukk(zco,ijkn)*a13)*rndet
440 pmat(yco,6,ijkn) = (stukk(xco,ijkn)*a21+ &
441 stukk(yco,ijkn)*a22+ &
442 stukk(zco,ijkn)*a23)*rndet
443 pmat(zco,6,ijkn) = (stukk(xco,ijkn)*a31+ &
444 stukk(yco,ijkn)*a32+ &
445 stukk(zco,ijkn)*a33)*rndet
452 DEALLOCATE(
grid%stuii, stat=errfl );
IF (errfl>0) goto 99
453 DEALLOCATE(
grid%stujj, stat=errfl );
IF (errfl>0) goto 99
454 DEALLOCATE(
grid%stukk, stat=errfl );
IF (errfl>0) goto 99
455 DEALLOCATE(
grid%stuij, stat=errfl );
IF (errfl>0) goto 99
456 DEALLOCATE(
grid%stuik, stat=errfl );
IF (errfl>0) goto 99
457 DEALLOCATE(
grid%stujk, stat=errfl );
IF (errfl>0) goto 99
505 #include "Indexing.h"
508 TYPE(t_region
) :: region
514 REAL(RFREAL),
POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:)
520 global => region%global
523 'RFLO_ModGridControlMap.F90' )
575 #include "Indexing.h"
578 TYPE(t_region
) :: region
585 INTEGER :: ilev, h1, h2, lbound, inoff, ijnoff
587 REAL(RFREAL),
POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:), xyz(:,:)
593 global => region%global
596 'RFLO_ModGridControlMap.F90' )
601 lbound =
patch%lbound
612 xyz => region%levels(ilev)%grid%xyz
622 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
623 IF (lbound==1 .OR. lbound==2)
THEN
626 ELSE IF (lbound==3 .OR. lbound==4)
THEN
629 ELSE IF (lbound==5 .OR. lbound==6)
THEN
633 st(1,ng1,ng2) = xyz(xcoord,ijkn)
634 st(2,ng1,ng2) = xyz(ycoord,ijkn)
635 st(3,ng1,ng2) = xyz(zcoord,ijkn)
680 #include "Indexing.h"
683 TYPE(t_region
) :: region
691 INTEGER :: ilev, lbound, h1, h2
692 REAL(RFREAL) :: determ, rndet, a11, a12, a21, a22
693 REAL(RFREAL),
POINTER :: st(:,:,:), sti(:,:,:), stj(:,:,:)
694 REAL(RFREAL),
POINTER :: stii(:,:,:), stjj(:,:,:), stij(:,:,:), pfun(:,:,:,:)
700 global => region%global
703 'RFLO_ModGridControlMap.F90' )
708 lbound =
patch%lbound
739 determ = sti(1,
i,
j)*stj(2,
i,
j)-stj(1,
i,
j)*sti(2,
i,
j)
740 rndet = -1._rfreal/determ
746 pfun(1,1,
i,
j) = (stii(1,
i,
j)*a11 + stii(2,
i,
j)*a12)*rndet
747 pfun(2,1,
i,
j) = (stii(1,
i,
j)*a12 + stii(2,
i,
j)*a22)*rndet
749 pfun(1,2,
i,
j) = (stij(1,
i,
j)*a11 + stij(2,
i,
j)*a12)*rndet
750 pfun(2,2,
i,
j) = (stij(1,
i,
j)*a12 + stij(2,
i,
j)*a22)*rndet
752 pfun(1,3,
i,
j) = (stjj(1,
i,
j)*a11 + stjj(2,
i,
j)*a12)*rndet
753 pfun(2,3,
i,
j) = (stjj(1,
i,
j)*a12 + stjj(2,
i,
j)*a22)*rndet
788 #include "Indexing.h"
791 TYPE(t_region
) :: region
794 INTEGER ::
i,
j,
k, iter
800 INTEGER :: ijkn, imjkn, ijmkn, ijkmn, inoff, ijnoff, errorflag
801 INTEGER :: xco, yco, zco
803 REAL(RFREAL) :: phii, phii1, phij, phij1, phik, phik1, dsi,
dx,
dy,
dz, resid
804 REAL(RFREAL),
POINTER :: xyzini(:,:), stu(:,:), stuold(:,:)
805 REAL(RFREAL),
ALLOCATABLE :: dsj(:), dsk(:,:)
806 REAL(RFREAL),
ALLOCATABLE :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
812 global => region%global
815 'RFLO_ModGridControlMap.F90' )
823 ndum = region%nDumCells
833 global%error = errorflag
834 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
838 global%error = errorflag
839 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
843 global%error = errorflag
844 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
848 global%error = errorflag
849 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
853 global%error = errorflag
854 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
859 xyzini => region%levels(1)%gridOld%xyzOld
860 stu => region%levels(1)%grid%stu
861 stuold => region%levels(1)%grid%stuOld
873 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
874 imjkn = indijk(
i-1,
j ,
k ,inoff,ijnoff)
876 arclen12(
j,
k) = arclen12(
j,
k) + &
877 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,imjkn))**2 + &
878 (xyzini(ycoord,ijkn)-xyzini(ycoord,imjkn))**2 + &
879 (xyzini(zcoord,ijkn)-xyzini(zcoord,imjkn))**2)
887 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
888 ijmkn = indijk(
i ,
j-1,
k ,inoff,ijnoff)
890 arclen34(
k,
i) = arclen34(
k,
i) + &
891 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijmkn))**2 + &
892 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijmkn))**2 + &
893 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijmkn))**2)
901 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
902 ijkmn = indijk(
i ,
j ,
k-1,inoff,ijnoff)
904 arclen56(
i,
j) = arclen56(
i,
j) + &
905 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijkmn))**2 + &
906 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijkmn))**2 + &
907 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijkmn))**2)
916 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
917 imjkn = indijk(
i-1,
j ,
k ,inoff,ijnoff)
920 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,imjkn))**2 + &
921 (xyzini(ycoord,ijkn)-xyzini(ycoord,imjkn))**2 + &
922 (xyzini(zcoord,ijkn)-xyzini(zcoord,imjkn))**2)
924 stuold(xco,ijkn) = dsi/arclen12(
j,
k)
933 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
934 ijmkn = indijk(
i ,
j-1,
k ,inoff,ijnoff)
937 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijmkn))**2 + &
938 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijmkn))**2 + &
939 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijmkn))**2)
941 stuold(yco,ijkn) = dsj(
i)/arclen34(
k,
i)
950 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
951 ijkmn = indijk(
i ,
j ,
k-1,inoff,ijnoff)
953 dsk(
i,
j) = dsk(
i,
j) + &
954 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijkmn))**2 + &
955 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijkmn))**2 + &
956 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijkmn))**2)
958 stuold(zco,ijkn) = dsk(
i,
j)/arclen56(
i,
j)
977 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
978 imjkn = indijk(
i-1,
j ,
k ,inoff,ijnoff)
979 ijmkn = indijk(
i ,
j-1,
k ,inoff,ijnoff)
980 ijkmn = indijk(
i ,
j ,
k-1,inoff,ijnoff)
982 dsi = dsi + stuold(xcoord,ijkn)-stuold(xcoord,imjkn)
983 dsj(
i) = dsj(
i) + stuold(ycoord,ijkn)-stuold(ycoord,ijmkn)
984 dsk(
i,
j) = dsk(
i,
j) + stuold(zcoord,ijkn)-stuold(zcoord,ijkmn)
988 phii1 = 1._rfreal - phii
990 phij1 = 1._rfreal - phij
992 phik1 = 1._rfreal - phik
994 stu(xco,ijkn) = phij1*phik1* &
997 stuold(xco,indijk(
i,
jpnend,kpnend,inoff,ijnoff)) + &
1001 stuold(xco,indijk(
i,
jpnbeg,kpnend,inoff,ijnoff))
1003 stu(yco,ijkn) = phii1*phik1* &
1006 stuold(yco,indijk(
ipnend,
j,kpnend,inoff,ijnoff)) + &
1010 stuold(yco,indijk(
ipnbeg,
j,kpnend,inoff,ijnoff))
1012 stu(zco,ijkn) = phii1*phij1* &
1030 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
1031 dx = stu(xcoord,ijkn) - stuold(xcoord,ijkn)
1032 dy = stu(ycoord,ijkn) - stuold(ycoord,ijkn)
1033 dz = stu(zcoord,ijkn) - stuold(zcoord,ijkn)
1039 IF (global%myProcid == (global%nProcAlloc-1)/2 .AND. &
1040 global%verbLevel >= verbose_high)
THEN
1041 WRITE(stdout,*) solver_name//
' CtrParam_Vol:region,iter,residual', &
1042 region%iRegionGlobal,iter,resid
1061 inoff,ijnoff,xcoord,zcoord,stu )
1065 DEALLOCATE( dsj,stat=errorflag )
1066 global%error = errorflag
1067 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
1070 DEALLOCATE( dsk,stat=errorflag )
1071 global%error = errorflag
1072 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
1075 DEALLOCATE( arclen12,stat=errorflag )
1076 global%error = errorflag
1077 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
1080 DEALLOCATE( arclen34,stat=errorflag )
1081 global%error = errorflag
1082 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
1085 DEALLOCATE( arclen56,stat=errorflag )
1086 global%error = errorflag
1087 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
1117 #include "Indexing.h"
1120 TYPE(t_region
) :: region
1125 INTEGER ::
i,
j,
k, iter
1128 INTEGER :: ilev, lbound, h1, h2, ir, jr, kr, ijkn, ijknm, m1, m2, errorflag
1131 REAL(RFREAL) :: arclen(4), ri, rj, dsi, phii, phii1, phij, phij1
1132 REAL(RFREAL) ::
dx,
dy, resid
1133 REAL(RFREAL),
ALLOCATABLE :: dsj(:)
1134 REAL(RFREAL),
POINTER :: xyzini(:,:), st(:,:,:), stold(:,:,:)
1140 global => region%global
1142 'RFLO_ModGridControlMap.F90' )
1147 lbound =
patch%lbound
1153 xyzini => region%levels(ilev)%gridOld%xyzOld
1155 stold =>
patch%stOld
1160 ALLOCATE( dsj(h1), stat=errorflag )
1161 global%error = errorflag
1162 IF (global%error/=0) CALL
errorstop( global,err_allocate,&
1168 arclen(:) = 0._rfreal
1170 IF (lbound==1 .OR. lbound==2)
THEN
1177 ijkn = indijk(ir ,
jpnbeg,
k ,inoff,ijnoff)
1178 ijknm = indijk(ir ,
jpnbeg,
k-1,inoff,ijnoff)
1181 arclen(1) = arclen(1) + &
1182 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1183 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1184 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1185 stold(2,m1,m2) = arclen(1)
1187 stold(1,m1,:) = 0._rfreal
1188 stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1191 ijkn = indijk(ir ,
jpnend,
k ,inoff,ijnoff)
1192 ijknm = indijk(ir ,
jpnend,
k-1,inoff,ijnoff)
1195 arclen(2) = arclen(2) + &
1196 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1197 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1198 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1199 stold(2,m1,m2) = arclen(2)
1201 stold(1,m1,:) = 1._rfreal
1202 stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1205 ijkn = indijk(ir ,
j ,
kpnbeg,inoff,ijnoff)
1206 ijknm = indijk(ir ,
j-1,
kpnbeg,inoff,ijnoff)
1209 arclen(3) = arclen(3) + &
1210 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1211 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1212 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1213 stold(1,m1,m2) = arclen(3)
1215 stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1216 stold(2,:,m2) = 0._rfreal
1219 ijkn = indijk(ir ,
j ,
kpnbeg,inoff,ijnoff)
1220 ijknm = indijk(ir ,
j-1,
kpnbeg,inoff,ijnoff)
1223 arclen(4) = arclen(4) + &
1224 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1225 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1226 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1227 stold(1,m1,m2) = arclen(4)
1229 stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1230 stold(2,:,m2) = 1._rfreal
1232 ELSEIF (lbound==3 .OR. lbound==4)
THEN
1239 ijkn = indijk(
i ,jr ,
kpnbeg,inoff,ijnoff)
1240 ijknm = indijk(
i-1,jr ,
kpnbeg,inoff,ijnoff)
1243 arclen(1) = arclen(1) + &
1244 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1245 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1246 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1247 stold(2,m1,m2) = arclen(1)
1249 stold(1,m1,:) = 0._rfreal
1250 stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1253 ijkn = indijk(
i ,jr ,kpnend,inoff,ijnoff)
1254 ijknm = indijk(
i-1,jr ,kpnend,inoff,ijnoff)
1257 arclen(2) = arclen(2) + &
1258 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1259 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1260 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1261 stold(2,m1,m2) = arclen(2)
1263 stold(1,m1,:) = 1._rfreal
1264 stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1267 ijkn = indijk(
ipnbeg,jr ,
k ,inoff,ijnoff)
1268 ijknm = indijk(
ipnbeg,jr ,
k-1,inoff,ijnoff)
1271 arclen(3) = arclen(3) + &
1272 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1273 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1274 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1275 stold(1,m1,m2) = arclen(3)
1277 stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1278 stold(2,:,m2) = 0._rfreal
1281 ijkn = indijk(
ipnend,jr ,
k ,inoff,ijnoff)
1282 ijknm = indijk(
ipnend,jr ,
k-1,inoff,ijnoff)
1285 arclen(4) = arclen(4) + &
1286 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1287 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1288 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1289 stold(1,m1,m2) = arclen(4)
1291 stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1292 stold(2,:,m2) = 1._rfreal
1294 ELSEIF (lbound==5 .OR. lbound==6)
THEN
1301 ijkn = indijk(
ipnbeg,
j ,kr ,inoff,ijnoff)
1302 ijknm = indijk(
ipnbeg,
j-1,kr ,inoff,ijnoff)
1305 arclen(1) = arclen(1) + &
1306 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1307 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1308 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1309 stold(2,m1,m2) = arclen(1)
1311 stold(1,m1,:) = 0._rfreal
1312 stold(2,m1,:) = stold(2,m1,:)/arclen(1)
1315 ijkn = indijk(
ipnend,
j ,kr ,inoff,ijnoff)
1316 ijknm = indijk(
ipnend,
j-1,kr ,inoff,ijnoff)
1319 arclen(2) = arclen(2) + &
1320 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1321 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1322 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1323 stold(2,m1,m2) = arclen(2)
1325 stold(1,m1,:) = 1._rfreal
1326 stold(2,m1,:) = stold(2,m1,:)/arclen(2)
1329 ijkn = indijk(
i ,
jpnbeg,kr ,inoff,ijnoff)
1330 ijknm = indijk(
i-1,
jpnbeg,kr ,inoff,ijnoff)
1333 arclen(3) = arclen(3) + &
1334 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1335 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1336 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1337 stold(1,m1,m2) = arclen(3)
1339 stold(1,:,m2) = stold(1,:,m2)/arclen(3)
1340 stold(2,:,m2) = 0._rfreal
1343 ijkn = indijk(
i ,
jpnend,kr ,inoff,ijnoff)
1344 ijknm = indijk(
i-1,
jpnend,kr ,inoff,ijnoff)
1347 arclen(4) = arclen(4) + &
1348 sqrt((xyzini(xcoord,ijkn)-xyzini(xcoord,ijknm))**2 + &
1349 (xyzini(ycoord,ijkn)-xyzini(ycoord,ijknm))**2 + &
1350 (xyzini(zcoord,ijkn)-xyzini(zcoord,ijknm))**2)
1351 stold(1,m1,m2) = arclen(4)
1353 stold(1,:,m2) = stold(1,:,m2)/arclen(4)
1354 stold(2,:,m2) = 1._rfreal
1360 ri =
REAL(
i-1)/
REAL(h1-1)
1361 stold(2,
i,
j) = ri*stold(2,h1,
j) + (1._rfreal-ri)*stold(2,1,
j)
1367 rj =
REAL(
j-1)/
REAL(h2-1)
1368 stold(1,
i,
j) = rj*stold(1,
i,h2) + (1._rfreal-rj)*stold(1,
i,1)
1383 dsi = dsi + stold(1,
i,
j)-stold(1,
i-1,
j)
1385 phii = (3._rfreal-2._rfreal*dsi)*dsi*dsi
1386 phii1 = 1._rfreal - phii
1387 st(2,
i,
j) = phii*stold(2,h1,
j) + phii1*stold(2,1,
j)
1394 dsj(
i) = dsj(
i) + stold(2,
i,
j)-stold(2,
i,
j-1)
1396 phij = (3._rfreal-2._rfreal*dsj(
i))*dsj(
i)*dsj(
i)
1397 phij1 = 1._rfreal - phij
1399 st(1,
i,
j) = phij*stold(1,
i,h2) + phij1*stold(1,
i,1)
1408 dx = st(1,
i,
j) - stold(1,
i,
j)
1409 dy = st(2,
i,
j) - stold(2,
i,
j)
1414 IF (global%myProcid == (global%nProcAlloc-1)/2 .AND. &
1415 global%verbLevel >= verbose_high)
THEN
1416 WRITE(stdout,*) solver_name//
' CtrParam_Surf:patch,iter,residual', &
1417 region%iRegionGlobal,ipatch,iter,resid
1428 DEALLOCATE( dsj,stat=errorflag )
1429 global%error = errorflag
1430 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,&
**********************************************************************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
**********************************************************************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
subroutine, public rflo_gridcontrolfunc3d(region)
subroutine, public rflo_findiffcompis(ni, nj, idb, ide, var, dvar)
**********************************************************************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)
subroutine, public rflo_findiffcompi(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_findiffcompjj(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridphysgrad2d(region, patch)
subroutine, public rflo_findiffcompjs(ni, nj, idb, ide, var, dvar)
**********************************************************************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
subroutine, public rflo_findiffcompiis(ni, nj, idb, ide, var, dvar)
**********************************************************************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
subroutine, public rflo_gridphysgrad3d(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 knode iend
subroutine, public rflo_findiffcompj(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
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 ipnbeg
subroutine, public rflo_gridcontrolmap2d(region, patch, iPatch)
subroutine, public rflo_findiffcompkk(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridcontrolmap3d(region)
subroutine, public rflo_gridcontrolgrad3d(region)
subroutine, public rflo_findiffcompjjs(ni, nj, idb, ide, var, dvar)
subroutine, public rflo_findiffcompk(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
subroutine, public rflo_gridcontrolfunc2d(region, patch, iPatch)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
**********************************************************************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 rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
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
subroutine, public rflo_gridcontrolgrad2d(region, patch, iPatch)
subroutine, public rflo_findiffcompii(ibeg, iend, jbeg, jend, kbeg, kend, ndum, iNOff, ijNOff, idb, ide, var, dvar)
**********************************************************************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)
**********************************************************************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
**********************************************************************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