540 likes | 732 Views
Direct Solution Techniques in Spectral Methods. Maria Ugryumova. CASA Seminar, 13 December 2007. Outline. 1. Introduction. 2. Ad-hoc Direct Methods. 3. The matrix diagonalization techniques. 4. Direct methods. 5. Conclusions. 2 / 30. 1. Introduction. Steady and unsteady problems;.
E N D
Direct Solution Techniques in Spectral Methods Maria Ugryumova CASA Seminar, 13 December 2007
Outline 1. Introduction 2. Ad-hoc Direct Methods 3. The matrix diagonalization techniques 4. Direct methods 5. Conclusions 2/30
1. Introduction • Steady and unsteady problems; • Constant-coefficient Helmholtz equation • Some generalizations • Spectral descretization methods lead to the system 3/30
Outline 1. Introduction 2. Ad-hoc Direct Methods 3. The matrix diagonalization techniques 4. Direct methods 5. Conclusions 4/30
2. Ad-hoc Direct Methods Approximations: • Fourier • Chebyshev • Legendre Solution process: • 1. To performe appropriate transform • 2. To solve the system • 3. To performe an inverse transform on to get. 5/30
2. Ad-hoc Direct Methods Approximations: • Fourier • Chebyshev • Legendre Solution process: To performe appropriate transform To solve the system To performe an inverse transform on to get . 5/30
2.1 Fourier Approximations Problem Solution 1a -The Fourier Galerkin approximation - the Fourier coefficients; - the trancated Fourier series; • The solution is 6/30
Solution 1b - a Fourier collocation approximation Given 7/30
Solution 1b - a Fourier collocation approximation Given • Using the discrete Fourier transform (DFT is a mapping between ) and - the discrete Fourier coefficients; 7/30
Solution 1b - a Fourier collocation approximation Given • Using the discrete Fourier transform (DFT is a mapping between ) and - the discrete Fourier coefficients; • (3) is solved for • Reversing the DFT 7/30
Galerkin and collocation approximation to Helmholz problem are equally straightfoward and demand operations. 8/30
2.3 Chebyshev Tau Approximation Problem Solution1- Chebyshev Tau approximation: 9/30
2.3 Chebyshev Tau Approximation Problem Solution1- Chebyshev Tau approximation: • Rewriting the second derivative , where L is upper triangular. • Solution process requires operations 9/30
2.3.1 More efficient solution procedure Solution2- To rearrange the equations For q=2 For q=1 in combination with (5) will lead 10/30
After simplification For even coefficients: • To minimize the round-off errors; • quasi-tridiagonal system; • not diagonally dominant; • Nonhomogeneous BC. 11/30
2.4 Mixed Collocation Tau Approximation Solution process: Discrete Chebyshev transform; To solve quasi-tridiagonal system; Inverse Chebyshev transform on to get . 12/30
2.5 Galerkin Approximation Problem Solution: Legendre Galerkin approx. 13/30
2.5 Galerkin Approximation Problem Solution: Legendre Galerkin approx. After integration by parts (full matrices) 13/30
An alternative set of basis functions produces tridiagonal system: • Then expension is • The same system but • Two sets of tridiagonal equations; O(N) operations 14/30 The right-hand side terms in (5) are related to Legendre coefficients :
The standard Legendre coefficients of the solution can be found via • Transformation between spectral space and physical space: 15/30
2.6 Numerical example for Ad Hoc Methods in 1-D Exact solution is • Galerkin method is more accurate than Tau methods • Roundoff errors are more for Chebyshev methods, significantly for N>1024 16/30
Outline 1. Introduction 2. Ad-hoc Direct Methods 3. The matrix diagonalization techniques 4. Direct methods 5. Conclusions 17/30
3.1 Schur Decomposition Problem: • Collocation approx and Legendre G-NI approxim.lead • Solving (6) by Schur decomposition [Bartels, Stewart, 1972] lower-triangular upper-triangular 18/30
Solution process: • Reduction and to Schur form • Construction of F’ • Solution of for U’ • Transformation from U’ to U. Computational cost: 19/30
3.2 Matrix Digitalization Approach • Similar to Schur decomposition. The same solution steps. • and are diagonalized • Operation cost: 20/30
3.3 Numerical example for Ad Hoc Methods in 2-D Problem: • Matrix diagonalization was used for the solution procedure • Results are very similar to 1-D case Haidvogel and Zang (1979), Shen (1994) 21/30
Outline 1. Introduction 2. Ad-hoc Direct Methods 3. The matrix diagonalization techniques 4. Direct methods 5. Conclusions 22/30
4. Direct Methods • Matrix structure produced by Galerkin and G-NI methods ; • How the tensor-product nature of the methods can be used efficientlyto • build matrices; • How the sparseness of the matrices in 2D and in 3D can be accounted in • direct techniques 23/30
4.1 Multidimensional Stiffness and Mass Matrices Problem: + homogen. BC on Integral formulation: Let be a finite tensor-product basis in . The trial and test function will be chosen in Galerkin solution: –stiffness matrix 24/30
Decomposition of K into its 1st, 2nd, 0 – order components 25/30
Decomposition of K into its 1st, 2nd, 0 – order components then • for a general , the use of G-NI approach with Lagrange nodal basis will lead to diagonal marix 26/30
Decomposition of K into its 1st, 2nd, 0 – order components • - tensor-product function, • - arbitrary, G-NI approach leads to sparse matrix (a matrix-vector multiply requires operations) 2D 3D 27/30
Decomposition of K into its 1st, 2nd, 0 – order components • for arbitrary , G-NI approach (with Lagange nodal basis) leads to sparse matrix (a matrix-vector multiply requires operations) In 2D: matrix is in general full for arbitrary nonzero In 3D: has sparse structure 28/30
4. Gaussian Elimination Techniques • LU - decomposition 2D: special cases of Ad-hoс methods have lower cost • - decomposition • To get benifit from sparsyty, reodering of matrix to factorization have to be done [Gilbert, 1992, Saad, 1996] • Frontal and multifrontal [Davis and Duff 1999] 29/30
Outline 1. Introduction 2. Ad-hoc Direct Methods 3. The matrix diagonalization techniques 4. Direct methods 5. Conclusions 30/30
5. Conclusions • Approximation techniques; • Galerkin approximations give more accurate results than other methods; • Techniques, which can eliminate the cost of solution on prepocessing stage; • Sparcity matrices 31/31