Top Banner
Numerical integration in more dimensions – part 2 Remo Minero
25

Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

Jul 19, 2018

Download

Documents

doantruc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

Numerical integration in more dimensions – part 2

Remo Minero

Page 2: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 2

Outline

The role of a mapping function inmultidimensional integration

Gauss approach in more dimensions and quadrature rules

Critical analysis of acceptability of a given quadrature rule

Page 3: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 3

Problem definition

! We have and we want to compute I:ℜ→ℜ⊂Ω nf :

! We want to implement some numerical method, which ought to be (as usual) accurate and cheap (e.g. small number of operations)

∫Ω= xdfI

Page 4: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 4

Covering

! Step 1: covering of the domain with replicas of a basic geometry

Ω

( ) ( )∑∫∫ ≅Ω

lel

dfdf xxxx

Error 1: covering error

el

Page 5: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 5

Mapping function

! Step 2: introduction of a mapping function F" Example 1: squares

( ) ( ) ( ) ( )[ ] ( )

ll

l0

l0

l2

l0

l1l

Ay

x

y

xF

bx

vvvvv

+=

+

−−=

ˆˆ

ˆ|

ˆ

ˆ

x0

el

x10

y1

eFl

( )l2v ( )l

3vy

el( )l0v

( )l1v

Page 6: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 6

Mapping function

x0

y

( )l1v

el

" example 2: triangles

( ) ( ) ( ) ( )[ ] ( )

ll

l0

l0

l2

l0

l1l

Ay

x

y

xF

bx

vvvvv

+=

+

−−=

ˆˆ

ˆ|

ˆ

ˆ

Fl

x10

y1

e

( )l2v

el( )l0v

Page 7: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 7

Properties of the mapping function F

! Fl is affine: ( ) lll AF bxx += ˆˆlinear

constant

∑ ∑ =i i

iii 1x αα ,

F maps affine combinations

to affine combinations

Fl

Fl

e

e el

eltriangles are mapped to triangles, rectangles to parallelograms, etc.

…that is,

Page 8: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 8

The role of the mapping function

( ) ( )∑∫∫ ≅Ω

lel

dfdf xxxx

( ) ( )( ) ( )

( ) ( )( )∫∫ ∫

⋅=

=∂=

ell

ee

ll

dFfA

dFFfdfl

ˆ

ˆ

ˆˆdet

ˆdetˆ

xx

xxxx

! Step 1:

! Step 2:

Page 9: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 9

Quadrature

! Step 3: integration over the basic geometry

( )( ) ( ) ( )∑∫∫ ≅=i

iie

e l gwdgdFf xxxxx ˆˆˆˆˆˆ

ˆ

Error 2: quadrature error

Page 10: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 10

Integration over a surface

! Suppose we have a function defined over a surface

! Thanks to the properties of the mapping function, we can use the same approach:

( ) ( ) ( ) ( )[ ] ( )ll

l0

l0

l2

l0

l1l A

y

x

y

xF bxvvvvv +=+

−−=

ˆ

ˆ

ˆ|

ˆ

ˆ

…simply v(l) given in a suitable reference system…

Page 11: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 11

How can one reduce errors?

Covering error Quadrature error! More accurate formulas! Smaller volumes (where

necessary, depending on f)Ω

Page 12: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 12

Open problem

Given a basic geometry, find the least amount of points and weights such that

is exact for all monomials of degree d and lower

" Let’s look at some examples…

( ) ( )xxx ˆˆˆˆ

∑∫ ≅i

ie

gwdg

Page 13: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 13

d=1 in the square

3 equations # 1 point, 1 weight

Mathematical problem - Physical interpretation

1

x y

1

1

0

y

x0.5

0.5

==

==

==

e11

e11

e1

yw21dydxy

xw21dydxx

w1dydx1

ˆ

ˆ

ˆ

ˆ

ˆ 1w1 =ˆ

Page 14: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 14

d=1 in the triangle

3 equations # 1 point, 1 weight

Mathematical problem - Physical interpretation

1

x y

1

1

0

y

x

21w1 =ˆ

31

31

==

==

==

e11

e11

e1

yw61dydxy

xw61dydxx

w21dydx1

ˆ

ˆ

ˆ

ˆ

ˆ

Page 15: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 15

d=2 in the square

6 equations # 2 points, 2 weights

Mathematical problem - Physical interpretation

