Download - Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Transcript
Page 1: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Statistical mechanics in computational geometry

Daniel DuqueETSIN, UPM

June 21, 2010

Page 2: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

IntroductionMotivationFluid particle dynamicsEuler vs Lagrange

The problemReconstructionDesiderata

MethodsSPHFEMMLS

LME and SMEIntroRajanLMESME

To do

Page 3: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Motivation

◮ Notice: in the past, we have applied computational geometry(CG) to statistical mechanics (SM). I.e. the α-shapes.

◮ Today, I’ll describe methods from SM applied to CG.

Page 4: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

The problem

◮ When discretizing the continuum equations of hydrodynamicsusing nodes (“particles”) one may obtain equations of motion.Direct connection: Molecular dynamics No SM, really

◮ (Actually, interesting SM in the mesoscopic, Brownian regime,but that’s not our topic today.)

◮ How to discretize the equations for some given particles?Some unexpected SM.

Page 5: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Laws: Navier-Stokes equations

We would be happy to compute these two accurately:Continuity:

∂ρ

∂t= −∇ · ρv

Momentum density ρvα, for each coordinate α = 1, 2, 3:

∂ρvα

∂t= −∇ · ρvαv −

∂p

∂xα

+ µ∇2vα

Page 6: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Euler’s view

Use a grid, and finite differences (or finite elements) for equationsthat are written in this “frame”.

Page 7: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Euler’s view

Use a grid, and finite differences (or finite elements) for equationsthat are written in this “frame”.Notice “particles” are fixed here, are just space nodes. There isusually lots of freedom in choosing them (and refining them).

SERG, U. Sheffield

Page 8: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of fixed meshes

Problems arise in many situations.

◮ When one does not know in advance where more effort (CPUand RAM) will be needed (turbulence, astrophysics. . . )

Page 9: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of fixed meshes

Problems arise in many situations.

◮ When one does not know in advance where more effort (CPUand RAM) will be needed (turbulence, astrophysics. . . )

◮ When the boundary is also moving, “free boundary problems”.E.g. surface waves (what people call “waves”!). (Spanish: ola6= onda). I.e. almost always in naval engineering.

Page 10: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of fixed meshes

Problems arise in many situations.

◮ When one does not know in advance where more effort (CPUand RAM) will be needed (turbulence, astrophysics. . . )

◮ When the boundary is also moving, “free boundary problems”.E.g. surface waves (what people call “waves”!). (Spanish: ola6= onda). I.e. almost always in naval engineering.

This calls for a Lagrangian approach, and computational methodsthat will be either meshless or have a moving mesh.

Page 11: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Lagrange’s view

No need to go into details today. In a nutshell, “particles” aredefined that follow the flow (pathlines).

Page 12: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Lagrange’s view

No need to go into details today. In a nutshell, “particles” aredefined that follow the flow (pathlines).In this frame, the equations simplify remarkably. Now, we would behappy just with these.Lagrangian particles:

Dr

Dt= v

Continuity:DM

Dt= 0

Momentum:M

V

Dv

Dt= −∇ p + µ∇2

v.

Page 13: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Computing with fluid particles

Given a set of particles with

◮ positions {ra},

◮ velocities {va},

◮ and pressures {pa}

Page 14: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Computing with fluid particles

Given a set of particles with

◮ positions {ra},

◮ velocities {va},

◮ and pressures {pa}

Dra

Dt= va

DMa

Dt= 0

Ma

Va

Dva

Dt= −(∇ p)a + µ(∇2

v)a.

Page 15: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Computing with fluid particles

So, we need to provide expressions for:

◮ particles’ volumes {Va}

◮ pressure gradients {(∇p)a}

◮ velocity Laplacians {(∇2v)a}

Page 16: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Anyway!Mathematically, our problem boils down to:

◮ given the values of a function u(x) on a set of nodes {xa},{ua}

Page 17: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Anyway!Mathematically, our problem boils down to:

◮ given the values of a function u(x) on a set of nodes {xa},{ua}

◮ find the derivatives at the nodes: {∇u}a, {∇2u}a, etc.

Page 18: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Anyway!Mathematically, our problem boils down to:

◮ given the values of a function u(x) on a set of nodes {xa},{ua}

◮ find the derivatives at the nodes: {∇u}a, {∇2u}a, etc.

◮ we are not alone: many people are considering relatedproblems in the field of imaging. E.g. reconstruction:{ua} → u(x). Sometimes even {ua} → ∇2u(x) (edgedetection).

Page 19: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Anyway!Mathematically, our problem boils down to:

◮ given the values of a function u(x) on a set of nodes {xa},{ua}

◮ find the derivatives at the nodes: {∇u}a, {∇2u}a, etc.

◮ we are not alone: many people are considering relatedproblems in the field of imaging. E.g. reconstruction:{ua} → u(x). Sometimes even {ua} → ∇2u(x) (edgedetection).

◮ also: we are unable to choose “nice” nodes. Even if we do,they will move around, to who knows where (This is a hugedifference with the fixed grid community, such as FEMs).

Page 20: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Anyway!Mathematically, our problem boils down to:

◮ given the values of a function u(x) on a set of nodes {xa},{ua}

◮ find the derivatives at the nodes: {∇u}a, {∇2u}a, etc.

◮ we are not alone: many people are considering relatedproblems in the field of imaging. E.g. reconstruction:{ua} → u(x). Sometimes even {ua} → ∇2u(x) (edgedetection).

◮ also: we are unable to choose “nice” nodes. Even if we do,they will move around, to who knows where (This is a hugedifference with the fixed grid community, such as FEMs).

The standard approach is to introduce a set of weight functions{pa(x)}, from which:

u(x) =∑

a

uapa(x) ∇u(x) =∑

a

ua∇pa(x) . . .

(Actually, some quadrature may be needed on top of this.)

Page 21: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

Page 22: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

Page 23: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

Page 24: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

◮ 2-cons∑

apax

2a

= x2

Page 25: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

◮ 2-cons∑

apax

2a

= x2

◮ local

Page 26: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

◮ 2-cons∑

apax

2a

= x2

◮ local

◮ mesh-free

Page 27: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

◮ 2-cons∑

apax

2a

= x2

◮ local

◮ mesh-free

◮ boundary

Page 28: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Desired features

◮ posit pa > 0 (all of today’s talk, but MLS)

◮ 0-cons∑

apa = 1

◮ 1-cons∑

apaxa = x

◮ 2-cons∑

apax

2a

= x2

◮ local

◮ mesh-free

◮ boundary

We would like these be satisfied, in some sense, at least. In orderof niceness:

◮ Identically

◮ For lots of particles (O(N) effort)

◮ For finer resolution (O(N2) effort, or worse)

Page 29: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: SPH

pa =1

Cexp[−β(x − xa)

2]

0-c 1-c 2-c loc m-free bound

Page 30: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: SPH

pa =1

Cexp[−β(x − xa)

2]

0-c 1-c 2-c loc m-free bound

◮ Quite bad consistency (needs resolution increase to converge),but very easy to implement

◮ Uses: fluids with interfaces, both in science and in animationindustry (films, commercials. . . ). Next Limit’s Real Flow:LotR, Avatar, Charlie and the Chocolate, Ice Age 1-3,Watchmen. . .

Page 31: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: SPH-Shepard

sa = exp[−β(x − xa)2]

pa =sa

Z

Z =∑

a

sa

0-c 1-c 2-c loc m-free bound

◮ 0-consistency by construction, the rest is as bad as SPH.

Page 32: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: FEM

pa = finite elements on Delaunay mesh

Page 33: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: FEM

pa = finite elements on Delaunay mesh

◮ The very famous Finite Element Method of engineering

◮ Notice the elements are triangles in 1D, pyramids in 2D, butin the later there are many possible triangulations on which tobuild them

◮ The Delaunay lattice is the “best” in many ways: it is the onewith more open angles. Plus, its dual is the Voronoitesselation.

Page 34: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

FEM

0-c 1-c 2-c loc m-free bound

Page 35: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: MLS

pa = fa(x) exp[−β(x − xa)2]

0-c 1-c 2-c loc m-free bound

Page 36: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Popular choices: MLS

pa = fa(x) exp[−β(x − xa)2]

0-c 1-c 2-c loc m-free bound

◮ Exact consistencies by construction.

◮ But notice: serious stability issues due to fitting.

◮ In fact, it violates positivity, pa < 0 sometimes.

Page 37: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Our little experience with FEM and MLS

FEM seemed really the way to go. But! it never converges to theproper ∇2! (on arbitrary point sets).

Page 38: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Our little experience with FEM and MLS

FEM seemed really the way to go. But! it never converges to theproper ∇2! (on arbitrary point sets).This was quite a shock, it being such stablished in engineering.

Page 39: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Our little experience with FEM and MLS

FEM seemed really the way to go. But! it never converges to theproper ∇2! (on arbitrary point sets).This was quite a shock, it being such stablished in engineering.Then, we (re)discovered MLS. It did converge, but when used it isvery unstable. Beware of overfitting!

Page 40: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Our little experience with FEM and MLS

FEM seemed really the way to go. But! it never converges to theproper ∇2! (on arbitrary point sets).This was quite a shock, it being such stablished in engineering.Then, we (re)discovered MLS. It did converge, but when used it isvery unstable. Beware of overfitting!All in all, the FEM can already be used for reasonable results.

Page 41: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

FEM results: dam break

-0.5 0 0.5 1 1.5x

-0.5

0

0.5

1

y

Step 266000; time 2.66

Page 42: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

FEM results: dam break

-0.5 0 0.5 1 1.5x

-0.5

0

0.5

1

y

Step 800000; time 8

Page 43: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

FEM results: dam break

-0.5 0 0.5 1 1.5x

-0.5

0

0.5

1

y

Step 2476000; time 24.76

Page 44: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing: LME

A Copernican revolution:

◮ instead of pa(x) → u(x) → ∇u

Page 45: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing: LME

A Copernican revolution:

◮ instead of pa(x) → u(x) → ∇u

◮ Rather: fix x , find {pa} with the desired properties.

Page 46: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing: LME

A Copernican revolution:

◮ instead of pa(x) → u(x) → ∇u

◮ Rather: fix x , find {pa} with the desired properties.

◮ E.g. find {pa} such that∑

pa(x) = 1,∑

pa(x − xa) = 0, plusof course more requirements. Perhaps some variationalconditions (min or max something?)

Page 47: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing: LME

A Copernican revolution:

◮ instead of pa(x) → u(x) → ∇u

◮ Rather: fix x , find {pa} with the desired properties.

◮ E.g. find {pa} such that∑

pa(x) = 1,∑

pa(x − xa) = 0, plusof course more requirements. Perhaps some variationalconditions (min or max something?)

◮ Notice: no functional form to the pa. This is both a source offreedom and a computational nuisance.

Page 48: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Previous hint: Rajan

◮ Impose∑

pa(x) = 1,∑

pa(x − xa) = 0.

Page 49: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Previous hint: Rajan

◮ Impose∑

pa(x) = 1,∑

pa(x − xa) = 0.

◮ Consider the squared weighted distance from x to all {xa}:U =

pa(x − xa)2. (Notice: all values {x − xa} are fixed:

it’s the weights we can play with).

Page 50: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Previous hint: Rajan

◮ Impose∑

pa(x) = 1,∑

pa(x − xa) = 0.

◮ Consider the squared weighted distance from x to all {xa}:U =

pa(x − xa)2. (Notice: all values {x − xa} are fixed:

it’s the weights we can play with).

◮ Minimize U subject to the constraints.

Page 51: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Previous hint: Rajan

◮ Impose∑

pa(x) = 1,∑

pa(x − xa) = 0.

◮ Consider the squared weighted distance from x to all {xa}:U =

pa(x − xa)2. (Notice: all values {x − xa} are fixed:

it’s the weights we can play with).

◮ Minimize U subject to the constraints.

◮ Guess what we get?

Page 52: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Previous hint: Rajan

◮ Impose∑

pa(x) = 1,∑

pa(x − xa) = 0.

◮ Consider the squared weighted distance from x to all {xa}:U =

pa(x − xa)2. (Notice: all values {x − xa} are fixed:

it’s the weights we can play with).

◮ Minimize U subject to the constraints.

◮ Guess what we get?

Mathematically: extremize

L = β∑

pa(x − xa)2 + α

(

pa − 1)

+ λ∑

pa(x − xa)

Page 53: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

Page 54: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

◮ the FEM . . .

Page 55: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

◮ the FEM . . .

◮ on the Delaunay triangulation!

Page 56: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

◮ the FEM . . .

◮ on the Delaunay triangulation!

◮ Notice we don’t even compute the triangulation! (which isnon-trivial).

Page 57: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

◮ the FEM . . .

◮ on the Delaunay triangulation!

◮ Notice we don’t even compute the triangulation! (which isnon-trivial).

Page 58: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Rajan – FEM

◮ If the “program” is carried out we recover . . .

◮ the FEM . . .

◮ on the Delaunay triangulation!

◮ Notice we don’t even compute the triangulation! (which isnon-trivial).

◮ Amazing or what? (It is to me.)

Page 59: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, continued

◮ So, this U looks like an energy, doesn’t it: U =∑

pa(x − xa)2.

◮ It would be a sort of mean spherical model (all pa add up to1), where each “spin” pa is coupled only to its field (x − xa)

2.

Page 60: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, continued

◮ So, this U looks like an energy, doesn’t it: U =∑

pa(x − xa)2.

◮ It would be a sort of mean spherical model (all pa add up to1), where each “spin” pa is coupled only to its field (x − xa)

2.

So, what if we tried “entropy” instead of “energy”?

L =∑

pa (log pa − 1) + α(

pa − 1)

+ λ∑

pa(x − xa)

Page 61: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, continued

◮ So, this U looks like an energy, doesn’t it: U =∑

pa(x − xa)2.

◮ It would be a sort of mean spherical model (all pa add up to1), where each “spin” pa is coupled only to its field (x − xa)

2.

So, what if we tried “entropy” instead of “energy”?

L =∑

pa (log pa − 1) + α(

pa − 1)

+ λ∑

pa(x − xa)

Notice: S = −∑

pa (log pa − 1), which is maximized.

Page 62: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, continued

Well, in SM the solution to this is well-known:

pa =1

Zexp [−λ∗(x − xa)] ,

where λ∗ is the value:λ∗ : min

λlog Z

Page 63: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, continued

Well, in SM the solution to this is well-known:

pa =1

Zexp [−λ∗(x − xa)] ,

where λ∗ is the value:λ∗ : min

λlog Z

Note: this is the physicist’s approach to LME. Computing peoplehave an easier time considering this from information theory: S isthe information entropy (Shannon’s), which reflects how much weknow about a system with variables pa. By maximizing it, wechoose the least-biased set.

Page 64: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, properties

◮ They look nice and elegant, a bit like splines, not quite asspiky as FEMs. They are quite wide.

◮ They automatically die out at the boundary, except for nodesalready at the boundary (just like FEM).

Page 65: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME, properties

◮ They look nice and elegant, a bit like splines, not quite asspiky as FEMs. They are quite wide.

◮ They automatically die out at the boundary, except for nodesalready at the boundary (just like FEM).

0-c 1-c 2-c loc m-free bound

Page 66: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Extended LME

The functions are perhaps too wide, so recalling the result byRajan, we may consider:

L = β∑

pa(x − xa)2 +

pa (log pa − 1) +

+ α(

pa − 1)

+ λ∑

pa(x − xa)

Page 67: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Extended LME

The functions are perhaps too wide, so recalling the result byRajan, we may consider:

L = β∑

pa(x − xa)2 +

pa (log pa − 1) +

+ α(

pa − 1)

+ λ∑

pa(x − xa)

◮ Pure LEM: β → 0. Very hot limit (just entropy)

◮ Pure Rajan: β → ∞. Very cold limit (just energy)

◮ We can tune β, even have β = β(x).

Page 68: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Extended LME: pictures

Fixed spacing, varying β

0 0.2 0.4 0.6 0.8 1x

0

0.2

0.4

0.6

0.8

1

p a

Fixed β, varying spacing

Page 69: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME - SPH connection

Another interesting fact: if we drop 1-cons:

L = β∑

pa(x − xa)2 +

pa (log pa − 1) +

+ α(

pa − 1)

,

The solution is just:

pa =exp[−β(x − xa)

2]

Z,

SPH-Shepard!

Page 70: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME - SPH connection

Another interesting fact: if we drop 1-cons:

L = β∑

pa(x − xa)2 +

pa (log pa − 1) +

+ α(

pa − 1)

,

The solution is just:

pa =exp[−β(x − xa)

2]

Z,

SPH-Shepard!I know, this is trivial, but few works bridge these fields: fluids,computational geometry, and statistical physics.

Page 71: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of LME

Imagine we would also want 2-cons:∑

apa(x − xa)

2 = 0.

Page 72: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of LME

Imagine we would also want 2-cons:∑

apa(x − xa)

2 = 0.But, the associated Lagrange multiplier already is our energy term!

L = β∑

pa(x − xa)2 + . . .

Page 73: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Limitations of LME

Imagine we would also want 2-cons:∑

apa(x − xa)

2 = 0.But, the associated Lagrange multiplier already is our energy term!

L = β∑

pa(x − xa)2 + . . .

Clearly, a minimum of L w.r.t. β will likely not be found.In fact, the minimum will always be β → ∞, as we will see next,and FEM will be recovered (which does not have 2-cons!)

Page 74: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME’s lack of 2-cons

(Argument due to P. Espanol). The situation is clearer in 1D.

x1

x2

x3

x4

x5x

β

λlogZ

◮ Low λ < 0: Z ≈ e−λ|x−x1|, hence log Z ≈ −λ|x − x1|.

◮ High λ > 0: Z ≈ eλ|x−x5|, hence log Z ≈ λ|x − x5|.

So, for a fixed β we can expect to find a minimum of log Z . Thisis nothing but the extended LEM.

Page 75: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

LME’s lack of 2-cons

x1

x2

x3

x4

x5x

β

λlogZ

◮ Low β < 0: Z ≈ e−β|x−x3|2

, hence log Z ≈ −β|x − x3|2. OK,

thus far. But:

◮ High β > 0: Z ≈ e−β|x−x3|2

, hence log Z ≈ −β|x − x3|3.

Disaster.

Hence, the minimum squeezes away towards β → ∞!

Page 76: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing SME

OK, now imagine we had:

log Z ≈ β(g − |x − x3|2),

with g > |x − x3|2?

Now, the minimum would not be at β → ∞ any more.

Page 77: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

Introducing SME

OK, now imagine we had:

log Z ≈ β(g − |x − x3|2),

with g > |x − x3|2?

Now, the minimum would not be at β → ∞ any more.But then, of course, our original problem has changed to:

L =∑

pa (log pa − 1) + α(

pa − 1)

+

+ λ∑

pa(x − xa) + β(

pa(x − xa)2 − g(x)

)

.

Whose solution is again known from SM:

pa =1

Zexp

[

−λ∗(x − xa) − β∗(

(x − xa)2 − g(x)

)]

,

λ∗, β∗ : minλ,β

log Z

Page 78: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Some inspection of the particular requirement g > |x − x3|2 shows

that in general g(x), called “the gap” should be confined to thisregion:

Page 79: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Some inspection of the particular requirement g > |x − x3|2 shows

that in general g(x), called “the gap” should be confined to thisregion:

How bad is this? After all, 2-cons is lost . . .

Page 80: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Well, not very bad. Consider the following choice

Here, g(x) is just a constant (except close to the boundaries).

Page 81: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Well, not very bad. Consider the following choice

Here, g(x) is just a constant (except close to the boundaries).Since we have imposed

pa(x − xa)2 − g(x) = 0, this means a

quadratic function will be reconstructed, only shifted by g(x).

Page 82: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Well, not very bad. Consider the following choice

Here, g(x) is just a constant (except close to the boundaries).Since we have imposed

pa(x − xa)2 − g(x) = 0, this means a

quadratic function will be reconstructed, only shifted by g(x).But, if g(x) is constant, all the derivatives will be exact!! This isexactly what we wanted!!!

Page 83: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: the gap

Well, not very bad. Consider the following choice

Here, g(x) is just a constant (except close to the boundaries).Since we have imposed

pa(x − xa)2 − g(x) = 0, this means a

quadratic function will be reconstructed, only shifted by g(x).But, if g(x) is constant, all the derivatives will be exact!! This isexactly what we wanted!!!

0-c 1-c 2-c loc m-free bound

Page 84: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: some pictures

Page 85: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: some pictures

Page 86: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

SME: some pictures

Page 87: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

To do

Basically: go ahead, and implement it on a simulation!

Page 88: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

To do

Basically: go ahead, and implement it on a simulation!Is it hard? Not really: a minimization should be performed only ateach of the particles (not all x), which involves only ∂λ log Z and∂σ log Z (these are quite easy).

Page 89: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

To do

Basically: go ahead, and implement it on a simulation!Is it hard? Not really: a minimization should be performed only ateach of the particles (not all x), which involves only ∂λ log Z and∂σ log Z (these are quite easy).For the derivatives, ∂2

λλ log Z etc are needed, but these are onlyneeded when the minimum has been found. Moreover, somemethods (quasi-Newton) are supposed to provide these secondderivatives automatically.

Page 90: Statistical mechanics in computational geometrydaniel/presentacion_UAM.pdf · Statistical mechanics in computational geometry Daniel Duque ETSIN, UPM June 21, 2010. Introduction Motivation

References

◮ LME M. Arroyo and M. Ortiz, Local maximum-entropy

approximation schemes: a seamless bridge between nite

elements and meshfree methods. Int. J. Numer. Meth. Engng2006; 65:21672202. DOI: 10.1002/nme.1534

◮ SME C.J. Cyron, M. Arroyo, and M. Ortiz, Smooth, second

order, non-negative meshfree approximants selected by

maximum entropy. Int. J. Numer. Meth. Engng 2009;79:16051632. DOI: 10.1002/nme.2597