iRel interface updates

James Porter jvporter at wisc.edu
Wed Jul 21 17:31:01 CDT 2010


On Wed, 2010-07-21 at 18:08 -0400, seol at scorec.rpi.edu wrote:
> - I think iBase_EntityIterator should be defined in iBase.

That's reasonable. I think it should be defined in the same way as
iBase_Instance (that is, as a void*) to minimize the amount of changes
required for code that uses iMesh/iGeom. The other option would be to
replace iMesh_EntityIterator with iBase_EntityIterator everywhere
(likewise for iGeom).

> - it's not clear what iRel_getEntArrSetIterArrRelation is for, and how
> much it is useful

I'm not sure either. Tim might know, since I think he added that to the
interface.

> - Any specific reasons for not having iRel_getEntSetArrRelation and
> iRel_getSetSetArrRelation?

I'm not sure if these make sense, but I haven't done much looking at the
get/set relation code.

> - parameter type (in/out/inout) missed in iRel.h

Good call, I'll add these.

> - For consistant naming, how about iRel_create and iRel_destroy?
> (respecting the discussion of create/destroy name change proposal in
> http://lists.mcs.anl.gov/pipermail/tstt-interface/2010-May/000166.html)

If iMesh and iGeom switch to this, I think iRel should follow suit.

> - Do we have a mechanism to set the classification (relation between mesh
> entity and geometric entity) at time of the mesh entity creation either in
> iRel or iMesh?

I don't think so. Tim might correct me on this, however.

> > Another change I'll suggest but have no strong attachment to is that we
> > change iRel_RelationHandle to iRel_PairHandle to make a distinction
> > between the relation of two interfaces (a "pair") and the relation of
> > entities/sets (a "relation"). The changes would be as follows:
> >
> > * iRel_RelationHandle  -> iRel_PairHandle
> > * iRel_createRelation  -> iRel_createPair
> > * iRel_destroyRelation -> iRel_destroyPair
> > * iRel_getRelationInfo -> iRel_getPairInfo
> > * iRel_findRelations   -> iRel_findPairs
> 
> Multiple relations under pair umbrella is suggested. Not so sure if "pair"
> is the most appropriate term, iow, multiple pairs under relation umbrella
> makes more sense to me.

Right now, a "RelationHandle" is strictly a connection between two
interfaces. Most of the get/set Relation functions assume that there
will only ever be two interfaces for a given RelationHandle. The
"multiple pairs" case should be handled by the iRel instance itself, as
opposed to the RelationHandle.

My concern is that there are multiple things called "Relations" in iRel
(namely an association between two interfaces and an association between
two entities), and this can cause confusion when people just use the
word "Relation".

- Jim



More information about the tstt-interface mailing list