Commit 01ef1b3d authored by Sylvain Thery's avatar Sylvain Thery

bug in curvature parallel computing

parent 2b2df40a
......@@ -440,17 +440,17 @@ void computeCurvatureVertices_NormalCycles(
if (!map. template isOrbitEmbedded<VERTEX>())
{
CellMarkerNoUnmark<VERTEX> cm(map);
map. template initOrbitEmbedding<VERTEX>();
map. template initAllOrbitsEmbedding<VERTEX>();
}
if (!map. template isOrbitEmbedded<EDGE>())
{
CellMarkerNoUnmark<EDGE> cm(map);
map. template initOrbitEmbedding<EDGE>();
map. template initAllOrbitsEmbedding<EDGE>();
}
if (!map. template isOrbitEmbedded<FACE>())
{
CellMarkerNoUnmark<FACE> cm(map);
map. template initOrbitEmbedding<FACE>();
map. template initAllOrbitsEmbedding<FACE>();
}
FunctorComputeCurvatureVertices_NormalCycles<PFP> funct(map, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal);
......
......@@ -438,6 +438,14 @@ public:
template <unsigned int ORBIT>
void initCell(unsigned int i) ;
/**
* Traverse the map and embed all orbits of the given dimension with a new cell
* @param realloc if true -> all the orbits are embedded on new cells, if false -> already embedded orbits are not impacted
*/
template <unsigned int ORBIT>
void initAllOrbitsEmbedding(bool realloc = false) ;
/****************************************
* QUICK TRAVERSAL MANAGEMENT *
****************************************/
......
......@@ -419,6 +419,23 @@ inline void GenericMap::initCell(unsigned int i)
m_attribs[ORBIT].initLine(i) ;
}
template <unsigned int ORBIT>
void GenericMap::initAllOrbitsEmbedding(bool realloc)
{
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded") ;
DartMarker mark(*this) ;
for(Dart d = begin(); d != end(); next(d))
{
if(!mark.isMarked(d))
{
mark.markOrbit<ORBIT>(d) ;
if(realloc || getEmbedding<ORBIT>(d) == EMBNULL)
setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
}
}
}
/****************************************
* QUICK TRAVERSAL MANAGEMENT *
****************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment