# 3.4 Nonlinear minimization problems¶

We consider minimization problems of the form

$\text{find } u \in V \text{ s.t. } E(u) \leq E(v) \quad \forall~ v \in V.$
[1]:

# imports
from ngsolve import *
from ngsolve.webgui import Draw


Similar to the previous unit we want solve the (minimization) problem using Newton’s method. However this time we don’t start with an equation but a minimization problem. We will let NGSolve derive the corresponding expressions for minimization conditions.

To solve the problem we use the Variation integrator of NGSolve and formulate the problem through the symbolic description of an energy functional.

Let $$E(u)$$ be the energy that is to be minimized for the unknown state $$u$$.

Then a necessary optimality condition is that the derivative at the minimizer $$u$$ in all directions $$v$$ vanishes, i.e.

$\delta E(u) (v) = 0 \quad \forall v \in V$

At this point we are back in business of the previous unit as we now have an equation that we need to solve.

Let’s continue with a concrete example.

## Scalar minimization problems¶

As a first example we take $$V = H^1_0$$ and

$E(u) = \int_{\Omega} \frac12 \vert \nabla u \vert^2 + \frac{1}{12} u^4 - fu ~dx.$

The minimization is equivalent (due to convexity) to solving the nonlinear PDE (cf. unit 3.3 with $$f=10$$)

$\delta E(u)(v) = 0 ~ \forall v \in V \quad \Leftrightarrow \quad - \Delta u + \frac13 u^3 = f \text{ in } V'$

with $$\Omega = (0,1)^2$$.

[2]:

# define geometry and generate mesh
from ngsolve import *
from ngsolve.webgui import *
from netgen.occ import *
shape = Rectangle(1,1).Face()
shape.edges.Min(X).name="left"
shape.edges.Max(X).name="right"
shape.edges.Min(Y).name="bottom"
shape.edges.Max(Y).name="top"
geom = OCCGeometry(shape, dim=2)
mesh = Mesh(geom.GenerateMesh(maxh=0.3))


We solve the PDE with a Newton iteration.

[3]:

V = H1(mesh, order=4, dirichlet=".*")
u = V.TrialFunction()


We define the semi-linear form expression through the energy functional using the Variation-keyword:

[4]:

a = BilinearForm (V, symmetric=True)


Now NGSolve applies the derivative on the functional so that the previous statement corresponds to:

a += (grad(u) * grad(v) + 1/3*u**3*v - 10 * v)*dx


(which has the same form as the problems in the nonlinear example)

We recall the Newton iteration (cf. unit-3.3 ) and now apply the same loop:

• Given an initial guess $$u^0$$

• loop over $$i=0,..$$ until convergence:

• Compute linearization: $A (u^i) + \delta A(u^i) :nbsphinx-math:Delta u^{i} = 0$:

• $$f^i = A (u^i)$$

• $$B^i = \delta A(u^i)$$

• Solve $$B^i \Delta u^i = -f^i$$

• Update $$u^{i+1} = u^i + \Delta u^{i}$$

• Evaluate stopping criteria

• Evaluate $$E(u^{i+1})$$

As a stopping criteria we take $$\langle A u^i,\Delta u^i \rangle = \langle A u^i, A u^i \rangle_{(B^i)^{-1}}< \varepsilon$$.

Note that $$A(u^i)$$ (a.Apply(...)) and $$\delta A(u^i)$$ (a.AssembleLinearization(...)) are now derived from $$A$$ which is defined as $$A = \delta E$$ through the energy functional $$E(\cdot)$$.

• We don’t have to form $$\delta E$$ manually, but let NGSolve do the job and

• we can use the energy functional to interprete the success of iteration steps

[5]:

def SolveNonlinearMinProblem(a,gfu,tol=1e-13,maxits=10, callback=lambda gfu: None):
res = gfu.vec.CreateVector()
du  = gfu.vec.CreateVector()
callback(gfu)
for it in range(maxits):
print ("Newton iteration {:3}".format(it),
", energy = {:16}".format(a.Energy(gfu.vec)),end="")

#solve linearized problem:
a.Apply (gfu.vec, res)
a.AssembleLinearization (gfu.vec)
du.data = a.mat.Inverse(V.FreeDofs()) * res

#update iteration
gfu.vec.data -= du
callback(gfu)

#stopping criteria
stopcritval = sqrt(abs(InnerProduct(du,res)))
print ("<A u",it,", A u",it,">_{-1}^0.5 = ", stopcritval)
if stopcritval < tol:
break
Redraw(blocking=True)


So, let’s try it out:

[6]:

gfu = GridFunction(V)
gfu.Set((x*(1-x))**4*(y*(1-y))**4) # initial guess
gfu_it = GridFunction(gfu.space,multidim=0)
cb = lambda gfu : gfu_it.AddMultiDimComponent(gfu.vec) # store current state
SolveNonlinearMinProblem(a,gfu, callback = cb)
print ("energy = ", a.Energy(gfu.vec))

Newton iteration   0 , energy = -2.519310473005075e-05<A u 0 , A u 0 >_{-1}^0.5 =  1.8746343188666652
Newton iteration   1 , energy = -1.7525741822566479<A u 1 , A u 1 >_{-1}^0.5 =  0.010379556074918205
Newton iteration   2 , energy = -1.752628053722505<A u 2 , A u 2 >_{-1}^0.5 =  1.122907759369698e-06
Newton iteration   3 , energy = -1.7526280537231351<A u 3 , A u 3 >_{-1}^0.5 =  1.3091870090779652e-14
energy =  -1.7526280537231351

[7]:

Draw(gfu,mesh,"u", deformation = True)
#Draw(gfu_it,mesh,"u", deformation = True)

[7]:

BaseWebGuiScene


Again, a Newton for minimization is also shipped with NGSolve (actually it is the same with the additional knowledge about the Energy and the possibility to do a line search for a given search direction):

[8]:

from ngsolve.solvers import *
gfu.Set((x*(1-x))**4*(y*(1-y))**4) # initial guess
NewtonMinimization(a,gfu)
#Draw(gfu,mesh,"u", deformation = True)

Newton iteration  0
Energy:  -2.519310473005075e-05
err =  1.874634318866665
Newton iteration  1
Energy:  -1.7525741822566476
err =  0.010379556074917643
Newton iteration  2
Energy:  -1.7526280537225047
err =  1.122907759377858e-06
Newton iteration  3
Energy:  -1.7526280537231351
err =  1.3160364281577543e-14

[8]:

(0, 4)


## Nonlinear elasticity¶

We consider a beam which is fixed on one side and is subject to gravity only. We assume a Neo-Hookean hyperelastic material. The model is a nonlinear minimization problem with

$E(v) := \int_{\Omega} \frac{\mu}{2} ( \operatorname{tr}(F^T F-I)+\frac{2 \mu}{\lambda} \operatorname{det}(F^T F)^{\frac{\lambda}{2\mu}} - 1) - \gamma ~ (f,v) ~~ dx$

where $$\mu$$ and $$\lambda$$ are the Lamé parameters and $$F = I + D v$$ where $$v: \Omega \to \mathbb{R}^2$$ is the sought for displacement.

We fix the domain to $$\Omega = (0,1) \times (0,0.1)$$

[9]:

# define geometry and generate mesh
shape = Rectangle(1,0.1).Face()
shape.edges.Min(X).name="left"
shape.edges.Min(X).maxh=0.01
shape.edges.Max(X).name="right"
shape.edges.Min(Y).name="bot"
shape.edges.Max(Y).name="top"
geom = OCCGeometry(shape, dim=2)
mesh = Mesh(geom.GenerateMesh(maxh=0.05))

[10]:

# E module and poisson number:
E, nu = 210, 0.2
# Lamé constants:
mu  = E / 2 / (1+nu)
lam = E * nu / ((1+nu)*(1-2*nu))

V = VectorH1(mesh, order=2, dirichlet="left")
u  = V.TrialFunction()

#gravity:
force = CoefficientFunction( (0,-1) )


Now, we recall the energy

$E(v) := \int_{\Omega} \frac{\mu}{2} ( \operatorname{tr}(F^T F-I)+\frac{2 \mu}{\lambda} \operatorname{det}(F^T F)^{\frac{\lambda}{2\mu}} - 1) - \gamma ~ (f,v) ~~ dx$
[11]:

def Pow(a, b):
return exp (log(a)*b)

def NeoHook (C):
return 0.5 * mu * (Trace(C-I) + 2*mu/lam * Pow(Det(C), -lam/2/mu) - 1)

I = Id(mesh.dim)
C = F.trans * F

factor = Parameter(1.0)

a = BilinearForm(V, symmetric=True)
a += Variation(  NeoHook (C).Compile() * dx
-factor * (InnerProduct(force,u) ).Compile() * dx)


We want to solve the minimization problem for $$\gamma = 5$$. Due to the high nonlinearity in the problem, the Newton iteration will not convergence for any initial guess. We approach the case $$\gamma = 5$$ by solving problems with $$\gamma = i/10$$ for $$i=1,..,50$$ and taking the solution of the previous problem as an initial guess.

[12]:

gfu = GridFunction(V)
gfu.vec[:] = 0
gfu_l = GridFunction(V,multidim=0)
SolveNonlinearMinProblem(a,gfu)
if (loadstep + 1) % 10 == 0:

loadstep 0
Newton iteration   0 , energy = 8.750000000000005<A u 0 , A u 0 >_{-1}^0.5 =  0.016679556030768466
Newton iteration   1 , energy = 8.75013263143626<A u 1 , A u 1 >_{-1}^0.5 =  0.023336047578620383
Newton iteration   2 , energy = 8.749861131112139<A u 2 , A u 2 >_{-1}^0.5 =  0.0001023397695349267
Newton iteration   3 , energy = 8.749861125875432<A u 3 , A u 3 >_{-1}^0.5 =  5.083832616030928e-08
Newton iteration   4 , energy = 8.749861125875428<A u 4 , A u 4 >_{-1}^0.5 =  2.6648807648277497e-13
Newton iteration   5 , energy = 8.749861125875427<A u 5 , A u 5 >_{-1}^0.5 =  6.748333421008375e-16
Newton iteration   0 , energy = 8.749583835006014<A u 0 , A u 0 >_{-1}^0.5 =  0.01659726051718783
Newton iteration   1 , energy = 8.749710086037027

