Commits

Anonymous committed 1c199c3

refactoring

Comments (0)

Files changed (5)

src/lamg/amg/coarse.py

         return continueWhile
     
     
-    def aggregationStage(self, spam, coarseSet, delta):
+    def aggregationStage(self, _, coarseSet, delta):
         """
             % Purpose: further aggregate the coarse aggregate set defined
             % by seed, using an affinity strength threshold delta Input:
 
     
     
-    def aggregationStage(self, spam, coarseSet, delta):
+    def aggregationStage(self, _, coarseSet, delta):
         """
         """
         raise NotImplementedError("TODO")
 
     
     
-    def aggregationStage(self, spam, coarseSet, delta):
+    def aggregationStage(self, _, coarseSet, delta):
         """
         """
         raise NotImplementedError("TODO")
         
         
     
-    def _postVisit(self, i, spam):
+    def _postVisit(self, i, _):
         """
                 % Purpose: update affinities among nodes upon aggregation.
             % Input: i = node to be aggregated with the seed s. Must be a
         return result
     
     
-    def _aggregationStageLoop(self, lev, cycleIndex, nu, coarseSet, spam):
+    def _aggregationStageLoop(self, lev, cycleIndex, nu, coarseSet, _):
         """
             %-----------------------------------------
             % Loop over coarsening stages

src/lamg/amg/level.py

             % Useful for debugging. Detach s from its aggregate. Size of
             % aggregate containing s
         """
-        (k, spam) = lab.find(self.R[:, s])
+        (k, _) = lab.find(self.R[:, s])
         aggregateSize = lab.sum_(self.R[k, :], 2)
         associates = lab.find(aggregateSize > 1)
         
         return x
     
     
-    def interpolate(self, x, spam):
+    def interpolate(self, x, _):
         """
             % Restrict the function X at this level to the next-finer
             % level.
         for q in range(self.numStages, -1, 1): # CHECK: range bounds
             Pstage = self.getInterpolation(q)
             for i in range(lab.numel(c)):
-                (a, spam) = lab.find(Pstage[:, c[i]])
+                (a, _) = lab.find(Pstage[:, c[i]])
                 #% Inlined unique() function so that this code works
                 #% for the non-caliber-1 elimination interpolations
                 b = lab.sort(a)
         
     # IMPL: Level
     
-    def setP(self, spam):
+    def setP(self, _):
         """
             % Reconstruct level based on a new interpolation operator P.
             % Applies to non-elimination levels only.
         raise Exception("Finest level has no P")
     
     
-    def coarseType(self, spam):
+    def coarseType(self, _):
         """
             % Restrict the next-finer level function X to this level using
             % the coarse-type operator (X <- T*X).
         raise Exception("Finest level has no transfer operator")
     
     
-    def restrict(self, spam):
+    def restrict(self, _):
         """
         % Restrict the next-finer level function X to this level.
         """
         raise Exception("Finest level has no transfer operators")
     
     
-    def interpolate(self, spam):
+    def interpolate(self, _):
         """
             % Interpolate the function X at this level to the next-finer level
             % (x <- P*x).

src/lamg/amg/relax.py

         return (x, r)
         
     
-    def runWithRhs(self, x, r, spam, nu):
+    def runWithRhs(self, x, r, _, nu):
         """
             % Apply a relaxation sweep with an initial guess X to A*X=B. X
             % can be a matrix whose columns are multiple initial guesses. B

src/lamg/amg/setup.py

             # % Build the next coarse level. Update state accordingly
             handler = setupBuilder.handlers[self.state]
             timer = stopwatch.Timer()
-            (coarseLevel, spam, eggs, nu, details) = handler.build(self, problem, setupBuilder.coarsestLevel)
+            (coarseLevel, _, __, nu, details) = handler.build(self, problem, setupBuilder.coarsestLevel)
             if details is None:
                 details = lab.struct()
                 details.timeTotal = timer.stop()
         CoarseningStrategy.__init__(self, options)
         
     
-    def buildInternal(self, target, problem, spam):
+    def buildInternal(self, target, problem, _):
         """
             % Build and return the next-coarser level COARSELEVEL using the
             % strategy encapsulated in this object. FINELEVEL is the
             target.state = CoarseningState(CoarseningState.DONE_COARSENING)
             return (coarseLevel, hcr, beta, nu, details)
         
-        (spam, T, aggregateIndex, beta, nu, hcr) = aggregation.optimalResult()
+        (_, T, aggregateIndex, beta, nu, hcr) = aggregation.optimalResult()
         
         #% Initialize the next-coarser level - compute interpolation,
         #% Galerkin coarsening and energy correction

src/lamg/hyper.py

     %
     %   see also: LOWDEGREENODES, COARSESTRATEGYELIMINATION.
     """
+    # FIXME: use high-level constructs instead of rebuilding optimized code
 
     n = mx.getN(A)  # number of columns
     A_irow = mx.getIr(A)   
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.