← Back to team overview

dolfin team mailing list archive

Re: SWIG 2.0.2

 


On 10/03/11 15:57, Johan Hake wrote:
> On Thursday March 10 2011 07:42:13 Garth N. Wells wrote:
>> On 10/03/11 15:40, Johan Hake wrote:
>>> On Thursday March 10 2011 04:47:13 Garth N. Wells wrote:
>>>> The DOLFIN Python interface won't build with SWIG 2.0.2. This issue is
>>>> that SWIG 2.0.2 demands that if a shared pointer is declared for a
>>>> class, then all classes in the class hierarchy must be declared as
>>>> shared pointers.
>>>
>>> This has always been the case. It might be that we previously got away
>>> with it.
>>>
>>>> I've done this, but there are two sticking points:
>>>>  - Unit tests fail for MeshFunctions. I expect that this is related to
>>>>
>>>> the SWIG magic that has been implemented for templated MeshFunctions.
>>>
>>> Has something changed for MeshFunctions?
>>
>> I'm digging more, and it seems that VertexFunction is the culprit. The
>> other named MeshFunctions seem ok.
>>
>>>> - SWIG reports:
>>>>   Warning 520: Base class 'ufc::function' of 'Foo' is not similarly
>>>>   marked as a smart pointer.
>>>>
>>>> I don't understand this because I added '%shared_ptr(ufc::function)' to
>>>> UFC.
>>>
>>> It looks like we need to include
>>>
>>>   %shared_ptr(ufc::function)
>>>
>>> in shared_ptr_classes.i too. We already have:
>>>   %shared_ptr(ufc::form)
>>
>> I tried that, but have looked in much depth because I got stuck with the
>> MeshFunctions.
> 
> Ok, I need to merge the swig binary stuff before I can have alook. Will do 
> that later today.
> 

I'll leave it to you - it seems that almost everything breaks
(MeshFunctions are just the start), so some serious SWIG skill is required.

Garth


>>> Johan
>>>
>>>
>>>
>>> I will see if a minimal example regenerates the error.
>>>
>>>> The almost working branch is at
>>>>
>>>>     lp:~dolfin-core/dolfin/wells
>>>>
>>>> Garth
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dolfin
>>>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dolfin
>>>> More help   : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dolfin
>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dolfin
>> More help   : https://help.launchpad.net/ListHelp



Follow ups

References