Comment 9 for bug 799513

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 799513] Re: Snow Leopard demos fail with Swig 2.0.4

On Wednesday September 14 2011 01:06:53 Johannes Ring wrote:
> I get the same error with the development version of SWIG.

Could you add these print statements:

=== modified file 'site-packages/dolfin/functions/functionspace.py'
--- site-packages/dolfin/functions/functionspace.py 2011-09-09 13:48:18
+0000
+++ site-packages/dolfin/functions/functionspace.py 2011-09-14 15:54:08
+0000
@@ -72,6 +72,11 @@
         ufc_element, ufc_dofmap = jit(self._ufl_element)

         # Instantiate DOLFIN FiniteElement and DofMap
+ print ufc_element
+ print
+ print ufc_element.__class__
+ print
+ print ufc_element.__class__.__bases__
         self._dolfin_element = cpp.FiniteElement(ufc_element)
         dolfin_dofmap = cpp.DofMap(ufc_dofmap, mesh)

And run demo_poisson.py and report the output?

I get:

<e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916.e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916.ffc_form_e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916_finite_element_0;
proxy of <Swig Object of type 'boost::shared_ptr<
ffc_form_e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916_finite_element_0 > *' at
0x347c3c0> >

<class
'e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916.e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916.ffc_form_e53cbae4a6d3a1b3b1083d8ac6088d0a4418b916_finite_element_0'>

(<class 'ufc.ufc.finite_element'>,)

Which indidacates it is a shared_ptr version of a ufc::finite_element.

Hopefully you get something different...

Johan