- Timestamp:
- 07/14/2008 03:16:24 PM (6 months ago)
- Files:
-
- 1 modified
-
trunk/fipy/solvers/pysparse/linearLUSolver.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fipy/solvers/pysparse/linearLUSolver.py
r2331 r2680 89 89 LU = superlu.factorize(L._getMatrix().to_csr()) 90 90 91 error0 = numerix.sqrt(numerix.sum((L * x - b)**2)) 92 91 93 for iteration in range(self.iterations): 92 94 errorVector = L * x - b 93 tol = max(numerix.absolute(errorVector*maxdiag))94 # Multiplied by maxdiag so that it is equal to the residual seen externally95 95 96 if tol<= self.tolerance:96 if (numerix.sqrt(numerix.sum(errorVector**2)) / error0) <= self.tolerance: 97 97 break 98 98 … … 100 100 LU.solve(errorVector, xError) 101 101 x[:] = x - xError 102 103 #tol = max(numerix.absolute(xError))104 # Old termination condition was based on the correction made to x
FiPy: A Finite Volume PDE Solver Using Python