MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

65
MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling A. Brandt The Weizmann Institute of Science UCLA www.wisdom.weizmann.ac.il/ ~achi

description

MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling. A. Brandt The Weizmann Institute of Science UCLA www.wisdom.weizmann.ac.il/~achi. Major scaling bottlenecks: computing. Elementary particles (QCD) Schrödinger equation molecules condensed matter - PowerPoint PPT Presentation

Transcript of MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Page 1: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

MULTISCALE COMPUTATION:

From Fast SolversTo Systematic Upscaling

A. BrandtThe Weizmann Institute of ScienceUCLA

www.wisdom.weizmann.ac.il/~achi

Page 2: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Major scaling bottlenecks:computing

Elementary particles (QCD)

Schrödinger equationmoleculescondensed matter

Molecular dynamicsprotein folding, fluids, materials

Turbulence, weather, combustion,…

Inverse problemsda, control, medical imaging

Vision, recognition

Page 3: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Scale-born obstacles:

• Many variables n gridpoints / particles / pixels / …

• Interacting with each other O(n2)

• Slowness

Slow Monte Carlo / Small time steps / …Slowly converging iterations /

due to

1. Localness of processing

Page 4: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

0

0r0 distance

Two-atomLennard-Jonespotential

r0

small step

Page 5: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

small step

Moving one particle at a time

fast local ordering

slow global move

Page 6: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 7: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Solving PDE: Influence of pointwiserelaxation on the error

Error of initial guess Error after 5 relaxation sweeps

Error after 10 relaxations Error after 15 relaxations

Fast error smoothingslow solution

Page 8: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Scale-born obstacles:

• Many variables n gridpoints / particles / pixels / …

• Interacting with each other O(n2)

• Slowness

Slow Monte Carlo / Small time steps / …Slowly converging iterations /

due to

1. Localness of processing

2. Attraction basins

Page 9: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 10: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 11: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Fluids Gas/Liquid

1. Positional clustering

Lennard-Jones

r0

2. Electrostatic clustering

Dipoles

Water: 1& 2

Page 12: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

r

E(r)

Optimization min E(r)

multi-scale attraction basins

Page 13: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

+ Lennard-Jones

~104 Monte Carlo passes

for one T Gi transition

G1 G2T

Dihedral potential

+ Electrostatic

Page 14: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Potential Energy

S rr ,126

NBji ij

ij

ij

ij BALennard-Jones

S r

NB , j i ij

qqji Electrostatic

Bond length strain

Bond angle strain

)(1SV

DA,,,

ιjκlnijkl ncos ljki

torsion

DHA

HBAH,D, HA

HA

HA

HA 4

1210

S r

D

r

Ccos

hydrogen bond

rk

)r,...,r,r( n21E

2

,

)rr(S

S N

ijijj i

ij

2

,,

)(SKBA

ijkijk kji

ijk coscos

ijkl

ri

rjrl

rij ijk

Page 15: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Scale-born obstacles:

• Many variables n gridpoints / particles / pixels / …

• Interacting with each other O(n2)

• Slowness

Slow Monte Carlo / Small time steps / …Slowly converging iterations /

due to

1. Localness of processing

2. Attraction basins

Removed by multiscale processing

Page 16: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Solving PDE: Influence of pointwiserelaxation on the error

Error of initial guess Error after 5 relaxation sweeps

Error after 10 relaxations Error after 15 relaxations

Fast error smoothingslow solution

Page 17: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

LU = F

h

2h

4h

LhUh = Fh

L2hU2h = F2h

L4hV4h = R4h

L2hV2h = R2h

Page 18: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

interpolation (order l+p)to a new grid

interpolation (order m)of corrections

relaxation sweeps

algebraic error< truncation error

residual transfer

ν νenough sweepsor direct solver*

**

1ν2ν

*

Full MultiGrid (FMG) algorithm

..

.

*

Vcyclemultigrid

h0

h0/2

h0/4

2h

h

Page 19: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)

Page 20: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)• Nonlinear FAS (1975)

