[MOAB-dev] MOAB API cleanup : get_connectivity

James Porter jvporter at wisc.edu
Fri Oct 22 16:44:59 CDT 2010


On Fri, 2010-10-22 at 15:23 -0500, Jason Kraftcheck wrote:
> Further, this function should accept an optional vector in which offsets
> into the connectivity vector are stored:
> 
>   virtual ErrorCode  get_connectivity(const EntityHandle *entity_handles,
>                                const int num_handles,
>                                std::vector<EntityHandle> &connectivity,
>                                bool topological_connectivity = false) const;
> 
> 
> While the offset vector isn't that important when getting only topological
> connectivity (verts per ent can be determined from only the type), if the
> complete node list is requested for higher-order elements then this function
> isn't so useful without returning an offset list.  Alternately, the final
> optional argument could be removed and the function renamed as
> 'get_topolgocial_connectivity'.

While you're there, you could change that function to return a combined
adjacency-and-offset object that supports some kind of multidimensional
indexing. I wrote something like that for PyTAPS, and it seemed to work
out:
http://packages.python.org/PyTAPS/helpers.html#itaps.helpers.OffsetListSingle

- Jim



More information about the moab-dev mailing list