[Fwd: itaps-parallel getVtxCoordIndex]

txie at scorec.rpi.edu txie at scorec.rpi.edu
Tue Oct 14 15:19:11 CDT 2008


Hi, All,

The original specification of function iMesh_getVtxCoordIndex() in iMesh.h
is below:

/**\brief  Get adjacent entities as connectivity lists
     * For a specified set handle, entity type and/or entity topology, *
return connectivity of adjacent entities of specified dimension. *
Connectivity is expressed as index into array of vertices returned *
by getEntities function.

The specification seems to be a little confusing, and the function
implementation in FMDB is complex as follows:

------------------------------------------------
1) If user requests adjacencies to mesh entities in a set (the set is not
a whole mesh), the function is implemented as Lori suggested. User needs
to set requested_entity_type, requested_entity_topology and
entity_adjacency_type.

   When it returns, the 'offset' array is set based on the type of the
adjacent entities (the number of interior vertices), and 'index' array
contains vertex ids.

2) If user requests adjacencies to entities in a whole mesh,

  2.1) If user requests all entity types and topologies
(iMesh_ALL_TOPOLOGIES and iBase_ALL_TYPES), the function returns all
vertices of entities with entity_adjacency_type in the mesh.

  2.2) otherwise, the function returns all vertices of entities with
requested_entity_topology/requested_entity_type in the mesh.

   When it returns, the 'offset' array is set based on the type of those
mesh entities (the number of interior vertices), and 'index' array
contains vertex ids.
------------------------------------------------

I think that the implementation difference between in a set and in a whole
mesh, is possibly because the adjacencies of entities in a set can be
entities NOT in the set.


In a particular case as Lori asked, to get vertices associated with
triangle faces,

 1) Request in a set with 2 triangles (not equal to a whole mesh):
F_1_2_3, F_2_3_4,

INPUT:
   requested_entity_type = FACE
   requested_entity_topology = TRIANGLE
   entity_adjacency_type = VERTEX
RETURN:
   offset = {0, 1, 2, 3, 4, 5, 6}
   offset_size = 7
   indices = { 1,2,3, 2,3,4}
   indices_size = 6
   topologies = {point, point, point, point, point, point}
   topologies_size = 6

 2) Requests in a whole mesh with only 2 triangles: F_1_2_3, F_2_3_4,

INPUT:
   requested_entity_type = FACE
   requested_entity_topology = TRIANGLE
   entity_adjacency_type = VERTEX        (optional)
RETURN:
   offset = {0, 3,  6}
   offset_size = 3
   indices = { 1,2,3, 2,3,4}
   indices_size = 6
   topologies = {triangle, triangle}
   topologies_size = 2



Thanks,

Ting





> ---------------------------- Original Message
----------------------------
> Subject: itaps-parallel getVtxCoordIndex
> From:    "Lori A. Diachin" <diachin2 at llnl.gov>
> Date:    Mon, September 29, 2008 7:28 pm
> To:      "itaps-parallel at mcs.anl.gov" <itaps-parallel at mcs.anl.gov>
--------------------------------------------------------------------------
>
> Hi All,
>
> I came across an issue with the getVtxCoordIndex function while I was
testing my finite element solver code with the GRUMMP implementation of
iMesh.  In talking it over with Carl, we realized that we had very
different interpretations of what should be returned from the function and
that the documentation was unclear.  So we are pinging the group for
feedback so that we can clarify the documentation and ensure that
implementations are compliant...
>
> In particular, I am attempting to request the vertices associated with
triangular faces and so I set the requested_entity_type to FACE,
requested_entity_topology to TRIANGLE, and entity_adjacency_type to
VERTEX.  I expect to get back 3 indices per face so that the offset array
is set to 0,3,6,...  This is how it's implemented in 'simple mesh'.  I do
not use the entity_adjacency_type argument for much of anything.
>
> Carl had a different interpretation of the spec.  As he understands it,
getVtkCoordIndex first grabs a bunch of adjacent entities, then makes a
list of the vertex indices for the verts of -those- entities.  So for my
request above, he returns individual vertices as the requested adjacency
type and sets the offset array to 0,1,2,3,....   To get the information I
want, he changes the arguments so that the entity_adjacency_type is FACE
to get faces adjacent to TRIANGLES..
>
> Thoughts on these interpretations?  We need to be sure that the
> documentation (user guide and man pages are both vague on this) and
compliance test codes are clear on this.
>
> Thanks,
> Lori
>
>
>
>









More information about the itaps-parallel mailing list