Commit 37b3cdd9 authored by Pierre Kraemer's avatar Pierre Kraemer

debug TraversorCell : quickTraversor disable forceDartMarker

parent 9b573352
......@@ -447,7 +447,7 @@ public:
void enableQuickTraversal() ;
template <unsigned int ORBIT>
void updateQuickTraversal() ;
void updateQuickTraversal(const FunctorSelect& good = allDarts) ;
template <unsigned int ORBIT>
AttributeMultiVector<Dart>* getQuickTraversal() ;
......
......@@ -435,14 +435,14 @@ inline void GenericMap::enableQuickTraversal()
}
template <unsigned int ORBIT>
inline void GenericMap::updateQuickTraversal()
inline void GenericMap::updateQuickTraversal(const FunctorSelect& good)
{
assert(m_quickTraversal[ORBIT] != NULL || !"updateQuickTraversal on a disabled orbit") ;
CellMarker<ORBIT> cm(*this) ;
for(Dart d = begin(); d != end(); next(d))
{
if(!cm.isMarked(d))
if(good(d) && !cm.isMarked(d))
{
cm.mark(d) ;
(*m_quickTraversal[ORBIT])[getEmbedding<ORBIT>(d)] = d ;
......
......@@ -29,30 +29,32 @@ template <typename MAP, unsigned int ORBIT>
TraversorCell<MAP, ORBIT>::TraversorCell(MAP& map, const FunctorSelect& good, bool forceDartMarker, unsigned int thread) :
m(map), dmark(NULL), cmark(NULL), current(NIL), firstTraversal(true), m_good(good)
{
quickTraversal = map.template getQuickTraversal<ORBIT>() ;
if(quickTraversal != NULL)
{
cont = &(m.template getAttributeContainer<ORBIT>()) ;
}
if(forceDartMarker)
dmark = new DartMarker(map, thread) ;
else
{
if(!forceDartMarker && map.template isOrbitEmbedded<ORBIT>())
cmark = new CellMarker<ORBIT>(map, thread) ;
quickTraversal = map.template getQuickTraversal<ORBIT>() ;
if(quickTraversal != NULL)
{
cont = &(m.template getAttributeContainer<ORBIT>()) ;
}
else
dmark = new DartMarker(map, thread) ;
{
if(map.template isOrbitEmbedded<ORBIT>())
cmark = new CellMarker<ORBIT>(map, thread) ;
else
dmark = new DartMarker(map, thread) ;
}
}
}
template <typename MAP, unsigned int ORBIT>
TraversorCell<MAP, ORBIT>::~TraversorCell()
{
if(quickTraversal == NULL)
{
if(dmark)
delete dmark ;
else
delete cmark ;
}
if(dmark)
delete dmark ;
else if(cmark)
delete cmark ;
}
template <typename MAP, unsigned int ORBIT>
......
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