bound preserving polynomials and numerical approximationdespres/bd_fichiers/trento.pdf · numerical...
TRANSCRIPT
B. Despres(LJLL-
UniversityParis VI) and
InstitutUniversitaire
de France2016 Bound preserving polynomials
and numerical approximation
B. Despres (LJLL-University Paris VI) andInstitut Universitaire de France 2016
70th Birthday Tito Toro p. 1 / 24
Theory
Numericalresults
Fast imple-mentation
Basic problem on an example
• For u ∈ L∞(0, 1), write the infinite expansion
u(x) =∞∑i=0
uiϕi (x) with ui =
∫u(x)ϕi (x)dµ(x)
where the polynomials are µ-orthogonal∫ϕi (x)ϕj(x)dµ(x) = δij .
• Truncate the expansion : high order polynomial approximation un ∈ Pn
un(x) =n∑
i=0
uiϕi (x).
• For n >> 1, one may have very often
‖un‖L∞(0,1) > ‖u‖L∞(0,1).
• Goal of this presentation : address the control of these ”oscillations”,Gibbs phenomenon, Runge phenomenon, . . .
70th Birthday Tito Toro p. 2 / 24
Theory
Numericalresults
Fast imple-mentation
Consequence on scientific computing
High order Suppression of Num. Osc. . . .linear transport Shyy and al (JCP 92’)
70th Birthday Tito Toro p. 3 / 24
Theory
Numericalresults
Fast imple-mentation
Literature : huge
Toro, Riemann solvers and numerical methods for fluid dynamics. Apractical introduction, 3rd edition ( ! !) 2009.
Some seminal contributions in the hyperbolic world :Godunov, VanLeer, Harten, Roe, Sweby, Shu-Osher Efficient implementation of essentially non-oscillatoryshock-capturing schemes 88’, . . .
Arbitrary selection of recent hyperbolic contributions :Dumbser-Kaser-Titarev-Toro 07’, Vilar-Shu-Maire, Positivity-preserving cell-centered Lagrangian schemes formulti-material compressible flows : from first-order to high-orders 16’, Shu Bound-preserving high orderaccurate schemes Notes of the Canadian Mathematical Society 2013, MOOD series by Loubere and al, . . .
In other domains :- Lasserre, Moments, Positive Polynomials and Their Applications, Imperial college press, 2010 (related tooptimal control of pol. systems)- Foucart Rauhut, A mathematical introduction to compressive sensing, Applied and Numerical HarmonicAnalysis, Birkhauser/Springer, New York, 2013.- Risler, Computer aided geometric design Handbook of numerical analysis 1997- Weisse and al The kernel polynomial method Rev. Mod. Phys. 2006 (stat. phys.)- Despres-Perthame Uncertainty propagation 15’, . . .
70th Birthday Tito Toro p. 4 / 24
Theory
Numericalresults
Fast imple-mentation
The set Un
Define the closed convex subset of Pn
Un = {pn(x) ∈ Pn, 0 ≤ pn(x) ≤ 1 for 0 ≤ x ≤ 1} ⊂ Pn.
Examples :x 7→ xn ∈ Un,rescaled Tchebycheff (Tn + 1)/2 ∈ Un,Bernstein polynomials n!
p!(n−p)!xp(1− x)n−p ∈ Un . . .
Can we know=construct=manipulate=implement all pn ∈ Un ?
70th Birthday Tito Toro p. 5 / 24
Theory
Numericalresults
Fast imple-mentation
Lukacs Theorem
Starting point is the following result of algebraic nature. Define
P+n = {pn(x) ∈ Pn, 0 ≤ pn(x) for 0 ≤ x ≤ 1} .
Lukacs theorem (first part, n even) : Assume pn ∈ P+n .
Assume n = 2m ∈ 2N, then there exists am ∈ Pm and bm−1 ∈ Pm−1 suchthat
pn = a2m + b2
m−1w w(x) = x(1− x).
Strange enough : as far as I know, never used so far in combination withhyperbolic equations.
Classical textbooks on polynomials are : Szego : Orthogonal polynomials, 39’. Milovanovic and al : Topics inpolynomials : extremal problems, inequalities, zeros, 82’. Lasserre : Moments, Positive Polynomials and TheirApplications, 2009’. Devore-Lorenz : Constructive approximation, 81’.
70th Birthday Tito Toro p. 6 / 24
Theory
Numericalresults
Fast imple-mentation
Two bounds
• Start now with p ∈ Un.
• p ∈ P+n : the Lukacs theorem yields the representation
p = a2 + b2w (1)
where a and b are polynomials with convenient degree andw(x) = x(1− x) is the weight.
• 1− p ∈ P+n : so
1− p = c2 + d2w (2)
where c and d are polynomials with convenient degree.
• That is p ∈ Un iff there exists 4 polynomials (a, b, c, d , ) such that
1 = a2 + b2w + c2 + d2w .
SetUn = {(a, b, c, d) ∈ Pn × Pn−1 × Pn × Pn−1
such that 1 = a2 + b2w + c2 + d2w}.
70th Birthday Tito Toro p. 7 / 24
Theory
Numericalresults
Fast imple-mentation
Basic properties
Consider the algebra (quaternion algebra)A = aα +wbβ +cγ +wdδ,B = aβ −bα +cδ −dγ,C = aγ −wbδ −cα +wdβ,D = aδ +bγ −cβ −dα.
One has the weighted 4-squares Euler identity
A2 +B2w +C 2 +D2w =(a2 + b2w + c2 + d2w
)(α2 + β2w + γ2 + δ2w
).
• Assume (a, b, c, d) ∈ Un and (α, β, γ, δ) ∈ Um. Then(A,B,C ,D) ∈ Un+m.• The polynomials (a, b, c, d) ∈ U1 can represented with 3 ”angles”(θ, ϕ, µ) ∈ R3
a(x) = cos θx + cosϕ(1− x),
b = R cosµ, R = 2 sin(θ−ϕ
2
)c(x) = sin θx + sinϕ(1− x),d = R sinµ.
(3)
70th Birthday Tito Toro p. 8 / 24
Theory
Numericalresults
Fast imple-mentation
A first result
Theorem : Let n ∈ 2N being even. There exists a smooth function fromR3n/2 onto Un. The smooth function is made explicit by a constructivealgorithm and is 2π-periodic with respect to all its arguments.
- Hint of the proof : by a descending argument, like the decomposition of a natural number into primenumbers. It is not vectorial analysis. It is group theory.
- D., Polynomials with bounds and numerical approximation,
https://hal.archives-ouvertes.fr/hal-01307999
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
’pol10’(cos(20*acos(x))+1)/2
example : exact rescaled Tchebycheff pol. ∈ U20 and reconstruction
70th Birthday Tito Toro p. 9 / 24
Theory
Numericalresults
Fast imple-mentation
A second result
Theorem (easy) : Assume f ∈ C 0[0, 1] and 0 ≤ f (x) ≤ 1 for 0 ≤ x ≤ 1.Then (in the norm ‖h‖ = sup0≤x≤1 |h(x)|)
infpn∈Un
‖f − pn‖ ≤ 2 infgn∈Pn
‖f − gn‖. (4)
Any polynomial gn ∈ Pn satisfies ‖gn − 1/2‖ ≤ ‖f − 1/2‖ + ‖f − gn‖ ≤ 1/2 + ‖f − gn‖.Rescale
pn = 1/2 + λ (gn − 1/2) ∈ Un for λ =1
1 + 2‖f − gn‖.
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1
f(x)01
0.5
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1
gn(x)01
0.5
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1
pn(x)01
0.5
f gn ∈ Pn pn ∈ Un
One has the identity
f − pn =2‖f − gn‖
1 + 2‖f − gn‖(f − 1/2) +
1
1 + 2‖f − gn‖(f − gn).
One gets the triangular inequality ‖f − pn‖ ≤ ‖f − gn‖ + ‖f − gn‖ = 2‖f − gn‖.
70th Birthday Tito Toro p. 10 / 24
Theory
Numericalresults
Fast imple-mentation
Test cases
Regardless of the CPU cost, are the generating formulas efficient andstable for implementation ?
- to answer this question, a first series of tests is performed within aMatlab test code with the fminunc function which implements a steepestdescent Quasi-Newton algorithm. The observed convergence is monotoneand robust.
-all problems considered below are written like
Find pn = argminqn∈Un
J(qn)
where J is some functional.
- for example it can be the L2 norm between pn and a given objectivefunction f : in this case
J(qn) =
∫ 1
0
|f (x)− qn(x)|2dx .
70th Birthday Tito Toro p. 11 / 24
Theory
Numericalresults
Fast imple-mentation
Discretization with quadrature points
- the functional J(qn) is in practice discretized as
Jh(α) =I∑
i=1
ωiJ(qn(xi ;α)), α ∈ R3n/2
where qn(xi ;α) is the pointwise value at the quadrature point 0 ≤ xi ≤ infunction of α ∈ R3n/2 (according to the first Theorem).- Jh is not convex even if J is convex.- Jh may have local minima α1, α2, . . . : we systematically run thecalculation between 1 and 5 times and keep the best candidate.
70th Birthday Tito Toro p. 12 / 24
Theory
Numericalresults
Fast imple-mentation
Runge function
Consider the L2 norm between p(α) and the rescaled Runge function as
f1(x) = 2625
(1
1+25(2x−1)2 − 26
)
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
x
’pol2_4’’pol4_8’
’pol8_16’f(x)
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
x
’pol2_4’ using 1:4’pol4_8’ using 1:4
’pol8_16’ using 1:4f(x)
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
x
’pol2_4’ using 1:5’pol4_8’ using 1:5
’pol8_16’ using 1:5f(x)
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
x
’pol2_4’ using 1:6’pol4_8’ using 1:6
’pol8_16’ using 1:6f(x)
n 4 8 16m = n/2 2 4 8
iterations 18 29 62CPU 3.15 3.61 6.83
discrete L2 error 0.0029 0.00194 0.00044
70th Birthday Tito Toro p. 13 / 24
Theory
Numericalresults
Fast imple-mentation
Step function
In the next test, the objective function is a step functionf4(x) = 0 for x < 0.435 and f4(x) = 1 for 0.435 < x .
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
’pol4’’pol8’
’pol16’’pol32’
f(x)
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1
’pol’ using 1:5’pol’ using 1:6
01
Left : minimization of the discrete L1 between a step function andpolynomials in bounds pn ∈ Un with n = 4, 8, 16, 32. Right for comparison :Bernstein and Tchebycheff interpolations with 17 interpolation points.
n 4 8 16 32m = n/2 2 4 8 16
iterations 39 129 355 1069CPU 3.57 10.3 41.8 306
discrete L1 error 0.041 0.021 0.0117 0.00518
70th Birthday Tito Toro p. 14 / 24
Theory
Numericalresults
Fast imple-mentation
2D : the main case
U2Dn =
{tot. deg.pn ≤ n, 0 ≤ pn(x , y) ≤ 1 ∀(x , y) ∈ [0, 1]2
}.
Take the weights w1 = 1, w2 = 1− x2, w3 = 1− y 2, w4 = w2w3
and the representation
p(x , y) = a(x , y)2w1(x) + c(x , y)2w2(x) + e(x , y)2w3(y) + g(x , y)2w4(x)
1−p(x , y) = b(x , y)2w1(x)+d(x , y)2w2(x)+f (x , y)2w3(y)+h(x , y)2w4(x).
Note the redundancy due to w4.
It yields a 8-squares formula
1 =(a(x , y)2 + b(x , y)2
)w1(x) +
(c(x , y)2 + d(x , y)2
)w2(x)
+(e(x , y)2 + f (x , y)2
)w3(y) +
(g(x , y)2 + h(x , y)2
)w4(x).
70th Birthday Tito Toro p. 15 / 24
Theory
Numericalresults
Fast imple-mentation
• The 1-2-4-8 Hurwiz theorem yields an obstruction to many squaresidentity at any order. In particular no 6-squares identity available : this isthe reason of the redundancy with w4.• For n = 8, the solution is given in the form of the Degen identity
(a2 + b2 + c2 + d2 + e2 + f 2 + g2 + h2)(m2 + n2 + o2 + p2 + q2 + r2 + s2 + t2)
= (am − bn − co − dp − eq − fr − gs − ht)2 + (bm + an + do − cp + fq − er − hs + gt)2
+(cm − dn + ao + bp + gq + hr − es − ft)2 + (dm + cn − bo + ap + hq − gr + fs − et)2
+(em − fn − go − hp + aq + br + cs + dt)2 + (fm + en − ho + gp − bq + ar − ds + ct)2
+(gm + hn + eo − fp − cq + dr + as − bt)2 + (hm − gn + fo + ep − dq − cr + bs + at)2.
• It is convenient to rewrite it as an Euler identity with complex numbers.We define (i2 = −1)
u = a + ib, v = c + id , w = e + if , z = g + ih (5)
andα = m + in, β = o + ip, γ = q + ir , δ = s + it. (6)
The Degen identity rewrites as
|A|2+|B|2+|C |2+|D|2 =(|u|2 + |v |2 + |w |2 + |z |2
)(|α|2 + |β|2 + |γ|2 + |δ|2
)(7)
with A = uα− v∗β − wγ∗ − z∗δ,B = vα + u∗β + zγ∗ − w∗δ,C = wα− zβ∗ + u∗γ + v∗δ,D = zα∗ + wβ − vγ + uδ.
(8)
70th Birthday Tito Toro p. 16 / 24
Theory
Numericalresults
Fast imple-mentation
2D : smooth objective function
Objective function f5(x , y) = T8((2x+y)/3)+12
, 11× 11 quadrature points.
-1-0.5
0 0.5
1-1
-0.5
0
0.5
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
p
’toto_Niter=8_acc=0.194.txt’ using 1:2:4
x
y
p
-1-0.5
0 0.5
1-1
-0.5
0
0.5
1
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
p
’toto_Niter=4.txt’
x
y
p
-1-0.5
0 0.5
1-1
-0.5
0
0.5
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
p
’toto_Niter=8_acc=0.194.txt’
x
y
p
-1-0.5
0 0.5
1-1
-0.5
0
0.5
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
p
’toto_Niter=16_acc=0.0195.txt’
x
y
p
total degree 8 16 32partial degree : x or y 4 8 16
iterations 93 291 340CPU 3.65 17.5 57.2
L2 error 0.34 0.10 0.027
70th Birthday Tito Toro p. 17 / 24
Theory
Numericalresults
Fast imple-mentation
2D : Step function
Objective function f6(x , y) = H(2x + y) : 11× 11 quadrature points.
-1 -0.5 0 0.5 1 -1
-0.5
0
0.5
1 0
0.2
0.4
0.6
0.8
1
’toto16.txt’ using 1:2:4
x
y
-1 -0.5 0 0.5 1 -1
-0.5
0
0.5
1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
’toto4.txt’ using 1:2:3
x
y
-1 -0.5 0 0.5 1 -1
-0.5
0
0.5
1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
’toto8.txt’ using 1:2:3
x
y
-1 -0.5 0 0.5 1 -1
-0.5
0
0.5
1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
’toto16.txt’ using 1:2:3
x
y
total degree 8 16 32partial degree : x or y 4 8 16
iterations 69 212 429CPU 3.03 12.7 59.6
L2 error 0.34 0.17 0.11
70th Birthday Tito Toro p. 18 / 24
Theory
Numericalresults
Fast imple-mentation
Main idea (with F. Charles and M. Campos-Pinto)
The target is fast algorithms in the context of the Lukacs Theorem
Lukacs Theorem (second part, n odd) : Assume pn ∈ P+n with n + 1 =
2m ∈ 2N, then there exists am−1 ∈ Pm and bm−1 ∈ Pm−1 such that
pn = a2m−1w1 + b2
m−1w2 w1(x) = x , w2(x) = 1− x . (9)
Fast algorithms= low cost reproducible approximate calculations of am−1 and bm−1
suitable for use in time-space codes.
A first question is the non uniqueness. Example for n = 3
1 = 12x + 12(1− x) = (4x − 3)2x + (4x − 1)2(1− x).
It yields 2 solutions :(a1, b1)(x) = (1, 1) and(a1, b1)(x) = (4x − 3, 4x − 1).
70th Birthday Tito Toro p. 19 / 24
Theory
Numericalresults
Fast imple-mentation
Interpolation : n = 3
Consider a smooth function f ∈W 1,∞(R), f ≥ 0, and a mesh h > 0.
Set g(x) = f (hx) for 0 ≤ x ≤ 1.
Interpolation : find p ∈ P+3 and 4 interpolation points x0, x1, x2, x3 such that
p(xi ) = g(xi ), 0 ≤ i ≤ 3.
Since the Lukacs Theorem yields the representationp(x) = xa(x)2 + (1− x)b(x)2 with a, b ∈ P1,then x0 = 0 and x3 = 1 are natural solutions
a(x3) =√
g(1) b(x0) =√
g(0).
Main question is to find x1 and x2 : imagine a(x2) = 0 and b(x1) = 0 . . .
70th Birthday Tito Toro p. 20 / 24
Theory
Numericalresults
Fast imple-mentation
. . .then
b(x2) = ±√
g(x2)
x2and a(x1) = ±
√g(x1)
1− x1.
In practice we do the opposite. We set
b(x2) = −√
g(x2)
x2and a(x1) = −
√g(x1)
1− x1
and consider that a(x2) = 0 and b(x1) = 0.It yields a fixed point algorithm for sliding quadrature points
xk+11 =
√f (0)(1−xk2 )xk2√
f (0)(1−xk2 )+√
f (xk2 h)∈ [0, 1],
xk+12 =
√xk1 −
(1−xk1 )√
f (h)xk1√f (xk1 h)+
√f (h)xk1
∈ [0, 1]
Theorem (Campos-Pinto+Charles+D.) : Assume f ≥ α > 0. Startfrom x0
1 = 3/4 and x01 = 1/4. There exists h∗ > 0 such that : for all
h ∈ (0, h∗) the sequence X k = (xk1 , x
k2 ) converges to a limit X∞ ∈ [0, 1]2
and ∣∣∣X k − X∞∣∣∣ ≤ Ckh
k+1.
Yields an analytical proof of the Lukacs theorem for f ∈ P+3 and small h ! ! !
70th Birthday Tito Toro p. 21 / 24
Theory
Numericalresults
Fast imple-mentation
Model problem : ∂tu + a∂xu = 0
FV + some ENO tech. (cellwise↔pointwise linear mapping) + P+3 .
Setup : initial data u0(x) = 2 cos(2πx)4, a = 1, Tend = 1, CFL=0.5.
1
1.5
2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
’toto.txt’ using 1:3
0.9 1 0
0.5
’toto.txt’
Order=2
Order=4 0.001
0.01
0.1
2000000/(x**4)
1
102300/(x**2)
100
10 100 1000
’rate.txt’ using 1:3’rate.txt’
0.0001
’rate.txt’ using 1:4
kmax cells 20 40 80 160 320
0 L∞ error 1.08 0.728 0.281 0.0908 0.02341 L∞ error 0.961 0.346 0.055 0.0063 0.0004182 L∞ error 1.01 0.316 0.0563 0.00306 0.000195
The scheme is bound preserving by construction.Fourth order is optimal with polynomials of degree 3.
70th Birthday Tito Toro p. 22 / 24
Theory
Numericalresults
Fast imple-mentation
With discontinuity
Solution of the advection equation
∂tu + a∂xu = 0, a = 1, L = 1, Tend = 2.
With polynomials in Un : this is only proof of concept (because dirtyimplementation).
order=2 order =3
- These methods provide alternative to more classical TVD (Roe, Sweby, Harten, . . .), PPM
(Colella-Woodward) techniques and to high order bound preserving techniques (C.W. Shu).
70th Birthday Tito Toro p. 23 / 24
Theory
Numericalresults
Fast imple-mentation
Conclusion
This presentation focused on some basic questions which concern boundpreserving polynomials pn ∈ P+
n and pn ∈ Un in view of further use inscientific computing.
A new set of algorithms exists for the effective generation ofpolynomials with two bounds. The algebra goes back to the Euler4-squares identity (quaternions) well known in number theory.
In 1D, the theory seems to be under control.
In nD, much more to do.
Based on analytical proofs of Lukacs Theorem, fast algorithms areunder development (any order).
- D., Polynomials with bounds and numerical approximation,https://hal.archives-ouvertes.fr/hal-01307999
- Better ask me the last version.
70th Birthday Tito Toro p. 24 / 24