Commit b6dd249d authored by pitiot's avatar pitiot

change

parent 112814a7
......@@ -35,26 +35,26 @@ SimpleGMap3::SimpleGMap3()
// CellMarker<EDGE> mE(myMap);
Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
myMap.check();
// Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
// cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
// myMap.check();
// Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
// position[dp] = typename PFP::VEC3(0.5,0.5,-0.5);
// position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
// position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5);
// position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5);
// position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
position[dp] = typename PFP::VEC3(0.5,0.5,-0.5);
position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5);
position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5);
position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
// Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(d))))))));
// Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(dp))))))));
// myMap.sewVolumes(dtemp,dp);
// Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
// Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
// Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
// Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, myMap.begin(), pl);
// myMap.check();
// myMap.check();
// for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
// position[i] += VEC3(2,0,0);
......
......@@ -697,7 +697,7 @@ void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typena
DartMarkerStore<MAP> m(map);
DartMarkerStore<MAP> newBoundaryV(map);
CellMarkerStore<MAP,VERTEX> newBoundaryV(map);
//
// 1-4 flip of all tetrahedra
......@@ -709,7 +709,7 @@ void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typena
for(Dart ditWF = tWF.begin() ; ditWF != tWF.end() ; ditWF = tWF.next())
{
if(!map.isBoundaryFace(ditWF) && !m.isMarked(ditWF))
m.markOrbit<FACE>(ditWF);
m.markOrbit<FACE>(ditWF);
}
VEC3 volCenter(0.0);
......@@ -742,7 +742,7 @@ void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typena
TraversorW<MAP> tWb(map);
for(Dart dit = tWb.begin() ; dit != tWb.end() ; dit = tWb.next())
{
if(map.isBoundaryAdjacentVolume(dit))
if(map.isVolumeIncidentToBoundary(dit))
{
Traversor3WE<MAP> tWE(map, dit);
for(Dart ditWE = tWE.begin() ; ditWE != tWE.end() ; ditWE = tWE.next())
......@@ -760,7 +760,7 @@ void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typena
Dart dres = Volume::Modelisation::Tetrahedralization::flip1To3<PFP>(map, dit);
position[dres] = faceCenter;
newBoundaryV.markOrbit<VERTEX>(dres);
newBoundaryV.mark(dres);
}
}
......
......@@ -49,7 +49,7 @@ public :
VEC3 m_positionFace;
unsigned int state;
unsigned int compteur_anti_infinite;
unsigned int crossCell ;
ParticleCell3D(MAP& map) : m(map)
......@@ -107,10 +107,12 @@ public :
void volumeSpecialCase(const VEC3& current);
void move(const VEC3& newCurrent)
{
crossCell = NO_CROSS ;
compteur_anti_infinite = 0;
if(!Geom::arePointsEquals(newCurrent, this->getPosition()))
{
switch(state) {
......
......@@ -568,8 +568,16 @@ void ParticleCell3D<PFP>::edgeState(const VEC3& current)
else if(wsof==Geom::UNDER) {
d = nextNonPlanar(d);
this->m_positionFace = pointInFace(d);
volumeState(current);
return;
this->compteur_anti_infinite++;
if(this->compteur_anti_infinite < 300)
{
volumeState(current);
}
else
{
CGoGNout<< "infinite loop detected" << CGoGNendl;
}
return;
}
VEC3 norm = Algo::Surface::Geometry::faceNormal<PFP>(m,d,position);
......@@ -769,7 +777,16 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current)
if(isAbove(current,d,this->m_position)==Geom::UNDER) {
// this->m_position = m.intersectDartPlaneLine(d,this->m_position,current);
Algo::Surface::Geometry::intersectionLineConvexFace<PFP>(m,d,position,this->m_position,current-this->m_position,this->m_position);
faceState(current,wsof);
this->compteur_anti_infinite++;
if(this->compteur_anti_infinite < 300)
{
faceState(current,wsof);
}
else
{
CGoGNout<< "infinite loop detected" << CGoGNendl;
}
}
else {
// this->m_position = m.intersectDartPlaneLineEdge(d,this->m_position,current);
......
......@@ -680,6 +680,7 @@ unsigned int IHM3<PFP>::subdivideFace(Dart d, bool triQuad)
}
m_map.setCurrentLevel(cur) ;
return cur;
}
template <typename PFP>
......
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