On 30 May 2013 09:34, Johan Hake <[email protected]> wrote: > 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. To say the least... I'd say it's close to impossible to get the same level of integration with just in time compilation as we have in python. However if it's possible to wrap pregenerated forms (i.e. header files generated by running ffc on the commandline) it could be useful to assemble matrices directly in octave for analysing eigenvalues etc. In some older internal code here at Simula we had the concept of a "matrix factory" which could assemble common matrices from a number of pregenerated form files, e.g. mass, stiffness, convection etc. Martin 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 > >> [email protected] > >> http://fenicsproject.org/mailman/listinfo/fenics > > > > _______________________________________________ > > fenics mailing list > > [email protected] > > http://fenicsproject.org/mailman/listinfo/fenics > > > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
