/[MITgcm]/MITgcm_contrib/dgoldberg/code_cg3d_petsc/cg3d_petsc.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/code_cg3d_petsc/cg3d_petsc.F

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

revision 1.1 by dgoldberg, Fri Jul 1 20:40:30 2016 UTC revision 1.2 by dgoldberg, Sat Jul 2 17:48:26 2016 UTC
# Line 112  C     LOCAL VARIABLES Line 112  C     LOCAL VARIABLES
112    
113        cg3d_dofs_cum_sum(0) = 0        cg3d_dofs_cum_sum(0) = 0
114    
115        DO i=1,nPx*nPy*MAX_CG3D_PETSC_CPUINVERT-1        DO i=0,nPx*nPy*MAX_CG3D_PETSC_CPUINVERT-1
116         IF (i.le.cg3d_petsc_cpuInVert) THEN         IF (i.le.cg3d_petsc_cpuInVert) THEN
117          global_dofs = global_dofs + cg3d_dofs_process (i)          global_dofs = global_dofs + cg3d_dofs_process (i)
118          if (i.ge.1) then          if (i.ge.1) then
# Line 190  C     LOCAL VARIABLES Line 190  C     LOCAL VARIABLES
190        call VecAssemblyEnd(solution, ierr)        call VecAssemblyEnd(solution, ierr)
191    
192    
193    
194        if (cg3d_need2create_mat) then        if (cg3d_need2create_mat) then
195        CALL TIMER_START ('CG3D_PETSC_MATCREATE',myThid)        CALL TIMER_START ('CG3D_PETSC_MATCREATE',myThid)
196    
# Line 286  C     LOCAL VARIABLES Line 287  C     LOCAL VARIABLES
287             endif             endif
288             endif             endif
289    
290    
291             call matSetValues (matrix_petsc_cg3d, 1, dof_index, col_iter,             call matSetValues (matrix_petsc_cg3d, 1, dof_index, col_iter,
292       &                        indices_col,       &                        indices_col,
293       &                        mat_values,INSERT_VALUES,ierr)       &                        mat_values,INSERT_VALUES,ierr)
# Line 386  C     LOCAL VARIABLES Line 388  C     LOCAL VARIABLES
388        CALL TIMER_START ('CG3D_PETSC_SOLVE',myThid)        CALL TIMER_START ('CG3D_PETSC_SOLVE',myThid)
389    
390        call KSPSolve(ksp_cg3d, rhs, solution, ierr)        call KSPSolve(ksp_cg3d, rhs, solution, ierr)
391          
392    
393        CALL TIMER_STOP ('CG3D_PETSC_SOLVE',myThid)        CALL TIMER_STOP ('CG3D_PETSC_SOLVE',myThid)
394    
395        call KSPGetIterationNumber(ksp_cg3d,iters,ierr)        call KSPGetIterationNumber(ksp_cg3d,iters,ierr)
       print *, "GOT HERE CG3D PETSC SOLVE COMPLETE", iters  
396    
397        maxIter = iters        maxIter = iters
398    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22