<div dir="ltr"><div>You need set 0.0 to the diagonals.</div>Diagonal storage is used in PETSc library.<div><br></div><div>Hong<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 10:11 AM, Kong, Fande <span dir="ltr"><<a href="mailto:fande.kong@inl.gov" target="_blank">fande.kong@inl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Developers,<br><br></div>Any reason to force users provide a matrix which does not miss any diagonal entries when using a LU-type solver? <br><br>Sometime, it is impossible to have all diagonal entries in a matrix, that is, the matrix has to miss some diagonal entries. For example, there is a saddle-point matrix from the discretization of incomprehensible equations, and the lower part of the matrix is a zero block. The matrix usually looks like:<br><br></div>| A B^T |<br></div>| B 0 |<br><div><div><br><br></div><div><div><div><br><br><br>[56]PETSC ERROR: Object is in wrong state<br>[56]PETSC ERROR: Matrix is missing diagonal entry 33<br>[56]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html</a> for trouble shooting.<br>[56]PETSC ERROR: Petsc Release Version 3.6.2, unknown <br>[56]PETSC ERROR: ./fluid on a arch-linux2-cxx-opt named ys0755 by fandek Mon Oct 17 17:06:08 2016<br>[56]PETSC ERROR: Configure options --with-clanguage=cxx --with-shared-libraries=1 --download-fblaslapack=1 --with-mpi=1 --download-parmetis=1 --download-metis=1 --with-netcdf=1 --download-exodusii=1 --with-hdf5=1 --with-debugging=no --with-c2html=0 --with-64-bit-indices=1 --download-hypre=1 --download-superlu_dist=1<br>[56]PETSC ERROR: #1 MatILUFactorSymbolic_SeqAIJ() line 1729 in /petsc_installed/petsc/src/<wbr>mat/impls/aij/seq/aijfact.c<br>[56]PETSC ERROR: #2 MatILUFactorSymbolic() line 6457 in /petsc_installed/petsc/src/<wbr>mat/interface/matrix.c<br>[56]PETSC ERROR: #3 PCSetUp_ILU() line 204 in /petsc_installed/petsc/src/<wbr>ksp/pc/impls/factor/ilu/ilu.c<br>[56]PETSC ERROR: #4 PCSetUp() line 983 in /petsc_installed/petsc/src/<wbr>ksp/pc/interface/precon.c<br>[56]PETSC ERROR: #5 KSPSetUp() line 332 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itfunc.c<br>[56]PETSC ERROR: #6 PCSetUpOnBlocks_ASM() line 405 in /petsc_installed/petsc/src/<wbr>ksp/pc/impls/asm/asm.c<br>[56]PETSC ERROR: #7 PCSetUpOnBlocks() line 1016 in /petsc_installed/petsc/src/<wbr>ksp/pc/interface/precon.c<br>[56]PETSC ERROR: #8 KSPSetUpOnBlocks() line 167 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itfunc.c<br>[56]PETSC ERROR: #9 KSPSolve() line 552 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itfunc.c<br>[56]PETSC ERROR: #10 PCApply_LSC() line 83 in /petsc_installed/petsc/src/<wbr>ksp/pc/impls/lsc/lsc.c<br>[56]PETSC ERROR: #11 PCApply() line 483 in /petsc_installed/petsc/src/<wbr>ksp/pc/interface/precon.c<br>[56]PETSC ERROR: #12 KSP_PCApply() line 242 in /petsc_installed/petsc/<wbr>include/petsc/private/kspimpl.<wbr>h<br>[56]PETSC ERROR: #13 KSPSolve_PREONLY() line 26 in /petsc_installed/petsc/src/<wbr>ksp/ksp/impls/preonly/preonly.<wbr>c<br>[56]PETSC ERROR: #14 KSPSolve() line 604 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itfunc.c<br>[56]PETSC ERROR: #15 PCApply_FieldSplit_Schur() line 904 in /petsc_installed/petsc/src/<wbr>ksp/pc/impls/fieldsplit/<wbr>fieldsplit.c<br>[56]PETSC ERROR: #16 PCApply() line 483 in /petsc_installed/petsc/src/<wbr>ksp/pc/interface/precon.c<br>[56]PETSC ERROR: #17 KSP_PCApply() line 242 in /petsc_installed/petsc/<wbr>include/petsc/private/kspimpl.<wbr>h<br>[56]PETSC ERROR: #18 KSPInitialResidual() line 63 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itres.c<br>[56]PETSC ERROR: #19 KSPSolve_GMRES() line 235 in /petsc_installed/petsc/src/<wbr>ksp/ksp/impls/gmres/gmres.c<br>[56]PETSC ERROR: #20 KSPSolve() line 604 in /petsc_installed/petsc/src/<wbr>ksp/ksp/interface/itfunc.c<br>[56]PETSC ERROR: #21 SNESSolve_NEWTONLS() line 233 in /petsc_installed/petsc/src/<wbr>snes/impls/ls/ls.c<br>[56]PETSC ERROR: #22 SNESSolve() line 3906 in /petsc_installed/petsc/src/<wbr>snes/interface/snes.c<br><br><br></div><div>Thanks,<br></div><div><br></div><div>Fande Kong,<br></div></div></div></div></div>
</blockquote></div><br></div></div></div>