[MOAB-dev] question about moab sets
Jason Kraftcheck
kraftche at cae.wisc.edu
Tue Mar 1 13:57:35 CST 2011
On 03/01/2011 01:51 PM, Iulian Grindeanu wrote:
> Hello,
> I have some misunderstandings about moab sets.
>
> If an entity A is part of a set B, and the entity A is deleted, the set still has it.
> Unless when you create the set, the option contains MESHSET_TRACK_OWNER flag.
> In that case, the set is "informed" about deletion, and it removes the entity.
>
> This is fine, it is understandable that you need to track it somehow, otherwise it would be hard to delete it from every set defined.
>
> My question is about the root set.
> The options for the root set are tested in MBTest:
> unsigned flags;
> rval = mb->get_meshset_options( rs, flags );
> CHECK( flags & MESHSET_SET );
> CHECK( !(flags & MESHSET_ORDERED) );
> CHECK( !(flags & MESHSET_TRACK_OWNER) );
>
> Which means the root set is not tracked; but when an entity is deleted, it is really deleted from root set ( I mean, get_entities from root set does not retrieve the deleted entity)
>
> I like that, but I think the manual should have a note if that is indeed the behavior. Or is my understanding wrong?
>
> Any comments?
>
The problem here is that there isn't an explicit root set. The root set is
just a "magic" handle that means the whole mesh. You cannot add/remove
entities from the root set, add it to parent/child lists, add it to other
sets, etc.
Did you check the value of 'rval' above? get_meshset_options must not have
a special case for the root set if it is not returning the correct flags.
rval is probably *not* MB_SUCCESS and flags might contain garbage (it may
have never been set.)
- jason
More information about the moab-dev
mailing list