Thread Previous • Date Previous • Date Next • Thread Next |
Anders Logg wrote:
On Fri, Apr 23, 2010 at 10:44:19AM +0100, Garth N. Wells wrote:Anders Logg wrote:On Fri, Apr 23, 2010 at 09:34:16AM +0100, Garth N. Wells wrote:This sounds very PETSc-speecific. Should it be a parameter of PETScMatrix only? GarthYes, perhaps. I find it a bit strange that MatZeroRows breaks for rows without elements.Send a PETSc bug report?Yes, that might be the best option.A solution would be to check the number of row entries, if possible.I also though of that but didn't find a fast way to check it. Perhaps I've overlooked some PETSc function that does this?
I checked the PETSc doc and the DOLFIN code and and setting the parameter in dolfin/la/PETScMatrix.cpp
MatSetOption(*A, MAT_KEEP_ZEROED_ROWS, PETSC_TRUE); causes to the MatZeroRowIS function not to the change the nonzero structure: http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetOption.html#MatSetOption and http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatZeroRowsIS.html#MatZeroRowsISand seems therefore (in our case) to throw an error if you want to add a nonzero value to a zero diagonal entry.
Just tested it here and it went fine without setting use_ident=false. What is the reason for setting this option? -- Andre
-- Anders ------------------------------------------------------------------------ _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@xxxxxxxxxxxxxxxxxxx Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp
Thread Previous • Date Previous • Date Next • Thread Next |