← Back to team overview

dolfin team mailing list archive

Re: Array<double> in SubDomain::inside()

 



On 09/03/10 16:02, Johan Hake wrote:
On Tuesday 09 March 2010 00:43:10 Garth N. Wells wrote:
Johan Hake wrote:
Hello!

I am trying to close the Array typemap Blueprint.

Is it worth changing the double* x/y arguments in SubDomain methods to
Array? The pros would be to have a consistent Python interface, but it
makes things more difficult in the C++ implementation.

What makes it difficult on the C++ side?

Well, difficult might not be the right word. My point was that we add more
lines in the C++ code to pass Array instead of double* than we remove by
making the python wrapper simpler.

We could maybe add an Array version of the different methods of SubDomain

   inside, map, snap

Then can the double * version of the same methods call the Array version
by default. Then we only expose the Array version to Python.

I would prefer to have dolfin::Array versions only, if possible.

This is not a big deal as it is working fine as it is, but would be good
to get rid of most of the double * typemaps.

Yes. It would be good to remove all plain array arguments in the public
interface in favour of safer types.

Ok, then I try to fix this. I assume we just change all double * to Array?


Have you made a start on this on the C++ side? I can make the change for SubDomain, but I don't want to get in your way.

Garth

Johan



Follow ups

References