Commit acd4feb8 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

optim gestion plongement dans operateurs EmbeddedMap2

parent 17225370
......@@ -44,7 +44,7 @@ void EmbeddedGMap2::splitVertex(Dart d, Dart e)
setDartEmbedding<VERTEX>(beta2(phi1(dd)), vEmb) ;
setDartEmbedding<VERTEX>(beta0(dd), vEmb) ;
setOrbitEmbeddingNewCell<VERTEX>(e) ;
setOrbitEmbeddingOnNewCell<VERTEX>(e) ;
copyCell<VERTEX>(e, d) ;
}
......@@ -91,7 +91,7 @@ Dart EmbeddedGMap2::cutEdge(Dart d)
unsigned int eEmb = getEmbedding<EDGE>(d) ;
setDartEmbedding<EDGE>(phi2(d), eEmb) ;
setDartEmbedding<EDGE>(beta0(d), eEmb) ;
setOrbitEmbeddingNewCell<EDGE>(nd) ;
setOrbitEmbeddingOnNewCell<EDGE>(nd) ;
copyCell<EDGE>(nd, d) ;
}
......@@ -264,7 +264,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
// {
// if(!sameFace(d,e))
// {
// setOrbitEmbeddingNewCell<FACE>(e);
// setOrbitEmbeddingOnNewCell<FACE>(e);
// copyCell<FACE>(e, d) ;
// }
// else
......@@ -282,7 +282,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
//
// if (isOrbitEmbedded<VERTEX>())
// {
// setOrbitEmbeddingNewCell<VERTEX>(d);
// setOrbitEmbeddingOnNewCell<VERTEX>(d);
// copyCell<VERTEX>(d, dPrev);
// }
//
......@@ -290,7 +290,7 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
// {
// if(!sameFace(d, dPrev))
// {
// setOrbitEmbeddingNewCell<FACE>(d);
// setOrbitEmbeddingOnNewCell<FACE>(d);
// copyCell<FACE>(d, dPrev) ;
// }
// else
......@@ -332,7 +332,7 @@ void EmbeddedGMap2::unsewFaces(Dart d)
{
if(!sameVertex(d,e))
{
setOrbitEmbeddingNewCell<VERTEX>(e);
setOrbitEmbeddingOnNewCell<VERTEX>(e);
copyCell<VERTEX>(e, d);
}
......@@ -341,14 +341,14 @@ void EmbeddedGMap2::unsewFaces(Dart d)
if(!sameVertex(d,e))
{
setOrbitEmbeddingNewCell<VERTEX>(e);
setOrbitEmbeddingOnNewCell<VERTEX>(e);
copyCell<VERTEX>(e, d);
}
}
if (isOrbitEmbedded<EDGE>())
{
setOrbitEmbeddingNewCell<EDGE>(e);
setOrbitEmbeddingOnNewCell<EDGE>(e);
copyCell<EDGE>(e, d);
}
}
......@@ -399,7 +399,7 @@ void EmbeddedGMap2::splitFace(Dart d, Dart e)
unsigned int fEmb = getEmbedding<FACE>(d) ;
setDartEmbedding<FACE>(phi_1(d), fEmb) ;
setDartEmbedding<FACE>(beta1(phi_1(d)), fEmb) ;
setOrbitEmbeddingNewCell<FACE>(e) ;
setOrbitEmbeddingOnNewCell<FACE>(e) ;
copyCell<FACE>(e, d) ;
}
}
......
......@@ -59,7 +59,7 @@ Dart EmbeddedGMap3::cutEdge(Dart d)
} while(e != d) ;
// embed a new cell for the new edge and copy the attributes' line (c) Lionel
setOrbitEmbeddingNewCell<EDGE>(phi1(d)) ;
setOrbitEmbeddingOnNewCell<EDGE>(phi1(d)) ;
copyCell<EDGE>(phi1(d), d) ;
}
......@@ -169,7 +169,7 @@ void EmbeddedGMap3::splitFace(Dart d, Dart e)
setDartEmbedding<FACE>(beta1(ee), fEmb) ;
setDartEmbedding<FACE>(beta0(beta1(ee)), fEmb) ;
setDartEmbedding<FACE>(beta1(beta0(beta1(ee))), fEmb) ;
setOrbitEmbeddingNewCell<FACE>(e);
setOrbitEmbeddingOnNewCell<FACE>(e);
copyCell<FACE>(e, d);
}
......@@ -248,7 +248,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
if(!sameVertex(dit, dd))
{
setOrbitEmbedding<VERTEX>(dit, getEmbedding<VERTEX>(dit)) ;
setOrbitEmbeddingNewCell<VERTEX>(dd);
setOrbitEmbeddingOnNewCell<VERTEX>(dd);
copyCell<VERTEX>(dd, dit);
}
else
......@@ -265,7 +265,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
if(!sameEdge(dit, dd))
{
setOrbitEmbedding<EDGE>(dit, getEmbedding<EDGE>(dit)) ;
setOrbitEmbeddingNewCell<EDGE>(dd);
setOrbitEmbeddingOnNewCell<EDGE>(dd);
copyCell<EDGE>(dd, dit);
}
else
......@@ -286,7 +286,7 @@ void EmbeddedGMap3::unsewVolumes(Dart d)
// embed the unsewn face with the face embedding
if (isOrbitEmbedded<FACE>())
{
setOrbitEmbeddingNewCell<FACE>(dd);
setOrbitEmbeddingOnNewCell<FACE>(dd);
copyCell<FACE>(dd, d);
}
}
......@@ -348,7 +348,7 @@ void EmbeddedGMap3::splitVolume(std::vector<Dart>& vd)
{
Dart v = vd.front() ;
Dart v23 = alpha2(v) ;
setOrbitEmbeddingNewCell<VOLUME>(v23) ;
setOrbitEmbeddingOnNewCell<VOLUME>(v23) ;
copyCell<VOLUME>(v23, v) ;
}
}
......
......@@ -39,9 +39,8 @@ void EmbeddedMap2::splitVertex(Dart d, Dart e)
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi1(dd), d) ;
copyDartEmbedding<VERTEX>(phi1(ee), e) ;
setOrbitEmbeddingNewCell<VERTEX>(e) ;
initDartEmbedding<VERTEX>(phi1(dd), getEmbedding<VERTEX>(d)) ;
setOrbitEmbeddingOnNewCell<VERTEX>(e) ;
copyCell<VERTEX>(e, d) ;
}
......@@ -52,8 +51,8 @@ void EmbeddedMap2::splitVertex(Dart d, Dart e)
if(isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi1(dd), dd) ;
copyDartEmbedding<FACE>(phi1(ee), ee) ;
initDartEmbedding<FACE>(phi1(dd), getEmbedding<FACE>(dd)) ;
initDartEmbedding<FACE>(phi1(ee), getEmbedding<FACE>(ee)) ;
}
}
......@@ -81,16 +80,16 @@ Dart EmbeddedMap2::cutEdge(Dart d)
if (isOrbitEmbedded<EDGE>())
{
copyDartEmbedding<EDGE>(phi2(d), d) ;
setOrbitEmbeddingNewCell<EDGE>(nd) ;
initDartEmbedding<EDGE>(phi2(d), getEmbedding<EDGE>(d)) ;
setOrbitEmbeddingOnNewCell<EDGE>(nd) ;
copyCell<EDGE>(nd, d) ;
}
if(isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(nd, d) ;
initDartEmbedding<FACE>(nd, getEmbedding<FACE>(d)) ;
Dart e = phi2(nd) ;
copyDartEmbedding<FACE>(phi1(e), e) ;
initDartEmbedding<FACE>(phi1(e), getEmbedding<FACE>(e)) ;
}
return nd;
......@@ -187,11 +186,13 @@ bool EmbeddedMap2::flipEdge(Dart d)
copyDartEmbedding<VERTEX>(d, phi1(e)) ;
copyDartEmbedding<VERTEX>(e, phi1(d)) ;
}
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi_1(d), d) ;
copyDartEmbedding<FACE>(phi_1(e), e) ;
}
return true ;
}
return false ;
......@@ -208,11 +209,13 @@ bool EmbeddedMap2::flipBackEdge(Dart d)
copyDartEmbedding<VERTEX>(d, phi1(e)) ;
copyDartEmbedding<VERTEX>(e, phi1(d)) ;
}
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi1(d), d) ;
copyDartEmbedding<FACE>(phi1(e), e) ;
}
return true ;
}
return false ;
......@@ -238,7 +241,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
}
if(isOrbitEmbedded<VOLUME>())
setOrbitEmbeddingNewCell<VOLUME>(d);
setOrbitEmbeddingOnNewCell<VOLUME>(d);
}
//void EmbeddedMap2::insertEdgeInVertex(Dart d, Dart e)
......@@ -254,7 +257,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
// {
// if(!sameFace(d,e))
// {
// setOrbitEmbeddingNewCell<FACE>(e);
// setOrbitEmbeddingOnNewCell<FACE>(e);
// copyCell<FACE>(e, d) ;
// }
// else
......@@ -272,7 +275,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
//
// if (isOrbitEmbedded<VERTEX>())
// {
// setOrbitEmbeddingNewCell<VERTEX>(d);
// setOrbitEmbeddingOnNewCell<VERTEX>(d);
// copyCell<VERTEX>(d, dPrev);
// }
//
......@@ -280,7 +283,7 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e)
// {
// if(!sameFace(d, dPrev))
// {
// setOrbitEmbeddingNewCell<FACE>(d);
// setOrbitEmbeddingOnNewCell<FACE>(d);
// copyCell<FACE>(d, dPrev) ;
// }
// else
......@@ -322,21 +325,21 @@ void EmbeddedMap2::unsewFaces(Dart d)
Dart ee = phi1(e) ;
if(!sameVertex(d, ee))
{
setOrbitEmbeddingNewCell<VERTEX>(ee);
setOrbitEmbeddingOnNewCell<VERTEX>(ee);
copyCell<VERTEX>(ee, d);
}
Dart dd = phi1(d) ;
if(!sameVertex(e, dd))
{
setOrbitEmbeddingNewCell<VERTEX>(dd);
setOrbitEmbeddingOnNewCell<VERTEX>(dd);
copyCell<VERTEX>(dd, e);
}
}
if (isOrbitEmbedded<EDGE>())
{
setOrbitEmbeddingNewCell<EDGE>(e);
setOrbitEmbeddingOnNewCell<EDGE>(e);
copyCell<EDGE>(e, d);
}
}
......@@ -365,8 +368,8 @@ void EmbeddedMap2::splitFace(Dart d, Dart e)
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi_1(e), d) ;
copyDartEmbedding<VERTEX>(phi_1(d), e) ;
initDartEmbedding<VERTEX>(phi_1(e), getEmbedding<VERTEX>(d)) ;
initDartEmbedding<VERTEX>(phi_1(d), getEmbedding<VERTEX>(e)) ;
}
if(isOrbitEmbedded<EDGE>())
......@@ -376,8 +379,8 @@ void EmbeddedMap2::splitFace(Dart d, Dart e)
if (isOrbitEmbedded<FACE>())
{
copyDartEmbedding<FACE>(phi_1(d), d) ;
setOrbitEmbeddingNewCell<FACE>(e) ;
initDartEmbedding<FACE>(phi_1(d), getEmbedding<FACE>(d)) ;
setOrbitEmbeddingOnNewCell<FACE>(e) ;
copyCell<FACE>(e, d) ;
}
}
......@@ -465,23 +468,23 @@ void EmbeddedMap2::splitSurface(std::vector<Dart>& vd, bool firstSideClosed, boo
// embed the vertex embedded from the origin volume to the new darts
if(isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(phi2(dit), phi1(dit));
copyDartEmbedding<VERTEX>(phi2(dit2), phi1(dit2));
initDartEmbedding<VERTEX>(phi2(dit), getEmbedding<VERTEX>(phi1(dit)));
initDartEmbedding<VERTEX>(phi2(dit2), getEmbedding<VERTEX>(phi1(dit2)));
}
// embed the edge embedded from the origin volume to the new darts
if(isOrbitEmbedded<EDGE>())
{
unsigned int eEmb = getEmbedding<EDGE>(dit) ;
setDartEmbedding<EDGE>(phi2(dit), eEmb);
setDartEmbedding<EDGE>(phi2(dit2), eEmb);
initDartEmbedding<EDGE>(phi2(dit), getEmbedding<EDGE>(dit));
setOrbitEmbeddingOnNewCell<EDGE>(phi2(dit2));
copyCell<EDGE>(dit2, dit);
}
// embed the volume embedded from the origin volume to the new darts
if(isOrbitEmbedded<VOLUME>())
{
copyDartEmbedding<VOLUME>(phi2(dit), dit);
copyDartEmbedding<VOLUME>(phi2(dit2), dit2);
initDartEmbedding<VOLUME>(phi2(dit), getEmbedding<VOLUME>(dit));
initDartEmbedding<VOLUME>(phi2(dit2), getEmbedding<VOLUME>(dit2));
}
}
}
......@@ -495,13 +498,14 @@ unsigned int EmbeddedMap2::closeHole(Dart d, bool forboundary)
{
if (isOrbitEmbedded<VERTEX>())
{
copyDartEmbedding<VERTEX>(f, phi2(phi_1(f))) ;
initDartEmbedding<VERTEX>(f, getEmbedding<VERTEX>(phi1(phi2(f)))) ;
}
if (isOrbitEmbedded<EDGE>())
{
copyDartEmbedding<EDGE>(f, phi2(f)) ;
initDartEmbedding<EDGE>(f, getEmbedding<EDGE>(phi2(f))) ;
}
f = phi1(f) ;
} while(dd != f) ;
......
......@@ -38,7 +38,7 @@ Dart EmbeddedMap3::splitVertex(std::vector<Dart>& vd)
if(isOrbitEmbedded<VERTEX>())
{
setOrbitEmbeddingNewCell<VERTEX>(d2);
setOrbitEmbeddingOnNewCell<VERTEX>(d2);
copyCell<VERTEX>(d2, d);
setOrbitEmbedding<VERTEX>( d, getEmbedding<VERTEX>(d));
}
......@@ -81,7 +81,7 @@ Dart EmbeddedMap3::cutEdge(Dart d)
// embed the new darts created in the cut edge
setOrbitEmbedding<EDGE>(d, getEmbedding<EDGE>(d)) ;
// embed a new cell for the new edge and copy the attributes' line (c) Lionel
setOrbitEmbeddingNewCell<EDGE>(nd) ;
setOrbitEmbeddingOnNewCell<EDGE>(nd) ;
copyCell<EDGE>(nd, d) ;
}
......@@ -258,11 +258,11 @@ void EmbeddedMap3::splitFace(Dart d, Dart e)
if(isOrbitEmbedded<FACE2>())
{
copyDartEmbedding<FACE2>(phi_1(d), d) ;
setOrbitEmbeddingNewCell<FACE2>(e) ;
setOrbitEmbeddingOnNewCell<FACE2>(e) ;
copyCell<FACE2>(e, d) ;
copyDartEmbedding<FACE2>(phi_1(dd), dd) ;
setOrbitEmbeddingNewCell<FACE2>(ee) ;
setOrbitEmbeddingOnNewCell<FACE2>(ee) ;
copyCell<FACE2>(ee, dd) ;
}
......@@ -271,7 +271,7 @@ void EmbeddedMap3::splitFace(Dart d, Dart e)
unsigned int fEmb = getEmbedding<FACE>(d) ;
setDartEmbedding<FACE>(phi_1(d), fEmb) ;
setDartEmbedding<FACE>(phi_1(ee), fEmb) ;
setOrbitEmbeddingNewCell<FACE>(e);
setOrbitEmbeddingOnNewCell<FACE>(e);
copyCell<FACE>(e, d);
}
......@@ -390,7 +390,7 @@ void EmbeddedMap3::unsewVolumes(Dart d)
if(!sameVertex(dit, dd))
{
setOrbitEmbedding<VERTEX>(dit, getEmbedding<VERTEX>(dit)) ;
setOrbitEmbeddingNewCell<VERTEX>(dd);
setOrbitEmbeddingOnNewCell<VERTEX>(dd);
copyCell<VERTEX>(dd, dit);
}
else
......@@ -406,7 +406,7 @@ void EmbeddedMap3::unsewVolumes(Dart d)
{
if(!sameEdge(dit, dd))
{
setOrbitEmbeddingNewCell<EDGE>(dd);
setOrbitEmbeddingOnNewCell<EDGE>(dd);
copyCell<EDGE>(dd, dit);
copyDartEmbedding<EDGE>(phi3(dit), dit) ;
}
......@@ -429,7 +429,7 @@ void EmbeddedMap3::unsewVolumes(Dart d)
// embed the unsewn face with the face embedding
if (isOrbitEmbedded<FACE>())
{
setOrbitEmbeddingNewCell<FACE>(dd);
setOrbitEmbeddingOnNewCell<FACE>(dd);
copyCell<FACE>(dd, d);
}
}
......@@ -485,7 +485,7 @@ void EmbeddedMap3::splitVolume(std::vector<Dart>& vd)
{
Dart v = vd.front() ;
Dart v23 = alpha2(v) ;
setOrbitEmbeddingNewCell<VOLUME>(v23) ;
setOrbitEmbeddingOnNewCell<VOLUME>(v23) ;
copyCell<VOLUME>(v23, v) ;
}
}
......
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