Docsity

(Sparse) Linear Solvers, Lecture notes of Geometry

Partial preview of the text

Download (Sparse) Linear Solvers and more Lecture notes Geometry in PDF only on Docsity!

(Sparse)

Linear

Solvers

A

B

A

B

A

x = B

Ax = B

Why?Why?

Many

geometry

processing

applications

boil

down

to:

solve one or more linear systemssolve

one

or

more

linear

systems

ParameterizationEditing Reconstruction Fairing Morphing

Don

’t you just invert

A

Don t

you

just

invert

A

-^

Even

if

invertible

V

i^

O(

Very expensive

O(

n

Usually

n

number

of

vertices/faces

Problem definition

-^

Input

Problem

definition

Matrix

A

mxn

Vector

B

mx

-^

Output^ –

Vector

x

nx

Such

that

Ax = B

-^

Small time and memory complexity

-^

Small

time

and

memory

complexity

-^

Use

additional

information

on

the

p

roblem p

Properties of

linear

systems for DGP

Properties

of

linear

systems

for

DGP

-^

Symmetric

p

ositive

definite

(p

ositive

y

p

(p

eigenvalues)^ –

Many

times

A

is

the

Laplacian matrix

Laplacian systems

are

usually

SPD

-^

A

remains,

b

changes

many

right

hand

sides

Interactive

applications

Mesh

geometry

same

matrix

for

X, Y, Z

Linear solvers zooLinear

solvers

zoo

-^

A

is

square

and

regular

-^

Indirect

solvers

iterative

-^

JacobiJacob

-^

Gauss

‐Seidel

-^

Conjugate

gradient

-^

Direct

solvers

factorization

-^

LU

-^

QRQR

-^

Cholesky

-^

Multigrid solvers

-^

Multigrid

solvers

8

Jacobi iterative

solver

Jacobi

iterative

solver

-^

Let

x

*^

be the exact solution

of

Ax

*^

=

b

Let

x

be

the

exact

solution

of

Ax

b

-^

Jacobi

method

Set

While

not

converged

Values

from

previous iteration

-^

For

i^

= 1

to

n

previous

iteration

10

Jacobi

iterative

solver

Pros

Si

l^

t^

i^

l^

t

-^

Si

mple

t

o

implement

No

need

for

sparse

data

structure

-^

Low

memory

consumption

O(

n

-^

Takes

advantage of sparse

structure

Takes

advantage

of

sparse

structure

b

ll li

d

-^

Can

b

e

parallelized

11

Direct solvers

factorization

Direct

solvers

factorization

•^

If A is diagonal/triangular the system is easy to solveIf

A

is

diagonal/triangular

the

system

is

easy

to

solve

•^

Idea:

-^

Idea:^ –

Factor

A

using

simple

”^

matrices x^1

Solve

using

k

easy

systems

13

Direct solvers

factorization

Direct

solvers

factorization

-^

Factoring

harder than solving

-^

Factoring

harder

than

solving

-^

Added

benefit

multiple

right

hand

sides

Factor only once!Factor

only

once!

14

Solving easy matricesSolving

easy

matrices

Lower triangularLower

triangular

-^

Forward

substitution

-^

Start from

x

-^

Start

from

x

1

16

Solving easy matricesSolving

easy

matrices

Upper triangularUpper

triangular

-^

Backward

substitution

-^

Start from

x

-^

Start

from

x

n

17

QR factorizationQR

factorization

-^

A

= QR

A

QR

Q

orthogonal

Æ

Q

T^

=

Q

R

upper

triangular

-^

Exists

for

any

matrix

-^

Solve

using

Rx

Q

Tb

19

Cholesky factorizationCholesky

factorization

•^
A = LL

T

L

lower

triangular

•^

Exists for square symmetric positive definiteExists

for

square

symmetric

positive

definite

matrices

-^

Solve

using

Lx

b

and

L

T^ x

x

1

20