

Print ( "Residual: %.7f " % resid_ave ) # Count iterations count = count + 1 print ( " \n " ) print ( "SOR conducted a total of %g iterations to obtain approximate solution." % count ) print ( "Final residual: %.

# Residual residual = a * psi + b * psi + c * psi + d * psi + e * psi - f # Update psi value psi += - w * residual / e # Update resid_ave as a sum of residuals resid_ave += abs ( residual ) cnt_points += 1 # Get average residual resid_ave = resid_ave / cnt_points # Print every 1000-dth residual if count % 1000=0: # Set count for points in checker-boarding cnt_points = 0 # Loop over internal points only for i in range ( 1, n - 1 ): for j in range ( 1, n - 1 ): # Checker-boarding if (( i + j ) % 2)=count%2:

count = 0 while resid_ave > resid_crit : # Set at 0 so we can sum it up later resid_ave = 0. w = 1.7 resid_crit = 1.0e-6 # Arbitrary value at the begining, higher than resid_crit resid_ave = 100. Coefficients in such equation can be functions of the independent variables but not the dependent ones. Successive over-relaxation (SOR) is a numerical method for solving a linear system of equations - equations that have a linear comination of differential terms. Therefore, the actual solution can only by approximated. Computers can only store a finite number of discrete quantities. PDEs describe quantities that vary continuously with respect to a set of independent variables. Introduction to statistics for GeoscientistsĪ very large proportion of the world’s supercomputing capacity is dedicated to solving PDEs - climate and weather simulations, aerodynamics, structural simulations, etc. Author (s): Dragica Vasileska, Associate Professor, Arizona State University. This note covers the following topics: Numerical Solution of Algebraic Equations, Gauss Elimination Method, LU Decomposition Method, Iterative Methods, Successive Over-Relaxation (SOR) Method. Canonical form of second-order linear PDEs Computational Electronics Numerical Analysis.
