# Hyperelasticity#

Author: Jørgen S. Dokken and Garth N. Wells

This section shows how to solve the hyperelasticity problem for deformation of a beam.

We will also show how to create a constant boundary condition for a vector function space.

We start by importing DOLFINx and some additional dependencies. Then, we create a slender cantilever consisting of hexahedral elements and create the function space V for our unknown.

import numpy as np
import ufl

from petsc4py import PETSc
from mpi4py import MPI
from dolfinx import fem, mesh, plot
L = 20.0
domain = mesh.create_box(MPI.COMM_WORLD,[[0.0,0.0,0.0], [L, 1, 1]], [20, 5, 5], mesh.CellType.hexahedron)
V = fem.VectorFunctionSpace(domain, ("CG", 2))


We create two python functions for determining the facets to apply boundary conditions to

def left(x):
return np.isclose(x[0], 0)

def right(x):
return np.isclose(x[0], L)

fdim = domain.topology.dim -1
left_facets = mesh.locate_entities_boundary(domain, fdim, left)
right_facets = mesh.locate_entities_boundary(domain, fdim, right)


Next, we create a marker based on these two functions

# Concatenate and sort the arrays based on facet indices. Left facets marked with 1, right facets with two
marked_facets = np.hstack([left_facets, right_facets])
marked_values = np.hstack([np.full_like(left_facets, 1), np.full_like(right_facets, 2)])
sorted_facets = np.argsort(marked_facets)
facet_tag = mesh.meshtags(domain, fdim, marked_facets[sorted_facets], marked_values[sorted_facets])


We then create a function for supplying the boundary condition on the left side, which is fixed.

u_bc = np.array((0,) * domain.geometry.dim, dtype=PETSc.ScalarType)


To apply the boundary condition, we identity the dofs located on the facets marked by the MeshTag.

left_dofs = fem.locate_dofs_topological(V, facet_tag.dim, facet_tag.find(1))
bcs = [fem.dirichletbc(u_bc, left_dofs, V)]


Next, we define the body force on the reference configuration (B), and nominal (first Piola-Kirchhoff) traction (T).

B = fem.Constant(domain, PETSc.ScalarType((0, 0, 0)))
T = fem.Constant(domain, PETSc.ScalarType((0, 0, 0)))


Define the test and solution functions on the space $$V$$

v = ufl.TestFunction(V)
u = fem.Function(V)


Define kinematic quantities used in the problem

# Spatial dimension
d = len(u)

# Identity tensor
I = ufl.variable(ufl.Identity(d))

# Right Cauchy-Green tensor
C = ufl.variable(F.T * F)

# Invariants of deformation tensors
Ic = ufl.variable(ufl.tr(C))
J  = ufl.variable(ufl.det(F))


Define the elasticity model via a stored strain energy density function $$\psi$$, and create the expression for the first Piola-Kirchhoff stress:

# Elasticity parameters
E = PETSc.ScalarType(1.0e4)
nu = PETSc.ScalarType(0.3)
mu = fem.Constant(domain, E/(2*(1 + nu)))
lmbda = fem.Constant(domain, E*nu/((1 + nu)*(1 - 2*nu)))
# Stored strain energy density (compressible neo-Hookean model)
psi = (mu / 2) * (Ic - 3) - mu * ufl.ln(J) + (lmbda / 2) * (ufl.ln(J))**2
# Stress
# Hyper-elasticity
P = ufl.diff(psi, F)


Comparison to linear elasticity

To illustrate the difference between linear and hyperelasticity, the following lines can be uncommented to solve the linear elasticity problem.

# P = 2.0 * mu * ufl.sym(ufl.grad(u)) + lmbda * ufl.tr(ufl.sym(ufl.grad(u))) * I


Define the variational form with traction integral over all facets with value 2. We set the quadrature degree for the integrals to 4.

metadata = {"quadrature_degree": 4}
# Define form F (we want to find u such that F(u) = 0)
F = ufl.inner(ufl.grad(v), P)*dx - ufl.inner(v, B)*dx - ufl.inner(v, T)*ds(2)


As the varitional form is non-linear and written on residual form, we use the non-linear problem class from DOLFINx to set up required structures to use a Newton solver.

problem = fem.petsc.NonlinearProblem(F, u, bcs)


