SlideShare a Scribd company logo
5.2 Gauss-Seidel and SOR (Successive Over Relaxation)

        As motivation return to the example of the last section:

                                            −ui −1 + 3ui −ui +1 = f i .

                Jacobi:                                  uim +1 = ( f i + uim 1 + uim 1 ) / 3
                                                                            −       +             i = 1,2,...,n.

Since ui-1 m+1 has already been computed and may be closer to the solution, we should

consider using it in place of ui-1 m. This is the Gauss-Seidel method

                Gauss-Seidel:                            uim +1 = ( f i + uim 1 1 + uim 1 ) / 3
                                                                            −
                                                                              +
                                                                                      +           i = 1,2,...,n.

For the Gauss-Seidel scheme and the given example, the iterates one and two are
                    0          1/3               13/27 
                    0  , u1 =  4 / 9  and u 2 =  53/81  .
               u = 
                0
                                                          
                    0 
                              13/27 
                                                  124/243 
                                                            

Gauss-Seidel exhibits faster convergence.


SOR Algorithm (0 < ω < 2)

        Note, ω = 1.0 is Gauss-Seidel, ω > 1.0 is over-relaxation, and ω < 1.0 is

        under-relaxation. Consider Ax = d or in component form

                ∑a
                 j< i
                        i, j   x j + ai ,i xi + ∑ ai , j x j = di .
                                                j> i




        for m = 0, maxm

                for i = 1, n

                                 xim +1 / 2 = ( di − ∑ ai , j x m +1 − ∑ ai , j x m ) / ai , i
                                                                j                 j
                                                       j< i               j >i



                                 xim +1 = (1 − ω ) xim + ω xim +1 / 2

                test for convergence.
2




        Most applications are sparse (many aij = 0). Gauss-Seidel would not be used on

dense matrices because of the number of calculations required for the lower and upper

sums.


Notes: (i)       If A SPD and 0 < ω < 2, then we will show that SOR converges.

        (ii)     ω > 1.0 is used to significantly accelerate convergence

                 (The choice of ω could be a problem for some application).

        (iii)    ω =1.0 (for G-S) is much faster than Jacobi.



        SOR may be viewed as a matrix FOFD iteration

                                 *                 0   0   0  0     0    0          0  0   *   *   *
                                 0                 *   0   0  *     0    0          0  0   0   *   *
                  A = D − L −U =                             −                        −             
                                 0                 0   *   0  *     *    0          0  0   0   0   *
                                                                                                    
                                 0                 0   0   *  *     *    *          0  0   0   0   0

Then    xim +1 = (1 − ω ) xim + ω (di − ∑ ai , j x m +1 −∑ ai , j x m ) / ai ,i
                                                   j                j
                                             j <i            j >i

                  a x    m +1
                    i, i i      = (1 − ω )a x + ω (di − ∑ ai , j x m +1 −∑ ai , j x m )
                                                m
                                           i, i i                  j                j
                                                               j <i             j >i

The matrix form is

                  Dx m +1 = (1− ω ) Dx m + ω (d + Lxm +1 + Ux m )

                  ( D − ω L) x m +1 = (1 − ω ) Dx m + ωUx m + ω d

                  ( D − ω L ) x m +1 / ω = (1 − ω) Dx m / ω + Ux m + d

                  x m +1 = [( D − ω L) / ω] −1[(1 − ω ) D / ω + U ] x m + [( D − ω L) / ω ]−1 d

                  x m +1 = Hω x m + [( D − ω L ) / ω ]−1 d
3


We need || Hω || < 1 to qualify as a convergent FOFD. Moreover, we want ϖ such that

|| Hϖ || ≤ || Hω || so that the convergence will be fast.


Example.         Two dimensional, point SOR for -∆u = f.

        Unknowns are uij ≅ u(ih,jh)                  h = ∆x = ∆y.

        Use the five point finite difference method:

                 −ui −1, j −ui , j −1 + 4ui , j −ui +1, j − ui , j +1 = h 2 f i , j .

                 (lower sum           + ai,i xi + upper sum)

        In order to cast this problem in the form of Ax = d, make the following

        identifications:

                 i → i,j pair ,

                 xi → ui,j ,

                 ai,i = 4 ,

                 aij = -1 for j identified with the grid pairs (i+1,j), (i-1,j),(i,j+1) and (i,j-1),

                 n → (N-1)2 and

                 d → h2 fi,j with h = 1/N.

        The classical order of nodes starts with the bottom grid row (j = 1) and moves

        from left (i = 1) to the right (i = N-1)

                                                          
                                   # #            #       
                                                          
                 lower↓            * i, j         #        ↑upper
                                                          
                                   * *            *       
                        
                                                          
                                                           
4


      Point SOR with u(i,j) Overwritten.



      for m = 0, maxm

               numi = 0

               for j = 1, N-1

                         for i = 1, N-1

                                   utemp = [h*h*fij +u(i-1,j)+u(i,j-1)+u(i+1,j)+u(i,j+1)]*0.25

                                   utemp = (1-ω)*u(i,j) + ω*utemp

                                   error = u(i,j) - utemp

                                   if abs(error) < ε   numi = numi + 1

                                   u(i,j) = utemp

               if numi = (N-1)*(N-1) break


      See MA402 chapters 3,4 for MATLAB and Fortran 90 implementations.



Example.       Two dimensional block SOR.

          B       −I         U1       F1 
      A =  −I                U  = h2  F 
                  B      −I  2        2
          
                  −I     B  U 3 
                                       F3 
                                          

          4 −1                         u11 
          −1 4 −1 ,
      B =                        U1 =  u21  ,
                                                  I3x3
         
             −1 4 
                                        u31 
                                         

      −U i −1 + BU i − U i +1 = h 2 Fi .

      Here i represents the i grid row (an abuse of notation)

      Block component form iss A = [Aij] where A is (N-1)x(N-1) block matrix.
5




                           AX = F

                           ∑A X
                            j< i
                                    ij    j   + Aii X i + ∑ Aij X j = Fi where Aii are tridiagonal matrices.
                                                              j> i




      Block G-S algorithm.

              for m = 1, maxm

                           for i = 1,N-1

                                         Solve Aii X im +1 = Fi − ∑ Aij X m +1 − ∑ Aij X m
                                                                          j              j
                                                                             j< i                   j> i

                           test for convergence.


Example.      Three dimensional point SOR for -∆u = f.

      This is similar to the 2D point SOR with an additional loop in z direction.

      The 7 point finite difference equation is

              −ui −1, j , l −ui , j− 1,l −ui , j ,l −1 + 6ui , j ,l −ui +1, j ,l − ui , j+ 1,l − ui , j ,l + 1 = h 2 f i ,j ,l .

      The point SOR scheme will now have three inner nested loops. The coefficient

      matrix will be block tridiagonal with the diagonal blocks having a similar

      structure as the 2D coefficient matrix.

More Related Content

What's hot

Implicit differentiation
Implicit differentiationImplicit differentiation
Implicit differentiation
Sporsho
 
4.1 implicit differentiation
4.1 implicit differentiation4.1 implicit differentiation
4.1 implicit differentiationdicosmo178
 
Mesh Processing Course : Multiresolution
Mesh Processing Course : MultiresolutionMesh Processing Course : Multiresolution
Mesh Processing Course : Multiresolution
Gabriel Peyré
 
Lesson 11: Implicit Differentiation (slides)
Lesson 11: Implicit Differentiation (slides)Lesson 11: Implicit Differentiation (slides)
Lesson 11: Implicit Differentiation (slides)
Matthew Leingang
 
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
Alex (Oleksiy) Varfolomiyev
 
Image denoising
Image denoisingImage denoising
Image denoising
Yap Wooi Hen
 
Lecture 2: linear SVM in the dual
Lecture 2: linear SVM in the dualLecture 2: linear SVM in the dual
Lecture 2: linear SVM in the dual
Stéphane Canu
 
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALESNONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
Tahia ZERIZER
 
Computer Aided Manufacturing Design
Computer Aided Manufacturing DesignComputer Aided Manufacturing Design
Computer Aided Manufacturing Design
V Tripathi
 
