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

Method chebyshev

engine/solver/amg_python.py:51–60  ·  view source on GitHub ↗
(self, A, x, b, iterations=1)

Source from the content-addressed store, hash-verified

49
50 # https://github.com/pyamg/pyamg/blob/5a51432782c8f96f796d7ae35ecc48f81b194433/pyamg/relaxation/relaxation.py#L586
51 def chebyshev(self, A, x, b, iterations=1):
52 coefficients = self.chebyshev_coeff
53 x = np.ravel(x)
54 b = np.ravel(b)
55 for _i in range(iterations):
56 residual = b - A*x
57 h = coefficients[0]*residual
58 for c in coefficients[1:]:
59 h = c*residual + A*h
60 x += h
61
62 def calc_spectral_radius(self, A):
63 t = time.perf_counter()

Callers 1

presmootherMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected