Missing diagonals after subdomain assembly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The matrix produced by subdomain assembly seems to not (always) include diagonal entries. PETSc says:
[0]PETSC ERROR: -------
[0]PETSC ERROR: Object is in wrong state!
[0]PETSC ERROR: Matrix is missing diagonal entry in row 124!
[0]PETSC ERROR: -------
I don't use this functionality, maybe this is fine ("user error"). But since PETSc apparently consider a matrix with missing diagonals an error, dolfin should probably not produce them.
Reproduction: Put this at the end of the method test_subdomain_
A = assemble(a0)
def boundary(x): return False
bc = DirichletBC(V, Constant(0.0), boundary)
bc.apply(A)
Related branches
Changed in dolfin: | |
status: | New → Invalid |
Changed in dolfin: | |
importance: | Undecided → Medium |
milestone: | none → 1.1.0 |
status: | Opinion → Confirmed |
Changed in dolfin: | |
status: | Confirmed → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
I'm not sure this is a bug. There's no way we can prevent users from
assembling matrices with missing diagonal entries. Consider the
following example:
c = Expression("0.0") Constant( c*dot(grad( u), grad(v))*dx)
A = assemble(
That will give A = 0 which has all diagonal entries zero.
--
Anders
On Mon, Feb 06, 2012 at 10:47:33AM -0000, Joachim Haga wrote: ------- ------- Error Message ------- ------- ------- ------- ------- - ------- ------- ------- ------- ------- ------- ------- ------- ------- -- assembly_ meshdomains( ) in fem/python/ SystemAssembler .py. Notice that there is no
> Public bug reported:
>
> The matrix produced by subdomain assembly seems to not (always) include
> diagonal entries. PETSc says:
>
> [0]PETSC ERROR: -------
> [0]PETSC ERROR: Object is in wrong state!
> [0]PETSC ERROR: Matrix is missing diagonal entry in row 124!
> [0]PETSC ERROR: -------
>
> I don't use this functionality, maybe this is fine ("user error"). But
> since PETSc apparently consider a matrix with missing diagonals an
> error, dolfin should probably not produce them.
>
> Reproduction: Put this at the end of the method
> test_subdomain_
> test/unit/
> boundary active, so the problem isn't just that we're missing a diagonal
> we actually need for the DirichletBC.
>
> A = assemble(a0)
> def boundary(x): return False
> bc = DirichletBC(V, Constant(0.0), boundary)
> bc.apply(A)
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New
>