← Back to team overview

dolfin team mailing list archive

Re: PyDOLFIN %includes

 

On Sun, Apr 15, 2007 at 01:29:20AM +0200, Johan Jansson wrote:
> > I have modified the way PyDOLFIN includes the interface files in
> > dolfin.i. There is now a line
> >
> >     %include "dolfin_headers.h"
> >
> > The file dolfin_headers.h is generated using the script generate.py
> > which extracts all the dolfin headers from all the dolfin_foo.h files
> > under src/kernel. This should mean that we don't need to give the
> > -includeall flag to SWIG.
> >
> > Johan, could you take a look at this and see if it looks like a good
> > idea?
> >
> > /Anders
> 
> One advantage of the -includeall method is that it includes the headers in
> the correct order (in the dependency order). I have to go back and check
> how important this really is, but as far as I remember this was a
> necessary condition for generating the interface properly. But perhaps
> it's simple to generate the list in the correct order.

What we need to do is to

1. Minimize the number of .h files included in the dolfin_foo.h files.

This is done for ODE but needs to be done for all other libraries. We
currently have 133 includes in dolfin_headers.h but could reduce this
to say 20-30.

2. When 1 is done, it will be easy to order the include files in the
dolfin_foo.h files so that they are in the right order.

/Anders


> The advantage with a generated header list is that it gives much more
> control of what to include/exclude, so I agree that it's desirable.
> 
>   Johan
> 
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


References