[MOAB-dev] Vertex-vertex adjacencies in iMesh?

Tim Tautges tautges at mcs.anl.gov
Fri May 28 09:17:57 CDT 2010



On 05/27/2010 06:53 PM, James Porter wrote:
> On Thu, 2010-05-27 at 18:00 -0500, Jason Kraftcheck wrote:
>> James Porter wrote:
>>> Should iMesh return an error when you ask for the vertices adjacent to
>>> another vertex? As I understand it (not that I can find a citation), the
>>> iMesh spec says that vertices aren't adjacent to themselves, but does it
>>> also require that the functions return errors? It seems like it would be
>>> better to return no adjacencies instead.
>>>
>>
>> IIRC, this was discussed during one of the ITAPS telecons a year or two ago,
>> and the decision was that this should result in an error.

That is correct.

>
> That's unfortunate, since it makes what I think is a pretty common use
> case really difficult: given an arbitrary collection of entities, get
> the set of vertices needed to describe the position of those entities.
> Ensuring that the set of vertices contains no duplicates (i.e. is a set)
> is also helpful.
>

One counter-argument you'll get is that you'll have to filter for duplicates anyway, since when you loop over entities 
and get their adj vertices, you'll definitely get duplicates in that union.

> Even though returning nothing for a vertex-vertex adjacency isn't ideal
> for me, it would at least make it easier to work around the problem. (Of
> course, it'd also be easier to work around if the entity type/topology
> enums were actually bitmasks.) I can't think of any reason that this
> behavior would be detrimental; generally, I'd prefer a library avoid
> returning errors unless it absolutely can't figure out a
> useful/consistent value to return.
>
> Of course, it's entirely possible I'm preaching to the choir here, and
> the ITAPS list is where I need to be arguing this. :)

You are indeed preaching to the choir here.  But I would encourage you to bring it up in the ITAPS context.  Even though 
your opinion will be discounted 'cuz you work for me, at least putting the question out there and describing how it's 
motivated by a real application will lend it at least some weight.

- tim

>
> - Jim
>
>

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