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.
>
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: NONZERO_ ALLOCATION_ ERR, PETSC_TRUE);
> MatSetOption(*A, MAT_NEW_
> 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- diagonalentries ) that includes the diagonal in the
> magma/dolfin/
> 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, /bugs.launchpad .net/bugs/ 927539 /bugs.launchpad .net/dolfin/ +bug/927539/ +subscriptions
> 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:/
>
> Title:
> Missing diagonals after subdomain assembly
>
> To manage notifications about this bug go to:
> https:/