[petsc-dev] [petsc-users] Solving Poisson equation with multigrid

Barry Smith bsmith at mcs.anl.gov
Wed May 29 23:30:25 CDT 2013


On May 29, 2013, at 11:05 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> Hong, I think this diagnostic output is unintuitive for a user that
> doesn't know this relation.  Shall we add the enum names to the output
> lines below?
> 
>    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_POSITIVE_DEFINITE) {
>      ierr = PetscViewerASCIIPrintf(viewer,"  using Manteuffel shift\n");CHKERRQ(ierr);
>    }
>    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_NONZERO) {
>      ierr = PetscViewerASCIIPrintf(viewer,"  using diagonal shift to prevent zero pivot\n");CHKERRQ(ierr);
>    }
>    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_INBLOCKS) {
>      ierr = PetscViewerASCIIPrintf(viewer,"  using diagonal shift on blocks to prevent zero pivot\n");CHKERRQ(ierr);
>    }

Could we also introduce something like MatFactorShiftTypesFull[] = {} strings rather than have ugly if code?

   Barry





More information about the petsc-dev mailing list