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

Method presmoother

engine/solver/amg_python.py:122–137  ·  view source on GitHub ↗
(self, A,x,b)

Source from the content-addressed store, hash-verified

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):

Callers 3

postsmootherMethod · 0.95
old_V_cycleMethod · 0.95
V_cycle_v2Method · 0.95

Calls 2

diag_sweepMethod · 0.95
chebyshevMethod · 0.95

Tested by

no test coverage detected