Question about the use of assemble function
Hello,
I have a question about the use of the assemble function.
I have tested the following lines :
from dolfin import *
mesh = UnitSquareMesh(1,1)
mesh.cells()
>>
array([[0, 1, 3],
[0, 2, 3]], dtype=uint32)
The first cell is defined using the nodes 0 , 1 and 3, and the second using the nodes 0, 2 and 3
v=TestFunction(V)
u=TrialFunction(V)
a=inner(u,v)*dx()
A=assemble(a)
The value of the assembled matrix should be 0 for the entries (1;2) and (2;1), because the nodes 1 and 3 are not connected.
print A.array()
>> [[ 0.08333333 0.04166667 0.04166667 0. ]
[ 0.04166667 0.16666667 0.08333333 0.04166667]
[ 0.04166667 0.08333333 0.16666667 0.04166667]
[ 0. 0.04166667 0.04166667 0.08333333]]
The result is not what I expected. And I don't understand this matrix. "Hand computing" doesn't give the same result.
Any idea what the problem could be ?
I use the last version of dolfin, installed using dorsal, and "STABLE_BUID=false"
Thanks,
Erwan
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Blechta
- Solved:
- Last query:
- Last reply: