[MOAB-dev] MOAB API cleanup : get_connectivity

Jason Kraftcheck kraftche at cae.wisc.edu
Mon Oct 25 08:44:08 CDT 2010


On 10/23/2010 05:55 PM, Tim Tautges wrote:
> I'm fine with all of those.  Could you add a ticket to that effect?
> 
> - tim
> 

After reconsidering, I realized that the current get_connectivity functions
still provide some functionality that get_adjacencies cannot: getting
higher-order nodes (or not getting higher-order nodes.  I forget which
get_adjacencies does.)  We could handle that case in get_adjacencies by
passing some other, special value for the target dimension.  But as it is no
longer just a matter of removing duplicate functionality it should probably
wait until after the release.

I did create ticket #170 for the offset list thing, though.

- jason



> On 10/22/2010 03:23 PM, Jason Kraftcheck wrote:
>> I think that, before the release, we should remove the following
>> functions
>> from MBInterface:
>>
>>    virtual ErrorCode  get_connectivity(const EntityHandle
>> *entity_handles,
>>                                 const int num_handles,
>>                                 Range&connectivity,
>>                                 bool topological_connectivity = false)
>> const;
>>
>>    virtual ErrorCode get_connectivity( const Range&  entity_handles,
>>                                 Range&connectivity,
>>                                 bool topological_connectivity = false)
>> const;
>>
>> Both of these are mostly redundant because get_adjacencies can be used
>> for
>> exactly the same thing.  The only time they would differ is if the input
>> list contained a mixture of polyhedra and other elements.  But in that
>> case,
>> the behavior of get_adjacencies is probably both less confusing and
>> more useful.
>>
>> 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'.
>>
>> - jason
>>
>>
> 


-- 
"A foolish consistency is the hobgoblin of little minds" - Ralph Waldo Emerson



More information about the moab-dev mailing list