dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #12416
Re: [HG DOLFIN] merge.
On Friday 27 February 2009 16:00:41 Garth N. Wells wrote:
> Johan Hake wrote:
> > On Friday 27 February 2009 13:42:52 DOLFIN wrote:
> >> One or more new changesets pushed to the primary dolfin repository.
> >> A short summary of the last three changesets is included below.
> >>
> >> changeset: 5778:4d9f505f298acd3327677601d0fe858c0916c6a9
> >> tag: tip
> >> parent: 5776:8f64dec384552dd82130220dfcc25352bb819917
> >> parent: 5777:4c4ea64dbf83d200a2ac63329386ca9d49408a2c
> >> user: "Garth N. Wells <gnw20@xxxxxxxxx>"
> >> date: Fri Feb 27 12:42:47 2009 +0000
> >> files:
> >> description:
> >> merge.
> >>
> >>
> >> changeset: 5777:4c4ea64dbf83d200a2ac63329386ca9d49408a2c
> >> parent: 5774:4f322c1719204d28fb5a0ec319f6fc57edec68bf
> >> user: "Garth N. Wells <gnw20@xxxxxxxxx>"
> >> date: Fri Feb 27 12:42:12 2009 +0000
> >> files: dolfin/mesh/dolfin_mesh.h dolfin/swig/dolfin_docstrings.i
> >> dolfin/swig/dolfin_headers.i description:
> >> Fix order of files in dolfin_mesh.h to avoid some Python demo errros.
> >
> > Thanks!
> >
> > These errors are subtle...
>
> Indeed, trial and error seems to be the only way.
One option, which probably is not an option, is to use 'dolfin::' before all
dolfin defined types in all .h files. Then swig will figure out the right
types anyway, but readability of the .h files will drastically go down.
There are also a way to debug this by looking at the TYPES TABLE in the swig
generated cpp_wrap.cc file, for us it starts around line ~3120. Here swig
defines all known types. The types defined in dolfin namespace looks like:
#define SWIGTYPE_p_dolfin__Point swig_types[161]
where _dolfin_ means that Assembler is a type in dolfin namespace. If
Assembler for some reason would not be recognized to be in dolfin namespace
it would simply look like:
#define SWIGTYPE_p_Point swig_types[11]
This example is actually from the present cpp_wrap.cc file, meaning that we
still have some unwrapped occasions of Point. If you search
for "SWIGTYPE_p_Point" in the file you will see that it comes from
vertices.point and Edge.midpoint, meaning that these two funcitons will not
return a correct wrapped type.
The correction will then be to move the Point.h file before these two files,
in dolfin_mesh.h
Which I will do ;)
There are some more types that are not wrapped, but I do not know if these are
critical:
#define SWIGTYPE_p_EpetraSparsityPattern swig_types[2]
#define SWIGTYPE_p_GenericVector swig_types[8]
// This is not used anywhere
#define SWIGTYPE_p_LogStream swig_types[9]
#define SWIGTYPE_p_PETScPreconditioner swig_types[10]
Johan
References