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

better conv warning
parent e2f36c4e
No related branches found
No related tags found
No related merge requests found
// $Id: GFace.cpp,v 1.26 2006-12-03 01:09:34 geuzaine Exp $ // $Id: GFace.cpp,v 1.27 2006-12-04 15:55:05 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -449,17 +449,16 @@ void GFace::XYZtoUV(const double X, const double Y, const double Z, ...@@ -449,17 +449,16 @@ void GFace::XYZtoUV(const double X, const double Y, const double Z,
jac[2][1] * (Z - P.z())); jac[2][1] * (Z - P.z()));
err = DSQR(Unew - U) + DSQR(Vnew - V); err = DSQR(Unew - U) + DSQR(Vnew - V);
err2 = DSQR(X - P.x()) + DSQR(Y - P.y()) + DSQR(Z - P.z()); err2 = sqrt(DSQR(X - P.x()) + DSQR(Y - P.y()) + DSQR(Z - P.z()));
iter++; iter++;
U = Unew; U = Unew;
V = Vnew; V = Vnew;
} }
if(iter < MaxIter && err <= Precision && if(iter < MaxIter && err <= Precision &&
Unew <= umax && Vnew <= vmax && Unew <= umax && Vnew <= vmax &&
Unew >= umin && Vnew >= vmin){ Unew >= umin && Vnew >= vmin){
if (onSurface && err2 > Precision * CTX.lc) if (onSurface && err2 > 1.e-4 * CTX.lc)
Msg(WARNING,"Converged for i=%d j=%d (err=%g iter=%d) BUT xyz error = %g", Msg(WARNING,"Converged for i=%d j=%d (err=%g iter=%d) BUT xyz error = %g",
i, j, err, iter, err2); i, j, err, iter, err2);
return; return;
......
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