40 |
_RS vf(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
_RS vf(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
41 |
_RL cg2d_x(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL cg2d_x(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
42 |
_RL cg2d_b(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL cg2d_b(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
43 |
|
_RL tolerance,residual |
44 |
|
INTEGER numIters |
45 |
|
|
46 |
C-- Save previous solution & Initialise Vector solution and source term : |
C-- Save previous solution & Initialise Vector solution and source term : |
47 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
144 |
C-- Find the surface pressure using a two-dimensional conjugate |
C-- Find the surface pressure using a two-dimensional conjugate |
145 |
C-- gradient solver. |
C-- gradient solver. |
146 |
C see CG2D_INTERNAL.h for the interface to this routine. |
C see CG2D_INTERNAL.h for the interface to this routine. |
147 |
|
tolerance=cg2dTargetResidual |
148 |
|
residual=0. |
149 |
|
numIters=cg2dMaxIters |
150 |
CALL CG2D( |
CALL CG2D( |
151 |
I cg2d_b, |
I cg2d_b, |
152 |
U cg2d_x, |
U cg2d_x, |
153 |
|
U tolerance, |
154 |
|
U residual, |
155 |
|
U numIters, |
156 |
I myThid ) |
I myThid ) |
|
|
|
157 |
_EXCH_XY_R8(cg2d_x, myThid ) |
_EXCH_XY_R8(cg2d_x, myThid ) |
158 |
|
|
159 |
|
_BEGIN_MASTER( myThid ) |
160 |
|
WRITE(0,'(A,I6,1PE30.14)') ' CG2D iters, err = ', |
161 |
|
& 0, tolerance |
162 |
|
WRITE(0,'(A,I6,1PE30.14)') ' CG2D iters, err = ', |
163 |
|
& numIters, residual |
164 |
|
_END_MASTER( ) |
165 |
|
|
166 |
C-- Transfert the 2D-solution to "etaN" : |
C-- Transfert the 2D-solution to "etaN" : |
167 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
168 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |