leaf_node() method of a Function object not acting correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
High
|
Johan Hake |
Bug Description
I'm encountering an error when trying to adapt the highest node of a hierarchical function object. I can adapt the function space and the mesh (and also the problem object which is not demonstrated below) using the .leaf_node() method but the function object is giving me problems. If I use u.child() instead of u.leaf_node() then it works, but then it has to be updated after the third adaptation.
Thanks
Mike
Demo code:
~~~~~~~~~~~
from dolfin import *
mesh = UnitSquare(2,2)
V = FunctionSpace(mesh, "Lagrange", 1) # Order 1 function space
u = Function(V)
print mesh.depth(), V.depth(), u.depth()
print mesh == mesh.leaf_node()
print mesh.leaf_node(), V.leaf_node(), u.leaf_node()
adapt(mesh) # Adapt mesh, new mesh assigned to bottom
adapt(V, mesh.leaf_node()) #Adapt V based on refined mesh
adapt(u,
print mesh.depth(), V.depth(), u.depth()
adapt(mesh.
adapt(V.
adapt(u.
#adapt(
print mesh.depth(), V.depth(), u.depth()
~~~~~~~
Related branches
Changed in fenics: | |
importance: | Undecided → High |
affects: | fenics → dolfin |
Changed in dolfin: | |
assignee: | nobody → Johan Hake (johan-hake) |
status: | Confirmed → Fix Committed |
milestone: | none → 1.2.0 |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
The corresponding C++ version (attached) runs as expected/correctly, indicating that this might be a Python wrapper issue...