← Back to team overview

dolfin team mailing list archive

Re: Double pointers

 

On 26 September 2011 14:04, Anders Logg <logg@xxxxxxxxx> wrote:

> On Wed, Sep 21, 2011 at 07:06:02PM +0200, Anders Logg wrote:
> > On Wed, Sep 21, 2011 at 04:54:29PM -0000, Garth Wells wrote:
> > > On 21 September 2011 17:40, Johan Hake <787405@xxxxxxxxxxxxxxxxxx>
> wrote:
> > > > On Wednesday September 21 2011 09:00:16 Garth Wells wrote:
> > > >> We should look at this  - it will allow the removal of some ugly
> copies
> > > >> in DOLFIN.
> > > >
> > > > Agree, but at the moment are boost::multi_arrays not so pleasent for
> the SWIG
> > > > interface. Copying is enforced. Not sure this is a big deal for such
> a low
> > > > lever functionality, but it is sad that it should be needed, if the
> underlying
> > > > structure is just a c-array, which numpy wraps just fine.
> > > >
> > >
> > > I think that if this type of data is used intensively at the Python
> > > level, then there will be bigger performance issues to worry about
> > > than data copying.
> > >
> > > The multi_array interface is somewhat secondary - the important point
> > > is flattening the double pointer in the UFC interface.
> >
> > We should avoid using any other data structures than plain C arrays in
> > the UFC interface.
> >
> > Or we should use STL data structures (or boost) throughout UFC, but
> > that sounds more like UFC >= 3.0.
>
> We should make a new UFC release to fix at least the bug in the
> quadrature version of tabulate_tensor for interior_facet_integral.
>
> Should we also change the double pointers into plain arrays?
>

I don't think we should change this at this moment.

Kent


>
> This would mean quite subtstantial changes as the following variables
> and arguments will need to change:
>
>  cell::entity_indices
>  cell::coordinates
>  tabulate_tensor(..., w, ...)
>  tabulate_tensor(..., quadrature_points, ...)
>
> This will also require changes DOLFIN and FFC/SFC and (perhaps the
> most time-consuming part...) in the UFC manual.
>
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

References