Commits

Stefano Zampini committed 51cb09f

PCBDDC: using MatIsSymmetricKnown for symmetry checking will never break codes

Comments (0)

Files changed (1)

src/ksp/pc/impls/bddc/bddcprivate.c

   }
 
   /* compute other basis functions for non-symmetric problems */
-  ierr = MatIsSymmetric(pc->pmat,0.,&pcbddc->issym);CHKERRQ(ierr);
+  /*ierr = MatIsSymmetric(pc->pmat,0.,&pcbddc->issym);CHKERRQ(ierr);*/
+  { /* this is a temporary workaround since seqbaij matrices does not have support for symmetry checking */
+    PetscBool setsym;
+    ierr = MatIsSymmetricKnown(pc->pmat,&setsym,&pcbddc->issym);CHKERRQ(ierr);
+    if (!setsym) pcbddc->issym = PETSC_FALSE;
+  }
+
   if (!pcbddc->issym) {
     if (!pcbddc->coarse_psi_B) {
       ierr = MatCreate(PETSC_COMM_SELF,&pcbddc->coarse_psi_B);CHKERRQ(ierr);