[MOAB-dev] Order of entities in unordered entity sets?

James Porter jvporter at wisc.edu
Wed Jun 2 14:29:03 CDT 2010


Attached is a test case that creates an unordered entity set that
somehow has duplicates in it. Apologies for the complicated selection
code, but I'm having a hard time reducing it without hiding the bug.
This program should be run with tjunc6.cub, available here:
<https://mywebspace.wisc.edu/jvporter/web/tjunc6.cub>. It's possible I'm
just doing something wrong, but if I am, CopyMesh is probably doing it
wrong too (unless my selection code is messed up).

Quick rundown of what the code does: I select the faces of Neumann set
100 and the edges adjacent to those faces which are also in Neumann set
500. Then I check how many total vertices are used by all that (this is
the first 3 lines of output).

The rest of the code is mimicking CopyMesh. First, I add the faces/edges
to an unordered set. Next, for N=1,2,3 I get the N-D entities back out
of the set, get the adjacent verts, and add them to the set. Somehow,
during this, a handful of vertices end up with duplicates in the set.

Here's the output I get when I run it:

# edges/faces = 256
# adj verts = 960
# unique adj verts = 241

Total # entities = 514
Should be = 497

Duplicates:
  0xbed
  0xbee
  0x19ff
  0x1a0b
  0x1a16
  0x1a17
  0x1a56
  0x1a57
  0x2554
  0x2555
  0x2556
  0x2557
  0x2558
  0x2559
  0x255a
  0x255b
  0x255c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: counts.cpp
Type: text/x-c++src
Size: 6690 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20100602/a0a7f856/attachment.cpp>


More information about the moab-dev mailing list