(self, A,x,b)
| 120 | x[:] = b / diag |
| 121 | |
| 122 | def presmoother(self, A,x,b): |
| 123 | from pyamg.relaxation.relaxation import gauss_seidel, jacobi, sor, polynomial |
| 124 | if self.args.smoother_type == 'gauss_seidel': |
| 125 | gauss_seidel(A,x,b,iterations=self.args.smoother_niter, sweep='symmetric') |
| 126 | elif self.args.smoother_type == 'jacobi': |
| 127 | jacobi(A,x,b,iterations=self.args.smoother_niter, omega=self.jacobi_omega) |
| 128 | elif self.args.smoother_type == 'sor_vanek': |
| 129 | for _ in range(self.args.smoother_niter): |
| 130 | sor(A,x,b,omega=1.0,iterations=1,sweep='forward') |
| 131 | sor(A,x,b,omega=1.85,iterations=1,sweep='backward') |
| 132 | elif self.args.smoother_type == 'sor': |
| 133 | sor(A,x,b,omega=1.33,sweep='symmetric',iterations=self.args.smoother_niter) |
| 134 | elif self.args.smoother_type == 'diag_sweep': |
| 135 | self.diag_sweep(A,x,b,iterations=self.args.smoother_niter) |
| 136 | elif self.args.smoother_type == 'chebyshev': |
| 137 | self.chebyshev(A,x,b,iterations=self.args.smoother_niter) |
| 138 | |
| 139 | |
| 140 | def postsmoother(self,A,x,b): |
no test coverage detected