近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定
Kosei ABE
 
Lecture3 linear svm_with_slack
Lecture3 linear svm_with_slackLecture3 linear svm_with_slack
Lecture3 linear svm_with_slackStéphane Canu
 
Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010akabaka12
 
Engr 213 midterm 1a sol 2009
Engr 213 midterm 1a sol 2009Engr 213 midterm 1a sol 2009
Engr 213 midterm 1a sol 2009akabaka12
 
Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009akabaka12
 
Jordan's solution
Jordan's solutionJordan's solution
Jordan's solutionsabsma
 

What's hot (19)

Implicit differentiation
Implicit differentiationImplicit differentiation
Implicit differentiation
 
4.1 implicit differentiation
4.1 implicit differentiation4.1 implicit differentiation
4.1 implicit differentiation
 
Sect1 2
Sect1 2Sect1 2
Sect1 2
 
Mesh Processing Course : Multiresolution
Mesh Processing Course : MultiresolutionMesh Processing Course : Multiresolution
Mesh Processing Course : Multiresolution
 
Lesson 11: Implicit Differentiation (slides)
Lesson 11: Implicit Differentiation (slides)Lesson 11: Implicit Differentiation (slides)
Lesson 11: Implicit Differentiation (slides)
 
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
Optimal Finite Difference Grids for Elliptic and Parabolic PDEs with Applicat...
 
Image denoising
Image denoisingImage denoising
Image denoising
 
Lecture 2: linear SVM in the dual
Lecture 2: linear SVM in the dualLecture 2: linear SVM in the dual
Lecture 2: linear SVM in the dual
 
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALESNONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
NONLINEAR DIFFERENCE EQUATIONS WITH SMALL PARAMETERS OF MULTIPLE SCALES
 
Computer Aided Manufacturing Design
Computer Aided Manufacturing DesignComputer Aided Manufacturing Design
Computer Aided Manufacturing Design
 
Lecture5 kernel svm
Lecture5 kernel svmLecture5 kernel svm
Lecture5 kernel svm
 
近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定
 
Inse
InseInse
Inse
 
Lecture3 linear svm_with_slack
Lecture3 linear svm_with_slackLecture3 linear svm_with_slack
Lecture3 linear svm_with_slack
 
Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010
 
Engr 213 midterm 1a sol 2009
Engr 213 midterm 1a sol 2009Engr 213 midterm 1a sol 2009
Engr 213 midterm 1a sol 2009
 
Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009
 
Linear Differential Equations1
Linear Differential Equations1Linear Differential Equations1
Linear Differential Equations1
 
Jordan's solution
Jordan's solutionJordan's solution
Jordan's solution
 

Viewers also liked

Edtec685 Aip Presentation
Edtec685 Aip PresentationEdtec685 Aip Presentation
Edtec685 Aip Presentationjmdoane
 
The way of the stars
The way of the starsThe way of the stars
The way of the starsmayadez
 
EPM Live PortfolioEngine
EPM Live PortfolioEngineEPM Live PortfolioEngine
EPM Live PortfolioEngineEPM Live
 
Laporan Tahunan AJI 2008
Laporan Tahunan AJI 2008Laporan Tahunan AJI 2008
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
EPM Live
 
Hy solution사례(5)저축보험가입고객
Hy solution사례(5)저축보험가입고객Hy solution사례(5)저축보험가입고객
Hy solution사례(5)저축보험가입고객valuasset
 
Exwel trust slides with music
Exwel trust slides with musicExwel trust slides with music
Exwel trust slides with music
Exwel Trust
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)dyandmy
 
Hku mmg 2011_presentatie_meeting01
Hku mmg 2011_presentatie_meeting01Hku mmg 2011_presentatie_meeting01
Hku mmg 2011_presentatie_meeting01zesvoetvier
 
HP Fossology v5.3
HP Fossology v5.3HP Fossology v5.3
From open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysferaFrom open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysfera
fOSSa - Free Open Source Software Academia Conference
 
