之前一直不明白Jacobi迭代为什么是五点迭代,今天忽然想到这是二维泊松方程的求解,一切就豁然开朗。
Jacobi迭代基本形式:
[x_i^{k + 1} = frac{1}{2}left( {{b_i} - sumlimits_{j
e i} {{a_{ij}}x_j^k} }
ight)]
详细推导见之前博客的引用链接。
对于二维泊松方程,x、y方向采用相同的步长,在x、y方向同时采用中心差分离散可得:
[{left. {frac{{{partial ^2}u(x,y)}}{{partial {x^2}}}}
ight|{({x_i},{x_j})}} approx frac{{2u({x_i},{y_j}) - u({x{i - 1}},{y_j}) - u({x_{i - 1}},{y_j})}}{{{h^2}}}]
[{left. {frac{{{partial ^2}u(x,y)}}{{partial {y^2}}}}
ight|{({x_i},{x_j})}} approx frac{{2u({x_i},{y_j}) - u({x_i},{y{j - 1}}) - u({x_i},{y_{j + 1}})}}{{{h^2}}}]
带入二维Poisson方程即得Poisson方程在
[left( {{x_i},{y_j}}
ight)]
点的近似离散方程
[4{u_{i,j}} - {u_{i - 1,j}} - {u_{i + 1,j}} - {u_{i,j - 1}} - {u_{i,j + 1}} = {h^2}{f_{i,j}}]
其中
[{f_{i,j}} = f({x_i},{y_j})]
,
[{u_{i,j}}]为[u({x_i},{y_j})]
的近似。