Recommended way to obtain all entities from a tag

Issue #69 new
Guilherme Caminha created an issue

What would be the best way to get all entities from a tag, of any type (i.e. all entities with data)? The only way that I can see is to use get_entities_by_type_and_tag but It doesn't seem the best way since I have to pass a type argument.

Comments (5)

  1. Vijay M

    Depending on the dimension of the mesh, you really have a small subset of types to check (if your mesh is of mixed types). So calling get_entities_by_type_and_tag in a loop for different types will be the cleanest option.

    @iulian07 do you think it makes sense to create a new API method for get_entities_by_tag that returns all entities with non-default values ?

  2. Vijay M

    @pshriwise Perhaps we can create high level enumerators that make sense in this context in PyMOAB, rather than introducing additional API routines in MOAB directly.

  3. Vijay M

    @pshriwise Do you think adding some higher level enumerators like this would be useful ? If so, one more for your TODO list!

  4. Log in to comment