27 Oct
2010
27 Oct
'10
8:16 a.m.
On Wed, Oct 27, 2010 at 10:26, Benjamin Sanderse <[email protected]> wrote:
PetscInt iterations; ierr = KSPGetIterationNumber(ksp,&iterations);CHKERRQ(ierr); fd = PETSC_VIEWER_SOCKET_WORLD; ierr = PetscIntView(1,iterations,fd);CHKERRQ(ierr);
This is a type error (your compiler should have issued a warning), you want PetscIntView(1,&iterations,fd); because the prototype is PetscIntView(PetscInt,const PetscInt[],PetscViewer); Also see Barry's comment about reading it correctly. Jed