You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So pairwise aggregation is typically used with an AMLI/K-cycle. I tested the pairwise method without Krylov on 100x100 Poisson and get junk with the AMLI cycle. Below code and output for reproducibility. I have not looked into the AMLI code, but its convergence on isotropic Poisson is definitely suspicious.
import numpy as np
from pyamg.gallery import poisson
from pyamg.aggregation.pairwise import pairwise_solver
A = poisson((100,), format='csr')
smooth = ('gauss_seidel',{'sweep': 'symmetric'})
ml = pairwise_solver(A, strength='classical', presmoother=smooth, postsmoother=smooth)
x = np.random.rand(A.shape[0])
b = A * np.random.rand(A.shape[0])
res = []
x_sol = ml.solve(b, x0=x, maxiter=200, tol=1e-10, cycle='AMLI', residuals=res)
amli_cf = (res[-1] / res[0]) ** (1.0 / (len(res)-1))
res = []
x_sol = ml.solve(b, x0=x, maxiter=200, tol=1e-10, cycle='V', residuals=res)
v_cf = (res[-1] / res[0]) ** (1.0 / (len(res)-1))
res = []
x_sol = ml.solve(b, x0=x, maxiter=200, tol=1e-10, cycle='W', residuals=res)
w_cf = (res[-1] / res[0]) ** (1.0 / (len(res)-1))
res = []
x_sol = ml.solve(b, x0=x, maxiter=200, tol=1e-10, cycle='F', residuals=res)
f_cf = (res[-1] / res[0]) ** (1.0 / (len(res)-1))
print([v_cf, f_cf, w_cf, amli_cf])
So pairwise aggregation is typically used with an AMLI/K-cycle. I tested the pairwise method without Krylov on 100x100 Poisson and get junk with the AMLI cycle. Below code and output for reproducibility. I have not looked into the AMLI code, but its convergence on isotropic Poisson is definitely suspicious.
Output: [V-cycle, F-cycle, W-cycle, AMLI-cycle]:
If I add CG acceleration (which may or may not make sense with an AMLI cycle, but nevertheless):
The text was updated successfully, but these errors were encountered: