[MOAB-dev] MOAB API cleanup : get_connectivity

Tim Tautges tautges at mcs.anl.gov
Mon Oct 25 09:23:25 CDT 2010



On 10/25/2010 08:44 AM, Jason Kraftcheck wrote:
> 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.
>

Ok.

- tim

> 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
>>>
>>>
>>
>
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list