MCPcopy Create free account
hub / github.com/chunleili/mgpbd / old_V_cycle

Method old_V_cycle

engine/solver/amg_python.py:148–159  ·  view source on GitHub ↗
(self,levels,lvl,x,b)

Source from the content-addressed store, hash-verified

146 return res
147
148 def old_V_cycle(self,levels,lvl,x,b):
149 A = levels[lvl].A
150 self.presmoother(A,x,b)
151 residual = b - A @ x
152 coarse_b = levels[lvl].R @ residual
153 coarse_x = np.zeros_like(coarse_b)
154 if lvl == len(levels)-2:
155 coarse_x = self.coarse_solver(levels[lvl+1].A, coarse_b)
156 else:
157 self.old_V_cycle(levels, lvl+1, coarse_x, coarse_b)
158 x += levels[lvl].P @ coarse_x
159 self.postsmoother(A, x, b)
160
161 # non recursive V_cycle norecur
162 def V_cycle_v2(self, levels, x0, b):

Callers

nothing calls this directly

Calls 3

presmootherMethod · 0.95
coarse_solverMethod · 0.95
postsmootherMethod · 0.95

Tested by

no test coverage detected