Page 21: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

LU = F

h

2h

4h

LhUh = Fh

L4hU4h = F4h

h2

h4

Fine-to-coarse defect correction

L2hV2h = R2hU2h = Uh,approximate +V2h L2hU2h = F2h

Page 22: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 23: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs*

(1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 24: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

• Same fast solver

Local patches of finer grids

• Each level correct the equations of the next coarser level

• Each patch may use different coordinate system and anisotropic grid

“Quasicontiuum” method [B., 1992]

• Each patch may use different coordinate system and anisotropic grid and different

physics; e.g. Atomistic

and differet physics; e.g. atomistic

Page 25: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 26: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 27: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 28: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

ALGEBRAIC MULTIGRID (AMG) 1982

Page 29: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

ALGEBRAIC MULTIGRID (AMG) 1982

Coarse variables - a subset

1. “General” linear systems

2. Variety of graph problems

Page 30: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Graph problems

Partition: min cut

Clustering bioinformatics

Image segmentation

VLSI placement Routing

Linear arrangement: bandwidth, cutwidth

Graph drawing low dimension embedding

Coarsening: weighted aggregation

Recursion: inherited couplings (like AMG)

Modified by properties of coarse aggregates

General principle: Multilevel objectives

Page 31: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 32: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

2h

h

2wavelength

Non-local components:

eix, ≈ ±kSlow to converge in local processing

The error after relaxationv(x) = A1(x) eikx + A2(x) e-ikx

A1(x), A2(x) smooth

Ar(x) are represented on coarser grids:

A1 + 2 i k A1′ = f1 = rh(x) e-ikx

1D Wave Equation: u”+k2u=f

Page 33: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

k

8,8)

1,1)

2,2)3,3)

4,4)

5,5)

6,6)7,7)O(H)

2D Wave Equation: Du+k2u=f

Non-local:

ei( x + 2 y)

+

≈ k2

On coarser grid (meshsize H):

Fully efficient multigrid solverTends to Geometrical OpticsRadiation Boundary Conditions: directly on coarsest level

cH

1r

v(x) y)(x,A ry)x( rre i

Page 34: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Σr = 1

m

Ar(x) φr(x)

Generally: LU=F

Non-local part of U has the form

L φr ≈ 0

Ar(x) smooth

{φr } found by local processing

Ar represented on a coarser grid

Page 35: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 36: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

N eigenfunctions

Electronic structures (Kohn-Sham eq):

)(ψ)(ψ)(V xxx iii i i = 1, …, = 1, …, NN = # electrons= # electrons

O (N) gridpoints per i

O (N2 ) storage

Orthogonalization O (N3 ) operations

O (N log N) storage & operations

Multiscale eigenbase 1D: Livne

V = Vnuclear + V()One shot solver

Page 37: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs* (1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations Full matrix• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 38: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Integro-differential Equation

differential

, dense

2

dyyuyxGxLu )(),()(

fuAnn

A

Multigrid solver

Distributive relaxation:1st order2nd order

Solution cost ≈ one fast transform(one fast evaluation of the discretized integral transform)

Page 39: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Integral Transforms

Ω

d )u( G(x, V(x) 'x

|-x|

1

/|-x|-e

x-e

ixe

22

G(x, Transform

Fourier

Laplace

Gauss

Potential

Complexity

n logn)

n logn)

n)

n)

