Comment 13 for bug 927539

Revision history for this message
Garth Wells (garth-wells) wrote : Re: [Bug 927539] Re: Missing diagonals after subdomain assembly

On 22 July 2012 01:14, Cian Wilson <email address hidden> wrote:
> Afraid this problem has arisen for me again. My previous solution depended on being able to not finalize the tensor then add the zeros in after the first assembly but before collapsing the sparsity.

Did you try using the setting the assembler argument

   bool finalize_tensor

to false? This would only work for PETSc anyway at the moment.

> The addition of:
> MatSetOption(*A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_TRUE);
> in PetscMatrix::init in r6784-5 has meant that this is no longer possible.
>

I set this since it has become the default in PETSc 3.3. It also helps
catch issues that can have a major impact on efficiency.

> I've had another go at implementing a fix (see lp:~ldeo-
> magma/dolfin/diagonalentries ) that includes the diagonal in the
> sparsity and sets zeros in the matrix to ensure they're not collapsed
> out. It's controlled by the parameter keep_diagonal, which can be
> passed into any assembly routine (that calls init_global_tensor) but
> defaults to the current behaviour (false). This is all based on the
> changes to incorporate periodic bcs into the sparsity.
>

Thanks. I'll take a look shortly.

Garth

> Cheers,
> Cian
>
> ** Branch unlinked: lp:~ldeo-magma/dolfin/diag
>
> ** Branch linked: lp:~ldeo-magma/dolfin/diagonalentries
>
> --
> You received this bug notification because you are a member of DOLFIN
> Core Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/927539
>
> Title:
> Missing diagonals after subdomain assembly
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/927539/+subscriptions