Commit 9233601e authored by thomas's avatar thomas

Merge remote-tracking branch 'lio/feature-pitiot' into develop

parents 01ed9f51 43a5b4c8
......@@ -345,31 +345,53 @@ unsigned int ImplicitHierarchicalMap3::faceLevel(Dart d)
fLevel = l < fLevel ? l : fLevel ; // of its edges
} while(it != d) ;
unsigned int cur = m_curLevel ;
m_curLevel = fLevel ;
unsigned int nbSubd = 0 ;
it = old ;
unsigned int eId = m_edgeId[old] ; // the particular case of a face
do // with all neighboring faces regularly subdivided
{ // but not the face itself
++nbSubd ; // is treated here
it = phi1(it) ;
} while(m_edgeId[it] == eId) ;
while(nbSubd > 1)
{
nbSubd /= 2 ;
--fLevel ;
}
// unsigned int cur = m_curLevel ;
// m_curLevel = fLevel ;
// unsigned int nbSubd = 0 ;
// it = old ;
// unsigned int eId = m_edgeId[old] ; // the particular case of a face
// do // with all neighboring faces regularly subdivided
// { // but not the face itself
// ++nbSubd ; // is treated here
// it = phi1(it) ;
// } while(m_edgeId[it] == eId) ;
// while(nbSubd > 1)
// {
// nbSubd /= 2 ;
// --fLevel ;
// }
m_curLevel = cur ;
// m_curLevel = cur ;
return fLevel ;
}
unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
{
if(m_curLevel == 0)
return 0 ;
unsigned int vLevel = std::numeric_limits<unsigned int>::max(); //hook sioux
//First : the level of a volume is the minimum of the levels of its faces
Traversor3WF<ImplicitHierarchicalMap3> travF(*this, d);
for (Dart dit = travF.begin(); dit != travF.end(); dit = travF.next())
{
// in a first time, the level of a face
//the level of the volume is the minimum of the
//levels of its faces
unsigned int fLevel = faceLevel(dit);
vLevel = fLevel < vLevel ? fLevel : vLevel ;
}
//Second : the case of all faces regularly subdivided but not the volume itself
return vLevel;
}
/*
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
if(m_curLevel == 0)
......@@ -421,25 +443,28 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
fLevel = l < fLevel ? l : fLevel ; // of its edges
} while(it != e) ;
unsigned int cur = m_curLevel ;
m_curLevel = fLevel ;
unsigned int nbSubd = 0 ;
it = old ;
unsigned int eId = m_edgeId[old] ; // the particular case of a face
do // with all neighboring faces regularly subdivided
{ // but not the face itself
++nbSubd ; // is treated here
it = phi1(it) ;
} while(m_edgeId[it] == eId) ;
// unsigned int cur = m_curLevel ;
// m_curLevel = fLevel ;
while(nbSubd > 1)
{
nbSubd /= 2 ;
--fLevel ;
}
// unsigned int nbSubd = 0 ;
// it = old ;
// unsigned int eId = m_edgeId[old] ; // the particular case of a face
// std::cout << "old edge id = " << eId << std::endl;
// do // with all neighboring faces regularly subdivided
// { // but not the face itself
// ++nbSubd ; // is treated here
// it = phi1(it) ;
// std::cout << "current edge id = " << m_edgeId[it] << std::endl;
// } while(m_edgeId[it] == eId) ;
m_curLevel = cur ;
// while(nbSubd > 1)
// {
// nbSubd /= 2 ;
// --fLevel ;
// }
// m_curLevel = cur ;
//
// compute the minimum level of the volume
......@@ -470,31 +495,33 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
}
//Second : the case of all faces regularly subdivided but not the volume itself
unsigned int cur = m_curLevel ;
m_curLevel = vLevel ;
// //Second : the case of all faces regularly subdivided but not the volume itself
// unsigned int cur = m_curLevel ;
// m_curLevel = vLevel ;
unsigned int nbSubd = 0 ;
Dart it = oldest ;
unsigned int eId = m_edgeId[oldest] ;
// unsigned int nbSubd = 0 ;
// Dart it = oldest ;
// unsigned int eId = m_edgeId[oldest] ;
do
{
++nbSubd ;
it = phi1(it) ;
} while(m_edgeId[it] == eId) ;
// do
// {
// ++nbSubd ;
// it = phi1(it) ;
// } while(m_edgeId[it] == eId) ;
while(nbSubd > 1)
{
nbSubd /= 2 ;
--vLevel ;
}
// while(nbSubd > 1)
// {
// nbSubd /= 2 ;
// --vLevel ;
// }
// m_curLevel = cur ;
m_curLevel = cur ;
return vLevel;
}
*/
Dart ImplicitHierarchicalMap3::faceOldestDart(Dart d)
{
......
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