| 401 |
orientation will have \code{(0,1)}, whereas those in the opposite |
orientation will have \code{(0,1)}, whereas those in the opposite |
| 402 |
index direction will have \code{(0,-1)}. \\ |
index direction will have \code{(0,-1)}. \\ |
| 403 |
|
|
| 404 |
|
The arrays \varlink{exch2\_oi}{exch2_oi}, |
|
\varlink{exch2\_oi}{exch2_oi}, |
|
| 405 |
\varlink{exch2\_oj}{exch2_oj}, \varlink{exch2\_oi\_f}{exch2_oi_f}, and |
\varlink{exch2\_oj}{exch2_oj}, \varlink{exch2\_oi\_f}{exch2_oi_f}, and |
| 406 |
\varlink{exch2\_oj\_f}{exch2_oj_f} |
\varlink{exch2\_oj\_f}{exch2_oj_f} are indexed to tile number and |
| 407 |
|
neighbor and specify the relative offset within the subdomain of the |
| 408 |
|
array index of a variable going from a neighboring tile $N$ to a local |
| 409 |
|
tile $T$. Consider the six-tile case (Fig. \ref{fig:6tile}), where |
| 410 |
|
\code{exch2\_oi(1,1)=33}, \code{exch2\_oi(2,1)=0}, |
| 411 |
|
\code{exch2\_oi(3,1)=32}, and \code{exch2\_oi(4,1)=-32}. Each of these |
| 412 |
|
indicates the offset in the $x$ direction \\ |
| 413 |
|
|
| 414 |
|
Finally, \varlink{exch2\_itlo\_c}{exch2_itlo_c}, |
| 415 |
|
\varlink{exch2\_ithi\_c}{exch2_ithi_c}, |
| 416 |
|
\varlink{exch2\_jtlo\_c}{exch2_jtlo_c} and |
| 417 |
|
\varlink{exch2\_jthi\_c}{exch2_jthi_c} hold the location and index |
| 418 |
|
bounds of the edge segment of the neighbor tile \code{N}'s subdomain |
| 419 |
|
that gets exchanged with the local tile \code{T}. To take the example |
| 420 |
|
of tile \code{T=2} in the twelve-tile topology |
| 421 |
|
(Fig. \ref{fig:12tile}): \\ |
| 422 |
|
|
| 423 |
|
\begin{verbatim} |
| 424 |
|
exch2_itlo_c(4,2)=17 |
| 425 |
|
exch2_ithi_c(4,2)=17 |
| 426 |
|
exch2_jtlo_c(4,2)=0 |
| 427 |
|
exch2_jthi_c(4,2)=33 |
| 428 |
|
\end{verbatim} |
| 429 |
|
|
| 430 |
|
Here \code{N=4}, indicating the western neighbor, which is \code{Tn=1}. |
| 431 |
|
\code{Tn=1} resides on the same subdomain as \code{T=2}, so the tiles |
| 432 |
|
have the same orientation and the same $x$ and $y$ axes. The $i$ |
| 433 |
|
component is orthogonal to the western edge and the tile is 16 points |
| 434 |
|
wide, so \code{exch2\_itlo\_c} and \code{exch2\_ithi\_c} indicate the |
| 435 |
|
column beyond \code{Tn=1}'s eastern edge, in that tile's halo |
| 436 |
|
region. Since the border of the tiles extends through the entire |
| 437 |
|
height of the subdomain, the $y$ axis bounds \code{exch2\_jtlo\_c} to |
| 438 |
|
\code{exch2\_jthi\_c} cover the height, plus 1 in either direction to |
| 439 |
|
cover part of the halo. \\ |
| 440 |
|
|
| 441 |
|
For the north edge of the same tile \code{T=2} where \code{N=1} and |
| 442 |
|
the neighbor tile is \code{Tn=5}: |
| 443 |
|
|
| 444 |
|
\begin{verbatim} |
| 445 |
|
exch2_itlo_c(1,2)=0 |
| 446 |
|
exch2_ithi_c(1,2)=0 |
| 447 |
|
exch2_jtlo_c(1,2)=0 |
| 448 |
|
exch2_jthi_c(1,2)=17 |
| 449 |
|
\end{verbatim} |
| 450 |
|
|
| 451 |
|
\code{T}'s northern edge is parallel to the $x$ axis, but since |
| 452 |
|
\code{Tn}'s $y$ axis corresponds to \code{T}'s $x$ axis, |
| 453 |
|
\code{T}'s northern edge exchanges with \code{Tn}'s western edge. |
| 454 |
|
The western edge of the tiles corresponds to the lower bound of the |
| 455 |
|
$x$ axis, so \code{exch2\_itlo\_c} \code{exch2\_ithi\_c} are \code{0}. The |
| 456 |
|
range of \code{exch2\_jtlo\_c} and \code{exch2\_jthi\_c} correspond to the |
| 457 |
|
width of \code{T}'s northern edge, plus the halo. \\ |
| 458 |
|
|
|
This needs some diagrams. \\ |
|
| 459 |
|
|
| 460 |
|
|
| 461 |
{\footnotesize |
|
| 462 |
\begin{verbatim} |
|
| 463 |
C exch2_pi :: X index row of target to source permutation |
|
| 464 |
C :: matrix for each neighbour entry. |
|
| 465 |
C exch2_pj :: Y index row of target to source permutation |
|
| 466 |
C :: matrix for each neighbour entry. |
|
| 467 |
C exch2_oi :: X index element of target to source |
|
| 468 |
C :: offset vector for cell-centered quantities |
|
| 469 |
C :: of each neighbor entry. |
This needs some diagrams. \\ |
|
C exch2_oj :: Y index element of target to source |
|
|
C :: offset vector for cell-centered quantities |
|
|
C :: of each neighbor entry. |
|
|
C exch2_oi_f :: X index element of target to source |
|
|
C :: offset vector for face quantities |
|
|
C :: of each neighbor entry. |
|
|
C exch2_oj_f :: Y index element of target to source |
|
|
C :: offset vector for face quantities |
|
|
C :: of each neighbor entry. |
|
|
\end{verbatim} |
|
|
} |
|
| 470 |
|
|
| 471 |
|
|
| 472 |
|
|