← Back to team overview

dolfin team mailing list archive

Re: Fwd: [Branch ~dolfin-core/dolfin/main] Rev 4695: Add parameter "use_ident" in DirichletBC. Default value is true (same

 

On Sat, Apr 24, 2010 at 03:35:33PM +0200, Andre Massing wrote:
>
>
> 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?
> >>>>
> >>>>Garth
> >>>Yes, 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#MatZeroRowsIS
>
> and 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?

I don't remember. We've had it there for a long time.

Does anyone know why it's there?

--
Anders

Attachment: signature.asc
Description: Digital signature


References