/[MITgcm]/MITgcm/model/src/solve_for_pressure.F
ViewVC logotype

Diff of /MITgcm/model/src/solve_for_pressure.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.18 by jmc, Thu Mar 8 20:40:57 2001 UTC revision 1.19 by adcroft, Fri Mar 9 20:45:09 2001 UTC
# Line 40  C     cg2d_b - Conjugate Gradient 2-D so Line 40  C     cg2d_b - Conjugate Gradient 2-D so
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)
# Line 142  C Western boundary Line 144  C Western boundary
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)

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.22