Commit 91d94657 authored by pitiot's avatar pitiot

maj ihm

parent 640661c3
......@@ -173,6 +173,12 @@ public:
*/
Dart faceOldestDart(Dart d) ;
//! Test if dart d and e belong to the same face
/*! @param d a dart
* @param e a dart
*/
bool sameFace(Dart d, Dart e) ;
/**
* Return true if the edge of d in the current level map
* has already been subdivided to the next level
......
......@@ -48,8 +48,8 @@ public:
virtual void faceState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross) ;
void move(const VEC3& goal, CellMarkerMemo<FACE>& memo_cross) ;
std::vector<Dart> get_memo(const VEC3& goal);
std::vector<Dart> move(const VEC3& goal, CellMarkerMemo<FACE>& memo_cross) ;
std::vector<Dart> move(const VEC3& goal);
} ;
#include "particle_cell_2D_memo.hpp"
......
......@@ -6,7 +6,7 @@ std::vector<Dart> ParticleCell2DMemo<PFP>::move(const VEC3& goal)
if (!Geom::arePointsEquals(goal, this->getPosition()))
{
CellMarkerMemo<FACE> memo_cross(this->m);
memo_cross.mark(this->d);
switch (this->getState())
{
......
......@@ -35,7 +35,7 @@ Orientation2D testOrientation2D(const VEC3& P, const VEC3& Pa, const VEC3& Pb)
{
typedef typename VEC3::DATA_TYPE T ;
const T zero = 0.00001 ;
const T zero = 0.000001 ;
T p = (P[0] - Pa[0]) * (Pb[1] - Pa[1]) - (Pb[0] - Pa[0]) * (P[1] - Pa[1]) ;
......
......@@ -203,6 +203,18 @@ Dart ImplicitHierarchicalMap::faceOldestDart(Dart d)
return oldest ;
}
bool ImplicitHierarchicalMap::sameFace(Dart d, Dart e)
{
Dart it = d ;
do
{
if(it == e)
return true ;
it = phi1(it) ;
} while(it != d) ;
return false ;
}
bool ImplicitHierarchicalMap::edgeIsSubdivided(Dart d)
{
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
......
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