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

force subdivision to the smallest level if tol<0

parent 4da6476e
No related branches found
No related tags found
No related merge requests found
......@@ -1066,8 +1066,11 @@ void adaptiveElements<T>::adapt(double tol, int numComp,
it != T::all.end(); it++)
(*it)->visible = false;
if(!plug || tol != 0.)
T::error(fabs(maxVal - minVal), tol);
if(!plug || tol != 0.){
double avg = fabs(maxVal - minVal);
if(tol < 0) avg = 1.; // force visibility to the smallest subdivision
T::error(avg, tol);
}
if(plug)
plug->assignSpecificVisibility();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment