63 REAL(RFREAL),
POINTER :: dnode(:,:)
65 TYPE(t_region
) :: region, regionsrc
69 INTEGER ::
i,
j,
k, ijkbuff
72 INTEGER :: bctype,
ibeg,
iend,
jbeg,
jend,
kbeg, kend, inoff, ijnoff, ijkn, &
73 ijknb, n1, n2, ndim, dest,
tag, request, ibnd, jbnd, kbnd
74 INTEGER :: lb, l1srcdir, l2srcdir, l1beg, l1end, l1step, l2beg, l2end, l2step
78 REAL(RFREAL) :: v1(3), v2(3)
79 REAL(RFREAL),
POINTER :: xyz(:,:)
85 global => region%global
88 'RFLO_ExchangeDnodeSend.F90' )
92 IF (regionsrc%active == off)
THEN
93 CALL
errorstop( global,err_srcregion_off,&
103 xyz => region%levels(1)%gridOld%xyz
111 bctype =
patch%bcType
118 ELSE IF (
patch%srcL1beg ==
patch%srcL1end)
THEN
119 IF (lb==1 .OR. lb==2)
THEN
124 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
127 ELSE IF (lb==3 .OR. lb==4)
THEN
129 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
135 ELSE IF (lb==5 .OR. lb==6)
THEN
144 v1(:) =
patch%l1VecSrc(:)
151 ELSE IF (
patch%srcL2beg ==
patch%srcL2end)
THEN
152 IF (lb==1 .OR. lb==2)
THEN
154 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
160 ELSE IF (lb==3 .OR. lb==4)
THEN
165 v2(:) = xyz(:,indijk(
ibeg,
jbeg,kend,inoff,ijnoff)) - &
168 ELSE IF (lb==5 .OR. lb==6)
THEN
177 v1(:) =
patch%l2VecSrc(:)
187 IF (lb==1 .OR. lb==2)
THEN
192 ELSE IF (lb == 2)
THEN
198 IF (l1srcdir > 0)
THEN
206 IF (l2srcdir > 0)
THEN
214 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
215 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
216 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
217 DO k=l2beg,l2end,l2step
218 DO j=l1beg,l1end,l1step
219 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
220 ijkbuff = ijkbuff + 1
221 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
222 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
223 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
228 IF (l1srcdir > 0)
THEN
236 IF (l2srcdir > 0)
THEN
244 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
245 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
246 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
247 DO j=l2beg,l2end,l2step
248 DO k=l1beg,l1end,l1step
249 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
250 ijkbuff = ijkbuff + 1
251 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
252 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
253 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
261 ELSE IF (lb==3 .OR. lb==4)
THEN
266 ELSE IF (lb == 4)
THEN
272 IF (l1srcdir > 0)
THEN
280 IF (l2srcdir > 0)
THEN
288 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
289 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
290 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
291 DO i=l2beg,l2end,l2step
292 DO k=l1beg,l1end,l1step
293 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
294 ijkbuff = ijkbuff + 1
295 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
296 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
297 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
302 IF (l1srcdir > 0)
THEN
310 IF (l2srcdir > 0)
THEN
318 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
319 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
320 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
321 DO k=l2beg,l2end,l2step
322 DO i=l1beg,l1end,l1step
323 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
324 ijkbuff = ijkbuff + 1
325 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
326 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
327 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
335 ELSE IF (lb==5 .OR. lb==6)
THEN
340 ELSE IF (lb == 6)
THEN
346 IF (l1srcdir > 0)
THEN
354 IF (l2srcdir > 0)
THEN
362 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
363 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
364 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
365 DO j=l2beg,l2end,l2step
366 DO i=l1beg,l1end,l1step
367 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
368 ijkbuff = ijkbuff + 1
369 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
370 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
371 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
376 IF (l1srcdir > 0)
THEN
384 IF (l2srcdir > 0)
THEN
392 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
393 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) .OR. &
394 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range))
THEN
395 DO i=l2beg,l2end,l2step
396 DO j=l1beg,l1end,l1step
397 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
398 ijkbuff = ijkbuff + 1
399 patch%mixt%sendBuff(ijkbuff ) = dnode(xcoord,ijkn)
400 patch%mixt%sendBuff(ijkbuff+ ndim) = dnode(ycoord,ijkn)
401 patch%mixt%sendBuff(ijkbuff+2*ndim) = dnode(zcoord,ijkn)
412 dest = regionsrc%procid
413 tag = regionsrc%localNumber + mpi_patchoff*
patch%srcPatch
414 CALL mpi_isend(
patch%mixt%sendBuff,3*ndim,mpi_rfreal,dest,
tag, &
415 global%mpiComm,global%requests(
patch%mixt%iRequest), &
417 IF (global%mpierr /= 0) CALL
errorstop( global,err_mpi_trouble,&
**********************************************************************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 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 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 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)
**********************************************************************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 rflo_exchangednodesend(region, regionSrc, patch, dNode)