[MOAB-dev] Questions about Tags and Topology
Iulian Grindeanu
iulian at mcs.anl.gov
Sat Feb 11 00:02:03 CST 2012
Hello, I will try to answer to some of those questions; ----- Original Message -----
| Hi Tim,
| I've had a good deal of success this week and have been able to
| represent a couple of our simpler datasets in what seems to be a
| reasonable manner. I have also come up with a few questions.
| Tags:
| • DataTypes – from what I can see, tags do not support a few of the
| numpy datatypes, namely: float32, int16, and int64. Is this a
| constraint of the PyTAPS wrapper or the underlying iMesh/MOAB
| infrastructure?
itaps has a limited data type set; see MOAB/itaps/iBase.h pytaps is closely related to itaps; some types can be "manufactured" out of byte type, but it is the user responsibility to interpret / convert correctly (so interpret an int16 as a 2-byte value, etc). I am not sure if something like that is possible in python/pytaps. It is for sure possible in c/c++ | •
| • Tags-of-tags – Is this possible? I've tried a couple of ways but
| can't seem to get it to go.
tags can be set/get on anything that is an "EntityHandle" in moab. So anything that is an entity handle (node, element, mesh set) can set and get tag values, using a tag handle. I am not sure I understand the question. Would you need to set a tag value on a tag handle? That is not possible. | •
| Topology:
| • Is it possible to apply topology over entity sets? One way I've
| found for dealing with time is to have a "temporal" EntitySet that has
| child EntitySets for each timestep. This seems to work well, but I
| can't find a way of relating the various timesteps aside from the
| inherent indexing of the "temporal" EntitySet. I hoped that it would
| be possible to do something like make a line_segment that related the
| timestep EntitySets, but that didn't seem to work.
maybe you can set a tag with the time value for each of the child EntitySets. I am not sure I understand what do you mean by "line_segment". Also, if set1 is a child of set2, it does not mean that the set2 is a parent of set1 (and viceversa) see the difference between add_parent_child and add_child_meshset, for example Another thing that can help: you add child1 to set1, then add child2 to set1 When you ask for children of set1, you will always get them in order child1, child2. So maybe you can use that for a natural ordering of your children ( EntitySets ). Another question: Is the mesh changing in time? That is one reason you may want EntitySets changing in time. Or maybe some solution uses different mesh elements at a given time | •
| • Edges from quadrilaterals: After building a set of quadrilateral
| entities from an array of vertices, I was surprised that there were
| not edge entities generated as well. Is there a method for doing this?
| I realize I could generate the edges from the vertex array (perhaps
| after some reworking), but it seems to me that it might also be
| possible to get them from the quadrilaterals themselves.
this is the easiest question:) you have to use the flag create_if_missing=true in a call like: ErrorCode get_adjacencies(const EntityHandle *from_entities, const int num_entities, const int to_dimension, const bool create_if_missing, std::vector<EntityHandle>& adj_entities, const int operation_type = Interface::INTERSECT) = 0; from_entities are your quads, to_dimension is 1 (edges), and you will get the edges in adj_entities vector. | Thanks in advance,
| Chris
Hope this helps, Iulian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20120211/0990e804/attachment.htm>
More information about the moab-dev
mailing list