and then create and customize the Newton solver

from dolfinx import nls
solver = nls.petsc.NewtonSolver(domain.comm, problem)

# Set Newton solver options
solver.atol = 1e-8
solver.rtol = 1e-8
solver.convergence_criterion = "incremental"


We create a function to plot the solution at each time step.

import pyvista
import matplotlib.pyplot as plt
pyvista.start_xvfb()
plotter = pyvista.Plotter()
plotter.open_gif("deformation.gif", fps=3)

topology, cells, geometry = plot.create_vtk_mesh(u.function_space)
function_grid = pyvista.UnstructuredGrid(topology, cells, geometry)

values = np.zeros((geometry.shape[0], 3))
values[:, :len(u)] = u.x.array.reshape(geometry.shape[0], len(u))
function_grid["u"] = values
function_grid.set_active_vectors("u")

# Warp mesh by deformation
warped = function_grid.warp_by_vector("u", factor=1)
warped.set_active_vectors("u")

# Add mesh to plotter and visualize
actor = plotter.add_mesh(warped, show_edges=True, lighting=False, clim=[0, 10])

# Compute magnitude of displacement to visualize in GIF
Vs = fem.FunctionSpace(domain, ("Lagrange", 2))
magnitude = fem.Function(Vs)
us = fem.Expression(ufl.sqrt(sum([u[i]**2 for i in range(len(u))])), Vs.element.interpolation_points())
magnitude.interpolate(us)
warped["mag"] = magnitude.x.array


Finally, we solve the problem over several time steps, updating the y-component of the traction

from dolfinx import log
log.set_log_level(log.LogLevel.INFO)
tval0 = -1.5
for n in range(1, 10):
T.value[2] = n * tval0
num_its, converged = solver.solve(u)
assert(converged)
u.x.scatter_forward()
print(f"Time step {n}, Number of iterations {num_its}, Load {T.value}")
function_grid["u"][:, :len(u)] = u.x.array.reshape(geometry.shape[0], len(u))
magnitude.interpolate(us)
warped.set_active_scalars("mag")
warped_n = function_grid.warp_by_vector(factor=1)
plotter.update_coordinates(warped_n.points.copy(), render=False)
plotter.update_scalar_bar_range([0, 10])
plotter.update_scalars(magnitude.x.array)
plotter.write_frame()
plotter.close()

