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 |
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 |
|
|
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) |
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 |
|
|