Entity sets - containment and parent-child
Mark Beall
mbeall at simmetrix.com
Tue Nov 17 14:07:53 CST 2009
On Nov 17, 2009, at 11:40 AM, Carl Ollivier-Gooch wrote:
> Mark Beall wrote:
>
>>> In most cases you can support either, and which one you want
>>> depends on the usage. I think this would be far more useful
>>> though if there were a function to change the type of relation
>>> dynamically. Requesting an entity-set type be changed to an
>>> entity-both type, and back again, for smoothing, is the easiest
>>> use case for this, but adaptive refinement is another good example.
>> I don't think I understand why you would want to change the
>> relation. If I have classification as an entity-set relation, why
>> would I want it differently. I will say that I'm assuming that
>> iRel_getEntEntAssociation always allows you to efficiently query
>> the relation in either direction (this is implied due to the
>> existence of the "switch_order" argument).
>
> Here's an example: Suppose you're doing swapping, or any other
> topological modification to a mesh. Chances are excellent that you
> only want to do the 2-2 swap on the surface if both surface faces
> classify on the same model face. Now, if you've got an entity-
> entity relation giving you classification, that's an easy test. On
> the other hand, if you've got a geometric entity-mesh set relation,
> you have to find out which set a mesh face is in, which can only be
> done through an exhaustive search of faces. So the higher memory (e-
> e) relation is much lower CPU.
Right, sorry, I was thinking about the entity sets in the wrong way
(somehow my brain was thinking that the switch_order argument would
magically do this, but that's not what it does).
So then createAssociation(model,mesh) should create a entity-set
relation and createAssociation(mesh,model) should create a different
entity-entity relation. Of course, in our implementation, these are
really just things that are pretending to be relations and entity
sets, but that doesn't really matter.
If that's the case, it would seem you just need to ask for the right
relation, not necessarily be able to change them from one type to
another (in this case it's pretty equivalent, maybe not in other cases
that I haven't thought of).
mark
More information about the tstt-interface
mailing list