Changeset 3266

Show
Ignore:
Timestamp:
10/15/2009 10:17:06 AM (4 months ago)
Author:
guyer
Message:

Use existing L2norm() function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fipy/terms/term.py

    r3043 r3266  
    8181    def _calcResidual(self, var, matrix, RHSvector): 
    8282 
    83         L2norm = numerix.sqrt(numerix.sum(self._calcResidualVector(var, matrix, RHSvector)**2)) 
    84         RHSL2norm = numerix.sqrt(numerix.sum(RHSvector**2)) 
     83        L2norm = numerix.L2norm(self._calcResidualVector(var, matrix, RHSvector)) 
     84        RHSL2norm = numerix.L2norm(RHSvector) 
    8585         
    8686        if RHSL2norm == 0: 
     
    193193    def justResidualVector(self, var, solver=None, boundaryConditions=(), dt=1., underRelaxation=None, residualFn=None): 
    194194        r""" 
    195         Builds and the `Term`'s linear system once. This method 
     195        Builds the `Term`'s linear system once. This method 
    196196        also recalculates and returns the residual as well as applying 
    197197        under-relaxation.