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

better check for MAX_LC

parent 0328cb67
No related branches found
No related tags found
No related merge requests found
......@@ -193,14 +193,17 @@ static double LC_MVertex_PNTS(GEntity *ge, double U, double V)
GVertex *v1 = ged->getBeginVertex();
GVertex *v2 = ged->getEndVertex();
if (v1 && v2){
double lc1 = v1->prescribedMeshSizeAtVertex();
double lc2 = v2->prescribedMeshSizeAtVertex();
if (lc1 >= MAX_LC && lc2 >= MAX_LC){
// FIXME we might want to remove this to make all lc treatment consistent
return CTX::instance()->lc / 10.;
}
else{
Range<double> range = ged->parBounds(0);
double a = (U - range.low()) / (range.high() - range.low());
double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() +
(a) * v2->prescribedMeshSizeAtVertex() ;
// FIXME we might want to remove this to make all lc treatment consistent
if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
return lc;
return (1 - a) * lc1 + (a)* lc2;
}
}
else
return MAX_LC;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment