Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
A Fast Interior Point Method for FreeFem++
Application to a laplacian problem with Signorini type boundary conditions (Z. Belhachmi, F. Ben Belgacem & F. Hecht)
Sylvain Auliac - Laboratoire Jacques-Louis Lions
mardi 3 juillet 12
Outline
mardi 3 juillet 12
Outline
Introduction• FreeFem++ : a short presentation• Optimization tools in FreeFem++
mardi 3 juillet 12
Outline
Introduction• FreeFem++ : a short presentation• Optimization tools in FreeFem++
Interior-Point Methods • A short overview• The IPOPT software• Using IPOPT through FreeFem++
mardi 3 juillet 12
Outline
Introduction• FreeFem++ : a short presentation• Optimization tools in FreeFem++
Interior-Point Methods • A short overview• The IPOPT software• Using IPOPT through FreeFem++
«Signorini-like» Laplacian Problem• Definition of the problem• Numerical results
Closing...
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software (F. Hecht) An open-source finite element PDEsolver with :
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software (F. Hecht) An open-source finite element PDEsolver with :
•An automatic mesh generator
⌦ ⇢ R2s.t.
@⌦ = � = {(cos(t), sin(t)) , t 2 [0, 2⇡]}
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language
find u 2 H10 (⌦) s.t. 8v 2 H1
0 (⌦)Z
⌦rurv �
Z
⌦fv = 0
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)•An MPI interface
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)•An MPI interface•An IDE interface (by A. Le Hyaric)
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)•An MPI interface•An IDE interface (by A. Le Hyaric)•Some non-linear optimization tools
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)•An MPI interface•An IDE interface (by A. Le Hyaric)•Some non-linear optimization tools•An active community of users
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
The FreeFem++ Software An open-source finite element PDEsolver with :
•An automatic mesh generator•A FEM/PDE/Variational Forms specific user language •Automatic interpolation from a mesh to another one•Some sparse sequential linear solvers (LU, Cholesky, UMFPack, etc...), and some parallel ones (MUMPS, HYPRE, SUPERLU, PASTIX, etc...), eigenvalues and vectors (ARPACK)•An MPI interface•An IDE interface (by A. Le Hyaric)•Some non-linear optimization tools•An active community of users
➡ http://www.freefem.org/ff++/mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
Optimization Tools of FreeFem++ :
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
Optimization Tools of FreeFem++ :
Quadratic problems solvers: LinearCG, LinearGMRESGeneral non-linear optimizers: •NLCG, BFGS•CMAES (derivative free evolution strategy, MPI version available)•NEWUOA (derivative free)
Unconstrained Optimization :
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
Optimization Tools of FreeFem++ :
Quadratic problems solvers: LinearCG, LinearGMRESGeneral non-linear optimizers: •NLCG, BFGS•CMAES (derivative free evolution strategy, MPI version available)•NEWUOA (derivative free)
Unconstrained Optimization :
•Derivative free / stochastic algorithms : DIRECT, CRS, ISRES, NEWUOA, BOBYQA, COBYLA, SBPLX, etc...
•Gradient-based algorithms : LBFGS, MMA, SLSQP, T-Newton, etc...
•Augmented Lagrangian MethodWhole list available on the NLopt web page
NLopt - Constrained non-linear optimizers :
mardi 3 juillet 12
Introduction FreeFem++ : a short presentation Optimization tools with FreeFem++
Optimization Tools of FreeFem++ :
Quadratic problems solvers: LinearCG, LinearGMRESGeneral non-linear optimizers: •NLCG, BFGS•CMAES (derivative free evolution strategy, MPI version available)•NEWUOA (derivative free)
Unconstrained Optimization :
•Derivative free / stochastic algorithms : DIRECT, CRS, ISRES, NEWUOA, BOBYQA, COBYLA, SBPLX, etc...
•Gradient-based algorithms : LBFGS, MMA, SLSQP, T-Newton, etc...
•Augmented Lagrangian MethodWhole list available on the NLopt web page
NLopt - Constrained non-linear optimizers :
IPOPT :Constrained non-linear optimization using sparse matrices
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
Interior Point Methods : a short overview
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
Objective function :
f : Rn �! R
Find : x0 = argmin8i, ci(x)�0
f(x)
c = (c1, . . . , cm) : Rn �! Rm
Constraints :Classical minimization under constraints problem :
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
Objective function :
f : Rn �! R
Find : x0 = argmin8i, ci(x)�0
f(x)
c = (c1, . . . , cm) : Rn �! Rm
Constraints :Classical minimization under constraints problem :
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
mardi 3 juillet 12
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
Objective function :
f : Rn �! R
Find : x0 = argmin8i, ci(x)�0
f(x)
c = (c1, . . . , cm) : Rn �! Rm
Constraints :Classical minimization under constraints problem :
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of f
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = 2
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = 1
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = 0
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = �1
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = �2
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence with find a a sequence of associated minimizers.
µk �!k!+1
0(µk)(xµk)
Barrier Function :For a given µ > 0, solve the unconstrained problem of finding
x
µ
= argminx2Rn
f(x)� µ
mX
i=1
ln c
i
(x)
Illustration : minimize on a trianglef(x, y) = (x + 0.1)2 + (y � 0.5)2
Isovalues of flog(µ) = �5
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, x
k
= argminx2Rn
f(x)� µ
k
mX
i=1
ln c
i
(x)
Links with the original problem :
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, x
k
= argminx2Rn
f(x)� µ
k
mX
i=1
ln c
i
(x)
Links with the original problem :
Extremum point : rf(xk)�mX
i=1
µk
ci(xk)rci(xk) = 0
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, x
k
= argminx2Rn
f(x)� µ
k
mX
i=1
ln c
i
(x)
Links with the original problem :Extremum point :
rf(xk)� Jc(xk)T�k = 0
�k = µk/c(xk), where
«Dual variables»
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :Extremum point : rf(xk)� Jc(xk)T
�k = 0
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
ci(xk)�k,i = µk
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :Extremum point : rf(xk)� Jc(xk)T
�k = 0
KKT Conditions :
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
ci(xk)�k,i = µk
rf(x⇤)� Jc(x⇤)T�
⇤ = 0c(x⇤) � 08i, �
⇤i � 0
8i, ci(x⇤)�⇤i = 0
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :Extremum point : rf(xk)� Jc(xk)T
�k = 0
KKT Conditions :
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
ci(xk)�k,i = µk
rf(x⇤)� Jc(x⇤)T�
⇤ = 0c(x⇤) � 08i, �
⇤i � 0
8i, ci(x⇤)�⇤i = 0
µk �! 0
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP Methods : given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :Extremum point : rf(xk)� Jc(xk)T
�k = 0
Under some favorable assumptions :xk �!
k!+1x
⇤
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
ci(xk)�k,i = µk
With even more assumptions : �k �!k!+1
�⇤
KKT point and multipliers such that, 9(x⇤, �⇤)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :
Under some favorable assumptions :xk �!
k!+1x
⇤
With even more assumptions :
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
�k �!k!+1
�⇤
Extremum point : rf(xk)� Jc(xk)T�k = 0 �k = µk/c(xk)
KKT point and multipliers such that, 9(x⇤, �⇤)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :
Under some favorable assumptions :xk �!
k!+1x
⇤
With even more assumptions :
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
�k �!k!+1
�⇤
Extremum point : rf(xk)� Jc(xk)T�k = 0 �k = µk/c(xk)
KKT point and multipliers such that, 9(x⇤, �⇤)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
Links with the original problem :
xk �!k!+1
x
⇤
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
KKT point and corresponding multipiers of theoriginal problem, such that, under some assumptions :
�k �!k!+1
�⇤
9(x⇤, �⇤)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Links with the original problem :
xk �!k!+1
x
⇤
KKT point and corresponding multipiers of theoriginal problem, such that, under some assumptions :9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Primal-dual IP method - Newton’s method is applied to the non-linear system :⇢
rf(x)� Jc(x)T� = 0
ci(x)�i = µ , 8i m
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Primal-dual IP method - Newton’s method is applied to the non-linear system : ⇢
rf(x)� Jc(x)T� = 0
ci(x)�i = µ , 8i m
H = r2f �mX
i=1
�ir2ci
Newton update :(�x
,��
)✓
H �JT
c
⇤Jc
C
◆ ✓�
x
��
◆=
✓rf � JT
c
�C�� µ1
◆
Where and (as for ).C = (�ijci)1i,jm ⇤
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Primal-dual IP method - Newton’s method is applied to the non-linear system : ⇢
rf(x)� Jc(x)T� = 0
ci(x)�i = µ , 8i m
H = r2f �mX
i=1
�ir2ci
Newton update :(�x
,��
)✓
H �JT
c
⇤Jc
C
◆ ✓�
x
��
◆=
✓rf � JT
c
�C�� µ1
◆
Where and (as for ).C = (�ijci)1i,jm ⇤H = r2f �mX
i=1
�ir2ci
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
IP main step: given a decreasing sequence withfind a sequence such that :
µk �!k!+1
0(µk)(xk)
8k, rf(xk)� Jc(xk)T�k = 0, �k = µk/c(xk) 2 Rm
Primal-dual IP method - Newton’s method is applied to the non-linear system : ⇢
rf(x)� Jc(x)T� = 0
ci(x)�i = µ , 8i m
H = r2f �mX
i=1
�ir2ci
Newton update :(�x
,��
)✓
H �JT
c
⇤Jc
C
◆ ✓�
x
��
◆=
✓rf � JT
c
�C�� µ1
◆
Where and (as for ).C = (�ijci)1i,jm ⇤
Links with the original problem : KKT point and corresponding multipliers of the original problem, such that, under some assumptions :
xk �!k!+1
x
⇤
9(x⇤, �⇤)
�k �!k!+1
�⇤
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The IPOPT software :• C++ open source implementation of a primal-dual interior point method for non-linear smooth optimization, from the COIN-OR project ☞ https://projects.coin-or.org/Ipopt
☞ the mailing list
• Uses sparse matrices and sparse symetric linear solvers (mumps, PARDISO, etc... ) for the Newton’s steps.
• Handles both inequality and/or equality constraints• A fortran variant for variationnal inequalities...?
Bibliography : •A. Wächter and L. T. Biegler, On the Implementation of a Primal-Dual Interior Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming, Mathematical Programming 106(1), pp. 25-57, 2006
•Some IPOPT related papers : https://projects.coin-or.org/Ipopt/wiki/IpoptPapers
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface :8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface :8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
⬅ Simple bounds constraints
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface :8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi ⬅ «True» constraints
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs f, rf, c, Jc, x
lb, x
ub,
clb, cub and...
H : Rn ⇥ Rm �! Mn (R)
(x , �) 7�! r2f(x)�mX
i=1
�ir2ci(x)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs f, rf, c, Jc, x
lb, x
ub,
clb, cub and...
H : Rn ⇥ R⇥ Rm �! Mn (R)
(x , � , �) 7�! �r2f(x) +mX
i=1
�ir2ci(x)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
: real[int] arrays •size n for x bounds•size m for c bounds•x bounds are optionnal•Set components to ±1e19
for unboundedness in particular directions.
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
: real[int] arrays •size n for x bounds•size m for c bounds•x bounds are optionnal•Set components to ±1e19
for unboundedness in particular directions.
Call IPOPT : full featuredint status = IPOPT(f, dF, c, Jc, H, xstart, lb=xlb,ub=xub,clb=clb,cub=cub, ... ... );
Remark: requires load ″ff-Ipopt″; earlier in the script
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
: real[int] arrays •size n for x bounds•size m for c bounds•x bounds are optionnal•Set components to ±1e19
for unboundedness in particular directions.
Call IPOPT : unconstrainedint status = IPOPT(f, dF, H, xstart, lb=xlb,ub=xub, ... ... );
Remark: requires load ″ff-Ipopt″; earlier in the script
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
: real[int] arrays •size n for x bounds•size m for c bounds•x bounds are optionnal•Set components to ±1e19
for unboundedness in particular directions.
Call IPOPT : with BFGSint status = IPOPT(f, dF, c, Jc, xstart, lb=xlb,ub=xub,clb=clb,cub=cub ... ... );
Remark: requires load ″ff-Ipopt″; earlier in the script
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : 8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
IPOPT needs
x
lb, x
ub, clb, cub
H
f
Jc
rf, c
: func real f(real[int] &X) {...}
: func real[int] df(real[int] &X) {...} func real[int] c(real[int] &X) {...} (optional)
: func matrix Jc(real[int] &X) {...} Needed only if there are constraint functions
: func matrix H(real[int] &X, real s, real[int] &L) In case of affine constraints, the prototype may be : func matrix H(real[int] &X) {...} If H is omitted Newton is replaced by a BFGS algorithm.
: real[int] arrays •size n for x bounds•size m for c bounds•x bounds are optionnal•Set components to ±1e19
for unboundedness in particular directions.
Call IPOPT : unconstrained with BFGSint status = IPOPT(f, dF, xstart, lb=xlb,ub=xub, ... ... );
Remark: requires load ″ff-Ipopt″; earlier in the script
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
mardi 3 juillet 12
Quadratic objective and affine constraints :... //begining of the scriptmatrix A = ... ;matrix C = ... ;real[int] b = ... , d = ... ;IPOPT([A,b] , [C,d] , xstart , /*named parameters*/ );
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
Homogeneous quadratic objective and affine constraints :... //begining of the scriptmatrix A = ... ;matrix C = ... ;real[int] d = ... ;IPOPT(A , [C,d] , xstart , /*named parameters*/ );
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
Standard objective and affine constraints :... //begining of the scriptfunc real f(real[int] &X) {...}func real[int] df(real[int] &X) {...}func matrix H(real[int] &X) {...} //no need for the full prototypematrix C = ... ;real[int] d = ... ;IPOPT(f, df, H, [C,d] , xstart , /*named parameters*/ );
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
Quadratic objective and standard constraints : hazardous case... //begining of the scriptfunc real[int] c(real[int] &X) {...}func matrix Jc(real[int] &X) {...}matrix A = ... ;real[int] b = ... ;
IPOPT([A,b] , c, Jc, xstart , /*named parameters*/ );
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : case of quadratic objective and affine constraints
8>>><
>>>:
x
⇤ = argminx2Rn
f(x)
8i n, x
lbi
x
⇤i
x
ubi
8i m, c
lbi
c
i
(x⇤) c
ubi
8x 2 Rn, f(x) = 1
2 hAx, xi + hb, xic(x) = Cx + d
(A, b) 2Mn,n(R)⇥ Rn, (C, d) 2Mn,m(R)⇥ Rm
➡ Possibility to directly pass the matrices and vectors
Quadratic objective and standard constraints : hazardous case... //begining of the scriptfunc real[int] c(real[int] &X) {...}func matrix Jc(real[int] &X) {...}matrix A = ... ;real[int] b = ... ;
IPOPT([A,b] , c, Jc, xstart , /*named parameters*/ );
Here, is always equal to A➡ erroneous hessian in some cases
H(x,�, �)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips
Matrix returning functions : must return a global object
func matrix H(real[int] &X) { matrix M; ... //compute M return M;}
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips
Matrix returning functions : must return a global object
func matrix H(real[int] &X) { matrix M; ... //compute M return M;}
M is cleaned after closing the function block, so the returned object does not exist anymore...
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips
Matrix returning functions : must return a global object
func matrix H(real[int] &X) { matrix M; ... //compute M return M;}
Sparse matrix returning functions : must return a global objectmatrix M; //just declare a global matrixfunc matrix H(real[int] &X) { ... //do something to fill M return M; //M will not be deleted before H goes out of scope}
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips
Sparse matrix returning functions : must return a global objectmatrix M; //just declare a global matrixfunc matrix H(real[int] &X) { ... //do something to fill M return M; //M will not be deleted before H goes out of scope}
The structure of the matrices : has to be constant through the optimization process...•Use varf as much as possible to build matrices, matrices built with the same varf always have the same structure even if some coefficients becomes null.
•Remember that zeros are discarded when building sparse matrices from arrays : real[int] c=...; real[int,int] tmp=...; int[int] I=..., J=...; matrix M = tmp; matrix M = [I, J ,c]; //two dangerous methods
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips (2)
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips (2)
Named parameters : subset of the IPOPT parameters, plus a few FreeFem++ specific ones, which can be used for :• Stopping criteria (tol, maxiter, maxcputime, etc...)• Getting final values (objvalue, lm, uz, lz, etc...)• Perform a warm start• Call a derivatives checker• Force the BFGS mode (add bfgs=1)• Specify an extern option file (see the IPOPT documentation)• etc...
Check the documentation for more informations.
mardi 3 juillet 12
Interior Point Method A short overviewThe IPOPT softwareUsing IPOPT through FreeFem++
The FreeFem++ Interface : some hints and tips (2)
Named parameters : subset of the IPOPT parameters, plus a few FreeFem++ specific ones, which can be used for :• Stopping criteria (tol, maxiter, maxcputime, etc...)• Getting final values (objvalue, lm, uz, lz, etc...)• Perform a warm start• Call a derivatives checker• Force the BFGS mode (add bfgs=1)• Specify an extern option file (see the IPOPT documentation)• etc...
Check the documentation for more informations.
Returned value : the IPOPT function returns an int revealing what happens during the optimization. Positive values often means IPOPT performed well and negative values are relevant of troubles.
mardi 3 juillet 12
Examples Quadratic problemsA non quadratic example
A Quadratic Example :
mardi 3 juillet 12
Examples Quadratic problemsA non quadratic example
A Quadratic Example :
mardi 3 juillet 12
Examples Quadratic problemsA non quadratic example
A Quadratic Example :
mardi 3 juillet 12
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :8<
:
�u�rp = fr.u = 0
in ⌦
u = gon @⌦
mardi 3 juillet 12
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
Find : u = argminv2K
14
Z
⌦
��rv +t rv��2 �
Z
⌦f.v
Where : K =�v 2 H1(⌦)2, v � g 2 H1
0 (⌦)2, r.v = 0
8<
:
�u�rp = fr.u = 0
in ⌦
u = gon @⌦
mardi 3 juillet 12
Find : u = argminv2K
14
Z
⌦
��rv +t rv��2 �
Z
⌦f.v
Where : K =�v 2 H1(⌦)2, v � g 2 H1
0 (⌦)2, r.v = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
mardi 3 juillet 12
Find : u = argminv2K
14
Z
⌦
��rv +t rv��2 �
Z
⌦f.v
Where : K =�v 2 H1(⌦)2, v � g 2 H1
0 (⌦)2, r.v = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
mardi 3 juillet 12
Find : u = argminv2K
14
Z
⌦
��rv +t rv��2 �
Z
⌦f.v
Where : K =�v 2 H1(⌦)2, v � g 2 H1
0 (⌦)2, r.v = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
mardi 3 juillet 12
Find : u = argminv2K
14
Z
⌦
��rv +t rv��2 �
Z
⌦f.v
Where : K =�v 2 H1(⌦)2, v � g 2 H1
0 (⌦)2, r.v = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
mardi 3 juillet 12
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
mardi 3 juillet 12
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
mardi 3 juillet 12
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
To get back the dual variables and store them in a P1 finite elements function.
mardi 3 juillet 12
Jh(u) = (Au, u)� (b, u) , u 2 Kh
Discret Problem : find minimizer of
+ Dirichlet boundary conditionsKh =�v 2 P2(Th)2 | Chv = 0
(Where ) Chv = 0 , 8q 2 P1(Th),Z
⌦qr.vh = 0
Examples Quadratic problemsA non quadratic example
Stokes Cavity Flow :
➡Dual variables converge toward the pressure field
mardi 3 juillet 12
Examples Quadratic problemA non quadratic example
A Constrained Minimal-Surface Example :
mardi 3 juillet 12
Examples Quadratic problemA non quadratic example
A Constrained Minimal-Surface Example :
Given g, let , and :
8v 2 E, S(v) =Z
⌦
p1 + |rv|2 , V (v) =
Z
⌦v
And, given V0 >0, try to find : u = argminv 2 E,
V (v) � V0
S(v)
E =�v 2 L2(⌦) | v � g 2 H1
0 (⌦)
mardi 3 juillet 12
Examples Quadratic problemA non quadratic example
A Constrained Minimal-Surface Example :
Given g, let , and :
8v 2 E, S(v) =Z
⌦
p1 + |rv|2 , V (v) =
Z
⌦v
And, given V0 >0, try to find : u = argminv 2 E,
V (v) � V0
S(v)
E =�v 2 L2(⌦) | v � g 2 H1
0 (⌦)
Computations withg = x
2y
2, ⌦ = {(x, y) 2 R2 | x
2 + y
2 1}V0 = 0 V0 =
12
V0 = 1 V0 = 2
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
⌦s ⌦i
⌦s, ⌦i : contiguous domains of R2
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
⌦s ⌦i
�
⌦s, ⌦i : contiguous domains of R2
� = @⇣⌦s [ ⌦i
⌘
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
⌦s ⌦i
� �C
⌦s, ⌦i : contiguous domains of R2
� = @⇣⌦s [ ⌦i
⌘�C = ⌦s \ ⌦i
mardi 3 juillet 12
Domain :
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
⌦s ⌦i
� �C
⌦s, ⌦i : contiguous domains of R2
� = @⇣⌦s [ ⌦i
⌘�C = ⌦s \ ⌦i
Problem :
mardi 3 juillet 12
Domain :
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem : Conjoint work with Z. Belhachmi, F. Ben Belgacem & F. Hecht ➡ Quadratic Finite Elements with Non-Matching Grids for the Unilateral Boundary Contact
⌦s ⌦i
� �C
⌦s, ⌦i : contiguous domains of R2
� = @⇣⌦s [ ⌦i
⌘�C = ⌦s \ ⌦i
Problem : find such thatpi, ps
• • Dirichlet or Neumann conditions on •
�p↵ = f↵ in ⌦↵ (↵ = s, i)�
[p] � 0, @np↵ � ⇠ and (@np� ⇠)[p] = 0 on �C
mardi 3 juillet 12
Domain :
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
«Signorini-like» Laplacian Problem :
⌦s ⌦i
� �C
⌦s, ⌦i : contiguous domains of R2
� = @⇣⌦s [ ⌦i
⌘�C = ⌦s \ ⌦i
Problem : find such thatpi, ps
(ps, pi) = argmin(us,ui)2K
X
↵2{s,i}
12
Z
⌦↵
|ru↵|2 �Z
⌦↵
f↵u↵ �Z
�↵n
g↵nu↵
Where :
K =⇢
(us, ui) 2 H1(⌦s)⇥H1(⌦i)����
u↵ � g↵d 2 H1
0 (⌦↵) ↵ = i, s[u] � 0
�
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
h
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
hJh(u) = (Au, u)� (b, u) , u 2 Kh
Kh =�uh 2 P2(T s
h )⇥ P2(T ih ) | Chuh � 0
Discret Problem : find minimizer of
+ Dirichlet boundary conditions
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
hJh(u) = (Au, u)� (b, u) , u 2 Kh
Kh =�uh 2 P2(T s
h )⇥ P2(T ih ) | Chuh � 0
Discret Problem : find minimizer of
+ Dirichlet boundary conditions
Building the needed objects :
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
hJh(u) = (Au, u)� (b, u) , u 2 Kh
Kh =�uh 2 P2(T s
h )⇥ P2(T ih ) | Chuh � 0
Discret Problem : find minimizer of
+ Dirichlet boundary conditions
Building the needed objects :• A, b are directly obtained from the separated Poisson matrices and second membersmatrix A = [ [As , 0] , [0 , Ai] ];
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
hJh(u) = (Au, u)� (b, u) , u 2 Kh
Kh =�uh 2 P2(T s
h )⇥ P2(T ih ) | Chuh � 0
Discret Problem : find minimizer of
+ Dirichlet boundary conditions
Building the needed objects :• A, b are directly obtained from the separated Poisson matrices and second membersmatrix A = [ [As , 0] , [0 , Ai] ];
•Dirichlet boundary conditions are treated as simple bounds, using a trick allowed by the varf syntax
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results
T ihT s
hJh(u) = (Au, u)� (b, u) , u 2 Kh
Kh =�uh 2 P2(T s
h )⇥ P2(T ih ) | Chuh � 0
Discret Problem : find minimizer of
+ Dirichlet boundary conditions
Building the needed objects :• A, b are directly obtained from the separated Poisson matrices and second membersmatrix A = [ [As , 0] , [0 , Ai] ];
•Dirichlet boundary conditions are treated as simple bounds, using a trick allowed by the varf syntax
•C depends on the unilateral conditions treatment
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results :
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results :Two exact solutions :
⇢p
i(x, y) = xy + x
pr + x� y
pr � x
p
s(x, y) = xy � x
pr + x� y
pr � x , r =
px
2 + y2
⇢p
i(x, y) = xy + [2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
p
s(x, y) = xy + [�2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
Computations : we numerically evaluate with the and norms, with decaying h in the three following cases :• Conforming meshes, corresponding degrees of freedom are directly compared.• Non-conforming meshes with simple interpolation process.• Non-conforming meshes with mortar projection (C is not sparse)
kph � pk H1, L2
L1
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : First solution
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : First solution⇢
p
i(x, y) = xy + [2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
p
s(x, y) = xy + [�2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
H1norm
L2norm
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : First solution⇢
p
i(x, y) = xy + [2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
p
s(x, y) = xy + [�2 max(x, 0)�min(x, 0) ⇤ sin(2⇡y) ]sin(3x)
H1norm
L2norm
L1 norm
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : Second solution
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : Second solution
⇢p
i(x, y) = xy + x
pr + x� y
pr � x
p
s(x, y) = xy � x
pr + x� y
pr � x , r =
px
2 + y2
L2normH1
norm
mardi 3 juillet 12
«Signorini-like» Laplacian Problem Definition of the problemNumerical results
Numerical Results : Second solution
⇢p
i(x, y) = xy + x
pr + x� y
pr � x
p
s(x, y) = xy � x
pr + x� y
pr � x , r =
px
2 + y2
L2norm
H1norm
L1 norm
mardi 3 juillet 12
Outlook
• A state of the art software for large-scale smooth optimization directly available into FreeFem++• Succesfully tested on several quadratic convex problems, outperforming any of the previously available optimizers• Limits : ➡ local optimization ➡ needs order two derivatives for full efficiency
mardi 3 juillet 12
Outlook
• A state of the art software for large-scale smooth optimization directly available into FreeFem++• Succesfully tested on several quadratic convex problems, outperforming any of the previously available optimizers• Limits : ➡ local optimization ➡ needs order two derivatives for full efficiency
Sequel :• 3D computations for the Signorini problem• Optimal shape design• Development of (smart) tools to ease the computation of derivatives within FreeFem++
mardi 3 juillet 12