2023-10-02 08:05:48.998 (   6.277s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:49.446 (   6.725s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.447435, 0.390000, 0.060000 (PETSc Krylov solver)

2023-10-02 08:05:49.666 (   6.945s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:49.985 (   7.265s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319331, 0.280000, 0.040000 (PETSc Krylov solver)

2023-10-02 08:05:49.998 (   7.277s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 22.2455 (tol = 1e-08) r (rel) = 0.134278(tol = 1e-08)

2023-10-02 08:05:50.205 (   7.484s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:50.523 (   7.802s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318135, 0.290000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:50.535 (   7.814s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 2.43261 (tol = 1e-08) r (rel) = 0.0146837(tol = 1e-08)

2023-10-02 08:05:50.741 (   8.020s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:51.060 (   8.339s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319119, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:05:51.071 (   8.350s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 4.43158 (tol = 1e-08) r (rel) = 0.0267498(tol = 1e-08)

2023-10-02 08:05:51.278 (   8.558s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:51.601 (   8.880s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322840, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:05:51.612 (   8.892s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.144189 (tol = 1e-08) r (rel) = 0.000870353(tol = 1e-08)
2023-10-02 08:05:51.825 (   9.105s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:52.146 (   9.425s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320509, 0.270000, 0.040000 (PETSc Krylov solver)

2023-10-02 08:05:52.156 (   9.436s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 0.021424 (tol = 1e-08) r (rel) = 0.000129319(tol = 1e-08)
2023-10-02 08:05:52.363 (   9.643s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:52.681 (   9.960s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.317840, 0.270000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:05:52.692 (   9.971s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 4.80067e-06 (tol = 1e-08) r (rel) = 2.89777e-08(tol = 1e-08)

Time step 1, Number of iterations 8, Load [ 0.   0.  -1.5]

2023-10-02 08:05:52.899 (  10.178s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:53.224 (  10.503s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.325102, 0.300000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:05:53.235 (  10.514s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 8: r (abs) = 2.64464e-11 (tol = 1e-08) r (rel) = 1.59635e-13(tol = 1e-08)
2023-10-02 08:05:53.235 (  10.514s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 8 iterations and 8 linear solver iterations.
2023-10-02 08:05:53.692 (  10.971s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:05:54.017 (  11.296s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.325282, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:54.236 (  11.515s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:54.556 (  11.835s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320163, 0.290000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:05:54.567 (  11.846s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 17.3254 (tol = 1e-08) r (rel) = 0.117842(tol = 1e-08)

2023-10-02 08:05:54.774 (  12.053s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:55.092 (  12.371s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318218, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:55.103 (  12.382s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 5.14882 (tol = 1e-08) r (rel) = 0.0350207(tol = 1e-08)

2023-10-02 08:05:55.310 (  12.589s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:55.630 (  12.909s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319391, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:05:55.641 (  12.920s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 7.24003 (tol = 1e-08) r (rel) = 0.0492445(tol = 1e-08)

2023-10-02 08:05:55.848 (  13.127s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:56.165 (  13.444s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.317094, 0.280000, 0.050000 (PETSc Krylov solver)
2023-10-02 08:05:56.176 (  13.455s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.777889 (tol = 1e-08) r (rel) = 0.00529096(tol = 1e-08)
2023-10-02 08:05:56.382 (  13.661s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:56.697 (  13.977s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.315167, 0.290000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:05:56.709 (  13.988s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 1.25525 (tol = 1e-08) r (rel) = 0.00853785(tol = 1e-08)

2023-10-02 08:05:56.917 (  14.196s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:57.237 (  14.516s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319984, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:57.248 (  14.527s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 0.00849512 (tol = 1e-08) r (rel) = 5.77813e-05(tol = 1e-08)
2023-10-02 08:05:57.454 (  14.734s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:57.770 (  15.050s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.315772, 0.300000, 0.010000 (PETSc Krylov solver)
2023-10-02 08:05:57.782 (  15.062s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 8: r (abs) = 0.000192107 (tol = 1e-08) r (rel) = 1.30665e-06(tol = 1e-08)

2023-10-02 08:05:57.989 (  15.269s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:58.313 (  15.592s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.323391, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:58.323 (  15.603s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 9: r (abs) = 1.70757e-10 (tol = 1e-08) r (rel) = 1.16144e-12(tol = 1e-08)
2023-10-02 08:05:58.323 (  15.603s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 9 iterations and 9 linear solver iterations.

Time step 2, Number of iterations 9, Load [ 0.  0. -3.]

2023-10-02 08:05:58.659 (  15.938s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:58.980 (  16.260s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.321218, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:05:59.202 (  16.481s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:05:59.526 (  16.805s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.324176, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:05:59.538 (  16.817s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 10.0011 (tol = 1e-08) r (rel) = 0.0887471(tol = 1e-08)

2023-10-02 08:05:59.745 (  17.024s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:00.065 (  17.344s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319606, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:00.076 (  17.355s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 5.33026 (tol = 1e-08) r (rel) = 0.0472992(tol = 1e-08)

2023-10-02 08:06:00.284 (  17.563s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:00.607 (  17.886s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322586, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:00.618 (  17.897s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 11.9901 (tol = 1e-08) r (rel) = 0.106397(tol = 1e-08)
2023-10-02 08:06:00.829 (  18.108s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:01.157 (  18.436s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.327997, 0.290000, 0.030000 (PETSc Krylov solver)

2023-10-02 08:06:01.169 (  18.449s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 2.29702 (tol = 1e-08) r (rel) = 0.0203831(tol = 1e-08)

2023-10-02 08:06:01.378 (  18.658s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:01.704 (  18.983s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.325249, 0.290000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:01.715 (  18.995s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 3.90234 (tol = 1e-08) r (rel) = 0.0346282(tol = 1e-08)
2023-10-02 08:06:01.923 (  19.203s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:02.256 (  19.535s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.332243, 0.310000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:02.268 (  19.547s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 0.236535 (tol = 1e-08) r (rel) = 0.00209895(tol = 1e-08)

2023-10-02 08:06:02.476 (  19.755s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:02.800 (  20.079s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.324207, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:02.811 (  20.091s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 8: r (abs) = 0.0427142 (tol = 1e-08) r (rel) = 0.000379034(tol = 1e-08)
2023-10-02 08:06:03.019 (  20.299s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:03.342 (  20.621s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322562, 0.280000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:03.354 (  20.633s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 9: r (abs) = 2.87798e-05 (tol = 1e-08) r (rel) = 2.55384e-07(tol = 1e-08)

2023-10-02 08:06:03.561 (  20.840s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:03.876 (  21.156s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.315635, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:03.888 (  21.168s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 10: r (abs) = 6.09481e-10 (tol = 1e-08) r (rel) = 5.40836e-12(tol = 1e-08)
2023-10-02 08:06:03.888 (  21.168s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 10 iterations and 10 linear solver iterations.

Time step 3, Number of iterations 10, Load [ 0.   0.  -4.5]

2023-10-02 08:06:04.222 (  21.502s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:04.541 (  21.821s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318781, 0.280000, 0.040000 (PETSc Krylov solver)

2023-10-02 08:06:04.760 (  22.039s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:05.075 (  22.354s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.314608, 0.280000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:05.086 (  22.365s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 5.50693 (tol = 1e-08) r (rel) = 0.0653918(tol = 1e-08)

2023-10-02 08:06:05.292 (  22.572s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:05.614 (  22.894s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.321846, 0.280000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:05.626 (  22.905s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 26.2489 (tol = 1e-08) r (rel) = 0.311692(tol = 1e-08)

2023-10-02 08:06:05.832 (  23.111s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:06.147 (  23.426s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.314646, 0.280000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:06.158 (  23.438s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 2.30927 (tol = 1e-08) r (rel) = 0.0274213(tol = 1e-08)
2023-10-02 08:06:06.365 (  23.645s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:06.683 (  23.963s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.317869, 0.310000, 0.010000 (PETSc Krylov solver)

2023-10-02 08:06:06.694 (  23.973s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 14.0562 (tol = 1e-08) r (rel) = 0.16691(tol = 1e-08)
2023-10-02 08:06:06.901 (  24.180s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:07.224 (  24.503s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322793, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:07.235 (  24.514s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 0.222774 (tol = 1e-08) r (rel) = 0.00264532(tol = 1e-08)
2023-10-02 08:06:07.442 (  24.722s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:07.763 (  25.042s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320541, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:07.774 (  25.053s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 0.286671 (tol = 1e-08) r (rel) = 0.00340406(tol = 1e-08)

2023-10-02 08:06:07.980 (  25.259s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:08.297 (  25.576s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.316892, 0.280000, 0.040000 (PETSc Krylov solver)

2023-10-02 08:06:08.308 (  25.587s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 8: r (abs) = 0.000321869 (tol = 1e-08) r (rel) = 3.82203e-06(tol = 1e-08)

2023-10-02 08:06:08.517 (  25.796s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:08.831 (  26.110s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.314298, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:08.843 (  26.122s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 9: r (abs) = 2.63796e-07 (tol = 1e-08) r (rel) = 3.13244e-09(tol = 1e-08)
2023-10-02 08:06:08.843 (  26.122s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 9 iterations and 9 linear solver iterations.

Time step 4, Number of iterations 9, Load [ 0.  0. -6.]

2023-10-02 08:06:09.195 (  26.474s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:09.507 (  26.787s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.312243, 0.280000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:09.725 (  27.004s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:10.043 (  27.322s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318258, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:10.055 (  27.335s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 3.19462 (tol = 1e-08) r (rel) = 0.0496479(tol = 1e-08)
2023-10-02 08:06:10.262 (  27.541s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:10.582 (  27.862s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320397, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:10.594 (  27.873s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 7.71429 (tol = 1e-08) r (rel) = 0.119888(tol = 1e-08)
2023-10-02 08:06:10.801 (  28.080s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:11.122 (  28.401s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320601, 0.310000, 0.010000 (PETSc Krylov solver)
2023-10-02 08:06:11.133 (  28.412s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 0.850873 (tol = 1e-08) r (rel) = 0.0132235(tol = 1e-08)
2023-10-02 08:06:11.341 (  28.620s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:11.663 (  28.943s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322608, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:11.675 (  28.954s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.371434 (tol = 1e-08) r (rel) = 0.0057725(tol = 1e-08)

2023-10-02 08:06:11.881 (  29.161s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:12.203 (  29.482s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.321449, 0.290000, 0.030000 (PETSc Krylov solver)

2023-10-02 08:06:12.215 (  29.494s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 0.00215066 (tol = 1e-08) r (rel) = 3.34236e-05(tol = 1e-08)
2023-10-02 08:06:12.422 (  29.701s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:12.745 (  30.024s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322723, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:12.757 (  30.036s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 2.54607e-06 (tol = 1e-08) r (rel) = 3.95687e-08(tol = 1e-08)
2023-10-02 08:06:12.964 (  30.243s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:13.287 (  30.566s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322995, 0.280000, 0.050000 (PETSc Krylov solver)
2023-10-02 08:06:13.298 (  30.577s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 8: r (abs) = 1.51485e-13 (tol = 1e-08) r (rel) = 2.35425e-15(tol = 1e-08)
2023-10-02 08:06:13.298 (  30.577s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 8 iterations and 8 linear solver iterations.

Time step 5, Number of iterations 8, Load [ 0.   0.  -7.5]

2023-10-02 08:06:13.638 (  30.917s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:13.956 (  31.235s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318020, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:14.173 (  31.452s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:14.488 (  31.767s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.315084, 0.290000, 0.030000 (PETSc Krylov solver)

2023-10-02 08:06:14.499 (  31.779s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 2.00649 (tol = 1e-08) r (rel) = 0.0395622(tol = 1e-08)
2023-10-02 08:06:14.705 (  31.984s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:15.020 (  32.300s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.315291, 0.280000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:15.032 (  32.311s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 4.60977 (tol = 1e-08) r (rel) = 0.0908914(tol = 1e-08)
2023-10-02 08:06:15.239 (  32.519s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:15.563 (  32.843s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.324035, 0.300000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:15.576 (  32.855s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 0.185372 (tol = 1e-08) r (rel) = 0.00365501(tol = 1e-08)

2023-10-02 08:06:15.786 (  33.065s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:16.105 (  33.384s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318887, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:16.116 (  33.395s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.024688 (tol = 1e-08) r (rel) = 0.000486777(tol = 1e-08)
2023-10-02 08:06:16.322 (  33.602s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:16.641 (  33.921s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319199, 0.260000, 0.060000 (PETSc Krylov solver)

Time step 6, Number of iterations 7, Load [ 0.  0. -9.]

2023-10-02 08:06:16.652 (  33.932s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 5.69254e-06 (tol = 1e-08) r (rel) = 1.12241e-07(tol = 1e-08)
2023-10-02 08:06:16.859 (  34.139s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:17.181 (  34.460s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.321410, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:17.192 (  34.471s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 7: r (abs) = 2.67626e-11 (tol = 1e-08) r (rel) = 5.27682e-13(tol = 1e-08)
2023-10-02 08:06:17.192 (  34.471s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 7 iterations and 7 linear solver iterations.
2023-10-02 08:06:17.531 (  34.811s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:17.858 (  35.137s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.326919, 0.270000, 0.050000 (PETSc Krylov solver)

2023-10-02 08:06:18.079 (  35.358s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:18.404 (  35.683s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.325131, 0.290000, 0.040000 (PETSc Krylov solver)
2023-10-02 08:06:18.415 (  35.694s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 1.38506 (tol = 1e-08) r (rel) = 0.0336622(tol = 1e-08)

2023-10-02 08:06:18.621 (  35.900s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:18.941 (  36.221s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320434, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:18.952 (  36.232s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 3.03739 (tol = 1e-08) r (rel) = 0.07382(tol = 1e-08)
2023-10-02 08:06:19.161 (  36.440s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:19.478 (  36.758s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.317772, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:19.490 (  36.769s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 0.0412386 (tol = 1e-08) r (rel) = 0.00100225(tol = 1e-08)
2023-10-02 08:06:19.696 (  36.975s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:20.013 (  37.292s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.316879, 0.290000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:20.024 (  37.304s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.00205057 (tol = 1e-08) r (rel) = 4.98364e-05(tol = 1e-08)

2023-10-02 08:06:20.232 (  37.511s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:20.552 (  37.831s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.320370, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:20.564 (  37.843s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 1.78865e-08 (tol = 1e-08) r (rel) = 4.34709e-10(tol = 1e-08)
2023-10-02 08:06:20.564 (  37.843s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 6 iterations and 6 linear solver iterations.

Time step 7, Number of iterations 6, Load [  0.    0.  -10.5]

2023-10-02 08:06:20.896 (  38.175s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:21.213 (  38.492s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.316978, 0.300000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:21.433 (  38.712s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:21.749 (  39.029s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.316691, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:21.761 (  39.041s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 1.06336 (tol = 1e-08) r (rel) = 0.031085(tol = 1e-08)

2023-10-02 08:06:21.968 (  39.247s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:22.291 (  39.570s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.323015, 0.310000, 0.010000 (PETSc Krylov solver)
2023-10-02 08:06:22.302 (  39.581s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 2.0477 (tol = 1e-08) r (rel) = 0.0598598(tol = 1e-08)
2023-10-02 08:06:22.508 (  39.787s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:22.827 (  40.106s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.318919, 0.290000, 0.020000 (PETSc Krylov solver)

2023-10-02 08:06:22.838 (  40.117s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 0.00897719 (tol = 1e-08) r (rel) = 0.000262427(tol = 1e-08)
2023-10-02 08:06:23.043 (  40.322s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:23.361 (  40.640s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.317809, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:23.371 (  40.651s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 0.000167422 (tol = 1e-08) r (rel) = 4.89419e-06(tol = 1e-08)
2023-10-02 08:06:23.577 (  40.857s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:23.902 (  41.181s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.324709, 0.300000, 0.020000 (PETSc Krylov solver)

Time step 8, Number of iterations 6, Load [  0.   0. -12.]

2023-10-02 08:06:23.914 (  41.193s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 3.23994e-11 (tol = 1e-08) r (rel) = 9.4712e-13(tol = 1e-08)
2023-10-02 08:06:23.914 (  41.193s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 6 iterations and 6 linear solver iterations.
2023-10-02 08:06:24.245 (  41.524s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.

2023-10-02 08:06:24.569 (  41.848s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.323849, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:24.787 (  42.066s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:25.110 (  42.390s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.323633, 0.300000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:25.122 (  42.401s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 2: r (abs) = 0.898789 (tol = 1e-08) r (rel) = 0.0309666(tol = 1e-08)

2023-10-02 08:06:25.329 (  42.608s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:25.650 (  42.930s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.321360, 0.310000, 0.020000 (PETSc Krylov solver)
2023-10-02 08:06:25.661 (  42.941s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 3: r (abs) = 1.38354 (tol = 1e-08) r (rel) = 0.0476679(tol = 1e-08)

2023-10-02 08:06:25.870 (  43.149s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:26.194 (  43.473s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.323958, 0.320000, 0.000000 (PETSc Krylov solver)
2023-10-02 08:06:26.206 (  43.485s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 4: r (abs) = 0.00185096 (tol = 1e-08) r (rel) = 6.37724e-05(tol = 1e-08)

2023-10-02 08:06:26.414 (  43.694s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:26.737 (  44.016s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.322504, 0.300000, 0.030000 (PETSc Krylov solver)

2023-10-02 08:06:26.749 (  44.028s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 5: r (abs) = 7.87183e-06 (tol = 1e-08) r (rel) = 2.71213e-07(tol = 1e-08)

Time step 9, Number of iterations 6, Load [  0.    0.  -13.5]

2023-10-02 08:06:26.959 (  44.239s) [main            ]              petsc.cpp:675   INFO| PETSc Krylov solver starting to solve system.
2023-10-02 08:06:27.279 (  44.558s) [main            ]         TimeLogger.cpp:28    INFO| Elapsed wall, usr, sys time: 0.319647, 0.290000, 0.030000 (PETSc Krylov solver)
2023-10-02 08:06:27.291 (  44.570s) [main            ]       NewtonSolver.cpp:36    INFO| Newton iteration 6: r (abs) = 2.75782e-13 (tol = 1e-08) r (rel) = 9.50169e-15(tol = 1e-08)
2023-10-02 08:06:27.291 (  44.570s) [main            ]       NewtonSolver.cpp:255   INFO| Newton solver finished in 6 iterations and 6 linear solver iterations.