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

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

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

revision 1.33 by adcroft, Tue May 29 14:01:36 2001 UTC revision 1.34 by cnh, Wed Sep 26 18:09:14 2001 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
6    CBOP
7    C     !ROUTINE: CG2D
8    C     !INTERFACE:
9        SUBROUTINE CG2D(          SUBROUTINE CG2D(  
10       I                cg2d_b,       I                cg2d_b,
11       U                cg2d_x,       U                cg2d_x,
# Line 10  C $Name$ Line 13  C $Name$
13       O                lastResidual,       O                lastResidual,
14       U                numIters,       U                numIters,
15       I                myThid )       I                myThid )
16  C     /==========================================================\  C     !DESCRIPTION: \bv
17  C     | SUBROUTINE CG2D                                          |  C     *==========================================================*
18  C     | o Two-dimensional grid problem conjugate-gradient        |  C     | SUBROUTINE CG2D                                          
19  C     |   inverter (with preconditioner).                        |  C     | o Two-dimensional grid problem conjugate-gradient        
20  C     |==========================================================|  C     |   inverter (with preconditioner).                        
21  C     | Con. grad is an iterative procedure for solving Ax = b.  |  C     *==========================================================*
22  C     | It requires the A be symmetric.                          |  C     | Con. grad is an iterative procedure for solving Ax = b.  
23  C     | This implementation assumes A is a five-diagonal         |  C     | It requires the A be symmetric.                          
24  C     | matrix of the form that arises in the discrete           |  C     | This implementation assumes A is a five-diagonal          
25  C     | representation of the del^2 operator in a                |  C     | matrix of the form that arises in the discrete            
26  C     | two-dimensional space.                                   |  C     | representation of the del^2 operator in a                
27  C     | Notes:                                                   |  C     | two-dimensional space.                                    
28  C     | ======                                                   |  C     | Notes:                                                    
29  C     | This implementation can support shared-memory            |  C     | ======                                                    
30  C     | multi-threaded execution. In order to do this COMMON     |  C     | This implementation can support shared-memory              
31  C     | blocks are used for many of the arrays - even ones that  |  C     | multi-threaded execution. In order to do this COMMON      
32  C     | are only used for intermedaite results. This design is   |  C     | blocks are used for many of the arrays - even ones that    
33  C     | OK if you want to all the threads to collaborate on      |  C     | are only used for intermedaite results. This design is    
34  C     | solving the same problem. On the other hand if you want  |  C     | OK if you want to all the threads to collaborate on        
35  C     | the threads to solve several different problems          |  C     | solving the same problem. On the other hand if you want    
36  C     | concurrently this implementation will not work.          |  C     | the threads to solve several different problems            
37  C     \==========================================================/  C     | concurrently this implementation will not work.          
38        IMPLICIT NONE  C     *==========================================================*
39    C     \ev
40    
41    C     !USES:
42          IMPLICIT NONE
43  C     === Global data ===  C     === Global data ===
44  #include "SIZE.h"  #include "SIZE.h"
45  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 42  C     === Global data === Line 48  C     === Global data ===
48  #include "CG2D.h"  #include "CG2D.h"
49  #include "SURFACE.h"  #include "SURFACE.h"
50    
51    C     !INPUT/OUTPUT PARAMETERS:
52  C     === Routine arguments ===  C     === Routine arguments ===
53  C     myThid    - Thread on which I am working.  C     myThid    - Thread on which I am working.
54  C     cg2d_b    - The source term or "right hand side"  C     cg2d_b    - The source term or "right hand side"
# Line 57  C                 Exit:  the actual numb Line 64  C                 Exit:  the actual numb
64        INTEGER numIters        INTEGER numIters
65        INTEGER myThid        INTEGER myThid
66    
67    C     !LOCAL VARIABLES:
68  C     === Local variables ====  C     === Local variables ====
69  C     actualIts      - Number of iterations taken  C     actualIts      - Number of iterations taken
70  C     actualResidual - residual  C     actualResidual - residual
# Line 92  C     I, J, N     - Loop counters ( N co Line 100  C     I, J, N     - Loop counters ( N co
100        INTEGER exchWidthX        INTEGER exchWidthX
101        INTEGER exchWidthY        INTEGER exchWidthY
102        INTEGER myNz        INTEGER myNz
103    CEOP
104    
105    
106  CcnhDebugStarts  CcnhDebugStarts

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.22