(Sparse) Linear Solvers

Similar documents
(Sparse) Linear Solvers

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Solving Sparse Linear Systems. Forward and backward substitution for solving lower or upper triangular systems

Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms

Advanced Computer Graphics

Iterative Methods for Linear Systems

Parallel Implementations of Gaussian Elimination

Advanced Computer Graphics

Contents. F10: Parallel Sparse Matrix Computations. Parallel algorithms for sparse systems Ax = b. Discretized domain a metal sheet

Iterative Sparse Triangular Solves for Preconditioning

1 Exercise: 1-D heat conduction with finite elements

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Efficient Linear System Solvers for Mesh Processing

Robot Mapping. Least Squares Approach to SLAM. Cyrill Stachniss

Graphbased. Kalman filter. Particle filter. Three Main SLAM Paradigms. Robot Mapping. Least Squares Approach to SLAM. Least Squares in General

Linear Equation Systems Iterative Methods

Contents. I The Basic Framework for Stationary Problems 1

Efficient Iterative Semi-supervised Classification on Manifold

Advanced Techniques for Mobile Robotics Graph-based SLAM using Least Squares. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

Efficient Multi-GPU CUDA Linear Solvers for OpenFOAM

Easy modeling generate new shapes by deforming existing ones

GTC 2013: DEVELOPMENTS IN GPU-ACCELERATED SPARSE LINEAR ALGEBRA ALGORITHMS. Kyle Spagnoli. Research EM Photonics 3/20/2013

Aim. Structure and matrix sparsity: Part 1 The simplex method: Exploiting sparsity. Structure and matrix sparsity: Overview

Fast Iterative Solvers for Markov Chains, with Application to Google's PageRank. Hans De Sterck

Real-Time Shape Editing using Radial Basis Functions

1 2 (3 + x 3) x 2 = 1 3 (3 + x 1 2x 3 ) 1. 3 ( 1 x 2) (3 + x(0) 3 ) = 1 2 (3 + 0) = 3. 2 (3 + x(0) 1 2x (0) ( ) = 1 ( 1 x(0) 2 ) = 1 3 ) = 1 3

Numerical Linear Algebra

What is Multigrid? They have been extended to solve a wide variety of other problems, linear and nonlinear.

Def De orma f tion orma Disney/Pixar

Lecture 27: Fast Laplacian Solvers

Sparse Linear Systems

CS 542G: Solving Sparse Linear Systems

Study and implementation of computational methods for Differential Equations in heterogeneous systems. Asimina Vouronikoy - Eleni Zisiou

Chapter 14: Matrix Iterative Methods

Efficient Solution Techniques

HYPERDRIVE IMPLEMENTATION AND ANALYSIS OF A PARALLEL, CONJUGATE GRADIENT LINEAR SOLVER PROF. BRYANT PROF. KAYVON 15618: PARALLEL COMPUTER ARCHITECTURE

Humanoid Robotics. Least Squares. Maren Bennewitz

Figure 6.1: Truss topology optimization diagram.

Lecture 9. Introduction to Numerical Techniques

Lecture 15: More Iterative Ideas

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

2.7 Numerical Linear Algebra Software

Least Squares and SLAM Pose-SLAM

CS 395T Lecture 12: Feature Matching and Bundle Adjustment. Qixing Huang October 10 st 2018

Parallel Computation of Spherical Parameterizations for Mesh Analysis. Th. Athanasiadis and I. Fudos University of Ioannina, Greece

A comparison of Algorithms for Sparse Matrix. Real-time Multibody Dynamic Simulation

Numerical Algorithms

Numerical Analysis I - Final Exam Matrikelnummer:

Implicit schemes for wave models

Report of Linear Solver Implementation on GPU

CS6015 / LARP ACK : Linear Algebra and Its Applications - Gilbert Strang

Parameterization of Meshes

SELECTIVE ALGEBRAIC MULTIGRID IN FOAM-EXTEND

Iterative Methods for Solving Linear Problems

Exam Design and Analysis of Algorithms for Parallel Computer Systems 9 15 at ÖP3

Multigrid Methods for Markov Chains

CSCE 5160 Parallel Processing. CSCE 5160 Parallel Processing

A Study of Numerical Methods for Simultaneous Equations

Chemical Engineering 541

Chapter Introduction

Lecture 11: Randomized Least-squares Approximation in Practice. 11 Randomized Least-squares Approximation in Practice

Nonsymmetric Problems. Abstract. The eect of a threshold variant TPABLO of the permutation

Computational Fluid Dynamics - Incompressible Flows

THE DEVELOPMENT OF THE POTENTIAL AND ACADMIC PROGRAMMES OF WROCLAW UNIVERISTY OF TECH- NOLOGY ITERATIVE LINEAR SOLVERS

Generic Programming Experiments for SPn and SN transport codes

Contents. I Basics 1. Copyright by SIAM. Unauthorized reproduction of this article is prohibited.

CS 6210 Fall 2016 Bei Wang. Review Lecture What have we learnt in Scientific Computing?

Addition/Subtraction flops. ... k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)(2)

Multiview Stereo COSC450. Lecture 8

Autar Kaw Benjamin Rigsby. Transforming Numerical Methods Education for STEM Undergraduates

Computing with vectors and matrices in C++

ICRA 2016 Tutorial on SLAM. Graph-Based SLAM and Sparsity. Cyrill Stachniss

Least-Squares Fitting of Data with B-Spline Curves

Interlude: Solving systems of Equations

fspai-1.1 Factorized Sparse Approximate Inverse Preconditioner

Lecture 17: More Fun With Sparse Matrices

Geometric Modeling Assignment 3: Discrete Differential Quantities

Laplacian Meshes. COS 526 Fall 2016 Slides from Olga Sorkine and Yaron Lipman

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

COMPUTER OPTIMIZATION

Numerical Methods 5633

Matrix Inverse 2 ( 2) 1 = 2 1 2

PARDISO Version Reference Sheet Fortran

Comparison of Two Stationary Iterative Methods

PROGRAMMING OF MULTIGRID METHODS

EFFICIENT SOLVER FOR LINEAR ALGEBRAIC EQUATIONS ON PARALLEL ARCHITECTURE USING MPI

WE consider the gate-sizing problem, that is, the problem

GRAPH CENTERS USED FOR STABILIZATION OF MATRIX FACTORIZATIONS

LARP / 2018 ACK : 1. Linear Algebra and Its Applications - Gilbert Strang 2. Autar Kaw, Transforming Numerical Methods Education for STEM Graduates

Sparse Matrices. This means that for increasing problem size the matrices become sparse and sparser. O. Rheinbach, TU Bergakademie Freiberg

A Global Laplacian Smoothing Approach with Feature Preservation

GEOMETRIC LIBRARY. Maharavo Randrianarivony

Preliminary Investigations on Resilient Parallel Numerical Linear Algebra Solvers

Preconditioning for linear least-squares problems

Using Jacobi Iterations and Blocking for Solving Sparse Triangular Systems in Incomplete Factorization Preconditioning

1.7.1 Laplacian Smoothing

CS231A Midterm Review. Friday 5/6/2016

Chapter 13. Boundary Value Problems for Partial Differential Equations* Linz 2002/ page

Numerical Methods to Solve 2-D and 3-D Elliptic Partial Differential Equations Using Matlab on the Cluster maya

Horn-Schunck and Lucas Kanade 1

Transcription:

(Sparse) Linear Solvers Ax = B Why? Many geometry processing applications boil down to: solve one or more linear systems Parameterization Editing Reconstruction Fairing Morphing 1

Don t you just invert A? Matrix not always invertible Not square A x b A x b Over determined Under determined Singular Almost singular Don t you just invert A? Even if invertible Veryexpensive O(n 3 ) Usually n = number of vertices/faces Inverse matrix not sparse! 2

Problem definition Input Matrix A mxn Vector B mx1 Output Vector x nx1 Such that Ax = B Small time and memory complexity Use additional information on the problem Properties of linear systems for DGP Sparse A Equations depend on graph neighborhood Equations on vertices 7non-zeros per row on average Number of non zero elements O(n) n = 1002 Non zeros = 7002 3

Properties of linear systems for DGP Symmetric positive definite (positive eigenvalues) Many times Ais the Laplacianmatrix Laplacian systems are usually SPD Aremains, bchanges many right hand sides Interactive applications Mesh geometry same matrix for X, Y, Z Linear solvers zoo A is square and regular Indirect solvers iterative Jacobi Gauss-Seidel Conjugate gradient Direct solvers factorization LU QR Cholesky Multigrid solvers 8 4

Jacobi iterative solver If all variables are known but one, its value is easy to find Idea: Guess initial values Repeat until convergence Compute the value of one variable assuming all others are known Repeat for all variables 9 Jacobi iterative solver Let x * be the exact solution of Ax * = b Jacobi method Set While not converged For i = 1to n Values from previous iteration 10 5

Jacobi iterative solver Pros Simple to implement No need for sparse data structure Low memory consumption O(n) Takes advantage of sparse structure Can be parallelized 11 Jacobi iterative solver Cons Guaranteed convergence for strictly diagonally dominant matrices The Laplacianis almostsuch a matrix Converges SLOWLY Smoothens the error Once the error is smooth, slow convergence Doesn t take advantage of Same A, different b SPD matrix 12 6

Gauss-Seidel Iteration Uses values from current iteration: 1 x = b a x a x ( k + 1) ( k ) ( k + 1) i i ij ij ij ij aii j< i j i Advantage over Jacobi: Uses only one vector storage (values can be written on). Also generally converges better. But parallelism is lost. 13 Direct solvers - factorization If A is diagonal/triangular the system is easy to solve Idea: Factor Ausing simple matrices x 1 Solve using keasy systems 14 7

Direct solvers - factorization Factoring harder than solving Added benefit multiple right hand sides Factor only once! 15 Diagonal Solving easy matrices 16 8

Solving easy matrices Lower triangular Forward substitution Start from x 1 17 Solving easy matrices Upper triangular Backward substitution Start from x n 18 9

LU factorization A = LU L lower triangular U upper triangular Exists for any non-singular square matrix Solve using Lx 1 =band Ux = x 1 19 QR factorization A = QR Qorthogonal Q T = Q -1 R upper triangular Exists for any matrix Solve using Rx = Q T b 20 10

Cholesky factorization A = LL T L lower triangular Exists for square symmetric positive definite matrices Solve using Lx 1 =band L T x = x 1 21 Direct solvers sparse factors? Usually factors are notsparse,even if Ais sparse Sparse matrix Cholesky factor 22 11

Sparse direct solvers Reorder variables/equations so factors are sparse For example Bandwidth is preserved Reorder to minimize bandwidth Sparse matrix bounded bandwith Cholesky factor 23 Sparse direct solvers SPD matrices Choleskyfactor sparsitypattern can be derived from matrix sparsity pattern Reorder to minimize new non zeros (fill in) of factor matrix Sparse matrix - reordered Cholesky factor 24 12

Sparse Cholesky Symbolic factorization Can be reused for matrix with same sparsity structure Even if values change! Only for SPD matrices Reordering is heuristic not always gives good sparsity High memory complexity if reordering was bad BUT Works extremely well for Laplacian systems Can solve systems up to n= 500K on a standard PC 25 Under-determined systems System is under-constrained too many variables Solution: add constraints by pinning variables Add equations x 1 = c 1, x 2 = c 2,..., x k = c 2 Or A x = b mxn mx1 nx1 Replace variables with constants in equations Better smaller system 26 13

Over-determined systems System is over-constrained too many equations A x = b nx1 mxn mx1 Unless equations are dependent, no solution exists Instead, minimize: 27 Over-determined systems The minimizerof A x b 2 Is the solution of T A Ax = T A b A T Ais symmetric positive definite Can use Cholesky 28 14

Singular square matrices Equivalent to under-determined system Add constraints By changing variables to constants NOT by adding equations! Will make system not square Much more expensive 29 Conclusions Many linear solvers exist Best choice depends on A DGP algorithms generate sparse SPD systems Research shows sparse linear solvers are best for DGP Sparse algs exist also for non-square systems If solving in Matlab use \ operator 30 15

References Efficient Linear System Solvers for Mesh Processing, Botsch et al., 2005 31 16