[MOAB-dev] r3801 - MOAB/trunk/src
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Wed Apr 21 16:21:25 CDT 2010
Author: tautges
Date: 2010-04-21 16:21:25 -0500 (Wed, 21 Apr 2010)
New Revision: 3801
Modified:
MOAB/trunk/src/AEntityFactory.cpp
MOAB/trunk/src/CN.cpp
MOAB/trunk/src/MBCNArrays.hpp
Log:
Mashed two truly evil bugs: in CN (Canonical Numbering), index lists
for down-adjacent non-vertex entities were in the wrong order, causing
the higher-order nodes for those down-adj entities to also be in the
wrong order (sound fun?). Futhermore, AEntityFactory::entities_equivalent
wasn't treating the higher-order nodes correctly either.
This fixes the bugs, but does not add a test. I'll enter a ticket for this.
Modified: MOAB/trunk/src/AEntityFactory.cpp
===================================================================
--- MOAB/trunk/src/AEntityFactory.cpp 2010-04-21 20:13:44 UTC (rev 3800)
+++ MOAB/trunk/src/AEntityFactory.cpp 2010-04-21 21:21:25 UTC (rev 3801)
@@ -347,7 +347,7 @@
// offset iter to avoid addition inside loop; this just makes sure we don't
// go off beginning of this_vertices with an index < 0
offset += num_corner_verts;
- for(i = 1; i < vertex_list_size; i++)
+ for(i = 1; i < num_corner_verts; i++)
{
if(vertex_list[i] != this_vertices[(offset-i)%num_corner_verts])
{
Modified: MOAB/trunk/src/CN.cpp
===================================================================
--- MOAB/trunk/src/CN.cpp 2010-04-21 20:13:44 UTC (rev 3800)
+++ MOAB/trunk/src/CN.cpp 2010-04-21 21:21:25 UTC (rev 3801)
@@ -194,11 +194,15 @@
else {
// else we're intersecting, and have a non-empty list; intersect with this target list
tmp_indices.clear();
- std::set_intersection(MUC.targets_per_source_element[*it1],
- MUC.targets_per_source_element[*it1]+
- MUC.num_targets_per_source_element[*it1],
- index_list.begin(), index_list.end(),
- std::back_inserter(tmp_indices));
+ for (int i = MUC.num_targets_per_source_element[*it1]-1; i>= 0; i--)
+ if (std::find(index_list.begin(), index_list.end(), MUC.targets_per_source_element[*it1][i]) !=
+ index_list.end())
+ tmp_indices.push_back(MUC.targets_per_source_element[*it1][i]);
+// std::set_intersection(MUC.targets_per_source_element[*it1],
+// MUC.targets_per_source_element[*it1]+
+// MUC.num_targets_per_source_element[*it1],
+// index_list.begin(), index_list.end(),
+// std::back_inserter(tmp_indices));
index_list.swap(tmp_indices);
// if we're at this point and the list is empty, the intersection will be NULL;
Modified: MOAB/trunk/src/MBCNArrays.hpp
===================================================================
--- MOAB/trunk/src/MBCNArrays.hpp 2010-04-21 20:13:44 UTC (rev 3800)
+++ MOAB/trunk/src/MBCNArrays.hpp 2010-04-21 21:21:25 UTC (rev 3801)
@@ -400,10 +400,10 @@
{{0,1,3}, {1,2,3}, {0,2,3}, {0,1,2}} }, // end target dim 0
{ // target dim 1
{3, 3, 3, 3}, // 3 edges for all faces
- {{0,3,4}, {1,4,5}, {2,3,5}, {0,1,2}} }, // end target dim 1
+ {{0,4,3}, {1,5,4}, {2,3,5}, {0,2,1}} }, // end target dim 1
{ // target dim 2
More information about the moab-dev
mailing list