Strange output on assembly with stable dolfin-1.2.0

Issue #115 invalid
Murtazo Nazarov created an issue

I am trying to assemble the following form:

element = FiniteElement("Lagrange", triangle, 1) u = TrialFunction(element) v = TestFunction(element) F = as_vector([1, 1]) a = inner(F,grad(u)) * v * dx

Then in C++ file I call:

UnitSquare mesh(1, 1); Test::FunctionSpace V(mesh); Test::BilinearForm a(V, V); Matrix A; assemble(A, a); info(A, true);

With dolfin-1.2.0 I get:

*** Warning: Verbose output for PETScMatrix not implemented, calling PETSc MatView directly. Matrix Object: 1 MPI processes type: seqaij

row 0: (0, 0) (1, 0.166667) (2, -0.166667) row 1: (0, 0) (1, 0.333333) (2, -0.333333) (3, 0) row 2: (0, 0) (1, 0.333333) (2, -0.333333) (3, 0) row 3: (1, 0.166667) (2, -0.166667) (3, 0)

<Matrix wrapper of >

while with dolfin-1.0.0+ I get:

*** Warning: Verbose output for PETScMatrix not implemented, calling PETSc MatView directly. Matrix Object: 1 MPI processes type: seqaij

row 0: (0, -0.333333) (1, 0) (2, 0) (3, 0.333333) row 1: (0, -0.166667) (1, 0) (3, 0.166667) row 2: (0, -0.166667) (2, 0) (3, 0.166667) row 3: (0, -0.333333) (1, 0) (2, 0) (3, 0.333333) <Matrix wrapper of >

Is it a bug or something else?

Comments (3)

  1. Murtazo Nazarov reporter

    Thank you, I did not know about that link.

    Anyway, it is a bit confusing to see zero elements on the matrix, shouldn't A be sparse?

  2. Log in to comment