Norms and spaces

21
Norms and spaces Definition : ) ( 2 L The space of all square integrable funcions defined in the domain dx f 2 is a finite number not infinity L2 norm of f 2 / 1 2 ) ( 2 dx f f L Example ) ( 2 L f compute ) 0 , 0 ( ) 2 , 2 ( 2 ) , ( y x y x f ) ( 2 L f 2 0 2 0 2 2 2 ) ( ) ( 2 dxdy y x f L 5 144 2 0 4 2 3 8 2 4 dy y y 5 12 ) ( 2 L f

description

Norms and spaces. Definition:. The space of all square integrable funcions defined in the domain. is a finite number not infinity. L2 norm of f. Example. compute. Norms and spaces. Definition:. The function and its first derivatives are square integrable. Def:. Example. Def:. - PowerPoint PPT Presentation

Transcript of Norms and spaces

Norms and spaces

Definition:

)(2L The space of all square integrable funcions defined in the domain

dxf 2 is a finite number not infinity

L2 norm of f

2/12)(2 dxff

L

Example)(2 L

fcompute

)0,0(

)2,2(

2),( yxyxf

)(2Lf

2

0

2

0

222

)()(

2dxdyyxf

L

5144

2

0

4238 24 dyyy

512

)(2

Lf

Definition:)(1H

The function and its first derivatives are square integrable

)}(,,:{ 2 Luuuu yx

Example

)0,0(

)2,2(

2),( yxyxf

5144

2

0

2

0

222

)()(

2

dxdyyxfL

4)1(2

0

2

0

22

)(2

dxdyfLx

364

2

0

2

0

22

)()2(

2

dxdyyfLy

Def:2

)(

2

)()( 222

LyLxLvvv

2)(

2)()( 22

1 LvLvH

v

3642

)(

2

)()(4

222

LyLxLfff

Def:

3644

328

)(1

H

f

Norms and spaces

)(1 Hf

Example

)0,0(

)2,2(

2),( yxyxf

328

2

0

2

0

222

)()(

2

dxdyyxfL

4)1(2

0

2

0

22

)(2

dxdyfLx

364

2

0

2

0

22

)()2(

2

dxdyyfLy

Def:2

)(

2

)()( 222

LyLxLvvv

3642

)(

2

)()(4

222

LyLxLfff

Norms and spaces

)(2||||||

Lvv

Energy norm

Example

xyxyxv 3),( 2

Compute the energy norm of the function

Norms and spaces

Example

xyxyxv 3),( 2

Which of the following belongs to

Definition: )(10H }on 0),(:{ 1 uHuu

)(10 H

)0,0(

)2,2(

)2()2(),( yyxxyxu

Triangle inequality

Norms and spaces

Cauchy-Schwartz inequality

baba (Real numbers)

)()()( 222

LLLvuvu

Triangle inequality

22

LLvuuv

Cauchy-Schwartz inequality

|||||| |||||| vuuv

KKPvCv

VK

h trianglesallfor )(),(

1

0

the space of all continuous piecewise linear polynomials

} 0:{0, onvVvV hh

the space of all continuous piecewise linear polynomials which vanishes on the boundary

Definition:

Definition:

Norms and spaces

Relations:

)( 100, HVh

)( 1 HVh

81 Kh

)0,0( )0,4(

)4,0( )4,4(

1

2 3

45

1K

2K3K

4K

5K6K7K

)2,0(

)4,2( )4,3(

82 Kh

43 Kh

44 Kh

87 Kh

56 Kh85 Kh

the length of the longest edge on K

Kh

Mesh size h

local mesh size

Example:

KKhh max

mesh size

},,max{ 71 KK hhh Example:

4h

on 0 in

ufu

A Priori Error Estimates

0,

0,

)(),(

such that Find

hhhhh

hh

VvvFvua

Vu

u hu

)( )(),(

such that )( Find10

10

HvvFvua

Hu

? huue in what sense the error e becomes small

vuvua ),(

A Priori Error Estimates

? huue

)( 10

Hvfvvu0, hhhhh Vvfvvu

0,

0,

)(),(

such that Find

hhhhh

hh

VvvFvua

Vu

)( )(),(

such that )( Find10

10

HvvFvua

Hu

variational formulation finite element method

0, allfor ,0)( hhhh Vvvuu

Galerkin Orthogonality

The finite element approximation uh, satisfies the orthogonality

Theorem 1 (Galerkin Orthogonality).

Proof: from the variational formulation we have:

0, )( hhhhh VvvFvu

0, )( hhhh VvvFvu

subtract

0, 0)( hhhh Vvvuu

)(100, HVh

)( 10

Hvfvvu

0, hhhhh Vvfvvu

variational formulation

finite element method

0, allfor |||,||| |||||| hhhh Vvvuuu

Best Approximation

The finite element approximation uh, satisfies

Theorem 2 (Best Approximation).

Proof: have weany for 0,hh Vv

)()( |||||| 2hhh uuuuuu

)()( hhhh uvvuuu

)()()()( hhhhh uvuuvuuu

)()( hh vuuu

|||||| |||||| hh vuuu

This shows that the finite element solution uh is the closest of all functions in Vhto the exact solution u when measuring distance using the energy norm.

K

2

)(

2222 ||||||KLKh uDChuu

Energy Norm Error

The finite element approximation uh, satisfies the a priori error estimateTheorem 3 (error depends on meshsize).

Proof:

K

2

)(

222 KLK uDCh

This shows that how the error depends on the mesh size.

with a constant C independent of Kh

Start from the best approximation

|||||| |||||| vuuu h

choosing v= πu22 ||| ||| |||||| uuuu h

K

2

)(2) ( KL

uu

the gradient of the error tends to zero as the maximum mesh size h tend to zero.

Remark

K

2

)(

2222 ||||||KLKh uDChuu

K

2

)(

222 C KL

uDh

2

)(

222 C

LuDh

)(

22 ||||||

Lh uDChuu

)()( 22

LLvCv

Error Depends on hFor any function Theorem (Poincare Inequality).

These constants C’s are different

Remark)(

22 ||||||

Lh uDChuu

|||||| vC

)(10 Hv

||||||)(2 hLh uuCuu

)(

22

LuDCh

)(

2)( 22

LLh uDChu-u

L2 error is h2we expect that the L2 error to be h2 and not h

)(

22)( 22

LLh uDChuu

The finite element approximation uh, satisfies the a priori error estimateTheorem 4 (The L2-error)

with a constant C independent of h

The proof uses a well-known technique called Nitsche’s trick,

on 0 in

ufu

on 0 in

e

Dual problem or adjoint problemMain problem

Remark:

Continuous Piecewise Linear Interpolation

Definition: we define its continuous piecewise linear interpolant by

)(0 CuLet

n

kkkNuu

1

)( hVu

approximates by taking on the same values in the nodes Ni.u u

u

u

uDChuu 2)(

L2 error is h2

)(

22)( 22

LLh uDChuuThe finite element approximation uh, satisfies the a priori error estimateTheorem 4 (The L2-error)

with a constant C independent of h

on 0 in

e

Proof: let ϕ be the solution of the dual problem

Multiplying by e and integrating using Green’s formula

ee2

ene

e

)(

e

Cauchy-Schwartz inequality

)(2

ee

)( e

2 Dche

Che

ChuDCh 2

eChuDCh 2

uDeCh 22

Dividing by e∥∥

uDeChe 222

uDChe 22

)(

22)( 22

LLh uDChuu

Error norms

)(

22)( 22

LLh uDChuuThe finite element approximation uh, satisfies the a priori error estimateTheorem (L2 Norm)

with a constant C independent of h

The finite element approximation uh, satisfies the a priori error estimateTheorem (Energy Norm)

with a constant C independent of Kh

)(

22 ||||||

Lh uDChuu

Calcuate the L2 error

K

2

)(

2

)( 22 KLhLh uuuu

K

2)( K

huu

K

2 ||),(),( Kyxuyxu h

K

22 |||||| |||||| Khh uuuu

K

yyK

xx uhuuhu 2

K

2 )()(

||),(),(||),(),( 2

K

2 KyxuhyxuKyxuhyxu yyxx

Calcuate the L2 error

on 0 in

ufu

)1,1()1,1(

)2(2),( 22 yxyxf

)1)(1(),( 22 yxyxu

Exact solution

)(

22)( 22

LLh uDChuu

2.01 h 1.02 h11 Chuu h

22 Chuu h

1

2

1

2 hh

uuuu

h

h

1

2

1

2 hh

uuuu

h

h

1

2

1

2 ln / lnhh

ee

function [l2error] = compute_error(p, t, uh, u, u_x, u_y)% calculates the error nt = size(t, 2); % number of triangles np = size(p,2); t1 = t(1,:); t2 = t(2,:); t3 = t(3,:); x1 = p(1, t1); x2 = p(1, t2); x3 = p(1, t3); y1 = p(2, t1); y2 = p(2, t2); y3 = p(2, t3); xc = (x1 + x2 + x3)/3; % x-coord of element midpoints yc = (y1 + y2 + y3)/3; % y-coord of element midpoints exact = feval(u, xc, yc); % exact sol at the midpoints uhc = pdeintrp(p, t, uh); % FE sol at the midpoints l2error2 =0;for K = 1:nt loc2glob = t(1:3,K); x = p(1,loc2glob); y = p(2,loc2glob); area = polyarea(x,y); loc_er = (exact(loc2glob) - uhc(loc2glob)).^2; l2error2 = l2error2 + sum(loc_er)*areaendl2error = sqrt(l2error2); [exact' , uhc', abs(exact-uhc)']

function [p,e,t,uh] = solveE(hmax)% Poisson's equation on a square [-1,1]X[-1,1] is solved% and the resulting finite element solution is stored in % the vector uh.% g = 'squareg'; % domainb = 'squareb1'; % Dirichlet dataf = '-2*((x.^2 - 1) + (y.^2 - 1))'; % right hand side [p, e, t] = initmesh(g,'Hmax',hmax); % triangulationuh = assempde(b, p, e, t, 1, 0, f); % solve pde

u = inline('(x.^2 - 1).*(y.^2 - 1)', 'x', 'y'); % exact solu_x = inline('2*x.*(y.^2 - 1)', 'x', 'y'); % u_x exact u_y = inline('2*y.*(x.^2 - 1)', 'x', 'y'); % u_y exact h1=0.2;[p1,e1,t1,uh1] = solveE(h1);[l2error1] = compute_error(p1, t1, uh1, u, u_x, u_y) h2=0.1;[p2,e2,t2,uh2] = solveE(h2);[l2error2] = compute_error(p2, t2, uh2, u, u_x, u_y) log(l2error1/l2error2)/log(h1/h2)

Calcuate the energy norm of the error

function [energy_error] = energy_error(p, t, uh, u, u_x, u_y)

)(

22 ||||||

Lh uDChuu

a) Write matlab file to compute the energy norm of the error

b) Write matlab file to compute the energy norm of the error for two different meshes with meshsizes h1 and h2 and verify the rate of convergence

Exercise