Hy solution 2012년05월펀드변경관련안내
Hy solution 2012년05월펀드변경관련안내Hy solution 2012년05월펀드변경관련안내
Hy solution 2012년05월펀드변경관련안내
valuasset
 
Nathans project adventure sport
Nathans project adventure sportNathans project adventure sport
Nathans project adventure sport
MissBeavis
 
Comprehensive capacity
Comprehensive capacityComprehensive capacity
Comprehensive capacityJet Wang
 
视频编码原理简介Sohu版
视频编码原理简介Sohu版视频编码原理简介Sohu版
视频编码原理简介Sohu版
pluschen
 
高崎経済大学の受験..
高崎経済大学の受験..高崎経済大学の受験..
高崎経済大学の受験..kobayashimasakazu
 
Tec i iletrag
Tec i iletragTec i iletrag
Tec i iletrag
vazumano
 

Viewers also liked (20)

Edtec685 Aip Presentation
Edtec685 Aip PresentationEdtec685 Aip Presentation
Edtec685 Aip Presentation
 
The way of the stars
The way of the starsThe way of the stars
The way of the stars
 
EPM Live PortfolioEngine
EPM Live PortfolioEngineEPM Live PortfolioEngine
EPM Live PortfolioEngine
 
Laporan Tahunan AJI 2008
Laporan Tahunan AJI 2008Laporan Tahunan AJI 2008
Laporan Tahunan AJI 2008
 
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
Want More Out of your SharePoint Environment? Extend your SharePoint Environm...
 
Hy solution사례(5)저축보험가입고객
Hy solution사례(5)저축보험가입고객Hy solution사례(5)저축보험가입고객
Hy solution사례(5)저축보험가입고객
 
Exwel trust slides with music
Exwel trust slides with musicExwel trust slides with music
Exwel trust slides with music
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)
 
Hku mmg 2011_presentatie_meeting01
Hku mmg 2011_presentatie_meeting01Hku mmg 2011_presentatie_meeting01
Hku mmg 2011_presentatie_meeting01
 
HP Fossology v5.3
HP Fossology v5.3HP Fossology v5.3
HP Fossology v5.3
 
From open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysferaFrom open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysfera
 
Open intelligence by tom secker
Open intelligence by tom seckerOpen intelligence by tom secker
Open intelligence by tom secker
 
Open sourcing of Journalism by James Corbett
Open sourcing of Journalism by James CorbettOpen sourcing of Journalism by James Corbett
Open sourcing of Journalism by James Corbett
 
Hy solution 2012년05월펀드변경관련안내
Hy solution 2012년05월펀드변경관련안내Hy solution 2012년05월펀드변경관련안내
Hy solution 2012년05월펀드변경관련안내
 
Nathans project adventure sport
Nathans project adventure sportNathans project adventure sport
Nathans project adventure sport
 
Comprehensive capacity
Comprehensive capacityComprehensive capacity
Comprehensive capacity
 
视频编码原理简介Sohu版
视频编码原理简介Sohu版视频编码原理简介Sohu版
视频编码原理简介Sohu版
 
高崎経済大学の受験..
高崎経済大学の受験..高崎経済大学の受験..
高崎経済大学の受験..
 
After Blood Stains: The Killing of AA Prabangsa
After Blood Stains: The Killing of AA PrabangsaAfter Blood Stains: The Killing of AA Prabangsa
After Blood Stains: The Killing of AA Prabangsa
 
Tec i iletrag
Tec i iletragTec i iletrag
Tec i iletrag
 

Similar to Gaussseidelsor

Unconditionally stable fdtd methods
Unconditionally stable fdtd methodsUnconditionally stable fdtd methods
Unconditionally stable fdtd methodsphysics Imposible
 
Fdtd
FdtdFdtd
Diifferential equation akshay
Diifferential equation akshayDiifferential equation akshay
Diifferential equation akshay
akshay1234kumar
 
Hw5sols
Hw5solsHw5sols
Hw5sols
Dulaj Rox
 
Per de matematica listo.
Per de matematica listo.Per de matematica listo.
Per de matematica listo.
nohelicordero
 
