3 |
|
|
4 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
5 |
|
|
6 |
|
CBOP |
7 |
|
|
8 |
|
C !ROUTINE: EXCH_Z_XY_RX |
9 |
|
|
10 |
|
C !INTERFACE: |
11 |
SUBROUTINE EXCH_Z_XY_RX( |
SUBROUTINE EXCH_Z_XY_RX( |
12 |
U phi, |
U phi, |
13 |
I myThid ) |
I myThid ) |
|
C /==========================================================\ |
|
|
C | SUBROUTINE EXCH_Z_XY_RX | |
|
|
C | o Handle exchanges for _RX, 2-dimensional arrays. | |
|
|
C |==========================================================| |
|
|
C | Do true shared-memory data transfers and "messaging" | |
|
|
C | tranfers for blocking case of data transfers. | |
|
|
C | Applications call this routine using | |
|
|
C | CALL EXCH..( x, myThid ) | |
|
|
C | where x is a two-dimensional array with overlaps. | |
|
|
C | This routine does true-shared-memory copies for blocks | |
|
|
C | within a thread. It will also do MPI meesaging between | |
|
|
C | different processes. | |
|
|
C | Note: | |
|
|
C | ===== | |
|
|
C | This routine is a default mode interface to the more | |
|
|
C | general exchange routine. Under default mode the | |
|
|
C | exchange is for an edge width of OLx, and OLy and | |
|
|
C | updates corner points as well as edges ( slightly more | |
|
|
C | synchronisation required). | |
|
|
C \==========================================================/ |
|
14 |
IMPLICIT NONE |
IMPLICIT NONE |
15 |
|
|
16 |
C === Global data === |
C !DESCRIPTION: |
17 |
|
C *==========================================================* |
18 |
|
C | SUBROUTINE EXCH_Z_XY_RX |
19 |
|
C | o Handle exchanges for _RX, 2-dim zeta coord array. |
20 |
|
C *==========================================================* |
21 |
|
C | Branch to correct exchange for particular grid operating |
22 |
|
C | on a zeta coord array. |
23 |
|
C *==========================================================* |
24 |
|
|
25 |
|
C !USES: |
26 |
|
C == Global variables == |
27 |
#include "SIZE.h" |
#include "SIZE.h" |
28 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
29 |
#include "EESUPPORT.h" |
#include "EESUPPORT.h" |
30 |
|
|
31 |
C === Routine arguments === |
C !INPUT/OUTPUT PARAMETERS: |
32 |
C phi - Array with overlap regions are to be exchanged |
C == Routine arguments == |
33 |
C Note - The interface to EXCH_RL assumes that |
C phi :: Array with overlap regions are to be exchanged |
34 |
C the standard Fortran 77 sequence association rules |
C Note - The interface to EXCH_RL assumes that |
35 |
C apply. |
C the standard Fortran 77 sequence association rules |
36 |
C myThid - My thread id. |
C apply. |
37 |
|
C myThid :: My thread id. |
38 |
_RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
39 |
INTEGER myThid |
INTEGER myThid |
|
CEndOfInterface |
|
40 |
|
|
41 |
|
C !LOCAL VARIABLES: |
42 |
C == Local variables == |
C == Local variables == |
43 |
C OL[wens] - Overlap extents in west, east, north, south. |
C OL[wens] :: Overlap extents in west, east, north, south. |
44 |
C exchWidth[XY] - Extent of regions that will be exchanged. |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
45 |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
46 |
|
CEOP |
47 |
|
|
48 |
OLw = OLx |
OLw = OLx |
49 |
OLe = OLx |
OLe = OLx |