<A u 1 , A u 1 >_{-1}^0.5 =  0.022961212649583354
Newton iteration   2 , energy = 8.749447223765369<A u 2 , A u 2 >_{-1}^0.5 =  0.0001421413169123172
Newton iteration   3 , energy = 8.749447213769075<A u 3 , A u 3 >_{-1}^0.5 =  2.3247493064684997e-06
Newton iteration   4 , energy = 8.749447213766375<A u 4 , A u 4 >_{-1}^0.5 =  6.323872995227713e-10
Newton iteration   5 , energy = 8.749447213766377<A u 5 , A u 5 >_{-1}^0.5 =  1.119653066799575e-15
Newton iteration   0 , energy = 8.74889799667628<A u 0 , A u 0 >_{-1}^0.5 =  0.01635808617700812
Newton iteration   1 , energy = 8.749005161141243<A u 1 , A u 1 >_{-1}^0.5 =  0.02189580387901107
Newton iteration   2 , energy = 8.748766090988285<A u 2 , A u 2 >_{-1}^0.5 =  0.00020819612216441726
Newton iteration   3 , energy = 8.748766069638341<A u 3 , A u 3 >_{-1}^0.5 =  4.889838190025943e-06
Newton iteration   4 , energy = 8.74876606962638<A u 4 , A u 4 >_{-1}^0.5 =  2.664220504310976e-09
Newton iteration   5 , energy = 8.748766069626376<A u 5 , A u 5 >_{-1}^0.5 =  1.7717033873671775e-15
Newton iteration   0 , energy = 8.747955022790292<A u 0 , A u 0 >_{-1}^0.5 =  0.015983171091260604
Newton iteration   1 , energy = 8.748035197390944

<A u 1 , A u 1 >_{-1}^0.5 =  0.020295470217182966
Newton iteration   2 , energy = 8.74782974991464<A u 2 , A u 2 >_{-1}^0.5 =  0.00026378510713421014
Newton iteration   3 , energy = 8.747829715614968<A u 3 , A u 3 >_{-1}^0.5 =  7.246519136770762e-06
Newton iteration   4 , energy = 8.747829715588695<A u 4 , A u 4 >_{-1}^0.5 =  4.74389669548128e-09
Newton iteration   5 , energy = 8.747829715588708<A u 5 , A u 5 >_{-1}^0.5 =  3.365494154012912e-15
Newton iteration   0 , energy = 8.746770582221059<A u 0 , A u 0 >_{-1}^0.5 =  0.015502131106817946
Newton iteration   1 , energy = 8.74682146885572<A u 1 , A u 1 >_{-1}^0.5 =  0.018363023441869346
Newton iteration   2 , energy = 8.746653234881324<A u 2 , A u 2 >_{-1}^0.5 =  0.00029906083139318875
Newton iteration   3 , energy = 8.746653190689392

<A u 3 , A u 3 >_{-1}^0.5 =  8.720506596758981e-06
Newton iteration   4 , energy = 8.746653190651365<A u 4 , A u 4 >_{-1}^0.5 =  5.244399288914433e-09
Newton iteration   5 , energy = 8.74665319065136<A u 5 , A u 5 >_{-1}^0.5 =  3.364828089463573e-15
Newton iteration   0 , energy = 8.745362093324541<A u 0 , A u 0 >_{-1}^0.5 =  0.014947229312900335
Newton iteration   1 , energy = 8.74538587978535<A u 1 , A u 1 >_{-1}^0.5 =  0.016295990103620928
Newton iteration   2 , energy = 8.745253346947937<A u 2 , A u 2 >_{-1}^0.5 =  0.00031322249880353097
Newton iteration   3 , energy = 8.74525329834197<A u 3 , A u 3 >_{-1}^0.5 =  9.04426265139727e-06
Newton iteration   4 , energy = 8.745253298301064<A u 4 , A u 4 >_{-1}^0.5 =  4.219367728764047e-09
Newton iteration   5 , energy = 8.745253298301066<A u 5 , A u 5 >_{-1}^0.5 =  2.7846416617750095e-15
Newton iteration   0 , energy = 8.743747536127557<A u 0 , A u 0 >_{-1}^0.5 =  0.014348610483379202
Newton iteration   1 , energy = 8.743748954586778<A u 1 , A u 1 >_{-1}^0.5 =  0.014251851569749318
Newton iteration   2 , energy = 8.743647552377714<A u 2 , A u 2 >_{-1}^0.5 =  0.00030938407313008435
Newton iteration   3 , energy = 8.743647504840698

<A u 3 , A u 3 >_{-1}^0.5 =  8.3871967456619e-06
Newton iteration   4 , energy = 8.743647504805526<A u 4 , A u 4 >_{-1}^0.5 =  2.696174291840676e-09
Newton iteration   5 , energy = 8.743647504805526<A u 5 , A u 5 >_{-1}^0.5 =  3.1430016885737932e-15
Newton iteration   0 , energy = 8.74194456970188<A u 0 , A u 0 >_{-1}^0.5 =  0.013731490952564249
Newton iteration   1 , energy = 8.741929130681514<A u 1 , A u 1 >_{-1}^0.5 =  0.012335985473828406
Newton iteration   2 , energy = 8.741853133717218<A u 2 , A u 2 >_{-1}^0.5 =  0.00029218460100397735
Newton iteration   3 , energy = 8.741853091234612<A u 3 , A u 3 >_{-1}^0.5 =  7.132845748855292e-06
Newton iteration   4 , energy = 8.74185309120917<A u 4 , A u 4 >_{-1}^0.5 =  1.4449637379591827e-09
Newton iteration   5 , energy = 8.741853091209174

<A u 5 , A u 5 >_{-1}^0.5 =  3.273052890137208e-15
Newton iteration   0 , energy = 8.73996995763774<A u 0 , A u 0 >_{-1}^0.5 =  0.013115193293812059
Newton iteration   1 , energy = 8.739942805214286<A u 1 , A u 1 >_{-1}^0.5 =  0.010606043841209402
Newton iteration   2 , energy = 8.739886610366465<A u 2 , A u 2 >_{-1}^0.5 =  0.00026638207307622233
Newton iteration   3 , energy =  8.7398865750021<A u 3 , A u 3 >_{-1}^0.5 =  5.665565430888294e-06
Newton iteration   4 , energy = 8.739886574986055<A u 4 , A u 4 >_{-1}^0.5 =  6.728302970086345e-10
Newton iteration   5 , energy = 8.739886574986054<A u 5 , A u 5 >_{-1}^0.5 =  3.532264629933144e-15
Newton iteration   0 , energy = 8.737839246950303<A u 0 , A u 0 >_{-1}^0.5 =  0.012513427275509898
Newton iteration   1 , energy = 8.737804626969567<A u 1 , A u 1 >_{-1}^0.5 =  0.009083727644054152
Newton iteration   2 , energy = 8.73776339311323<A u 2 , A u 2 >_{-1}^0.5 =  0.00023610622479437325
Newton iteration   3 , energy = 8.737763365299887<A u 3 , A u 3 >_{-1}^0.5 =  4.260964186784308e-06
Newton iteration   4 , energy = 8.737763365290808<A u 4 , A u 4 >_{-1}^0.5 =  2.782575945806737e-10
Newton iteration   5 , energy = 8.737763365290807<A u 5 , A u 5 >_{-1}^0.5 =  4.096146210245486e-15
Newton iteration   0 , energy = 8.735566630224838<A u 0 , A u 0 >_{-1}^0.5 =  0.011935188197963562
Newton iteration   1 , energy = 8.735527774936775

<A u 1 , A u 1 >_{-1}^0.5 =  0.007767358825516754
Newton iteration   2 , energy = 8.735497617011934<A u 2 , A u 2 >_{-1}^0.5 =  0.00020456113277914979
Newton iteration   3 , energy = 8.73549759611775<A u 3 , A u 3 >_{-1}^0.5 =  3.066840076391613e-06
Newton iteration   4 , energy = 8.735497596113051<A u 4 , A u 4 >_{-1}^0.5 =  1.0331737965861249e-10
Newton iteration   5 , energy = 8.735497596113055<A u 5 , A u 5 >_{-1}^0.5 =  4.311976438305994e-15
Newton iteration   0 , energy = 8.733164927999525<A u 0 , A u 0 >_{-1}^0.5 =  0.011385824134310201
Newton iteration   1 , energy = 8.733124156449502<A u 1 , A u 1 >_{-1}^0.5 =  0.006642095386402429
Newton iteration   2 , energy = 8.733102097500787<A u 2 , A u 2 >_{-1}^0.5 =  0.00017399831564279453
Newton iteration   3 , energy = 8.733102082375538<A u 3 , A u 3 >_{-1}^0.5 =  2.1307761991817205e-06
Newton iteration   4 , energy = 8.733102082373255<A u 4 , A u 4 >_{-1}^0.5 =  3.437331822670527e-11
Newton iteration   5 , energy = 8.733102082373257

<A u 5 , A u 5 >_{-1}^0.5 =  5.02681235422739e-15
Newton iteration   0 , energy = 8.730645643276901<A u 0 , A u 0 >_{-1}^0.5 =  0.01086802616877869
Newton iteration   1 , energy = 8.730604539974602<A u 1 , A u 1 >_{-1}^0.5 =  0.005687046957054471
Newton iteration   2 , energy = 8.730588364495892<A u 2 , A u 2 >_{-1}^0.5 =  0.0001458302515379124
Newton iteration   3 , energy =  8.7305883538676<A u 3 , A u 3 >_{-1}^0.5 =  1.4393632545733848e-06
Newton iteration   4 , energy = 8.730588353866564<A u 4 , A u 4 >_{-1}^0.5 =  1.0000807310978529e-11
Newton iteration   5 , energy = 8.730588353866565<A u 5 , A u 5 >_{-1}^0.5 =  4.407362245966811e-15
Newton iteration   0 , energy = 8.728019054783651<A u 0 , A u 0 >_{-1}^0.5 =  0.010382642571259655
Newton iteration   1 , energy = 8.727978652645493<A u 1 , A u 1 >_{-1}^0.5 =  0.004879699559414807
Newton iteration   2 , energy = 8.727966741154919<A u 2 , A u 2 >_{-1}^0.5 =  0.00012080162667604032
Newton iteration   3 , energy = 8.727966733860095<A u 3 , A u 3 >_{-1}^0.5 =  9.511509919838258e-07
Newton iteration   4 , energy = 8.727966733859645<A u 4 , A u 4 >_{-1}^0.5 =  2.328991803298973e-12
Newton iteration   5 , energy = 8.727966733859644<A u 5 , A u 5 >_{-1}^0.5 =  5.063159154800849e-15
Newton iteration   0 , energy = 8.72529432733081<A u 0 , A u 0 >_{-1}^0.5 =  0.009929301380651573
Newton iteration   1 , energy = 8.725255263782424<A u 1 , A u 1 >_{-1}^0.5 =  0.004198386362834357
Newton iteration   2 , energy = 8.725246444612651

<A u 2 , A u 2 >_{-1}^0.5 =  9.916954033493868e-05
Newton iteration   3 , energy = 8.72524643969578<A u 3 , A u 3 >_{-1}^0.5 =  6.181104157106701e-07
Newton iteration   4 , energy = 8.725246439695598<A u 4 , A u 4 >_{-1}^0.5 =  2.710387871298076e-13
Newton iteration   5 , energy = 8.725246439695596<A u 5 , A u 5 >_{-1}^0.5 =  5.190944183910614e-15
Newton iteration   0 , energy = 8.72247962602463<A u 0 , A u 0 >_{-1}^0.5 =  0.009506863855038334
Newton iteration   1 , energy = 8.722442264469741<A u 1 , A u 1 >_{-1}^0.5 =  0.0036234867189836443
Newton iteration   2 , energy = 8.722435694166874<A u 2 , A u 2 >_{-1}^0.5 =  8.086574400385491e-05
Newton iteration   3 , energy = 8.722435690897237<A u 3 , A u 3 >_{-1}^0.5 =  3.9682043090549373e-07
Newton iteration   4 , energy = 8.722435690897159<A u 4 , A u 4 >_{-1}^0.5 =  1.5335772022987126e-13
Newton iteration   5 , energy = 8.722435690897157<A u 5 , A u 5 >_{-1}^0.5 =  4.742479490832054e-15
Newton iteration   0 , energy = 8.71958222671479

<A u 0 , A u 0 >_{-1}^0.5 =  0.009113743066106779
Newton iteration   1 , energy = 8.71954674602111<A u 1 , A u 1 >_{-1}^0.5 =  0.003137864245862423
Newton iteration   2 , energy = 8.719541818188018<A u 2 , A u 2 >_{-1}^0.5 =  6.562823363768151e-05
Newton iteration   3 , energy = 8.719541816034377<A u 3 , A u 3 >_{-1}^0.5 =  2.5265169226199547e-07
Newton iteration   4 , energy = 8.719541816034342<A u 4 , A u 4 >_{-1}^0.5 =  1.5064203401913991e-13
Newton iteration   5 , energy = 8.719541816034345<A u 5 , A u 5 >_{-1}^0.5 =  6.399315788938205e-15
Newton iteration   0 , energy = 8.716608618682374<A u 0 , A u 0 >_{-1}^0.5 =  0.008748121193198465
Newton iteration   1 , energy = 8.716575076802393<A u 1 , A u 1 >_{-1}^0.5 =  0.002726885298742537
Newton iteration   2 , energy = 8.716571354904783<A u 2 , A u 2 >_{-1}^0.5 =  5.309900139636054e-05
Newton iteration   3 , energy = 8.716571353494926<A u 3 , A u 3 >_{-1}^0.5 =  1.6005861664646298e-07
Newton iteration   4 , energy = 8.716571353494906<A u 4 , A u 4 >_{-1}^0.5 =  9.227142274911629e-14
Newton iteration   0 , energy = 8.713564597802025<A u 0 , A u 0 >_{-1}^0.5 =  0.008408093607737411
Newton iteration   1 , energy = 8.713532975891185<A u 1 , A u 1 >_{-1}^0.5 =  0.0023782292023824788
Newton iteration   2 , energy = 8.71353014469709<A u 2 , A u 2 >_{-1}^0.5 =  4.289068268258079e-05
Newton iteration   3 , energy = 8.713530143777215<A u 3 , A u 3 >_{-1}^0.5 =  1.0117092683235677e-07
Newton iteration   4 , energy = 8.713530143777207

<A u 4 , A u 4 >_{-1}^0.5 =  4.9088034550772816e-14
Newton iteration   0 , energy = 8.71045534973613<A u 0 , A u 0 >_{-1}^0.5 =  0.008091761466311739
Newton iteration   1 , energy = 8.710425582168181<A u 1 , A u 1 >_{-1}^0.5 =  0.002081613243384551
Newton iteration   2 , energy = 8.710423413046925<A u 2 , A u 2 >_{-1}^0.5 =  3.4627848275045e-05
Newton iteration   3 , energy = 8.710423412447332<A u 3 , A u 3 >_{-1}^0.5 =  6.394848351251886e-08
Newton iteration   4 , energy = 8.71042341244733<A u 4 , A u 4 >_{-1}^0.5 =  2.4276073617777664e-14
Newton iteration   0 , energy = 8.707285523463952<A u 0 , A u 0 >_{-1}^0.5 =  0.0077972888333969845
Newton iteration   1 , energy = 8.707257517917983<A u 1 , A u 1 >_{-1}^0.5 =  0.0018284995938168376
Newton iteration   2 , energy = 8.707255844183978<A u 2 , A u 2 >_{-1}^0.5 =  2.7969506432784542e-05
Newton iteration   3 , energy = 8.707255843792803<A u 3 , A u 3 >_{-1}^0.5 =  4.0494181369648136e-08
Newton iteration   4 , energy = 8.707255843792796

<A u 4 , A u 4 >_{-1}^0.5 =  1.2498577152904397e-14
Newton iteration   0 , energy = 8.704059295834696<A u 0 , A u 0 >_{-1}^0.5 =  0.007522935802547589
Newton iteration   1 , energy = 8.70403294651861<A u 1 , A u 1 >_{-1}^0.5 =  0.0016118179188622103
Newton iteration   2 , energy = 8.704031645946337<A u 2 , A u 2 >_{-1}^0.5 =  2.2618820367138292e-05
Newton iteration   3 , energy = 8.704031645690513<A u 3 , A u 3 >_{-1}^0.5 =  2.5725878432975018e-08
Newton iteration   4 , energy = 8.704031645690513<A u 4 , A u 4 >_{-1}^0.5 =  7.329231282725472e-15
Newton iteration   0 , energy = 8.700780428002332<A u 0 , A u 0 >_{-1}^0.5 =  0.007267075659094228
Newton iteration   1 , energy = 8.70075562419366<A u 1 , A u 1 >_{-1}^0.5 =  0.001425718336304045
Newton iteration   2 , energy = 8.700754606610262<A u 2 , A u 2 >_{-1}^0.5 =  1.832484931993769e-05
Newton iteration   3 , energy = 8.70075460644235<A u 3 , A u 3 >_{-1}^0.5 =  1.6415416842935447e-08
Newton iteration   4 , energy = 8.700754606442349<A u 4 , A u 4 >_{-1}^0.5 =  5.762952669913154e-15
Newton iteration   0 , energy = 8.697452314642778<A u 0 , A u 0 >_{-1}^0.5 =  0.007028201640633323
Newton iteration   1 , energy = 8.697428946068124<A u 1 , A u 1 >_{-1}^0.5 =  0.0012653590359518866
Newton iteration   2 , energy = 8.697428144527672<A u 2 , A u 2 >_{-1}^0.5 =  1.4879804152253234e-05
Newton iteration   3 , energy = 8.69742814441696<A u 3 , A u 3 >_{-1}^0.5 =  1.0529580888130115e-08
Newton iteration   4 , energy = 8.69742814441696

<A u 4 , A u 4 >_{-1}^0.5 =  5.881360084351586e-15
Newton iteration   0 , energy = 8.694078026825627<A u 0 , A u 0 >_{-1}^0.5 =  0.006804927088291549
Newton iteration   1 , energy = 8.694055986926072<A u 1 , A u 1 >_{-1}^0.5 =  0.0011267276152112755
Newton iteration   2 , energy = 8.694055351408604<A u 2 , A u 2 >_{-1}^0.5 =  1.2114152752200682e-05
Newton iteration   3 , energy = 8.694055351335216<A u 3 , A u 3 >_{-1}^0.5 =  6.793995780457338e-09
Newton iteration   4 , energy = 8.694055351335217<A u 4 , A u 4 >_{-1}^0.5 =  6.5773071790719155e-15
Newton iteration   0 , energy = 8.690660349348773<A u 0 , A u 0 >_{-1}^0.5 =  0.006595981549690931
Newton iteration   1 , energy = 8.690639537145778<A u 1 , A u 1 >_{-1}^0.5 =  0.0010064928158468286
Newton iteration   2 , energy = 8.690639030038431<A u 2 , A u 2 >_{-1}^0.5 =  9.891019783227945e-06
Newton iteration   3 , energy = 8.690639029989512<A u 3 , A u 3 >_{-1}^0.5 =  4.4115817857073e-09
Newton iteration   4 , energy = 8.690639029989516

<A u 4 , A u 4 >_{-1}^0.5 =  6.566983421633295e-15
Newton iteration   0 , energy = 8.687201813264277<A u 0 , A u 0 >_{-1}^0.5 =  0.006400204543776223
Newton iteration   1 , energy = 8.687182134310188<A u 1 , A u 1 >_{-1}^0.5 =  0.0009018825357210975
Newton iteration   2 , energy = 8.687181727149987<A u 2 , A u 2 >_{-1}^0.5 =  8.100699070607634e-06
Newton iteration   3 , energy = 8.687181727117176<A u 3 , A u 3 >_{-1}^0.5 =  2.883734560181933e-09
Newton iteration   4 , energy = 8.687181727117178<A u 4 , A u 4 >_{-1}^0.5 =  6.904091184193927e-15
Newton iteration   0 , energy = 8.683704724240474<A u 0 , A u 0 >_{-1}^0.5 =  0.006216538114590388
Newton iteration   1 , energy = 8.683686090980025<A u 1 , A u 1 >_{-1}^0.5 =  0.0008105839742605476
Newton iteration   2 , energy = 8.683685762093026<A u 2 , A u 2 >_{-1}^0.5 =  6.655687929102021e-06
Newton iteration   3 , energy = 8.683685762070878<A u 3 , A u 3 >_{-1}^0.5 =  1.897995967256539e-09
Newton iteration   4 , energy = 8.683685762070883<A u 4 , A u 4 >_{-1}^0.5 =  6.7585741211718006e-15
Newton iteration   0 , energy = 8.680171187324692<A u 0 , A u 0 >_{-1}^0.5 =  0.006044018904348124
Newton iteration   1 , energy = 8.68015351908606<A u 1 , A u 1 >_{-1}^0.5 =  0.0007306621249545495
Newton iteration   2 , energy = 8.680153251866574<A u 2 , A u 2 >_{-1}^0.5 =  5.486403508580406e-06
Newton iteration   3 , energy = 8.680153251851522<A u 3 , A u 3 >_{-1}^0.5 =  1.2579455539104538e-09
Newton iteration   4 , energy = 8.680153251851527

<A u 4 , A u 4 >_{-1}^0.5 =  6.693509399780492e-15
Newton iteration   0 , energy = 8.676603128596561<A u 0 , A u 0 >_{-1}^0.5 =  0.0058817702080458684
Newton iteration   1 , energy = 8.676586351357642<A u 1 , A u 1 >_{-1}^0.5 =  0.0006604933213215017
Newton iteration   2 , energy = 8.676586133006545<A u 2 , A u 2 >_{-1}^0.5 =  4.537600466115332e-06
Newton iteration   3 , energy = 8.67658613299625<A u 3 , A u 3 >_{-1}^0.5 =  8.395967111748482e-10
Newton iteration   4 , energy = 8.676586132996258<A u 4 , A u 4 >_{-1}^0.5 =  6.189035703294858e-15
Newton iteration   0 , energy = 8.673002314134985<A u 0 , A u 0 >_{-1}^0.5 =  0.005728994291723082
Newton iteration   1 , energy = 8.672986360161195<A u 1 , A u 1 >_{-1}^0.5 =  0.0005987110554470173
Newton iteration   2 , energy = 8.67298618075548<A u 2 , A u 2 >_{-1}^0.5 =  3.7654374575899837e-06
Newton iteration   3 , energy = 8.672986180748392<A u 3 , A u 3 >_{-1}^0.5 =  5.64305568885755e-10
Newton iteration   4 , energy = 8.67298618074839

<A u 4 , A u 4 >_{-1}^0.5 =  5.834852842993401e-15
Newton iteration   0 , energy = 8.66937036666302<A u 0 , A u 0 >_{-1}^0.5 =  0.005584965136925089
Newton iteration   1 , energy = 8.669355174079497<A u 1 , A u 1 >_{-1}^0.5 =  0.0005441617646336972
Newton iteration   2 , energy = 8.669355025882016<A u 2 , A u 2 >_{-1}^0.5 =  3.1351095577952056e-06
Newton iteration   3 , energy = 8.669355025877104<A u 3 , A u 3 >_{-1}^0.5 =  3.81917609928787e-10
Newton iteration   4 , energy = 8.669355025877106<A u 4 , A u 4 >_{-1}^0.5 =  5.95781335973622e-15
Newton iteration   0 , energy = 8.66570878018354<A u 0 , A u 0 >_{-1}^0.5 =  0.0054490216950698195
Newton iteration   1 , energy = 8.665694292522272<A u 1 , A u 1 >_{-1}^0.5 =  0.0004958686989296843
Newton iteration   2 , energy = 8.665694169466711<A u 2 , A u 2 >_{-1}^0.5 =  2.618956534447179e-06
Newton iteration   3 , energy = 8.665694169463281<A u 3 , A u 3 >_{-1}^0.5 =  2.602517019887504e-10
Newton iteration   4 , energy = 8.665694169463281<A u 4 , A u 4 >_{-1}^0.5 =  5.869094376014445e-15
Newton iteration   0 , energy = 8.662018932874165<A u 0 , A u 0 >_{-1}^0.5 =  0.005320561684530227
Newton iteration   1 , energy = 8.66200509862148<A u 1 , A u 1 >_{-1}^0.5 =  0.00045300233578907004
Newton iteration   2 , energy = 8.662004995925834<A u 2 , A u 2 >_{-1}^0.5 =  2.1949616559010818e-06
Newton iteration   3 , energy = 8.662004995923427<A u 3 , A u 3 >_{-1}^0.5 =  1.7854290869445998e-10
Newton iteration   4 , energy = 8.662004995923432

<A u 4 , A u 4 >_{-1}^0.5 =  7.120871444963219e-15
Newton iteration   0 , energy = 8.658302098471687<A u 0 , A u 0 >_{-1}^0.5 =  0.005199035931026924
Newton iteration   1 , energy = 8.65828887063169<A u 1 , A u 1 >_{-1}^0.5 =  0.00041485610104101585
Newton iteration   2 , energy = 8.658288784506611<A u 2 , A u 2 >_{-1}^0.5 =  1.8455657839759463e-06
Newton iteration   3 , energy = 8.658288784504908<A u 3 , A u 3 >_{-1}^0.5 =  1.2329723292714258e-10
Newton iteration   4 , energy = 8.658288784504911<A u 4 , A u 4 >_{-1}^0.5 =  6.2692194257186395e-15
Newton iteration   0 , energy = 8.654559456343966<A u 0 , A u 0 >_{-1}^0.5 =  0.005083943232355289
Newton iteration   1 , energy = 8.654546792026595<A u 1 , A u 1 >_{-1}^0.5 =  0.00038082639515889195
Newton iteration   2 , energy = 8.654546719454009<A u 2 , A u 2 >_{-1}^0.5 =  1.556733127518787e-06
Newton iteration   3 , energy = 8.654546719452792<A u 3 , A u 3 >_{-1}^0.5 =  8.569813019240259e-11
Newton iteration   4 , energy = 8.654546719452792

<A u 4 , A u 4 >_{-1}^0.5 =  6.079727398907768e-15
Newton iteration   0 , energy = 8.650792100418663<A u 0 , A u 0 >_{-1}^0.5 =  0.004974825717199498
Newton iteration   1 , energy = 8.650779960457045<A u 1 , A u 1 >_{-1}^0.5 =  0.00035039611808679143
Newton iteration   2 , energy = 8.650779899021252<A u 2 , A u 2 >_{-1}^0.5 =  1.3172163047023878e-06
Newton iteration   3 , energy = 8.650779899020382<A u 3 , A u 3 >_{-1}^0.5 =  5.994134240831229e-11
Newton iteration   4 , energy = 8.650779899020383<A u 4 , A u 4 >_{-1}^0.5 =  7.057680503293462e-15
Newton iteration   0 , energy = 8.647001047115234<A u 0 , A u 0 >_{-1}^0.5 =  0.004871264662011438
Newton iteration   1 , energy = 8.64698939571383<A u 1 , A u 1 >_{-1}^0.5 =  0.00032312104255158
Newton iteration   2 , energy = 8.646989343472027<A u 2 , A u 2 >_{-1}^0.5 =  1.1179784450513302e-06
Newton iteration   3 , energy = 8.646989343471402<A u 3 , A u 3 >_{-1}^0.5 =  4.218525581248459e-11
Newton iteration   4 , energy = 8.646989343471414<A u 4 , A u 4 >_{-1}^0.5 =  7.271907342640097e-15
Newton iteration   0 , energy = 8.64318724240554<A u 0 , A u 0 >_{-1}^0.5 =  0.0047728767278151845
Newton iteration   1 , energy = 8.643176046819182<A u 1 , A u 1 >_{-1}^0.5 =  0.00029861851175516944
Newton iteration   2 , energy = 8.643176002201567<A u 2 , A u 2 >_{-1}^0.5 =  9.517386108129345e-07
Newton iteration   3 , energy = 8.643176002201107<A u 3 , A u 3 >_{-1}^0.5 =  2.986719911467217e-11
Newton iteration   4 , energy = 8.643176002201114

<A u 4 , A u 4 >_{-1}^0.5 =  7.448999440741552e-15
Newton iteration   0 , energy = 8.639351568111463<A u 0 , A u 0 >_{-1}^0.5 =  0.004679310578839456
Newton iteration   1 , energy = 8.639340798354077<A u 1 , A u 1 >_{-1}^0.5 =  0.00027655803838831075
Newton iteration   2 , energy = 8.639340760086464<A u 2 , A u 2 >_{-1}^0.5 =  8.126138816442001e-07
Newton iteration   3 , energy = 8.63934076008614<A u 3 , A u 3 >_{-1}^0.5 =  2.1269170173389516e-11
Newton iteration   4 , energy = 8.639340760086133<A u 4 , A u 4 >_{-1}^0.5 =  8.027639747305285e-15
Newton iteration   0 , energy = 8.635494847533248<A u 0 , A u 0 >_{-1}^0.5 =  0.004590243846233578
Newton iteration   1 , energy = 8.635484476114465<A u 1 , A u 1 >_{-1}^0.5 =  0.0002566534627508924
Newton iteration   2 , energy =  8.6354844431581<A u 2 , A u 2 >_{-1}^0.5 =  6.95837133430353e-07
Newton iteration   3 , energy = 8.635484443157859<A u 3 , A u 3 >_{-1}^0.5 =  1.5233761746238206e-11
Newton iteration   4 , energy = 8.635484443157866

<A u 4 , A u 4 >_{-1}^0.5 =  7.314110787454668e-15
Newton iteration   0 , energy = 8.63161785048923<A u 0 , A u 0 >_{-1}^0.5 =  0.004505380402446769
Newton iteration   1 , energy = 8.631607852176991<A u 1 , A u 1 >_{-1}^0.5 =  0.00023865639288823666
Newton iteration   2 , energy = 8.631607823681376<A u 2 , A u 2 >_{-1}^0.5 =  5.97534118301659e-07
Newton iteration   3 , energy = 8.631607823681195<A u 3 , A u 3 >_{-1}^0.5 =  1.0970788937928932e-11
Newton iteration   4 , energy = 8.631607823681193<A u 4 , A u 4 >_{-1}^0.5 =  7.171259772050678e-15
Newton iteration   0 , energy = 8.627721297837354<A u 0 , A u 0 >_{-1}^0.5 =  0.004424447914367267
Newton iteration   1 , energy = 8.62771164944414<A u 1 , A u 1 >_{-1}^0.5 =  0.0002223507016405929
Newton iteration   2 , energy = 8.627711624710026<A u 2 , A u 2 >_{-1}^0.5 =  5.14547004689195e-07
Newton iteration   3 , energy = 8.627711624709894<A u 3 , A u 3 >_{-1}^0.5 =  7.9455368027107e-12
Newton iteration   4 , energy = 8.627711624709892<A u 4 , A u 4 >_{-1}^0.5 =  6.742348281796715e-15
Newton iteration   0 , energy = 8.623805865539138<A u 0 , A u 0 >_{-1}^0.5 =  0.004347195646103198
Newton iteration   1 , energy = 8.623796545729816<A u 1 , A u 1 >_{-1}^0.5 =  0.00020754789747575217
Newton iteration   2 , energy = 8.623796524179978<A u 2 , A u 2 >_{-1}^0.5 =  4.442943918009859e-07
Newton iteration   3 , energy = 8.623796524179875<A u 3 , A u 3 >_{-1}^0.5 =  5.783624432079834e-12
Newton iteration   4 , energy = 8.623796524179879

<A u 4 , A u 4 >_{-1}^0.5 =  7.837848613934514e-15
Newton iteration   0 , energy = 8.61987218831917<A u 0 , A u 0 >_{-1}^0.5 =  0.00427339248498087
Newton iteration   1 , energy = 8.619863177438324<A u 1 , A u 1 >_{-1}^0.5 =  0.00019408321964668057
Newton iteration   2 , energy = 8.619863158594383<A u 2 , A u 2 >_{-1}^0.5 =  3.84659970729582e-07
Newton iteration   3 , energy =  8.6198631585943<A u 3 , A u 3 >_{-1}^0.5 =  4.231644513498914e-12
Newton iteration   4 , energy = 8.619863158594308<A u 4 , A u 4 >_{-1}^0.5 =  7.510917504451383e-15
Newton iteration   0 , energy = 8.615920862966213<A u 0 , A u 0 >_{-1}^0.5 =  0.004202825166971661
Newton iteration   1 , energy = 8.615912142883039<A u 1 , A u 1 >_{-1}^0.5 =  0.00018181233546171502
Newton iteration   2 , energy = 8.615912126346995<A u 2 , A u 2 >_{-1}^0.5 =  3.3390375906307317e-07
Newton iteration   3 , energy = 8.61591212634694<A u 3 , A u 3 >_{-1}^0.5 =  3.1108437519390033e-12
Newton iteration   4 , energy = 8.615912126346938

<A u 4 , A u 4 >_{-1}^0.5 =  7.654744435859083e-15
Newton iteration   0 , energy = 8.61195245131622<A u 0 , A u 0 >_{-1}^0.5 =  0.00413529668024064
Newton iteration   1 , energy = 8.611944005285135<A u 1 , A u 1 >_{-1}^0.5 =  0.0001706085394396096
Newton iteration   2 , energy = 8.61194399072465<A u 2 , A u 2 >_{-1}^0.5 =  2.905911350704029e-07
Newton iteration   3 , energy = 8.611943990724614<A u 3 , A u 3 >_{-1}^0.5 =  2.2987091937875516e-12
Newton iteration   4 , energy = 8.611943990724608<A u 4 , A u 4 >_{-1}^0.5 =  7.0863071625207114e-15
Newton iteration   0 , energy = 8.607967482952523<A u 0 , A u 0 >_{-1}^0.5 =  0.0040706248276995045
Newton iteration   1 , energy = 8.607959295487928<A u 1 , A u 1 >_{-1}^0.5 =  0.0001603603719274096
Newton iteration   2 , energy = 8.607959282624453<A u 2 , A u 2 >_{-1}^0.5 =  2.535359537934679e-07
Newton iteration   3 , energy = 8.607959282624426<A u 3 , A u 3 >_{-1}^0.5 =  1.7061241447746966e-12
Newton iteration   4 , energy = 8.607959282624417<A u 4 , A u 4 >_{-1}^0.5 =  8.149856564324238e-15
Newton iteration   0 , energy = 8.60396645765398<A u 0 , A u 0 >_{-1}^0.5 =  0.004008640931590341
Newton iteration   1 , energy = 8.60395851441762<A u 1 , A u 1 >_{-1}^0.5 =  0.0001509695892238384
Newton iteration   2 , energy = 8.603958503016859<A u 2 , A u 2 >_{-1}^0.5 =  2.2175482852948874e-07
Newton iteration   3 , energy = 8.603958503016834<A u 3 , A u 3 >_{-1}^0.5 =  1.273542983819777e-12
Newton iteration   4 , energy = 8.60395850301684

<A u 4 , A u 4 >_{-1}^0.5 =  8.027750920905498e-15
Newton iteration   0 , energy = 8.599949847618308<A u 0 , A u 0 >_{-1}^0.5 =  0.003949188664926119
Newton iteration   1 , energy = 8.599942135317924<A u 1 , A u 1 >_{-1}^0.5 =  0.0001423494290902818
Newton iteration   2 , energy = 8.59994212518214<A u 2 , A u 2 >_{-1}^0.5 =  1.94430277868304e-07
Newton iteration   3 , energy = 8.59994212518212<A u 3 , A u 3 >_{-1}^0.5 =  9.540149845734212e-13
Newton iteration   4 , energy = 8.599942125182121<A u 4 , A u 4 >_{-1}^0.5 =  7.468941967667977e-15

[13]:

Draw(gfu_l,mesh, interpolate_multidim=True, animate=True,
deformation=True, min=0, max=1, autoscale=False)

[13]:

BaseWebGuiScene


## Supplementary 1: Allen-Cahn equation¶

The Allen-Cahn equations describe the process of phase separation and is the ($$L^2$$) gradient-flow equation to the energy

$E(v) = \int_{\Omega} \varepsilon \vert \nabla v \vert^2~+~ \underbrace{v^2(1-v^2)}_{\Psi(v)} ~ dx$

where $$\Psi(v)$$ is the so-called double-well potential with the minima $$-1,0,1$$ (with $$0$$ being an unstable minima).

The solution to the Allen-Cahn equation solves

$\partial_t u = \frac{\delta E}{\delta u}$

The quantity $$u$$ is an indicator for a phase where $$-1$$ refers to one phase and $$1$$ to another phase.

The equation has two driving forces:

• $$u$$ is pulled into one of the two stable minima states ($$-1$$ and $$1$$) of the nonlinear term $$u^2(1-u^2)$$ (separation of the phases)

• the diffusion term scaled with $$\varepsilon$$ enforces a smooth transition between the two phases. $$\varepsilon$$ determines the size of the transition layer

We use the Energy formulation for energy minimization combined with a simple time stepping with an implicit Euler discretization:

$M u^{n+1} - M u^n = \Delta t \underbrace{\frac{\delta E}{\delta u}}_{=:A(u)} (u^{n+1})$

which we can interprete as a nonlinear minimization problem again with the energy

$E^{IE}(v) = \int_{\Omega} \frac{\varepsilon}{2} \vert \nabla v \vert^2~+~v^2(1-v^2) + \frac{1}{2\Delta t} \vert v - u^n \vert^2 ~ dx$

To solve the nonlinear equation at every time step we again rely on Newton’s method. We first define the periodic geometry, setup the formulation and then apply Newton’s method in the next cells:

[14]:

# define periodic geometry and generate mesh
shape = Rectangle(1,1).Face()
right=shape.edges.Max(X)
right.name="right"
shape.edges.Min(X).Identify(right,name="left")
top=shape.edges.Max(Y)
top.name="top"
shape.edges.Min(Y).Identify(top,name="bottom")
geom = OCCGeometry(shape, dim=2)
mesh = Mesh(geom.GenerateMesh(maxh=0.1))

[15]:

#use a periodic fe space correspondingly
V = Periodic(H1(mesh, order=3))
u = V.TrialFunction()

eps = 4e-3
dt = Parameter(1e-1)
gfu = GridFunction(V)
gfuold = GridFunction(V)
a = BilinearForm (V, symmetric=False)
+ 0.5/dt*(u-gfuold)*(u-gfuold)) * dx)

[16]:

from math import pi
gfu = GridFunction(V)
#gfu.Set(sin(2*pi*x)) # regular initial values
gfu.Set(sin(1e7*(x+y*y))) #<- essentially a random function
gfu_t = GridFunction(V, multidim=0)

[17]:

t = 0; tend = 5; cnt = 0; sample_rate = int(floor(0.5/dt.Get()))
while t < tend - 0.5 * dt.Get():
gfuold.vec.data = gfu.vec
SolveNonlinearMinProblem(a,gfu)
if (cnt+1) % sample_rate == 0:
t += dt.Get(); cnt += 1
print("t = ", t)

Newton iteration   0 , energy = 11.491890887887099<A u 0 , A u 0 >_{-1}^0.5 =  3.9555214718583307
Newton iteration   1 , energy = 3.1288443768344183<A u 1 , A u 1 >_{-1}^0.5 =  0.617589466234008
Newton iteration   2 , energy = 2.929547543125832<A u 2 , A u 2 >_{-1}^0.5 =  0.054026199167799244
Newton iteration   3 , energy = 2.928071948387486<A u 3 , A u 3 >_{-1}^0.5 =  0.001056189064023409
Newton iteration   4 , energy = 2.928071390329594<A u 4 , A u 4 >_{-1}^0.5 =  9.411807306645738e-07
Newton iteration   5 , energy = 2.928071390329154<A u 5 , A u 5 >_{-1}^0.5 =  1.2784588316700495e-12
Newton iteration   6 , energy = 2.928071390329153<A u 6 , A u 6 >_{-1}^0.5 =  3.2726869893109607e-16
t =  0.1
Newton iteration   0 , energy = 1.5236905377731316<A u 0 , A u 0 >_{-1}^0.5 =  0.8318868318359606
Newton iteration   1 , energy = 1.1702598099036825

<A u 1 , A u 1 >_{-1}^0.5 =  0.04424398436916609
Newton iteration   2 , energy = 1.1692762199894422<A u 2 , A u 2 >_{-1}^0.5 =  0.000382607324885163
Newton iteration   3 , energy = 1.1692761467874708<A u 3 , A u 3 >_{-1}^0.5 =  7.201124500118737e-08
Newton iteration   4 , energy = 1.1692761467874684<A u 4 , A u 4 >_{-1}^0.5 =  5.1135119131793234e-15
t =  0.2
Newton iteration   0 , energy = 1.0430761177262586<A u 0 , A u 0 >_{-1}^0.5 =  0.349491908073184
Newton iteration   1 , energy = 0.9818639339750148<A u 1 , A u 1 >_{-1}^0.5 =  0.00953083315008756
Newton iteration   2 , energy = 0.9818184573461862<A u 2 , A u 2 >_{-1}^0.5 =  2.1132398353461298e-05
Newton iteration   3 , energy = 0.9818184571228957<A u 3 , A u 3 >_{-1}^0.5 =  2.0495761174251036e-10
Newton iteration   4 , energy = 0.981818457122895<A u 4 , A u 4 >_{-1}^0.5 =  1.568224301259793e-16
t =  0.30000000000000004
Newton iteration   0 , energy = 0.9428350592928819

<A u 0 , A u 0 >_{-1}^0.5 =  0.2511669817658177
Newton iteration   1 , energy = 0.9117910047734952<A u 1 , A u 1 >_{-1}^0.5 =  0.009489817064654097
Newton iteration   2 , energy = 0.9117458808599814<A u 2 , A u 2 >_{-1}^0.5 =  3.286105561097373e-05
Newton iteration   3 , energy = 0.9117458803200503<A u 3 , A u 3 >_{-1}^0.5 =  6.108346729281577e-10
Newton iteration   4 , energy = 0.9117458803200507<A u 4 , A u 4 >_{-1}^0.5 =  1.4701277672541557e-16
t =  0.4
Newton iteration   0 , energy = 0.8825485359273036<A u 0 , A u 0 >_{-1}^0.5 =  0.24549499153930232
Newton iteration   1 , energy = 0.8533887944563312<A u 1 , A u 1 >_{-1}^0.5 =  0.013814916788098442
Newton iteration   2 , energy = 0.8532930045689965<A u 2 , A u 2 >_{-1}^0.5 =  8.495130173586184e-05
Newton iteration   3 , energy = 0.8532930009605082<A u 3 , A u 3 >_{-1}^0.5 =  4.812207613258164e-09
Newton iteration   4 , energy = 0.8532930009605088

<A u 4 , A u 4 >_{-1}^0.5 =  1.6126931510607207e-16
t =  0.5
Newton iteration   0 , energy = 0.822859424457485<A u 0 , A u 0 >_{-1}^0.5 =  0.25288444858868686
Newton iteration   1 , energy = 0.7922606907464347<A u 1 , A u 1 >_{-1}^0.5 =  0.017310084961438738
Newton iteration   2 , energy = 0.7921101612911245<A u 2 , A u 2 >_{-1}^0.5 =  0.00013082310935335457
Newton iteration   3 , energy = 0.7921101527333604<A u 3 , A u 3 >_{-1}^0.5 =  1.0114306944424334e-08
Newton iteration   4 , energy = 0.7921101527333603<A u 4 , A u 4 >_{-1}^0.5 =  1.881798527436377e-16
t =  0.6
Newton iteration   0 , energy = 0.7612937137396455<A u 0 , A u 0 >_{-1}^0.5 =  0.24667484887448524
Newton iteration   1 , energy = 0.7322260613743791<A u 1 , A u 1 >_{-1}^0.5 =  0.01731182435727959
Newton iteration   2 , energy = 0.7320754474308212<A u 2 , A u 2 >_{-1}^0.5 =  0.0001458528315026924
Newton iteration   3 , energy = 0.7320754367935242<A u 3 , A u 3 >_{-1}^0.5 =  1.711610446667943e-08
Newton iteration   4 , energy = 0.7320754367935237<A u 4 , A u 4 >_{-1}^0.5 =  4.0140392232088174e-16
t =  0.7
Newton iteration   0 , energy = 0.7047466329381263

