[petsc-users] Near nullspace lost in fieldsplit

Barry Smith bsmith at petsc.dev
Mon Feb 12 08:51:56 CST 2024


   7279 does change the code for MatZeroRowsColumns_MPIAIJ(). But perhaps that does not resolve the problem you are seeing? If that is the case we will need a reproducible example so we can determine exactly what else is happening in your code to cause the difficulties. 

Here is the diff for  MatZeroRowsColumns_MPIAIJ()

@@ -1026,7 +1023,7 @@ static PetscErrorCode MatZeroRowsColumns_MPIAIJ(Mat A, PetscInt N, const PetscIn
   PetscCall(PetscFree(lrows));
 
   /* only change matrix nonzero state if pattern was allowed to be changed */
-  if (!((Mat_SeqAIJ *)(l->A->data))->keepnonzeropattern) {
+  if (!((Mat_SeqAIJ *)(l->A->data))->nonew) {
     PetscObjectState state = l->A->nonzerostate + l->B->nonzerostate;
     PetscCall(MPIU_Allreduce(&state, &A->nonzerostate, 1, MPIU_INT64, MPI_SUM, PetscObjectComm((PetscObject)A)));
   }




> On Feb 12, 2024, at 7:02 AM, Jeremy Theler (External) <jeremy.theler-ext at ansys.com> wrote:
> 
> Hi Barry
> 
> >   The bug fix for 2 is availabel in https://gitlab.com/petsc/petsc/-/merge_requests/7279
> 
> Note that our code goes through   MatZeroRowsColumns_MPIAIJ() not through MatZeroRows_MPIAIJ() so this fix does not change anything for the case I mentioned.
> 
> --
> jeremy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240212/11901baf/attachment-0001.html>


More information about the petsc-users mailing list