1. petsc
  2. PETSc
  3. petsc-hg

Commits

Jed Brown  committed 48dd41c Merge

Merge branch 'jed/fix-pcview-fieldsplit-early'

* jed/fix-pcview-fieldsplit-early:
PCView_FieldSplit_Schur: fix crash on view before setup

  • Participants
  • Parent commits 3d1160e, 7828be9
  • Branches default

Comments (0)

Files changed (1)

File src/ksp/pc/impls/fieldsplit/fieldsplit.c

View file
     if (jac->kspupper != jac->head->ksp) {
       ierr = PetscViewerASCIIPrintf(viewer,"KSP solver for upper A00 in upper triangular factor \n");CHKERRQ(ierr);
       ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-      ierr = KSPView(jac->kspupper,viewer);CHKERRQ(ierr);
+      if (jac->kspupper) {ierr = KSPView(jac->kspupper,viewer);CHKERRQ(ierr);}
+      else {ierr = PetscViewerASCIIPrintf(viewer,"  not yet available\n");CHKERRQ(ierr);}
       ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
     }
     ierr = PetscViewerASCIIPrintf(viewer,"KSP solver for S = A11 - A10 inv(A00) A01 \n");CHKERRQ(ierr);