<A u 0 , A u 0 >_{-1}^0.5 =  0.224816531741391
Newton iteration   1 , energy = 0.68042289030315<A u 1 , A u 1 >_{-1}^0.5 =  0.013257868633850218
Newton iteration   2 , energy = 0.6803347052576816<A u 2 , A u 2 >_{-1}^0.5 =  7.356730490846073e-05
Newton iteration   3 , energy = 0.6803347025515281<A u 3 , A u 3 >_{-1}^0.5 =  3.461746172213633e-09
Newton iteration   4 , energy = 0.6803347025515281<A u 4 , A u 4 >_{-1}^0.5 =  2.0649088284078278e-16
t =  0.7999999999999999
Newton iteration   0 , energy = 0.6585292681349105<A u 0 , A u 0 >_{-1}^0.5 =  0.19784418981960603
Newton iteration   1 , energy = 0.6395570798159652<A u 1 , A u 1 >_{-1}^0.5 =  0.009721207698186215
Newton iteration   2 , energy = 0.6395097090815723<A u 2 , A u 2 >_{-1}^0.5 =  4.1540147902205815e-05
Newton iteration   3 , energy = 0.639509708218762<A u 3 , A u 3 >_{-1}^0.5 =  1.494163161464235e-09
Newton iteration   4 , energy = 0.6395097082187616<A u 4 , A u 4 >_{-1}^0.5 =  2.1299873554895631e-16
t =  0.8999999999999999
Newton iteration   0 , energy = 0.6226726033001583<A u 0 , A u 0 >_{-1}^0.5 =  0.17418883106530447
Newton iteration   1 , energy = 0.6079024092166269<A u 1 , A u 1 >_{-1}^0.5 =  0.007822252947133058
Newton iteration   2 , energy = 0.607871733714799

<A u 2 , A u 2 >_{-1}^0.5 =  3.716128865528011e-05
Newton iteration   3 , energy = 0.6078717330242976<A u 3 , A u 3 >_{-1}^0.5 =  1.74068890441231e-09
Newton iteration   4 , energy = 0.6078717330242978<A u 4 , A u 4 >_{-1}^0.5 =  2.340015898828096e-16
t =  0.9999999999999999
Newton iteration   0 , energy = 0.594546321610656<A u 0 , A u 0 >_{-1}^0.5 =  0.15684859627426093
Newton iteration   1 , energy = 0.5825305547887867<A u 1 , A u 1 >_{-1}^0.5 =  0.006507024407807038
Newton iteration   2 , energy = 0.5825093366653236<A u 2 , A u 2 >_{-1}^0.5 =  2.4904052512634778e-05
Newton iteration   3 , energy = 0.5825093363552127<A u 3 , A u 3 >_{-1}^0.5 =  6.426604241266484e-10
Newton iteration   4 , energy = 0.582509336355213<A u 4 , A u 4 >_{-1}^0.5 =  2.1961786982806853e-16
t =  1.0999999999999999
Newton iteration   0 , energy = 0.5713178189707434<A u 0 , A u 0 >_{-1}^0.5 =  0.14629439525468765
Newton iteration   1 , energy = 0.5608418685267202<A u 1 , A u 1 >_{-1}^0.5 =  0.005730862470527143
Newton iteration   2 , energy = 0.5608254135378812<A u 2 , A u 2 >_{-1}^0.5 =  1.9794291918248147e-05
Newton iteration   3 , energy = 0.5608254133419721<A u 3 , A u 3 >_{-1}^0.5 =  3.9207620869479045e-10
Newton iteration   4 , energy = 0.5608254133419724

<A u 4 , A u 4 >_{-1}^0.5 =  2.479705412608197e-16
t =  1.2
Newton iteration   0 , energy = 0.5507023753070027<A u 0 , A u 0 >_{-1}^0.5 =  0.14155223075050297
Newton iteration   1 , energy = 0.5408972396764403<A u 1 , A u 1 >_{-1}^0.5 =  0.005509950518164664
Newton iteration   2 , energy = 0.5408820299759135<A u 2 , A u 2 >_{-1}^0.5 =  1.831000280793815e-05
Newton iteration   3 , energy = 0.5408820298082834<A u 3 , A u 3 >_{-1}^0.5 =  3.6622220266822196e-10
Newton iteration   4 , energy = 0.5408820298082831<A u 4 , A u 4 >_{-1}^0.5 =  2.382898812602617e-16
t =  1.3
Newton iteration   0 , energy = 0.5311472234181713<A u 0 , A u 0 >_{-1}^0.5 =  0.14002776268417838
Newton iteration   1 , energy = 0.5215922942655572<A u 1 , A u 1 >_{-1}^0.5 =  0.006457701161293983
Newton iteration   2 , energy = 0.521571384451794<A u 2 , A u 2 >_{-1}^0.5 =  3.0040755000402455e-05
Newton iteration   3 , energy = 0.5215713840005611<A u 3 , A u 3 >_{-1}^0.5 =  9.599496977323723e-10
Newton iteration   4 , energy = 0.5215713840005612<A u 4 , A u 4 >_{-1}^0.5 =  2.5034801456724435e-16
t =  1.4000000000000001
Newton iteration   0 , energy = 0.5120740872850119<A u 0 , A u 0 >_{-1}^0.5 =  0.13743302627247042
Newton iteration   1 , energy = 0.5028965182973574

<A u 1 , A u 1 >_{-1}^0.5 =  0.007263027133069867
Newton iteration   2 , energy = 0.5028700345755763<A u 2 , A u 2 >_{-1}^0.5 =  4.9544009978314025e-05
Newton iteration   3 , energy = 0.5028700333482182<A u 3 , A u 3 >_{-1}^0.5 =  3.3169096276559485e-09
Newton iteration   4 , energy = 0.5028700333482179<A u 4 , A u 4 >_{-1}^0.5 =  2.503586569109002e-16
t =  1.5000000000000002
Newton iteration   0 , energy = 0.4939431797362317<A u 0 , A u 0 >_{-1}^0.5 =  0.13159781769317344
Newton iteration   1 , energy = 0.48549469220581076<A u 1 , A u 1 >_{-1}^0.5 =  0.006249462490523484
Newton iteration   2 , energy = 0.48547510368284996<A u 2 , A u 2 >_{-1}^0.5 =  3.2593918341691636e-05
Newton iteration   3 , energy = 0.4854751031516538<A u 3 , A u 3 >_{-1}^0.5 =  1.332574778859733e-09
Newton iteration   4 , energy = 0.4854751031516537<A u 4 , A u 4 >_{-1}^0.5 =  2.342907300004739e-16
t =  1.6000000000000003
Newton iteration   0 , energy = 0.47738610607330717<A u 0 , A u 0 >_{-1}^0.5 =  0.12485338850377642
Newton iteration   1 , energy = 0.4697329839553955<A u 1 , A u 1 >_{-1}^0.5 =  0.004787042888467244
Newton iteration   2 , energy = 0.46972150685086983<A u 2 , A u 2 >_{-1}^0.5 =  1.3508676195793117e-05
Newton iteration   3 , energy = 0.469721506759627

<A u 3 , A u 3 >_{-1}^0.5 =  1.7903781252022858e-10
Newton iteration   4 , energy = 0.4697215067596269<A u 4 , A u 4 >_{-1}^0.5 =  2.700895060175196e-16
t =  1.7000000000000004
Newton iteration   0 , energy = 0.4623430703435351<A u 0 , A u 0 >_{-1}^0.5 =  0.12011070915484146
Newton iteration   1 , energy = 0.45522806769704527<A u 1 , A u 1 >_{-1}^0.5 =  0.004023545789483371
Newton iteration   2 , energy = 0.4552199646563577<A u 2 , A u 2 >_{-1}^0.5 =  6.97033704944967e-06
Newton iteration   3 , energy = 0.45521996463206493<A u 3 , A u 3 >_{-1}^0.5 =  3.496055274720365e-11
Newton iteration   4 , energy = 0.45521996463206477<A u 4 , A u 4 >_{-1}^0.5 =  2.5800877085509983e-16
t =  1.8000000000000005
Newton iteration   0 , energy = 0.4482133032412433<A u 0 , A u 0 >_{-1}^0.5 =  0.11837151498432974
Newton iteration   1 , energy = 0.4412851002448923<A u 1 , A u 1 >_{-1}^0.5 =  0.003931203756522822
Newton iteration   2 , energy = 0.4412773653620619<A u 2 , A u 2 >_{-1}^0.5 =  6.354965352653142e-06
Newton iteration   3 , energy = 0.44127736534186973<A u 3 , A u 3 >_{-1}^0.5 =  2.438870609230378e-11
Newton iteration   4 , energy = 0.4412773653418694<A u 4 , A u 4 >_{-1}^0.5 =  2.5879116154042885e-16
t =  1.9000000000000006

Newton iteration   0 , energy = 0.4342879754653371<A u 0 , A u 0 >_{-1}^0.5 =  0.11961046028277654
Newton iteration   1 , energy = 0.4272065529611257<A u 1 , A u 1 >_{-1}^0.5 =  0.004288220618686489
Newton iteration   2 , energy = 0.4271973479272149<A u 2 , A u 2 >_{-1}^0.5 =  8.023297146664251e-06
Newton iteration   3 , energy = 0.4271973478950282<A u 3 , A u 3 >_{-1}^0.5 =  4.1283384299216076e-11
Newton iteration   4 , energy = 0.4271973478950282<A u 4 , A u 4 >_{-1}^0.5 =  2.557068501676467e-16
t =  2.0000000000000004
Newton iteration   0 , energy = 0.41988202167909827<A u 0 , A u 0 >_{-1}^0.5 =  0.12377863727587259
Newton iteration   1 , energy = 0.412312311160806<A u 1 , A u 1 >_{-1}^0.5 =  0.00494556212158324
Newton iteration   2 , energy = 0.4123000657563023<A u 2 , A u 2 >_{-1}^0.5 =  1.064132024906768e-05
Newton iteration   3 , energy = 0.41230006569968297<A u 3 , A u 3 >_{-1}^0.5 =  7.750596116624397e-11
Newton iteration   4 , energy = 0.4123000656996828<A u 4 , A u 4 >_{-1}^0.5 =  2.624973449937927e-16
t =  2.1000000000000005
Newton iteration   0 , energy = 0.40433469742260103<A u 0 , A u 0 >_{-1}^0.5 =  0.12997807125741387
Newton iteration   1 , energy = 0.39608012261339415