G(x,Exp(ik Waves n logn)

Page 40: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Glocal

G(x,y)

Gsmooth

s |x-y|

G(x,y) = Gsmooth(x,y) + Glocal(x,y)

s ~ next coarser scale

~ 1 / | x – y |

O(n) not static!

Page 41: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs*

(1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics Monte-Carlo

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 42: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Discretization Lattice LL

for accuracy :ε qε ~L

Monte Carlo cost ~dL

“volume factor”

“critical slowing down”

Multiscale ~ 2ε

Multigrid moves

2zL

Many sampling cyclesat coarse levels

Page 43: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)*• Nonlinear• Grid adaptation• General boundaries, BCs*• Discontinuous coefficients• Disordered: coefficients, grid (FE) AMG• Several coupled PDEs*

(1980)

• Non-elliptic: high-Reynolds flow• Highly indefinite: waves• Many eigenfunctions (N)• Near zero modes• Gauge topology: Dirac eq.• Inverse problems• Optimal design• Integral equations• Statistical mechanics

Massive parallel processing*Rigorous quantitative analysis

(1986)

FAS (1975)

Within one solver

)log(

2

NNO

fuku

(1977,1982)

Page 44: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

• Same fast solver

Local patches of finer grids

• Each level correct the equations of the next coarser level

• Each patch may use different coordinate system and anisotropic grid

“Quasicontiuum” method [B., 1992]

• Each patch may use different coordinate system and anisotropic grid and different

physics; e.g. Atomistic

and differet physics; e.g. atomistic

Page 45: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Repetitive systemse.g., same equations everywhere

UPSCALING:

Derivation of coarse equationsin small windows

Page 46: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Scale-born obstacles:

• Many variables n gridpoints / particles / pixels / …

• Interacting with each other O(n2)

• Slowness

Slow Monte Carlo / Small time steps / …Slowly converging iterations /

due to

1. Localness of processing

2. Attraction basins

Removed by multiscale processing

Page 47: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Systematic Upscaling

1. Choosing coarse variables

2. Constructing coarse-level operational rules

equations

Hamiltonian

Page 48: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 49: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 50: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 51: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

~ 10-15 second steps

Page 52: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Systematic Upscaling

1. Choosing coarse variables

Criterion: Fast convergence of “compatible

relaxation”

Page 53: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Systematic Upscaling

1. Choosing coarse variables

Criterion: Fast equilibration of “compatible Monte Carlo”

OR: Fast convergence of

“compatible relaxation”

Local dependence on coarse variables

2. Constructing coarse-level operational rules

Done locally

In representative “windows” fast

Page 54: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

Page 55: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

Two orders of magnitude faster simulation

Page 56: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 57: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Fluids

£ Total mass£ Total momentum£ Total dipole moment£ average location

Page 58: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

1

1

2

Page 59: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Windows

Coarser level

Larger density fluctuations

Still coarser level

1~density

:level Fine

2~density

:level Fine

3:density

level Fine

Page 60: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Fluids

Total mass:

)(xmSumming

Page 61: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Lower Temperature T

Summing also

0 ,2 vwuw

)(xme xwi v

u

Still lower T:More precise crystal direction and

periods determined at coarser spatial levels

Heisenberg uncertainty principle:

Better orientational resolution at larger spatial scales

Page 62: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Optimization byMultiscale annealing

Identifying increasingly larger-scale

degrees of freedom

at progressively lower temperatures

Handling multiscale attraction basins

E(r)

r

Page 63: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Systematic Upscaling

Rigorous computational methodology to derivefrom physical laws at microscopic (e.g., atomistic) level

governing equations at increasingly larger scales.

Scales are increased gradually (e.g., doubled at each level)

with interscale feedbacks, yielding:

• Inexpensive computation : needed only in some small “windows” at each scale.

• No need to sum long-range interactions

Applicable to fluids, solids, macromolecules, electronic structures, elementary particles, turbulence, …

• Efficient transitions between meta-stable configurations.

Page 64: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Upscaling Projects• QCD (elementary particles):

Renormalization multigrid Ron

BAMG solver of Dirac eqs. Livne, Livshits Fast update of , det Rozantsev

• (3n +1) dimensional Schrödinger eq. Filinov

Real-time Feynmann path integrals Zlochin

multiscale electronic-density functional

• DFT electronic structures Livne, Livshits

molecular dynamics

• Molecular dynamics:

Fluids Ilyin, Suwain, Makedonska

Polymers, proteins Bai, Klug

Micromechanical structures Ghoniem defects, dislocations, grains

• Navier Stokes Turbulence McWilliams

Dinar, Diskin

1MfxM

M

Page 65: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

THANK YOU