- Timestamp:
- 08/21/2008 12:42:39 PM (5 months ago)
- Files:
-
- 1 modified
-
trunk/fipy/terms/term.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fipy/terms/term.py
r2727 r2728 172 172 - `dt`: The time step size. 173 173 - `underRelaxation`: Usually a value between `0` and `1` or `None` in the case of no under-relaxation 174 - `residualFn`: A function that takes var, matrix, and RHSvector arguments, used to customize the residual calculation. 174 175 175 176 """ … … 204 205 - `dt`: The time step size. 205 206 - `underRelaxation`: Usually a value between `0` and `1` or `None` in the case of no under-relaxation 207 - `residualFn`: A function that takes var, matrix, and RHSvector arguments used to customize the residual calculation. 206 208 207 209 """ 208 210 solver, matrix, RHSvector = self._prepareLinearSystem(var, solver, boundaryConditions, dt) 209 211 210 print 'RHSvector',RHSvector211 212 212 if underRelaxation is not None: 213 213 matrix, RHSvector = self._applyUnderRelaxation(matrix, var, RHSvector, underRelaxation) 214 214 215 215 residualFn = residualFn or self._calcResidual 216 residual = residualFn(var, matrix, RHSvector) 217 218 return residual 216 217 return residualFn(var, matrix, RHSvector) 219 218 220 219 def _verifyCoeffType(self, var):
FiPy: A Finite Volume PDE Solver Using Python