Msor To Sor - Convert

Set all ( \omega_i ) in your code to this single ( \omega ). The algorithm becomes: [ x_i^(k+1) = (1 - \omega) x_i^(k) + \frac\omegaa_ii \left( b_i - \sum_j < i a_ij x_j^(k+1) - \sum_j > i a_ij x_j^(k) \right) ]

if i % 2 == 0: omega = omega_even else: omega = omega_odd Convert to: convert msor to sor

From MSOR to SOR: Simplifying the Modified Successive Over-Relaxation Method Set all ( \omega_i ) in your code to this single ( \omega )

However, you may have encountered a variant called the method. While it sounds more advanced, the "conversion" from MSOR to SOR is not a transformation of results but rather a conceptual and algorithmic simplification. omega = constant_omega This is only possible if

omega = constant_omega This is only possible if all ( \omega_i ) are equal. If not, MSOR and SOR are different iterative methods . No exact equivalence exists unless you reorder the system or change the splitting.

[ x_i^(k+1) = (1 - \omega) x_i^(k) + \frac\omegaa_ii \left( b_i - \sum_j < i a_ij x_j^(k+1) - \sum_j > i a_ij x_j^(k) \right) ]