1

x y

x2 y2xy

x

y

1

1

0

+==

+==

+==

+==

+==

+==

e222111

e

222

211

2

e

222

211

2

e2211

e2211

e21

yxwyxw41dydxxy

ywyw31dydxy

xwxw31dydxx

ywyw21dydxy

xwxw21dydxx

ww1dydx1

ˆ

ˆ

ˆ

ˆ

ˆ

ˆ

ˆˆˆˆ

ˆˆ

ˆˆ

ˆˆ

ˆˆ

...no Mathematica solution…...no Mathematica solution…

Page 16: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 16

d=3 (e.g. in the triangle)

10 equations # how many points?

3 points # too many equations?4 points # not enough

1

x y

x2 y2xy

x3 y3x2y xy2

Page 17: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 17

Biquadratic polynomials for the square

! Let’s choose two monomials p(x) and q(y) and let them be of degree d at most.

! If we choose d=3

! 16 equations # 4 points, 4 weightsx3

x3y

x3y2

x3y3x2y3xy3y3

x2x1

x2yxyy

x2y2xy2y2

...no Mathematica solution (in a reasonable time)…...no Mathematica solution (in a reasonable time)…

Page 18: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 18

Cross product Gauss

Gauss 1D in [0,1] Gauss 2D in [0,1]2

0 1

0

1

0 1

$ only for domains like [a,b]n

( ) ( ) ( ) ( )∑ ∫ ∑∑∫∫ ∫∑ ===i i j

jijiiii

ii xxgwwdyyxgwdyyxgwdxdyyxg ˆ,ˆ,ˆ,ˆ,

Page 19: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 19

Higher degree formulas

! Many of them in the literature

" Example 1: degree 6 in the triangle with 12 points

" Example 2:degree 20 in the triangle with 79 points!

D.A.Dunuvant, HIGH DEGREE EFFICIENT SYMMETRICAL GAUSSIAN QUADRATURE RULES FOR THE TRIANGLE, International Journal for Numerical Methods in Engineering, vol. 21, 1129-1148 (1985)

A.H. Stroud & D. Secrest, GAUSSIAN QUADRATURE FORMULA, Prentice-Hall, 1966

x10

y

1

1

25

4

3

67 8

9

10 1112

Page 20: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 20

Summary

Do the number of the unknows

correspond to the number of the

equations?

Does the non-linear system have

a solution?

Is the found solution

acceptable?

WE HAVE AN ACCEPTABLE QUADRATURE

METHOD!

Condition 1: Are all the points inside the element? Condition 2: Are all the weights wi positive?

ix

Page 21: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 21

Condition 1: ∀ iexi ˆˆ ∈

4x

1x

2x3x

F

∂Ω( )4F x

( )3F x( )1F x

( )2F x

Ω

What is the value of if does not belong to Ω?( )( )4Ff x ( )4F x

Page 22: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 22

Condition 2: wi ≥ 0, ∀ i

! To always have non-negative integrals for non-negative functions

0>∫ dxfb

a

( ) 07

1<∑

=i

ii xfw

Exact solution:

Approximation: if w2< 0

b

y

x0 a

w4 w6

f(x)

w5w3w2w1 w7

! Finite Elements Methods (FEM)

Page 23: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 23

Why weights always ≥ 0 in FEM

! Stiffness matrix A is positive definite

! Positive definite property is needed for the iterative solvers of Krylov type (all fast iterative solvers)

! Negative weights might cause positive definite property to be lost

0022>>+∇=== ∫∑∑ uifuuuau jij

i ji

T …Auu

∑=i

iiuu ϕ ( ) xda ijijij ∫ +∇∇= ϕϕϕϕ[ ]n1 uu ,,…=u

Page 24: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 24

Do we really get negative weights?

! Newton-Cotes approach in [-1,1]:

! Negative weights also in many formula using with Gauss approach

299376427368

299376260550

299376272400

29937648525

299376106300

2993761606711

141754540

1417510496

14175928

141755888

141759899

34

313211

AAAAAAn 654321

−−

−−

Page 25: Numerical integration in more dimensions – part 2 · 16/10/2002 Seminar: ... Gauss approach in more dimensions and quadrature rules ... Numerical Integration in more dimensions

16/10/2002 Seminar: Numerical Integration in more dimensions 25

Covering

" Example 2: triangles # more flexible

Ω