Double integration
Double integrationDouble integration
Double integration
Abhishek N Nair
 
Andreas Eberle
Andreas EberleAndreas Eberle
Andreas Eberle
BigMC
 
Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.
SEENET-MTP
 
Linear algebra-solutions-manual-kuttler-1-30-11-otc
Linear algebra-solutions-manual-kuttler-1-30-11-otcLinear algebra-solutions-manual-kuttler-1-30-11-otc
Linear algebra-solutions-manual-kuttler-1-30-11-otckjalili
 
2D_line_circle.ppt
2D_line_circle.ppt2D_line_circle.ppt
2D_line_circle.ppt
PuneetMathur39
 
Holographic Cotton Tensor
Holographic Cotton TensorHolographic Cotton Tensor
Holographic Cotton Tensor
Sebastian De Haro
 
Lagrange_Multipliers.pdf
Lagrange_Multipliers.pdfLagrange_Multipliers.pdf
Lagrange_Multipliers.pdf
SUDHANSHUSHARMA44430
 
Engr 213 final sol 2009
Engr 213 final sol 2009Engr 213 final sol 2009
Engr 213 final sol 2009akabaka12
 
Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...
HidenoriOgata
 
LAGRANGE_MULTIPLIER.ppt
LAGRANGE_MULTIPLIER.pptLAGRANGE_MULTIPLIER.ppt
LAGRANGE_MULTIPLIER.ppt
MSPrasad7
 
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge TheoryL. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
SEENET-MTP
 

Similar to Gaussseidelsor (20)

Diff-Eqs
Diff-EqsDiff-Eqs
Diff-Eqs
 
Complex varible
Complex varibleComplex varible
Complex varible
 
Unconditionally stable fdtd methods
Unconditionally stable fdtd methodsUnconditionally stable fdtd methods
Unconditionally stable fdtd methods
 
Fdtd
FdtdFdtd
Fdtd
 
Diifferential equation akshay
Diifferential equation akshayDiifferential equation akshay
Diifferential equation akshay
 
Hw5sols
Hw5solsHw5sols
Hw5sols
 
Per de matematica listo.
Per de matematica listo.Per de matematica listo.
Per de matematica listo.
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Double integration
Double integrationDouble integration
Double integration
 
Andreas Eberle
Andreas EberleAndreas Eberle
Andreas Eberle
 
Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.
 
Funcion gamma
Funcion gammaFuncion gamma
Funcion gamma
 
Linear algebra-solutions-manual-kuttler-1-30-11-otc
Linear algebra-solutions-manual-kuttler-1-30-11-otcLinear algebra-solutions-manual-kuttler-1-30-11-otc
Linear algebra-solutions-manual-kuttler-1-30-11-otc
 
2D_line_circle.ppt
2D_line_circle.ppt2D_line_circle.ppt
2D_line_circle.ppt
 
Holographic Cotton Tensor
Holographic Cotton TensorHolographic Cotton Tensor
Holographic Cotton Tensor
 
Lagrange_Multipliers.pdf
Lagrange_Multipliers.pdfLagrange_Multipliers.pdf
Lagrange_Multipliers.pdf
 
Engr 213 final sol 2009
Engr 213 final sol 2009Engr 213 final sol 2009
Engr 213 final sol 2009
 
Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...
 
LAGRANGE_MULTIPLIER.ppt
LAGRANGE_MULTIPLIER.pptLAGRANGE_MULTIPLIER.ppt
LAGRANGE_MULTIPLIER.ppt
 
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge TheoryL. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
L. Jonke - A Twisted Look on Kappa-Minkowski: U(1) Gauge Theory
 

More from uis

Raicesdeecuaciones
RaicesdeecuacionesRaicesdeecuaciones
Raicesdeecuacionesuis
 
Taller refuerzo
Taller refuerzoTaller refuerzo
Taller refuerzouis
 
Secant method
Secant methodSecant method
Secant methoduis
 
Fixedpoint
FixedpointFixedpoint
Fixedpointuis
 
Fixedpoint
FixedpointFixedpoint
Fixedpointuis
 
