55 average,dnode,dnodesrc )
72 REAL(RFREAL),
POINTER :: dnode(:,:), dnodesrc(:,:)
74 TYPE(t_region
) :: region, regionsrc
81 INTEGER :: bctype,
ibeg,
iend,
jbeg,
jend,
kbeg, kend,
idir,
jdir,
kdir, &
82 inoff, ijnoff, ijkn, ijknb
83 INTEGER :: ibegsrc, iendsrc, jbegsrc, jendsrc, kbegsrc, kendsrc, &
84 idirsrc, jdirsrc, kdirsrc, inoffsrc, ijnoffsrc, ijknsrc, ijknbsrc
85 INTEGER :: lb, lbs, l1srcdir, l2srcdir, mapmat(3,4)
89 REAL(RFREAL) ::
dy,
dz, sina, cosa, v1(3), v2(3)
90 REAL(RFREAL),
POINTER :: xyz(:,:), xyzsrc(:,:), dold(:,:)
95 'RFLO_ExchangeDnodeCopy.F90' )
99 IF (regionsrc%active==off .AND. (.NOT.regionsrc%mixtInput%moveGrid))
THEN
100 CALL
errorstop( region%global,err_srcregion_off,&
109 jbegsrc,jendsrc,kbegsrc,kendsrc )
115 xyz => region%levels(1)%gridOld%xyz
116 dold => region%levels(1)%grid%xyzOld
117 xyzsrc => regionsrc%levels(1)%gridOld%xyz
120 lbs =
patch%srcLbound
122 bctype =
patch%bcType
129 ELSE IF (
patch%srcL1beg ==
patch%srcL1end)
THEN
130 IF (lbs==1 .OR. lbs==2)
THEN
131 v1(:) = xyzsrc(:,indijk(ibegsrc,jendsrc,kbegsrc,inoffsrc,ijnoffsrc)) - &
132 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
133 ELSE IF (lbs==3 .OR. lbs==4)
THEN
134 v1(:) = xyzsrc(:,indijk(ibegsrc,jbegsrc,kendsrc,inoffsrc,ijnoffsrc)) - &
135 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
136 ELSE IF (lbs==5 .OR. lbs==6)
THEN
137 v1(:) = xyzsrc(:,indijk(iendsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc)) - &
138 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
140 IF (lb==1 .OR. lb==2)
THEN
145 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
148 ELSE IF (lb==3 .OR. lb==4)
THEN
150 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
156 ELSE IF (lb==5 .OR. lb==6)
THEN
171 ELSE IF (
patch%srcL2beg ==
patch%srcL2end)
THEN
172 IF (lbs==1 .OR. lbs==2)
THEN
173 v1(:) = xyzsrc(:,indijk(ibegsrc,jbegsrc,kendsrc,inoffsrc,ijnoffsrc)) - &
174 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
175 ELSE IF (lbs==3 .OR. lbs==4)
THEN
176 v1(:) = xyzsrc(:,indijk(iendsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc)) - &
177 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
178 ELSE IF (lbs==5 .OR. lbs==6)
THEN
179 v1(:) = xyzsrc(:,indijk(ibegsrc,jendsrc,kbegsrc,inoffsrc,ijnoffsrc)) - &
180 xyzsrc(:,indijk(ibegsrc,jbegsrc,kbegsrc,inoffsrc,ijnoffsrc))
182 IF (lb==1 .OR. lb==2)
THEN
184 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
190 ELSE IF (lb==3 .OR. lb==4)
THEN
195 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
198 ELSE IF (lb==5 .OR. lb==6)
THEN
210 ibegsrc = ibegsrc + idirsrc
211 iendsrc = iendsrc + idirsrc
212 jbegsrc = jbegsrc + jdirsrc
213 jendsrc = jendsrc + jdirsrc
214 kbegsrc = kbegsrc + kdirsrc
215 kendsrc = kendsrc + kdirsrc
220 ibegsrc,iendsrc,jbegsrc,jendsrc,kbegsrc,kendsrc, &
225 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
226 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
230 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
233 IF (abs(dnodesrc(xcoord,ijknsrc)-dold(xcoord,ijkn))<1.e-30_rfreal &
234 .OR. abs(dnode(xcoord,ijkn)-dold(xcoord,ijkn))<1.e-30_rfreal)
THEN
235 dnode(xcoord,ijkn) = dold(xcoord,ijkn)
237 dnode(xcoord,ijkn) = 0.5_rfreal*(dnode(xcoord,ijkn)+ &
238 dnodesrc(xcoord,ijknsrc))
239 dnodesrc(xcoord,ijknsrc) = dnode(xcoord,ijkn)
241 IF (abs(dnodesrc(ycoord,ijknsrc)-dold(ycoord,ijkn))<1.e-30_rfreal &
242 .OR. abs(dnode(ycoord,ijkn)-dold(ycoord,ijkn))<1.e-30_rfreal)
THEN
243 dnode(ycoord,ijkn) = dold(ycoord,ijkn)
245 dnode(ycoord,ijkn) = 0.5_rfreal*(dnode(ycoord,ijkn)+ &
246 dnodesrc(ycoord,ijknsrc))
247 dnodesrc(ycoord,ijknsrc) = dnode(ycoord,ijkn)
249 IF (abs(dnodesrc(zcoord,ijknsrc)-dold(zcoord,ijkn))<1.e-30_rfreal &
250 .OR. abs(dnode(zcoord,ijkn)-dold(zcoord,ijkn))<1.e-30_rfreal)
THEN
251 dnode(zcoord,ijkn) = dold(zcoord,ijkn)
253 dnode(zcoord,ijkn) = 0.5_rfreal*(dnode(zcoord,ijkn)+ &
254 dnodesrc(zcoord,ijknsrc))
255 dnodesrc(zcoord,ijknsrc) = dnode(zcoord,ijkn)
258 IF (abs(dnodesrc(xcoord,ijknsrc)) > abs(dnode(xcoord,ijkn)))
THEN
259 region%levels(1)%grid%boundMoved(lb) = .true.
260 dnode(xcoord,ijkn) = dnodesrc(xcoord,ijknsrc)
262 IF (abs(dnodesrc(ycoord,ijknsrc)) > abs(dnode(ycoord,ijkn)))
THEN
263 region%levels(1)%grid%boundMoved(lb) = .true.
264 dnode(ycoord,ijkn) = dnodesrc(ycoord,ijknsrc)
266 IF (abs(dnodesrc(zcoord,ijknsrc)) > abs(dnode(zcoord,ijkn)))
THEN
267 region%levels(1)%grid%boundMoved(lb) = .true.
268 dnode(zcoord,ijkn) = dnodesrc(zcoord,ijknsrc)
277 ELSE IF (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri+bc_range)
THEN
283 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
285 dy = cosa*dnodesrc(ycoord,ijknsrc) - &
286 sina*dnodesrc(zcoord,ijknsrc)
287 dz = sina*dnodesrc(ycoord,ijknsrc) + &
288 cosa*dnodesrc(zcoord,ijknsrc)
290 dnode(xcoord,ijkn) = dold(xcoord,ijkn)
291 dnode(ycoord,ijkn) = dold(ycoord,ijkn)
292 dnode(zcoord,ijkn) = dold(zcoord,ijkn)
294 IF (abs(dnodesrc(xcoord,ijknsrc)) > abs(dnode(xcoord,ijkn)))
THEN
295 region%levels(1)%grid%boundMoved(lb) = .true.
296 dnode(xcoord,ijkn) = dnodesrc(xcoord,ijknsrc)
298 IF (abs(
dy) > abs(dnode(ycoord,ijkn)))
THEN
299 region%levels(1)%grid%boundMoved(lb) = .true.
300 dnode(ycoord,ijkn) =
dy
302 IF (abs(
dz) > abs(dnode(zcoord,ijkn)))
THEN
303 region%levels(1)%grid%boundMoved(lb) = .true.
304 dnode(zcoord,ijkn) =
dz
**********************************************************************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_getpatchdirection(patch, idir, jdir, kdir)
INTEGER function indijkmap(i, j, k, mapMat, iOffset, ijOffset)
subroutine registerfunction(global, funName, fileName)
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 jdir
**********************************************************************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 idir
**********************************************************************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_exchangednodecopy(region, regionSrc, patch, patchSrc, average, dNode, dNodeSrc)
**********************************************************************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 kdir
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
long double dot_product(pnt vec1, pnt vec2)
subroutine rflo_getpatchmapping(lb, lbs, l1SrcDir, l2SrcDir, align, idir, jdir, kdir, idirSrc, jdirSrc, kdirSrc, ibeg, iend, jbeg, jend, kbeg, kend, ibegSrc, iendSrc, jbegSrc, jendSrc, kbegSrc, kendSrc, mapMat)
**********************************************************************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)