dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #21175
Hierarchical wrapping troubles
Something seems to go wrong with the Hierarchical Python wrappers.
C++ program:
UnitSquare mesh(3, 3);
mesh._debug();
Output:
Debugging hierarchical object.
has_parent() = 0
_parent.get() = 0
_parent.count() = 0
has_child() = 0
_child.get() = 0
_child.count() = 0
Debugging hierarchical object.
has_parent() = 0
_parent.get() = 0
_parent.count() = 0
has_child() = 0
_child.get() = 0
_child.count() = 0
Python program:
mesh = UnitSquare(3, 3)
mesh._debug()
Debugging hierarchical object.
has_parent() = 0
_parent.get() = 0
_parent.count() = 0
has_child() = 0
_child.get() = 0
_child.count() = 0
Debugging hierarchical object.
has_parent() = 1
_parent.get() = cbd47290
_parent.count() = -878438560
has_child() = 1
_child.get() = cbd47290
_child.count() = -878438560
The first call to Hierarchical::_debug is made from the constructor of
Hierarchical and is correct in both C++ and Python, but then the
Python object seems to lose contact with the reality.
--
Anders
Follow ups