bueler / p4pdes

C and Python examples from my book on using PETSc and Firedrake to solve PDEs
MIT License
182 stars 71 forks source link

Chebyshev iterative method #53

Closed shaoyaoqian closed 2 years ago

shaoyaoqian commented 2 years ago

Hi, @bueler !

I have a problem about the Chebyshev iterative method in the book. Assume that we use the simple iteration $$\mathbf{u}_{k+1}=\mathbf{u}_k+p(A)\left(\mathbf{b}-A \mathbf{u}_k\right)$$ and we have the Chebyshev polynomial $q(x)$ already, how to implement it?

Do we need to calculate $p(A)=(q(A)-I)A^{-1}$ in the iteration?

shaoyaoqian commented 2 years ago

Oh, sorry for asking so quickly. P(A) can be calculated as a Polynomial of A.