[MOAB-dev] commit/MOAB: iulian07: concavity fixes for parallel transport
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jan 10 14:26:20 CST 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/eb4b9ff5b775/
Changeset: eb4b9ff5b775
Branch: master
User: iulian07
Date: 2014-01-10 19:30:43
Summary: concavity fixes for parallel transport
the decomposed polygons just need to know their
arrival poly;
either as a correlation red poly, or the global id.
Global id is used for remote red cells
Affected #: 1 file
diff --git a/tools/mbcslam/CslamUtils.cpp b/tools/mbcslam/CslamUtils.cpp
index c5417c1..43668a6 100644
--- a/tools/mbcslam/CslamUtils.cpp
+++ b/tools/mbcslam/CslamUtils.cpp
@@ -926,6 +926,14 @@ ErrorCode enforce_convexity(Interface * mb, EntityHandle lset, int my_rank)
MB_TAG_DENSE, &dumH);
if(rval==MB_TAG_NOT_FOUND)
corrTag = 0;
+
+ Tag gidTag;
+ rval = mb->tag_get_handle("GLOBAL_ID", 1, MB_TYPE_INTEGER,
+ gidTag, MB_TAG_DENSE);
+
+ if(rval!=MB_SUCCESS)
+ return rval;
+
std::vector<double> coords;
coords.resize(3*MAXEDGES); // at most 10 vertices per polygon
// we should create a queue with new polygons that need processing for reflex angles
@@ -959,6 +967,10 @@ ErrorCode enforce_convexity(Interface * mb, EntityHandle lset, int my_rank)
if (MB_SUCCESS != rval)
return rval;
}
+ int gid=0;
+ rval = mb->tag_get_data(gidTag, &eh, 1, &gid);
+ if (MB_SUCCESS != rval)
+ return rval;
coords.resize(3 * num_nodes);
if (num_nodes < 4)
continue; // if already triangles, don't bother
@@ -1021,6 +1033,9 @@ ErrorCode enforce_convexity(Interface * mb, EntityHandle lset, int my_rank)
if (MB_SUCCESS != rval)
return rval;
}
+ rval = mb->tag_set_data(gidTag, &newElement, 1, &gid);
+ if (MB_SUCCESS != rval)
+ return rval;
if (num_nodes == 4)
{
// create another triangle
@@ -1046,6 +1061,9 @@ ErrorCode enforce_convexity(Interface * mb, EntityHandle lset, int my_rank)
if (MB_SUCCESS != rval)
return rval;
}
+ rval = mb->tag_set_data(gidTag, &newElement, 1, &gid);
+ if (MB_SUCCESS != rval)
+ return rval;
mb->remove_entities(lset, &eh, 1);
brokenPolys++;
/*std::cout<<"remove: " ;
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list