Hi Marco!

DOLFIN use SWIG to create Python wrappers. SWIG provides Octave wrappers
too. Are you going to use those?

http://www.swig.org/Doc2.0/SWIGDocumentation.html#Octave

SWIG use a flat namespace for the generated wrapper code, so you would
still have nameclashes for the Array class. However it will internally
keep all original C++ type information. SWIG also allows you to rename
any C++ entity, classes, functions, variables, methods, aso, to whatever
in the target language. You can then just tell SWIG to rename the
dolfin::Array to, let say, dolfin::ArrayDolfin.

Another challenge you might consider before you invest too much is to
figure out how you should integrate the code generation part of FEniCS.
For now that is handled by the Python packages of FFC, FIAT, UFL, and
parts of UFC. Because these are all in Python we have been able to
integrate these seamlessly (but not without bumps) with the Python
interface of DOLFIN. Doing this within octave will be challenging.

Johan



On 05/30/2013 01:27 AM, Anders Logg wrote:
> Hi Marco,
> 
> Interesting project.
> 
> The DOLFIN Array class is defined inside the namespace 'dolfin', so it
> shouldn't clash with the Octave version, unless that is imported into
> the global namespace in which case that needs to be fixed in Octave.
> 
> --
> Anders
> 
> 
> On Thu, May 30, 2013 at 01:18:04AM +0200, Marco Vassallo wrote:
>>    Hi everyone,
>>    my name is Marco and I'm working on the implementation of a
>>    Finite Elelment Library for Octave.
>>    The idea is to create wrappers in Octave for Dolfin, in a similar way
>>    to what it has
>>    been done for Phyton.
>>    Octave provides a Python interpreter, but we want to go directly from
>>    Octave
>>    to Dolfin instead of using it.
>>    So, first of all, I need to check the compatibility between Octave and
>>    Dolfin.
>>    I noted that, unfortunately, including in the same .h file both the
>>    Octave and
>>    Dolfin header file generates some error at compilation time because
>>    both
>>     Octave and Dolfin define a class "Array". Does anyone encountered
>>     a similar problem somewhere?
>>    As a first step, we want to write an Octave function for reading
>>    Dolfin mesh (.xml) and converting it into the Octave format. This
>>    function
>>    could be added to the msh package of forge-octave so that we could
>>    also use the features of the Dolfin Mesh class.
>>    I set up a blog for discussions/advices, if anyone of you is interested
>>    [1]http://gedeone-gsoc.blogspot.it/
>>    Marco V
>>
>> Referenser
>>
>>    1. http://gedeone-gsoc.blogspot.it/
> 
>> _______________________________________________
>> fenics mailing list
>> fenics@fenicsproject.org
>> http://fenicsproject.org/mailman/listinfo/fenics
> 
> _______________________________________________
> fenics mailing list
> fenics@fenicsproject.org
> http://fenicsproject.org/mailman/listinfo/fenics
> 

_______________________________________________
fenics mailing list
fenics@fenicsproject.org
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to