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