<A u 1 , A u 1 >_{-1}^0.5 =  0.006345667093671249
Newton iteration   2 , energy = 0.39605992899842507<A u 2 , A u 2 >_{-1}^0.5 =  2.9992126144211277e-05
Newton iteration   3 , energy = 0.3960599285486537<A u 3 , A u 3 >_{-1}^0.5 =  7.81286779863766e-10
Newton iteration   4 , energy = 0.3960599285486535<A u 4 , A u 4 >_{-1}^0.5 =  2.513327985210632e-16
t =  2.2000000000000006
Newton iteration   0 , energy = 0.38749679347636506<A u 0 , A u 0 >_{-1}^0.5 =  0.13219513012376718
Newton iteration   1 , energy = 0.37915742930315394<A u 1 , A u 1 >_{-1}^0.5 =  0.010458727703747972
Newton iteration   2 , energy = 0.37910232684035067<A u 2 , A u 2 >_{-1}^0.5 =  0.00012169623563905929
Newton iteration   3 , energy = 0.3791023194346424<A u 3 , A u 3 >_{-1}^0.5 =  1.792542077749337e-08
Newton iteration   4 , energy = 0.3791023194346421<A u 4 , A u 4 >_{-1}^0.5 =  4.794352070264674e-16
t =  2.3000000000000007
Newton iteration   0 , energy = 0.3711279786456356<A u 0 , A u 0 >_{-1}^0.5 =  0.12085875685028064
Newton iteration   1 , energy = 0.36417369091644786<A u 1 , A u 1 >_{-1}^0.5 =  0.010188004827912196
Newton iteration   2 , energy = 0.3641213569971834<A u 2 , A u 2 >_{-1}^0.5 =  0.00013388176225337013
Newton iteration   3 , energy = 0.36412134803387564

<A u 3 , A u 3 >_{-1}^0.5 =  2.5861850842274054e-08
Newton iteration   4 , energy = 0.36412134803387536<A u 4 , A u 4 >_{-1}^0.5 =  1.0392392426625511e-15
t =  2.400000000000001
Newton iteration   0 , energy = 0.3581043995013958<A u 0 , A u 0 >_{-1}^0.5 =  0.1010577749882044
Newton iteration   1 , energy = 0.3531329482947072<A u 1 , A u 1 >_{-1}^0.5 =  0.0053840406861597355
Newton iteration   2 , energy = 0.353118396929167<A u 2 , A u 2 >_{-1}^0.5 =  3.417686052276421e-05
Newton iteration   3 , energy = 0.35311839634511916<A u 3 , A u 3 >_{-1}^0.5 =  1.67669398378317e-09
Newton iteration   4 , energy = 0.3531183963451193<A u 4 , A u 4 >_{-1}^0.5 =  2.648461173264612e-16
t =  2.500000000000001
Newton iteration   0 , energy = 0.34890500792712215<A u 0 , A u 0 >_{-1}^0.5 =  0.08560033977139007
Newton iteration   1 , energy = 0.3452834766175034<A u 1 , A u 1 >_{-1}^0.5 =  0.0024709276312231934
Newton iteration   2 , energy = 0.3452804206875387<A u 2 , A u 2 >_{-1}^0.5 =  4.413881171786551e-06
Newton iteration   3 , energy = 0.3452804206777973<A u 3 , A u 3 >_{-1}^0.5 =  2.374666626487907e-11
Newton iteration   4 , energy = 0.3452804206777975<A u 4 , A u 4 >_{-1}^0.5 =  2.602248555179627e-16
t =  2.600000000000001
Newton iteration   0 , energy = 0.34203581164220853

<A u 0 , A u 0 >_{-1}^0.5 =  0.0774859054568568
Newton iteration   1 , energy = 0.339053907155097<A u 1 , A u 1 >_{-1}^0.5 =  0.0017060639412826459
Newton iteration   2 , energy = 0.33905245111230725<A u 2 , A u 2 >_{-1}^0.5 =  1.465926032454383e-06
Newton iteration   3 , energy = 0.3390524511112327<A u 3 , A u 3 >_{-1}^0.5 =  2.305746301319464e-12
Newton iteration   4 , energy = 0.3390524511112328<A u 4 , A u 4 >_{-1}^0.5 =  2.6883777108300525e-16
t =  2.700000000000001
Newton iteration   0 , energy = 0.3362335161487431<A u 0 , A u 0 >_{-1}^0.5 =  0.07364716338871968
Newton iteration   1 , energy = 0.3335367267248001<A u 1 , A u 1 >_{-1}^0.5 =  0.0015551778254830708
Newton iteration   2 , energy = 0.3335355168913364<A u 2 , A u 2 >_{-1}^0.5 =  1.235020713920438e-06
Newton iteration   3 , energy = 0.33353551689057365<A u 3 , A u 3 >_{-1}^0.5 =  1.6845124378294538e-12
Newton iteration   4 , energy = 0.33353551689057365<A u 4 , A u 4 >_{-1}^0.5 =  2.6021430933629563e-16
t =  2.800000000000001
Newton iteration   0 , energy = 0.33092026496720894<A u 0 , A u 0 >_{-1}^0.5 =  0.0714801887963354
Newton iteration   1 , energy = 0.3283789502568887<A u 1 , A u 1 >_{-1}^0.5 =  0.0014798010650238886
Newton iteration   2 , energy = 0.32837785490146404

<A u 2 , A u 2 >_{-1}^0.5 =  1.0585920118008087e-06
Newton iteration   3 , energy = 0.32837785490090365<A u 3 , A u 3 >_{-1}^0.5 =  1.1489140559161613e-12
Newton iteration   4 , energy = 0.32837785490090365<A u 4 , A u 4 >_{-1}^0.5 =  2.5300137731393214e-16
t =  2.9000000000000012
Newton iteration   0 , energy = 0.32589200310392924<A u 0 , A u 0 >_{-1}^0.5 =  0.06984330085441884
Newton iteration   1 , energy = 0.32346529895422405<A u 1 , A u 1 >_{-1}^0.5 =  0.001416817561857269
Newton iteration   2 , energy = 0.3234642948858981<A u 2 , A u 2 >_{-1}^0.5 =  9.206075187088258e-07
Newton iteration   3 , energy = 0.3234642948854744<A u 3 , A u 3 >_{-1}^0.5 =  7.753579178638979e-13
Newton iteration   4 , energy = 0.3234642948854745<A u 4 , A u 4 >_{-1}^0.5 =  2.4869722529393193e-16
t =  3.0000000000000013
Newton iteration   0 , energy = 0.3210859875805414<A u 0 , A u 0 >_{-1}^0.5 =  0.06832772950235567
Newton iteration   1 , energy = 0.31876316342896<A u 1 , A u 1 >_{-1}^0.5 =  0.0013642541364598327
Newton iteration   2 , energy = 0.3187622324985127<A u 2 , A u 2 >_{-1}^0.5 =  8.227319985475943e-07
Newton iteration   3 , energy = 0.318762232498174<A u 3 , A u 3 >_{-1}^0.5 =  5.457675603562877e-13
Newton iteration   4 , energy = 0.31876223249817404

<A u 4 , A u 4 >_{-1}^0.5 =  2.5121894943007606e-16
t =  3.1000000000000014
Newton iteration   0 , energy = 0.3164870121547469<A u 0 , A u 0 >_{-1}^0.5 =  0.06679156854877664
Newton iteration   1 , energy = 0.3142671369458832<A u 1 , A u 1 >_{-1}^0.5 =  0.0013192772813609005
Newton iteration   2 , energy = 0.3142662664002198<A u 2 , A u 2 >_{-1}^0.5 =  7.502267846966156e-07
Newton iteration   3 , energy = 0.3142662663999383<A u 3 , A u 3 >_{-1}^0.5 =  4.0984812312614005e-13
Newton iteration   4 , energy = 0.31426626639993827<A u 4 , A u 4 >_{-1}^0.5 =  2.5841916123990097e-16
t =  3.2000000000000015
Newton iteration   0 , energy = 0.3120949123662973<A u 0 , A u 0 >_{-1}^0.5 =  0.06519851300377273
Newton iteration   1 , energy = 0.3099791806086375<A u 1 , A u 1 >_{-1}^0.5 =  0.001273516686539121
Newton iteration   2 , energy = 0.309978369420863<A u 2 , A u 2 >_{-1}^0.5 =  6.868624409239317e-07
Newton iteration   3 , energy = 0.3099783694206269<A u 3 , A u 3 >_{-1}^0.5 =  3.2336589033908946e-13
Newton iteration   4 , energy = 0.30997836942062706<A u 4 , A u 4 >_{-1}^0.5 =  2.6424124399534467e-16
t =  3.3000000000000016
Newton iteration   0 , energy = 0.3079116566296402<A u 0 , A u 0 >_{-1}^0.5 =  0.06356883470417247
Newton iteration   1 , energy = 0.30589971827101514

<A u 1 , A u 1 >_{-1}^0.5 =  0.0012196734497721385
Newton iteration   2 , energy = 0.30589897423861606<A u 2 , A u 2 >_{-1}^0.5 =  6.235460634034231e-07
Newton iteration   3 , energy = 0.30589897423842183<A u 3 , A u 3 >_{-1}^0.5 =  2.596360511400929e-13
Newton iteration   4 , energy = 0.3058989742384217<A u 4 , A u 4 >_{-1}^0.5 =  2.4257775860168754e-16
t =  3.4000000000000017
Newton iteration   0 , energy = 0.30393513696120833<A u 0 , A u 0 >_{-1}^0.5 =  0.0619500148818447
Newton iteration   1 , energy = 0.3020236785082067<A u 1 , A u 1 >_{-1}^0.5 =  0.001157502402389253
Newton iteration   2 , energy = 0.3020230084056407<A u 2 , A u 2 >_{-1}^0.5 =  5.599804099226994e-07
Newton iteration   3 , energy = 0.3020230084054839<A u 3 , A u 3 >_{-1}^0.5 =  2.087324352912309e-13
Newton iteration   4 , energy = 0.30202300840548396<A u 4 , A u 4 >_{-1}^0.5 =  2.7455811603627693e-16
t =  3.5000000000000018
Newton iteration   0 , energy = 0.30015730638089433<A u 0 , A u 0 >_{-1}^0.5 =  0.060386860697755916
Newton iteration   1 , energy = 0.2983405415857909<A u 1 , A u 1 >_{-1}^0.5 =  0.0010931258401066727
Newton iteration   2 , energy = 0.2983399439570787<A u 2 , A u 2 >_{-1}^0.5 =  5.018148894112679e-07
Newton iteration   3 , energy = 0.2983399439569526

