On Monday, 21 September 2015, Martin Sandve Alnæs <[email protected]>
wrote:

> Try running ./cmake/scripts/generate-swig-interface and then
> fenics-install-component.sh. This is not fully automated, unfortunately.
> Otherwise try searching for e.g. assemble in .i files under dolfin/swig/ to
> find if that function is handled in some particular way.
>

It may need special handling to JIT the forms, so also look at the Python
code under site-packages/.

Garth



> Martin
> 21. sep. 2015 20:24 skrev "Tormod Landet" <[email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>>:
>
>> Hi,
>>
>> this is probably trivial, but I have looked and not found an obvious
>> place to add a new function to be wrapped with swig. I added the header
>> to the dolfin_fem.h file, and reran the fenics-install-component.sh
>> script which regenerates swig interfaces (as far as I understand). The
>> file gets compiled on make install, but I cannot find it in the dolfin
>> Python namespace afterwards.
>>
>> The code is in a branch at
>>
>> https://bitbucket.org/trlandet/dolfin/commits/a7e0e63ca0e4a0fe47012b0c6ec79f529520fbbf
>>
>> Background: for ease of testing and prototyping I want to expose
>> LocalAssembler as "assemble_local(form_a, cell) -> ndarray". I have
>> figured out that returning Array<double> and then reshaping on the
>> Python side may be a possible path, but as the function does not show up
>> in Python so I have not managed to test this.
>>
>> --
>> Tormod Ravnanger Landet
>>   Stipendiat - fluidmekanikk
>>   Matematisk institutt
>>   Universitetet i Oslo
>>
>>
>> _______________________________________________
>> fenics mailing list
>> [email protected]
>> <javascript:_e(%7B%7D,'cvml','[email protected]');>
>> http://fenicsproject.org/mailman/listinfo/fenics
>>
>

-- 
Garth N. Wells
Department of Engineering, University of Cambridge
http://www.eng.cam.ac.uk/~gnw20
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to