Reduce the solver convergence tolerance by a factor of 100, to

just LENGTH_EPS/1e2. At least in theory, that should still be
more than enough; all we need is for equal things to be equal
afterward, and even LENGTH_EPS/2 would guarantee that.

[git-p4: depot-paths = "//depot/solvespace/": change = 2110]
solver
Jonathan Westhues 2010-01-18 02:28:47 -08:00
parent 7337b23f0f
commit 66abc19ef1
1 changed files with 9 additions and 1 deletions

View File

@ -1,7 +1,15 @@
#include "solvespace.h"
// This tolerance is used to determine whether two (linearized) constraints
// are linearly dependent. If this is too small, then we will attempt to
// solve truly inconsistent systems and fail. But if it's too large, then
// we will give up on legitimate systems like a skinny right angle triangle by
// its hypotenuse and long side.
const double System::RANK_MAG_TOLERANCE = 1e-4;
const double System::CONVERGE_TOLERANCE = 1e-10;
// The solver will converge all unknowns to within this tolerance. This must
// always be much less than LENGTH_EPS, and in practice should be much less.
const double System::CONVERGE_TOLERANCE = (LENGTH_EPS/(1e2));
bool System::WriteJacobian(int tag) {
int a, i, j;