Commit 2b2df40a authored by Sylvain Thery's avatar Sylvain Thery

resolved last (?) bug of embnull

parent 3e4dba23
...@@ -397,12 +397,12 @@ inline void GenericMap::copyCell(Dart d, Dart e) ...@@ -397,12 +397,12 @@ inline void GenericMap::copyCell(Dart d, Dart e)
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded"); assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded");
unsigned int dE = getEmbedding<ORBIT>(d) ; unsigned int dE = getEmbedding<ORBIT>(d) ;
unsigned int eE = getEmbedding<ORBIT>(e) ; unsigned int eE = getEmbedding<ORBIT>(e) ;
// if(eE != EMBNULL) // if the source is NULL, nothing to copy if(eE != EMBNULL) // if the source is NULL, nothing to copy
// { {
// if(dE == EMBNULL) // if the dest is NULL, create a new cell if(dE == EMBNULL) // if the dest is NULL, create a new cell
// dE = setOrbitEmbeddingOnNewCell<ORBIT>(d) ; dE = setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data
// } }
} }
template <unsigned int ORBIT> template <unsigned int ORBIT>
...@@ -538,18 +538,9 @@ void GenericMap::addEmbedding() ...@@ -538,18 +538,9 @@ void GenericMap::addEmbedding()
AttributeMultiVector<unsigned int>* amv = dartCont.addAttribute<unsigned int>(oss.str()) ; AttributeMultiVector<unsigned int>* amv = dartCont.addAttribute<unsigned int>(oss.str()) ;
m_embeddings[ORBIT] = amv ; m_embeddings[ORBIT] = amv ;
FunctorInitEmb<GenericMap, ORBIT> fsetemb(*this); // set new embedding to EMBNULL for all the darts of the map
DartMarker dm(*this); for(unsigned int i = dartCont.begin(); i < dartCont.end(); dartCont.next(i))
for(Dart d = this->begin(); d != this->end(); this->next(d)) (*amv)[i] = EMBNULL ;
{
if(!dm.isMarked(d))
{
dm.markOrbit<ORBIT>(d);
unsigned int em = newCell<ORBIT>();
fsetemb.changeEmb(em);
foreach_dart_of_orbit<ORBIT>(d, fsetemb);
}
}
} }
/**************************************** /****************************************
......
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