Hi Stefano, On 18/01/17 11:07 AM, Stefano Zampini wrote:
Perhaps this is a valid fix- if (missing) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"Matrix is missing diagonal entry in row %D",d); + if (missing) { + for (i=0; i<N; i++) { + if (rows[i] == d) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"Cannot insert diagonal value! Matrix is missing diagonal entry in row %D",d); + } + }
I think that d only contains the first row with missing diagonal..? I think missing diagonals should be checked one by one... Is that what you wanted ti write? Thanks! Eric
