dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10952
Re: Problems in assemble.py
2008/12/4 Johan Hake <hake@xxxxxxxxx>:
> On Thursday 04 December 2008 20:44:20 Anders Logg wrote:
>> I have moved the jit function and the code from get_dolfin_form to
>> separate modules.
>>
>> The JIT compilation seems to work fine, but the _ufc_form member in
>> the generated dolfin::Form subclass seems to be zero. See comment at
>> the top of the the assemble function.
>>
>> Any ideas what goes wrong? If we get this working, we can remove most
>> of the code from assemble.py and reuse it also in pde.py.
>
> It is fixed now.
>
> This is the same problem we have with the compiled elements and dofmaps in
> FunctionSpace. You need to store a reference to the compiled form, otherwise
> swig will garbage collect the form when it goes out of scope, killing also
> the actuall cpp_ufc_form.
This is the kind of issue I'm hoping SWIGs shared_ptr bindings can help us with.
--
Martin
Follow ups
References