multiscale computation: from fast solvers to systematic upscaling

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

Upload: estevan-gutierrez

Post on 31-Dec-2015

23 views

Category:

Documents


2 download

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

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

small step

Moving one particle at a time

fast local ordering

slow global move

Page 5: 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 6: 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 7: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 8: 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 9: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

r

E(r)

Optimization min E(r)

multi-scale attraction basins

Page 10: 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 11: 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 12: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

LU = F

h

2h

4h

LhUh = Fh

L2hU2h = F2h

L4hV4h = R4h

L2hV2h = R2h

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

Multigrid solversCost: 25-100 operations per unknown

• Linear scalar elliptic equation (~1971)

Page 14: 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 15: 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 16: 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 17: 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 18: 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 19: 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 20: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 21: 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 22: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

ALGEBRAIC MULTIGRID (AMG) 1982

Page 23: 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 24: 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 25: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

SWA

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

Data: Filippi

TaggedTagged Our resultsOur results

Detected Lesions

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

Σ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 29: 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 30: 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 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 Full matrix• 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

Integro-differential Equation

differential

, dense

2

dyyuyxGxLu )(),()(

fuAnn

A

Multigrid solver

Distributive relaxation:1st order2nd order

Solution cost ≈ one fast transform (one matrix multiply)

Page 33: 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 34: 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!

Gsmooth(x,y) tranferred directly to coarser

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 Monte-Carlo

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

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 37: 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 38: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Repetitive systemse.g., same equations everywhere

UPSCALING:

Derivation of coarse equationsin small windows

Small scale ratio at a time

Page 39: 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 40: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 41: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling
Page 42: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

Page 43: 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 44: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Macromolecule

Two orders of magnitude faster simulation

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

Fluids

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

Page 47: 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 48: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

Fluids

Total mass:

)(xmSumming

Page 49: 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 50: 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 51: 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 52: 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.

Real-time Feynmann path integrals Zlochin

multiscale electronic-density functional

• DFT electronic structures Livne, Livshits, Carter

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 53: MULTISCALE COMPUTATION: From Fast Solvers To Systematic Upscaling

THANK YOU

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

Aggregating Regions Adaptively

e.g., by similarity of

• densities astrophysics

• heights epitaxial growth

• color image segmentationcolor variances at all scaleselongation continuation deblurringshapes recognition