Change GenericDofMap::cell_dofs(...) return type

Issue #350 resolved
Prof Garth Wells created an issue

Changing the function

const std::vector<dolfin::la_index>& cell_dofs(std::size_t cell_index);

to

const  Array<dolfin::la_index>& cell_dofs(std::size_t cell_index);

would allow the underlying (private) storage type to be changed, with Array just being a view into the data. This can have substantial performance benefits for common cases.

Comments (9)

  1. Prof Garth Wells reporter

    . . . and Array deliberately doesn't have a public copy constructor, which means an object of type Array cannot be returned by a function.

  2. Prof Garth Wells reporter

    The SWIG code for ArrayView is minimal (much of what is there in the branch will be removed, it was part of trying to get it to 'work').

  3. Log in to comment