itaps-parallel iMesh interface question...

Mark Miller miller86 at llnl.gov
Tue Mar 24 23:45:14 CDT 2009


Hi All,

I am seeing a contradiction in documentation here as well as behavior
between implementations regarding the 'has_data' argument here.

The paragraph says...
    *has_data!=0 ==> 'next iterator value is the end of iteration'

However, the \param statement says...
    *has_data==0 ==> 'next iterator has an entity'


   /**\brief  Get entity corresponding to an iterator and increment
iterator
     *
     * Get the entity corresponding to an array iterator, and increment the 
     * iterator.  Also return whether the next value of the iterator has
     * an entity (if non-zero, next iterator value is the end of the
     * iteration).
     * \param instance iMesh instance handle
     * \param entity_iterator Iterator being queried
     * \param entity_handle Pointer to an entity handle corresponding to the
     *        current value of iterator
     * \param has_data Pointer to flag; if returned non-zero, next iterator
     *        has an entity
     * \param *err Pointer to error type returned from function
     */
  void iMesh_getNextEntIter(iMesh_Instance instance,
                            /*in*/ iMesh_EntityIterator entity_iterator,
                            /*out*/ iBase_EntityHandle* entity_handle,
                            /*out*/ int *has_data,
                            /*out*/ int *err);

Either way, I find these statements pretty unclear and, in particular,
the name 'has_data' not consistent with at least one of the above
meanings.

So, what does 'has_data' mean here? If I were betting, I think it means
that if after returning from the iMesh_getNextEntIter call,
*has_data==0, it means the returned entity in 'entity_handle' is NOT
valid and the iteration has reached the end.

However, I think I am seeing some difference in behavior between old and
newer implementations of MOAB, at the very least, in this regard. And, I
don't really know what this 'has_data' value means.

Mark


-- 
Mark C. Miller, Lawrence Livermore National Laboratory
email: mailto:miller86 at llnl.gov
(M/T/W) (925)-423-5901 (!!LLNL BUSINESS ONLY!!)
(Th/F)  (530)-753-8511 (!!LLNL BUSINESS ONLY!!)



More information about the itaps-parallel mailing list