Commit 9e8736d8 authored by untereiner's avatar untereiner
Browse files

bug fix : isBoundaryMarked3

parent a387d890
...@@ -171,16 +171,19 @@ void MyQT::cb_Open() ...@@ -171,16 +171,19 @@ void MyQT::cb_Open()
float maxV = 0.0f; float maxV = 0.0f;
for (Dart d = tra.begin(); d != tra.end(); d = tra.next()) for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{ {
float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position); // float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
color[d] = PFP::VEC3(v,0,0); // color[d] = PFP::VEC3(v,0,0);
if (v>maxV) // if (v>maxV)
maxV=v; // maxV=v;
}
for (unsigned int i = color.begin(); i != color.end(); color.next(i)) if(myMap.isBoundaryAdjacentVolume(d))
{ color[d] = PFP::VEC3(0,0,0);
color[i][0] /= maxV;
color[i][2] = 1.0f - color[i][0];
} }
// for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// {
// color[i][0] /= maxV;
// color[i][2] = 1.0f - color[i][0];
// }
// SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData(myMap, position, 0.8f, 0.8f, 0.8f); m_topo_render->updateData(myMap, position, 0.8f, 0.8f, 0.8f);
...@@ -414,20 +417,20 @@ int main(int argc, char **argv) ...@@ -414,20 +417,20 @@ int main(int argc, char **argv)
for (Dart d = tra.begin(); d != tra.end(); d = tra.next()) for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{ {
float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position); float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
color[d] = PFP::VEC3(v,0,0); // color[d] = PFP::VEC3(v,0,0);
if (v>maxV) // if (v>maxV)
maxV=v; // maxV=v;
}
for (unsigned int i = color.begin(); i != color.end(); color.next(i)) if(myMap.isBoundaryAdjacentVolume(d))
{ color[d] = PFP::VEC3(0,0,0);
color[i][0] /= maxV; else
color[i][2] = 1.0f - color[i][0]; color[d] = PFP::VEC3(v,0,0);
} }
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test2.nas"); // for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh"); // {
// Algo::Volume::Export::exportTet<PFP>(myMap,position,"/tmp/test2.tet"); // color[i][0] /= maxV;
// Algo::Volume::Export::exportNodeEle<PFP>(myMap,position,"/tmp/test2"); // color[i][2] = 1.0f - color[i][0];
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test4.vtu"); // }
} }
else else
......
...@@ -1029,7 +1029,7 @@ bool Map3<MAP_IMPL>::isBoundaryAdjacentVolume(Dart d) const ...@@ -1029,7 +1029,7 @@ bool Map3<MAP_IMPL>::isBoundaryAdjacentVolume(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())
{ {
if(isBoundaryMarked3(phi3(dit))) if(this->template isBoundaryMarked<3>(phi3(dit)))
return true ; return true ;
} }
return false; return false;
......
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