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

minor bug fixes

parent f35a6dd1
...@@ -196,6 +196,9 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -196,6 +196,9 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
VertexAutoAttribute<NoTypeNameAttribute<std::vector<Dart> >, typename PFP::MAP::IMPL> vecDartsPerVertex(map, "incidents") ; VertexAutoAttribute<NoTypeNameAttribute<std::vector<Dart> >, typename PFP::MAP::IMPL> vecDartsPerVertex(map, "incidents") ;
DartMarkerNoUnmark<typename PFP::MAP> m(map) ; DartMarkerNoUnmark<typename PFP::MAP> m(map) ;
unsigned int vemb = EMBNULL;
auto fsetemb = [&] (Dart d) { map.template setDartEmbedding<VERTEX>(d, vemb); };
unsigned nbf = qt.roots.size() ; unsigned nbf = qt.roots.size() ;
// for each root face // for each root face
...@@ -206,13 +209,12 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -206,13 +209,12 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
for (unsigned int j = 0; j < 3; ++j) for (unsigned int j = 0; j < 3; ++j)
{ {
unsigned int idx = qt.roots[i]->indices[j] ; unsigned int idx = qt.roots[i]->indices[j] ;
unsigned int emb = qt.verticesID[idx] ; vemb = qt.verticesID[idx] ;
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, emb) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb) ; map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb) ;
m.mark(d) ; // mark on the fly to unmark on second loop m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[emb].push_back(d) ; // store incident darts for fast adjacency reconstruction vecDartsPerVertex[vemb].push_back(d) ; // store incident darts for fast adjacency reconstruction
d = map.phi1(d) ; d = map.phi1(d) ;
} }
} }
......
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
p1 *= 1.0 / 3.0 ; p1 *= 1.0 / 3.0 ;
p2 *= 1.0 / 3.0 ; p2 *= 1.0 / 3.0 ;
if(m_map.isBoundaryFace(d)) if(m_map.isFaceIncidentToBoundary(d))
{ {
Dart df = m_map.findBoundaryEdgeOfFace(d); Dart df = m_map.findBoundaryEdgeOfFace(d);
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
......
...@@ -167,7 +167,7 @@ void Map2MR<PFP>::addNewLevelSqrt3() ...@@ -167,7 +167,7 @@ void Map2MR<PFP>::addNewLevelSqrt3()
for (Dart dit = t.begin(); dit != t.end(); dit = t.next()) for (Dart dit = t.begin(); dit != t.end(); dit = t.next())
{ {
//if it is an even level (triadic refinement) and a boundary face //if it is an even level (triadic refinement) and a boundary face
if((m_map.getCurrentLevel()%2 == 0) && m_map.isBoundaryFace(dit)) if((m_map.getCurrentLevel()%2 == 0) && m_map.isFaceIncidentToBoundary(dit))
{ {
//find the boundary edge //find the boundary edge
Dart df = m_map.findBoundaryEdgeOfFace(dit); Dart df = m_map.findBoundaryEdgeOfFace(dit);
......
...@@ -364,7 +364,7 @@ public: ...@@ -364,7 +364,7 @@ public:
//! Tell if a face of the volume is on the boundary //! Tell if a face of the volume is on the boundary
/* @param d a dart /* @param d a dart
*/ */
bool isBoundaryAdjacentVolume(Dart d) const; bool isVolumeIncidentToBoundary(Dart d) const;
//! Tell if an edge of the volume is on the boundary //! Tell if an edge of the volume is on the boundary
/* @param d a dart /* @param d a dart
......
...@@ -1024,7 +1024,7 @@ inline bool Map3<MAP_IMPL>::isBoundaryFace(Dart d) const ...@@ -1024,7 +1024,7 @@ inline bool Map3<MAP_IMPL>::isBoundaryFace(Dart d) const
} }
template <typename MAP_IMPL> template <typename MAP_IMPL>
bool Map3<MAP_IMPL>::isBoundaryAdjacentVolume(Dart d) const bool Map3<MAP_IMPL>::isVolumeIncidentToBoundary(Dart d) const
{ {
Traversor3WF<Map3<MAP_IMPL> > tra(*this, d); Traversor3WF<Map3<MAP_IMPL> > tra(*this, d);
for(Dart dit = tra.begin() ; dit != tra.end() ; dit = tra.next()) for(Dart dit = tra.begin() ; dit != tra.end() ; dit = tra.next())
......
...@@ -167,12 +167,12 @@ private: // private members ...@@ -167,12 +167,12 @@ private: // private members
private: // private constants private: // private constants
// D65 reference white // D65 reference white
static const REAL Xn = 0.950456 ; static constexpr REAL Xn = 0.950456 ;
static const REAL Yn = 1.0 ; static constexpr REAL Yn = 1.0 ;
static const REAL Zn = 1.088754 ; static constexpr REAL Zn = 1.088754 ;
static const REAL un = 0.197832 ; static constexpr REAL un = 0.197832 ;
static const REAL vn = 0.468340 ; static constexpr REAL vn = 0.468340 ;
} ; } ;
......
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