toto

parent b0465702
......@@ -27,6 +27,25 @@ gmshFace::gmshFace(GModel *m, Surface *face)
resetMeshAttributes();
}
// a face is degenerate if
bool gmshFace::degenerate(int dim) const {
std::list<GEdge*> eds = edges();
int numNonDegenerate = 0;
std::set<GEdge*> t;
for(std::list<GEdge*>::iterator it = eds.begin(); it != eds.end(); ++it){
GEdge *e = *it;
GVertex *start = e->getBeginVertex();
GVertex *next = e->getEndVertex();
if (start != next && t.find(e) == t.end()){
numNonDegenerate++;
}
t.insert(e);
}
// printf("%d \n",numNonDegenerate);
return numNonDegenerate <= 1;
}
void gmshFace::resetNativePtr(Surface *face)
{
s = face;
......
......@@ -36,6 +36,7 @@ class gmshFace : public GFace {
virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true) const;
virtual void resetMeshAttributes();
void resetNativePtr(Surface *_s);
bool degenerate(int dim) const;
};
#endif
......@@ -54,7 +54,7 @@ struct HilbertSort
bbox *= 1.01;
MVertex**pv = &v[0];
int depth;
MultiscaleSortHilbert(pv, (int)v.size(), 64, 0.125,&depth);
MultiscaleSortHilbert(pv, (int)v.size(), 10, 0.125,&depth);
}
};
......@@ -269,7 +269,7 @@ void HilbertSort::Sort(MVertex** vertices, int arraysize, int e, int d,
void SortHilbert (std::vector<MVertex*>& v)
{
//HilbertSort h(1000);
HilbertSort h;
HilbertSort h(1000);
//HilbertSort h;
h.Apply(v);
}
......@@ -14,3 +14,5 @@ Plane Surface(6) = {5};
//Recombine Surface {6};
//+
Physical Surface(7) = {6};
//+
Recombine Surface {6};
This source diff could not be displayed because it is too large. You can view the blob instead.
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 sign in to comment