Fixedpoint
FixedpointFixedpoint
Fixedpointuis
 
False position
False positionFalse position
False positionuis
 
Bisection method
Bisection methodBisection method
Bisection methoduis
 
Gaussseidel
GaussseidelGaussseidel
Gaussseideluis
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en claseuis
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en claseuis
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en claseuis
 
Choleskymethod
CholeskymethodCholeskymethod
Choleskymethoduis
 
Choleskymethod
CholeskymethodCholeskymethod
Choleskymethoduis
 
Gauss jordan
Gauss jordanGauss jordan
Gauss jordanuis
 
Gauss jordan elimination through pivoting
Gauss jordan elimination through pivotingGauss jordan elimination through pivoting
Gauss jordan elimination through pivotinguis
 
L2 darcys law
L2 darcys lawL2 darcys law
L2 darcys lawuis
 

More from uis (17)

Raicesdeecuaciones
RaicesdeecuacionesRaicesdeecuaciones
Raicesdeecuaciones
 
Taller refuerzo
Taller refuerzoTaller refuerzo
Taller refuerzo
 
Secant method
Secant methodSecant method
Secant method
 
Fixedpoint
FixedpointFixedpoint
Fixedpoint
 
Fixedpoint
FixedpointFixedpoint
Fixedpoint
 
Fixedpoint
FixedpointFixedpoint
Fixedpoint
 
False position
False positionFalse position
False position
 
Bisection method
Bisection methodBisection method
Bisection method
 
Gaussseidel
GaussseidelGaussseidel
Gaussseidel
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en clase
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en clase
 
Metodos especiales ejercicio en clase
Metodos especiales ejercicio en claseMetodos especiales ejercicio en clase
Metodos especiales ejercicio en clase
 
Choleskymethod
CholeskymethodCholeskymethod
Choleskymethod
 
Choleskymethod
CholeskymethodCholeskymethod
Choleskymethod
 
Gauss jordan
Gauss jordanGauss jordan
Gauss jordan
 
Gauss jordan elimination through pivoting
Gauss jordan elimination through pivotingGauss jordan elimination through pivoting
Gauss jordan elimination through pivoting
 
L2 darcys law
L2 darcys lawL2 darcys law
L2 darcys law
 

Recently uploaded

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

