@let@token Setup of order conditions for splitting methods

Setup of order conditions for splitting methods
Harald Hofstätter
Institut für Analysis und Scientific Computing
Technische Universität Wien
with W. Auzinger, W. Herfort, and O. Koch
Computer Algebra in Scientific Computing (CASC 2016)
September 19–23, 2016, Bucharest, Romania
1/18
Harald Hofstätter
Setup of order conditions for splitting methods
Introduction
Evolution equations, splitting methods, and order conditions
2/18
Introduction
Evolution equations
• Evolution equation (u = u(t)):
∂t u = H(u) = A(u) + B(u) [+C(u) + . . .]
Initial condition u(0) = u0 given
Flow (exact solution): u(t) = EH (t, u0 )
• Subproblems
∂t u = A(u)
∂t u = B(u)
“easily” solvable, respective flows: u(t) = EA (t, u0 ), u(t) = EB (t, u0 )
• Prototypical example: Schrödinger equation
1
∂t ψ = i∆ψ − iV ψ
2
3/18
Introduction
Splitting methods
• Numerical integration method: compute recursively approximations
u0 7→ u1 7→ u2 7→ . . . of the exact solution on grid t0 , t1 , t2 , . . . with
stepsize ∆t = h, tn = t0 + nh.
Consider only one step starting at some u = un .
• Idea of splitting methods: Approximate flow EH of full problem by
recombination of sub-flows EA and EB
• Examples:
EH (h, u) ≈ EB (h, EA (h, u))
(Lie-Trotter splitting, first order)
1
1
EH (h, u) ≈ EA ( 2 h, EB (h, EA ( 2 h, u))) (Strang splitting, second order)
• Higher order (s stages):
EH (h, u) ≈ S(h, u) = EB (bs h, ·)◦EA (as h, ·)◦· · ·◦EB (b1 h, ·)◦EA (a1 h, ·)(u)
• Problem: How to determine coefficients a1 , b1 , . . . , as , bs such that
local error satisfies
L(h, u) = S(h, u) − EH (h, u) = O(hp+1 )
4/18
Introduction
Order conditions
• Taylor expansion of local error will lead to (multivariate) polynomial
equations in the coefficients a1 , b1 , . . . , as , bs ; order conditions
• Two tasks:
1. Setup of these polynomial equation
2. Solve these polynomial equations
Here: only the first item is considered (second item: very challenging!)
• Implementaion in Maple on multi-core machine described in the paper:
more or less obsolete
• We found better approach (unfortunately only after the paper was
already accepted)
• Implementation in the Julia programming language
5/18
Harald Hofstätter
Setup of order conditions for splitting methods
Local error representation via Taylor expansion
Simplest cases and general structure
6/18
Local error representation via Taylor expansion
Lie-Trotter AB type splitting, linear case
• Consider H u = Au + B u (linear). In general: AB 6= B A
• Lie-Trotter splitting (order p = 1):
e hH u ≈ S(h)u := e hB e hA u (‘=’ for AB = B A)
Local error via Taylor expansion:
d tH
dt e
d
dt S(t)
= (A + B) e t(A+B)
=e
tB tA
tB tA
e A + Be e
= A + B at t = 0
= A + B at t = 0
but
d2 tH
e
dt2
2
d
S(t)
dt2
= (A + B)2 = A2 + AB + B A + B 2 at t = 0
=
...
= A2 + B A + B A + B 2 at t = 0
; local error
L(h)u := S(h) − e hH u = − 21 h2 [A, B](u) + O(h3 )
with commutator [A, B](u) = (AB − B A) · u
7/18
Local error representation via Taylor expansion
Lie-Trotter AB type splitting, nonlinear case
• Lie-Trotter splitting for H(u) = A(u) + B(u) (nonlinear):
EH (h, u) ≈ S(h, u) := EB (h, EA (h, u)),
with first derivatives
d
dt EH (t, u)
= H(EH (t, u)) ,
d
dt S(t, u)
= B(S(t, u)) + ∂2 EB (t, EA (t, u))·A(EA (t, u))
(both derivatives are = A(u) + B(u) at t = 0)
and corresponding second derivatives.
• ; Local error via Taylor expansion:
L(h, u) = S(h, u) − EH (h, u) = − 12 h2 [A, B](u) + O(h3 )
with commutator [A, B](u) = A0 (u) · B(u) − B 0 (u) · A(u)
8/18
Local error representation via Taylor expansion
Strang AB type splitting
• Strang splitting (symmetric, order p = 2):
EH (h, u) ≈ S(h, u) := EB ( h2 , EA (h, EB ( h2 , u)))
Local error via Taylor expansion:
L(h, u) = S(h, u) − EH (h, u) =
Leading term
commutators
d3
L(0, u)
dt3
h3 d3
6 dt3 L(0, u)
+ O(h4 )
= linear combination of second-order
[A, [A, B]](u) and [[A, B], B](u)
with coefficients independent of h, u
9/18
Local error representation via Taylor expansion
Lie-Trotter and Strang ABC type splittings
• Lie-Trotter:
EH (h, u) ≈ S(h, u) := EC (h, EB (h, EA (h, u)))
Local error via Taylor expansion:
L(h, u) = S(h, u) − EH (h, u) =
Leading term
d2
L(0, u)
dt2
h2 d2
2 dt2 L(0, u)
+ O(h4 )
= linear combination of commutators K(u),
K ∈ {[A, B], [A, C], [B, C]}
• Strang:
EH (h, u) ≈ S(h, u) := EA ( h2 , EB ( h2 , EC (h, EB ( h2 , EA ( h2 , u)))))
Local error via Taylor expansion:
L(h, u) = S(h, u) − EH (h, u) =
Leading term
d3
L(0, u)
dt3
h3 d3
6 dt3 L(0, u)
+ O(h4 )
= linear combination of commutators K(u),
K ∈ {[A, [A, B]], [A, [A, C]], [[A, B], B], [[A, B], C],
[[A, C], B], [[A, C], C], [B, [B, C]], [[B, C], C]}
10/18
Local error representation via Taylor expansion
Ansatz for higher-order schemes; representation of the derivatives of the local error
• For the study of order conditions, formally considering the linear case
is sufficient.
• Ansatz for higher-order s-stage ABC type splitting (H = A+B +C):
ehH ≈ S(h) := Ss (h) · · · S1 (h),
Sj (h) = ehCj ehBj ehAj
with Aj = aj A, Bj = bj B, Cj = cj C, where the coefficients
{aj , bj , cj , j = 1 . . . s} are to be determined.
• q-th derivatives of local error operator L(t) = S(t) − etH at t = 0:
With k = (k1 , . . . , ks ) ∈ Ns0 , l = (lA , lB , lC ) ∈ N30 ,
X q Y X kj dq
CjlC BjlB AjlA − (A+B +C)q
dtq L(0) =
k
l
|k|=q
j=s...1 |l|=kj
(Leibniz formula) → for use in Taylor ansatz.
11/18
Local error representation via Taylor expansion
Algebraic background
Theorem
p+1
d
The leading term dt
p+1 L(0) of the Taylor expansion of the local error
of a splitting method of order p is an element of the free Lie algebra
generated by A, B,. . . , with Lie-bracket (commutator) [·, ·].
More precisely, it is a linear combination of pth order commutators.
• Independent commutators form basis of free Lie algebra
• Example: For p = 3, 3 independent 3th order AB -commutators
[A, [A, [A, B]]], [A, [[A, B], B]], [[[A, B], B], B],
corresponding to the Lyndon-Shirshov basis words
AAAB, AABB, ABBB
of length 4 over the alphabet (A, B)
W.Auzinger, W.Herfort:
Local error structures and order conditions in terms of Lie elements
for exponential splitting schemes
Opuscula Mathematica 34(2), 243–255, 2014
12/18
Harald Hofstätter
Setup of order conditions for splitting methods
Algorithmic approach for setup of order conditions
Idea and details of algorithm, Julia implementation
13/18
Algorithmic approach for setup of order conditions
Idea of the algorithm, AB type splitting
• s-stage ansatz with unknown (real or complex) coefficients
aj , bj [, cj ],
j = 1...s
• Desired order p
• For q = 1, 2, . . . , p:
In the expression
dq
dtq
kj X q Y X
kj l kj −l l kj −l
L(0) =
bj aj B Aj
− (A+B)q ,
k
l
j=s...1 l=0
|k|=q
where the product
Q
(. . .) and (A+B)q have been fully expanded
j=s...1
(taking into account that A, B are noncommuting),
search for occurences of Lyndon-Shirshov basis words of length q and
extract their coefficients (see algorithmic details below)
• For each basis element we obtain one equation (coefficient = 0).
Rapidly increasing complexity!
14/18
Algorithmic approach for setup of order conditions
A basis of the free Lie algebra (Lyndon-Shirshov basis)
Combinatorial words representing Lyndon-Shirshov basis, generated by Duval algorithm (1988).
Lyndon-Shirshov words of length q over alphabet {A, B}
q
#q
1
2
3
4
5
6
7
8
2
1
2
3
6
9
18
30
A, B
AB
AAB, ABB
AAAB, AABB, ABBB
AAAAB, AAABB, AABAB, AABBB, ABABB, ABBBB
AAAAAB, AAAABB, AAABAB, AAABBB, AABABB, AABBAB, AABBBB, ABABBB, ABBBBB
...
...
q
#q
Lyndon-Shirshov words of length q over alphabet {A, B, C}
1
2
3
4
5
6
3
3
8
18
48
115
A, B, C
AB, AC, BC
AAB, AAC, ABB, ABC, ACB, ACC, BBC, BCC
...
...
...
15/18
Algorithmic approach for setup of order conditions
Details of the implemented algorithm
Input: q, s
Output: a dictionary eqs of strings, indexed by all Lyndon-Shirshov words W of length q,
containing the corresponding equations
for all Lyndon-Shirshov words W of length q do
eqs[W ] = "-1" /* each equation contains a term −1 */
end
for all k = (k1 , . . . , ks ) with kj ≥ 0 and |k| = k1 + · · · + ks = q do
for all (l1 , . . . , ls ) with 0 ≤ lj ≤ kj do
W = ∅ /* empty word */
for j = s, s − 1, . . . , 1 do
. . B}
W = WA
. . A} B
| .{z
| .{z
lj
kj −lj
end
if W is a Lyndon-Shirshov word of length q then
for j = 1, . . . , s do
append to eqs[W ] a string representing +
end
q
k
!
!
kj lj kj −lj
aj bj
lj
end
end
end
16/18
Harald Hofstätter
Setup of order conditions for splitting methods
Remarks
17/18
Remarks
• The outcome: a system of polynomial equations for the splitting
coefficients aj , bj [, cj ], j = 1 . . . s
• For given order p and sufficiently large s: underdetermined system
; search for “optimal” solution, numerically very demanding
optimization problem.
• http://www.asc.tuwien.ac.at/~winfried/splitting
• Our Julia implementation available at https://github.com/
HaraldHofstaetter/SplittingOrderConditions.jl
W.Auzinger, H.Hofstätter, D.Ketcheson, O.Koch:
Practical splitting methods for the adaptive integration of nonlinear evolution equations.
Part I: Construction of optimized schemes and pairs of schemes
BIT Numer. Math., published online 28 July 2016
18/18