<A u 3 , A u 3 >_{-1}^0.5 =  1.6951501263674018e-13
Newton iteration   4 , energy = 0.2983399439569527<A u 4 , A u 4 >_{-1}^0.5 =  2.5473881551548026e-16
t =  3.600000000000002
Newton iteration   0 , energy = 0.29656587362385706<A u 0 , A u 0 >_{-1}^0.5 =  0.0588991574593093
Newton iteration   1 , energy = 0.29483721015631514<A u 1 , A u 1 >_{-1}^0.5 =  0.0010344214318564707
Newton iteration   2 , energy = 0.2948366749993806<A u 2 , A u 2 >_{-1}^0.5 =  4.546403103589512e-07
Newton iteration   3 , energy = 0.2948366749992774<A u 3 , A u 3 >_{-1}^0.5 =  1.4172739354665903e-13
Newton iteration   4 , energy = 0.2948366749992774<A u 4 , A u 4 >_{-1}^0.5 =  2.4675851281788083e-16
t =  3.700000000000002
Newton iteration   0 , energy = 0.29314786370736395<A u 0 , A u 0 >_{-1}^0.5 =  0.057474948074341045
Newton iteration   1 , energy = 0.2915017178754641<A u 1 , A u 1 >_{-1}^0.5 =  0.0009868447138053002
Newton iteration   2 , energy = 0.2915012308182631<A u 2 , A u 2 >_{-1}^0.5 =  4.2005048517149105e-07
Newton iteration   3 , energy = 0.2915012308181746<A u 3 , A u 3 >_{-1}^0.5 =  1.2380015877342813e-13
Newton iteration   4 , energy = 0.2915012308181746<A u 4 , A u 4 >_{-1}^0.5 =  2.543970966524381e-16
t =  3.800000000000002
Newton iteration   0 , energy = 0.28989302826659014

<A u 0 , A u 0 >_{-1}^0.5 =  0.05607848307677885
Newton iteration   1 , energy = 0.2883259913257588<A u 1 , A u 1 >_{-1}^0.5 =  0.0009510305443112451
Newton iteration   2 , energy = 0.28832553898209856<A u 2 , A u 2 >_{-1}^0.5 =  3.962086022997586e-07
Newton iteration   3 , energy = 0.2883255389820201<A u 3 , A u 3 >_{-1}^0.5 =  1.132371209263812e-13
Newton iteration   4 , energy = 0.28832553898202<A u 4 , A u 4 >_{-1}^0.5 =  2.5039167372177116e-16
t =  3.900000000000002
Newton iteration   0 , energy = 0.2867957236350986<A u 0 , A u 0 >_{-1}^0.5 =  0.05466621748627245
Newton iteration   1 , energy = 0.2853067500146116<A u 1 , A u 1 >_{-1}^0.5 =  0.0009225470959756842
Newton iteration   2 , energy = 0.28530632436204273<A u 2 , A u 2 >_{-1}^0.5 =  3.80086816077456e-07
Newton iteration   3 , energy = 0.28530632436197023<A u 3 , A u 3 >_{-1}^0.5 =  1.0717177494170779e-13
Newton iteration   4 , energy = 0.28530632436197007<A u 4 , A u 4 >_{-1}^0.5 =  2.5170391574685467e-16
t =  4.000000000000002
Newton iteration   0 , energy = 0.2838548202867312<A u 0 , A u 0 >_{-1}^0.5 =  0.05320329878294829
Newton iteration   1 , energy = 0.28244454106045236<A u 1 , A u 1 >_{-1}^0.5 =  0.0008943447705820982
Newton iteration   2 , energy = 0.2824441410348158

<A u 2 , A u 2 >_{-1}^0.5 =  3.675826156653108e-07
Newton iteration   3 , energy = 0.2824441410347484<A u 3 , A u 3 >_{-1}^0.5 =  1.0288766630372588e-13
Newton iteration   4 , energy = 0.28244414103474835<A u 4 , A u 4 >_{-1}^0.5 =  2.475518639349184e-16
t =  4.100000000000001
Newton iteration   0 , energy = 0.2810720215920084<A u 0 , A u 0 >_{-1}^0.5 =  0.051674356872346436
Newton iteration   1 , energy = 0.27974158857633935<A u 1 , A u 1 >_{-1}^0.5 =  0.0008606847605914772
Newton iteration   2 , energy = 0.27974121809560737<A u 2 , A u 2 >_{-1}^0.5 =  3.525184772024024e-07
Newton iteration   3 , energy = 0.2797412180955448<A u 3 , A u 3 >_{-1}^0.5 =  9.757255539023565e-14
t =  4.200000000000001
Newton iteration   0 , energy = 0.2784494899373552<A u 0 , A u 0 >_{-1}^0.5 =  0.050085501188120475
Newton iteration   1 , energy = 0.2771994577011342<A u 1 , A u 1 >_{-1}^0.5 =  0.0008197163596856316
Newton iteration   2 , energy = 0.2771991216522575<A u 2 , A u 2 >_{-1}^0.5 =  3.2955743458382943e-07
Newton iteration   3 , energy = 0.2771991216522033<A u 3 , A u 3 >_{-1}^0.5 =  8.806796768209915e-14
t =  4.300000000000001
Newton iteration   0 , energy = 0.2759877662249545<A u 0 , A u 0 >_{-1}^0.5 =  0.048458759677651994
Newton iteration   1 , energy = 0.2748173852773048

<A u 1 , A u 1 >_{-1}^0.5 =  0.0007732238144759549
Newton iteration   2 , energy = 0.2748170862703446<A u 2 , A u 2 >_{-1}^0.5 =  2.9819267163119265e-07
Newton iteration   3 , energy = 0.2748170862703002<A u 3 , A u 3 >_{-1}^0.5 =  7.374651827049924e-14
t =  4.4
Newton iteration   0 , energy = 0.27368460789987115<A u 0 , A u 0 >_{-1}^0.5 =  0.04682333620947004
Newton iteration   1 , energy = 0.27259163095177064<A u 1 , A u 1 >_{-1}^0.5 =  0.0007245407869678481
Newton iteration   2 , energy = 0.2725913684148521<A u 2 , A u 2 >_{-1}^0.5 =  2.622180323322382e-07
Newton iteration   3 , energy = 0.2725913684148179<A u 3 , A u 3 >_{-1}^0.5 =  5.733940873050694e-14
t =  4.5
Newton iteration   0 , energy = 0.27153482120416156<A u 0 , A u 0 >_{-1}^0.5 =  0.04520798765637697
Newton iteration   1 , energy = 0.2705156994079796<A u 1 , A u 1 >_{-1}^0.5 =  0.0006765227176158948
Newton iteration   2 , energy = 0.2705154705202685<A u 2 , A u 2 >_{-1}^0.5 =  2.2632954611248561e-07
Newton iteration   3 , energy = 0.2705154705202428<A u 3 , A u 3 >_{-1}^0.5 =  4.2353141236795205e-14
t =  4.6
Newton iteration   0 , energy = 0.26953078025053395<A u 0 , A u 0 >_{-1}^0.5 =  0.04363637071302488
Newton iteration   1 , energy = 0.26858105426236695

<A u 1 , A u 1 >_{-1}^0.5 =  0.0006306940006190356
Newton iteration   2 , energy = 0.2685808553379586<A u 2 , A u 2 >_{-1}^0.5 =  1.9372872054959798e-07
Newton iteration   3 , energy = 0.26858085533793963<A u 3 , A u 3 >_{-1}^0.5 =  3.060195357652105e-14
t =  4.699999999999999
Newton iteration   0 , energy = 0.2676632519758766<A u 0 , A u 0 >_{-1}^0.5 =  0.04212489421186804
Newton iteration   1 , energy = 0.2667779898211434<A u 1 , A u 1 >_{-1}^0.5 =  0.0005875042180962966
Newton iteration   2 , energy = 0.26677781721107563<A u 2 , A u 2 >_{-1}^0.5 =  1.657862274274515e-07
Newton iteration   3 , energy = 0.2667778172110618<A u 3 , A u 3 >_{-1}^0.5 =  2.2181364175430385e-14
t =  4.799999999999999
Newton iteration   0 , energy = 0.2659222673085123<A u 0 , A u 0 >_{-1}^0.5 =  0.040681920034712944
Newton iteration   1 , energy = 0.26509647386351554<A u 1 , A u 1 >_{-1}^0.5 =  0.0005469955754972235
Newton iteration   2 , energy = 0.2650963242378606<A u 2 , A u 2 >_{-1}^0.5 =  1.4274006462315329e-07
Newton iteration   3 , energy = 0.2650963242378505<A u 3 , A u 3 >_{-1}^0.5 =  1.6426428698063973e-14
t =  4.899999999999999
Newton iteration   0 , energy = 0.2642979143746181<A u 0 , A u 0 >_{-1}^0.5 =  0.039307701015381065
Newton iteration   1 , energy = 0.26352687861469176

<A u 1 , A u 1 >_{-1}^0.5 =  0.000509288929467951
Newton iteration   2 , energy = 0.26352674890804234<A u 2 , A u 2 >_{-1}^0.5 =  1.242887300304803e-07
Newton iteration   3 , energy = 0.2635267489080345<A u 3 , A u 3 >_{-1}^0.5 =  1.256388637654419e-14
t =  4.999999999999998

[18]:

Draw(gfu_t, mesh, interpolate_multidim=True, animate=True,
min=-0.1, max=0.1, autoscale=False, deformation=True)

[18]:

BaseWebGuiScene


## Supplementary 2: Minimal energy extension (postscript in unit-2.1.3 )¶

In unit-2.1.3 we discussed the BDDC preconditioner and characterized the coarse grid solution as the condensed problem with the continuity only w.r.t. the coarse grid dofs.

We can characterize this as a minimization problem involving

$u \in V^{ho,disc}, \quad u^{lo,cont} \in V^{lo,cont}, \quad \lambda \in V^{lo,disc},$

Here $$u$$ is the solution to the coarse-grid (decoupled) problem where $$u^{lo,cont}$$ represents the coarse (continuity-)dofs and $$\lambda$$ is the corresponding Lagrange multiplier to enforce continuity of $$u$$ w.r.t. the lo,cont-dofs.

[19]:

mesh = Mesh(geom.GenerateMesh(maxh=0.1))
fes_ho = Discontinuous(H1(mesh, order=10))
fes_lo = H1(mesh, order=1, dirichlet=".*")
fes_lam = Discontinuous(H1(mesh, order=1))
fes = fes_ho*fes_lo*fes_lam
uho, ulo, lam = fes.TrialFunction()


The energy that is to be minimized is:

$\int_{\Omega} \frac12 \Vert \nabla u \Vert^2 - u + \sum_T \sum_{V \in V(T)} ((u-u^{lo})\cdot \lambda)|_{V} \longrightarrow \operatorname{min}!$
[20]:

a = BilinearForm(fes)
- 1*uho*dx
+ (uho-ulo)*lam*dx(element_vb=BBND))
gfu = GridFunction(fes)
NewtonMinimization(a=a, u=gfu)
Draw(gfu.components[0],mesh,deformation=True)

Newton iteration  0
Energy:  0.0

err =  0.3932494925913631
Newton iteration  1
Energy:  -0.07732258171168223

err =  1.9518780474919402e-15

[20]:

BaseWebGuiScene


The minimization problem is solved by the solution of the PDE:

$\int_{\Omega} \nabla u \cdot \nabla v = \int_{\Omega} 1 \cdot v \quad \forall ~ v \in V^{ho,disc}$

under the constraint

$u(v) = u^{lo}(v) \quad \text{ for all vertices } v \in V(T) \text{ for all } T.$