Gaussseidelsor

  • 1. 5.2 Gauss-Seidel and SOR (Successive Over Relaxation) As motivation return to the example of the last section: −ui −1 + 3ui −ui +1 = f i . Jacobi: uim +1 = ( f i + uim 1 + uim 1 ) / 3 − + i = 1,2,...,n. Since ui-1 m+1 has already been computed and may be closer to the solution, we should consider using it in place of ui-1 m. This is the Gauss-Seidel method Gauss-Seidel: uim +1 = ( f i + uim 1 1 + uim 1 ) / 3 − + + i = 1,2,...,n. For the Gauss-Seidel scheme and the given example, the iterates one and two are 0   1/3   13/27  0  , u1 =  4 / 9  and u 2 =  53/81  . u =  0     0    13/27    124/243    Gauss-Seidel exhibits faster convergence. SOR Algorithm (0 < ω < 2) Note, ω = 1.0 is Gauss-Seidel, ω > 1.0 is over-relaxation, and ω < 1.0 is under-relaxation. Consider Ax = d or in component form ∑a j< i i, j x j + ai ,i xi + ∑ ai , j x j = di . j> i for m = 0, maxm for i = 1, n xim +1 / 2 = ( di − ∑ ai , j x m +1 − ∑ ai , j x m ) / ai , i j j j< i j >i xim +1 = (1 − ω ) xim + ω xim +1 / 2 test for convergence.
  • 2. 2 Most applications are sparse (many aij = 0). Gauss-Seidel would not be used on dense matrices because of the number of calculations required for the lower and upper sums. Notes: (i) If A SPD and 0 < ω < 2, then we will show that SOR converges. (ii) ω > 1.0 is used to significantly accelerate convergence (The choice of ω could be a problem for some application). (iii) ω =1.0 (for G-S) is much faster than Jacobi. SOR may be viewed as a matrix FOFD iteration * 0 0 0  0 0 0 0  0 * * * 0 * 0 0  * 0 0 0  0 0 * * A = D − L −U =  −  −   0 0 * 0  * * 0 0  0 0 0 *       0 0 0 *  * * * 0  0 0 0 0 Then xim +1 = (1 − ω ) xim + ω (di − ∑ ai , j x m +1 −∑ ai , j x m ) / ai ,i j j j <i j >i a x m +1 i, i i = (1 − ω )a x + ω (di − ∑ ai , j x m +1 −∑ ai , j x m ) m i, i i j j j <i j >i The matrix form is Dx m +1 = (1− ω ) Dx m + ω (d + Lxm +1 + Ux m ) ( D − ω L) x m +1 = (1 − ω ) Dx m + ωUx m + ω d ( D − ω L ) x m +1 / ω = (1 − ω) Dx m / ω + Ux m + d x m +1 = [( D − ω L) / ω] −1[(1 − ω ) D / ω + U ] x m + [( D − ω L) / ω ]−1 d x m +1 = Hω x m + [( D − ω L ) / ω ]−1 d
  • 3. 3 We need || Hω || < 1 to qualify as a convergent FOFD. Moreover, we want ϖ such that || Hϖ || ≤ || Hω || so that the convergence will be fast. Example. Two dimensional, point SOR for -∆u = f. Unknowns are uij ≅ u(ih,jh) h = ∆x = ∆y. Use the five point finite difference method: −ui −1, j −ui , j −1 + 4ui , j −ui +1, j − ui , j +1 = h 2 f i , j . (lower sum + ai,i xi + upper sum) In order to cast this problem in the form of Ax = d, make the following identifications: i → i,j pair , xi → ui,j , ai,i = 4 , aij = -1 for j identified with the grid pairs (i+1,j), (i-1,j),(i,j+1) and (i,j-1), n → (N-1)2 and d → h2 fi,j with h = 1/N. The classical order of nodes starts with the bottom grid row (j = 1) and moves from left (i = 1) to the right (i = N-1)    # # #    lower↓  * i, j #  ↑upper    * * *     
  • 4. 4 Point SOR with u(i,j) Overwritten. for m = 0, maxm numi = 0 for j = 1, N-1 for i = 1, N-1 utemp = [h*h*fij +u(i-1,j)+u(i,j-1)+u(i+1,j)+u(i,j+1)]*0.25 utemp = (1-ω)*u(i,j) + ω*utemp error = u(i,j) - utemp if abs(error) < ε numi = numi + 1 u(i,j) = utemp if numi = (N-1)*(N-1) break See MA402 chapters 3,4 for MATLAB and Fortran 90 implementations. Example. Two dimensional block SOR. B −I   U1   F1  A =  −I   U  = h2  F   B −I  2   2   −I B  U 3     F3     4 −1   u11   −1 4 −1 , B =  U1 =  u21  ,   I3x3   −1 4    u31    −U i −1 + BU i − U i +1 = h 2 Fi . Here i represents the i grid row (an abuse of notation) Block component form iss A = [Aij] where A is (N-1)x(N-1) block matrix.
  • 5. 5 AX = F ∑A X j< i ij j + Aii X i + ∑ Aij X j = Fi where Aii are tridiagonal matrices. j> i Block G-S algorithm. for m = 1, maxm for i = 1,N-1 Solve Aii X im +1 = Fi − ∑ Aij X m +1 − ∑ Aij X m j j j< i j> i test for convergence. Example. Three dimensional point SOR for -∆u = f. This is similar to the 2D point SOR with an additional loop in z direction. The 7 point finite difference equation is −ui −1, j , l −ui , j− 1,l −ui , j ,l −1 + 6ui , j ,l −ui +1, j ,l − ui , j+ 1,l − ui , j ,l + 1 = h 2 f i ,j ,l . The point SOR scheme will now have three inner nested loops. The coefficient matrix will be block tridiagonal with the diagonal blocks having a similar structure as the 2D coefficient matrix.