Skip to content
Snippets Groups Projects
Commit 7384796a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

work 3m

parent 30954f8f
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@
int Msg::_commRank = 0;
int Msg::_commSize = 1;
int Msg::_verbosity = 5;
int Msg::_progressMeterStep = 10;
int Msg::_progressMeterStep = 20;
int Msg::_progressMeterCurrent = 0;
std::map<std::string, double> Msg::_timers;
int Msg::_warningCount = 0;
......
......@@ -510,7 +510,7 @@ PointNumero *DocRecord::ConvertDlistToArray(DListPeek *dlist, int *n)
return ptr;
}
// build ready to use voronoi datas
// build ready to use voronoi data
void DocRecord::ConvertDListToVoronoiData()
{
if (_adjacencies){
......@@ -595,7 +595,7 @@ void DocRecord::makePosView(std::string fileName, GFace *gf)
}
}
else {
fprintf(f,"SP(%g,%g,%g) {%g};\n",pc[0],pc[1],0.0,-(double)i);
fprintf(f,"SP(%g,%g,%g){%g};\n", pc[0] ,pc[1], 0., -(double)i);
}
}
fprintf(f,"};\n");
......@@ -605,7 +605,6 @@ void DocRecord::makePosView(std::string fileName, GFace *gf)
void DocRecord::printMedialAxis(Octree *_octree, std::string fileName, GFace *gf, GEdge *ge)
{
FILE *f = fopen(fileName.c_str(),"w");
if (_adjacencies){
fprintf(f,"View \"medial axis\" {\n");
......@@ -863,7 +862,6 @@ void DocRecord::setPoints(fullMatrix<double> *p)
}
}
void DocRecord::recur_tag_triangles(int iTriangle, std::set<int>& taggedTriangles,
std::map<std::pair<void*, void*>,
std::pair<int,int> > &edgesToTriangles)
......
......@@ -121,8 +121,8 @@ void printVoronoi(GRegion *gr, std::set<SPoint3> &candidates)
if (allTets.size() != 2 ) continue;
SPoint3 pc1 = allTets[0]->circumcenter();
SPoint3 pc2 = allTets[1]->circumcenter();
std::set<SPoint3>::const_iterator it1 = candidates.find(pc1);
std::set<SPoint3>::const_iterator it2 = candidates.find(pc2);
//std::set<SPoint3>::const_iterator it1 = candidates.find(pc1);
//std::set<SPoint3>::const_iterator it2 = candidates.find(pc2);
//if( it1 != candidates.end() || it2 != candidates.end())
fprintf(outfile2,"SL(%g,%g,%g,%g,%g,%g) {%g,%g};\n",
pc1.x(), pc1.y(), pc1.z(), pc2.x(), pc2.y(), pc2.z(),
......
......@@ -288,11 +288,16 @@ PView *PView::getViewByName(const std::string &name, int timeStep, int partition
return 0;
}
int PView::getViewIndexByName(const std::string &name, int timeStep, int partition)
PView *PView::getViewByFileName(const std::string &name, int timeStep, int partition)
{
PView *view = getViewByName(name, timeStep, partition);
if(view) return view->getIndex();
return -1;
// search views from most recently to least recently added
for(int i = list.size() - 1; i >= 0; i--){
if(list[i]->getData()->getFileName() == name &&
((timeStep < 0 || !list[i]->getData()->hasTimeStep(timeStep)) ||
(partition < 0 || !list[i]->getData()->hasPartition(timeStep, partition))))
return list[i];
}
return 0;
}
PView *PView::getViewByNum(int num, int timeStep, int partition)
......
......@@ -101,7 +101,7 @@ class PView{
// return view only if it does *not* contain that partition)
static PView *getViewByName(const std::string &name, int timeStep=-1,
int partition=-1);
static int getViewIndexByName(const std::string &name, int timeStep=-1,
static PView *getViewByFileName(const std::string &name, int timeStep=-1,
int partition=-1);
static PView *getViewByNum(int num, int timeStep=-1, int partition=-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment