how to generate the swig input files?

  • Marc Dupont

    Marc Dupont - 2012-12-07

    Hello, I have two questions about the pythonflu project.

    First, can somebody give an overview which of the development takes place on , , and ?
    I have difficulties finding the most recent binary or source downloads.

    Secondly, it seems that the swig input files (*.cxx in the Foam directory within the pythonflu archive) are somehow derived from the OpenFOAM header files. Is this done using gccxml or some other automatic generator? Is the code (script?) for this step included somewhere in the pythonFlu downloads? I\'d appreciate if you could share it, because I need to build a simplified python library for OpenFOAM. This library should consist only of the book-keeping stuff (basically OpenFOAM/db/containers) and requires several changes to the swig input files.


  • Alexey Petrov

    Alexey Petrov - 2012-12-11

    pythonFlu does not use any automatic generators except SWIG itself. Each pythonFlu SWIG interface file was written by bare hands but follows some common rules. So, this might be the reason why it looks like pythonFlu uses some pre-SWIG code generator. Moreover, from our experience it is almost impossible to write such pre-SWIG OpenFOAM dedicted generator, because, in most cases, OpenFOAM classes need some special and personal treatment to be wrapped properly.

    pythonFlu already contains all the necessary OpenFOAM "book-keeping" stuff you could potentially need. So, I think, that pythonFlu will satisfy you as it is without any additional modifications. Just install and use it.

    Best regards,


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks