(Sparse) Linear Solvers, Lecture notes of Geometry

Sparse direct solvers. • SPD matrices. – Cholesky factor sparsity pattern can be derived from matrix' sparsity pattern. • Reorder to minimize new non zeros ...

Typology: Lecture notes

2022/2023

Uploaded on 03/01/2023

alley
alley 🇺🇸

4.2

(5)

256 documents

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
(Sparse)LinearSolvers
ABAB
A
x =
BA
x =
B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

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