<h1>Results</h1>

Firstly, we present a comparison of a series of 3-d results with those
in the literature (see Reese et al (2000)) to demonstrate that the program works as expected.

We begin with a comparison of the convergence with mesh refinement for the $Q_1-DGPM_0-DGPM_0$ and
$Q_2-DGPM_1-DGPM_1$ formulations, as summarised in the figure below.
The vertical displacement of the midpoint of the upper surface of the block is used to assess convergence.
Both schemes demonstrate good convergence properties for varying values of the load parameter $p/p_0$.
The results agree with those in the literature.
The lower-order formulation typically overestimates the displacement for low levels of refinement,
while the higher-order interpolation scheme underestimates it, but be a lesser degree.
This benchmark, and a series of others not shown here, give us confidence that the code is working
as it should.

<table align="center" class="tutorial" cellspacing="3" cellpadding="3">
  <tr>
     <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q1-P0_convergence.png" alt="">
	<p align="center">
        Convergence of the $Q_1-DGPM_0-DGPM_0$ formulation in 3-d.
	</p>
    </td>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q2-P1_convergence.png" alt="">
	<p align="center">
        Convergence of the $Q_2-DGPM_1-DGPM_1$ formulation in 3-d.
	</p>
    </td>
  </tr>
</table>


A typical screen output generated by running the problem is shown below.
The particular case demonstrated is that of the $Q_2-DGPM_1-DGPM_1$ formulation.
It is clear that, using the Newton-Raphson method, quadratic convergence of the solution is obtained.
Solution convergence is achieved within 5 Newton increments for all time-steps.
The converged displacement's $L_2$-norm is several orders of magnitude less than the geometry scale.

@code
Grid:
	 Reference volume: 1e-09
Triangulation:
	 Number of active cells: 64
	 Number of degrees of freedom: 2699
    Setting up quadrature point data...

Timestep 1 @ 0.1s
___________________________________________________________________________________________________________________________________________________________
                 SOLVER STEP                   |  LIN_IT   LIN_RES    RES_NORM     RES_U     RES_P      RES_J     NU_NORM      NU_U       NU_P       NU_J
___________________________________________________________________________________________________________________________________________________________
  0  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     786  2.118e-06  1.000e+00  1.000e+00  0.000e+00  0.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
  1  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     552  1.031e-03  8.563e-02  8.563e-02  9.200e-13  3.929e-08  1.060e-01  3.816e-02  1.060e-01  1.060e-01
  2  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     667  5.602e-06  2.482e-03  2.482e-03  3.373e-15  2.982e-10  2.936e-03  2.053e-04  2.936e-03  2.936e-03
  3  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     856  6.469e-10  2.129e-06  2.129e-06  2.245e-19  1.244e-13  1.887e-06  7.289e-07  1.887e-06  1.887e-06
  4  ASM_R  CONVERGED!
___________________________________________________________________________________________________________________________________________________________
Relative errors:
Displacement:	7.289e-07
Force: 		2.451e-10
Dilatation:	1.353e-07
v / V_0:	1.000e-09 / 1.000e-09 = 1.000e+00


[...]

Timestep 10 @ 1.000e+00s
___________________________________________________________________________________________________________________________________________________________
                 SOLVER STEP                   |  LIN_IT   LIN_RES    RES_NORM     RES_U     RES_P      RES_J     NU_NORM      NU_U       NU_P       NU_J
___________________________________________________________________________________________________________________________________________________________
  0  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     874  2.358e-06  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
  1  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     658  2.942e-04  1.544e-01  1.544e-01  1.208e+13  1.855e+06  6.014e-02  7.398e-02  6.014e-02  6.014e-02
  2  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     790  2.206e-06  2.908e-03  2.908e-03  7.302e+10  2.067e+03  2.716e-03  1.433e-03  2.716e-03  2.717e-03
  3  ASM_R  ASM_K  CST  ASM_SC  SLV  PP  UQPH  |     893  2.374e-09  1.919e-06  1.919e-06  4.527e+07  4.100e+00  1.672e-06  6.842e-07  1.672e-06  1.672e-06
  4  ASM_R  CONVERGED!
___________________________________________________________________________________________________________________________________________________________
Relative errors:
Displacement:	6.842e-07
Force: 		8.995e-10
Dilatation:	1.528e-06
v / V_0:	1.000e-09 / 1.000e-09 = 1.000e+00
@endcode



Using the Timer class, we can discern which parts of the code require the highest computational expense.
For a case with a large number of degrees-of-freedom (i.e. a high level of refinement), a typical output of the Timer is given below.
Much of the code in the tutorial has been developed based on the optimizations described,
discussed and demonstrated in Step-18 and others.
With over 93% of the time being spent in the linear solver, it is obvious that it may be necessary
to invest in a better solver for large three-dimensional problems.
The SSOR preconditioner is not multithreaded but is effective for this class of solid problems.
It may be beneficial to investigate the use of another solver such as those available through the Trilinos library.


@code
+---------------------------------------------+------------+------------+
| Total wallclock time elapsed since start    | 9.874e+02s |            |
|                                             |            |            |
| Section                         | no. calls |  wall time | % of total |
+---------------------------------+-----------+------------+------------+
| Assemble system right-hand side |        53 | 1.727e+00s |  1.75e-01% |
| Assemble tangent matrix         |        43 | 2.707e+01s |  2.74e+00% |
| Linear solver                   |        43 | 9.248e+02s |  9.37e+01% |
| Linear solver postprocessing    |        43 | 2.743e-02s |  2.78e-03% |
| Perform static condensation     |        43 | 1.437e+01s |  1.46e+00% |
| Setup system                    |         1 | 3.897e-01s |  3.95e-02% |
| Update QPH data                 |        43 | 5.770e-01s |  5.84e-02% |
+---------------------------------+-----------+------------+------------+
@endcode


We then used ParaView to visualize the results for two cases.
The first was for the coarsest grid and the lowest-order interpolation method: $Q_1-DGPM_0-DGPM_0$.
The second was on a refined grid using a $Q_2-DGPM_1-DGPM_1$ formulation.
The vertical component of the displacement, the pressure $\widetilde{p}$ and the dilatation $\widetilde{J}$ fields
are shown below.


For the first case it is clear that the coarse spatial discretization coupled with large displacements leads to a low quality solution
(the loading ratio is  $p/p_0=80$).
Additionally, the pressure difference between elements is very large.
The constant pressure field on the element means that the large pressure gradient is not captured.
However, it should be noted that locking, which would be present in a standard $Q_1$ displacement formulation does not arise
even in this poorly discretised case.
The final vertical displacement of the tracked node on the top surface of the block is still within 12.5% of the converged solution.
The pressure solution is very coarse and has large jumps between adjacent cells.
It is clear that the volume nearest to the applied traction undergoes compression while the outer extents
of the domain are in a state of expansion.
The dilatation solution field and pressure field are clearly linked,
with positive dilatation indicating regions of positive pressure and negative showing regions placed in compression.
As discussed in the Introduction, a compressive pressure has a negative sign
while an expansive pressure takes a positive sign.
This stems from the definition of the volumetric strain energy function
and is opposite to the physically realistic interpretation of pressure.


<table align="center" class="tutorial" cellspacing="3" cellpadding="3">
  <tr>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q1-P0_gr_1_p_ratio_80-displacement.png" alt="">
	<p align="center">
        Z-displacement solution for the 3-d problem.
	</p>
    </td>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q1-P0_gr_1_p_ratio_80-pressure.png" alt="">
	<p align="center">
        Discontinuous piece-wise constant pressure field.
	</p>
    </td>
     <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q1-P0_gr_1_p_ratio_80-dilatation.png" alt="">
	<p align="center">
        Discontinuous piece-wise constant dilatation field.
	</p>
    </td>
  </tr>
</table>

Combining spatial refinement and a higher-order interpolation scheme results in a high-quality solution.
Three grid refinements coupled with a $Q_2-DGPM_1-DGPM_1$ formulation produces
a result that clearly captures the mechanics of the problem.
The deformation of the traction surface is well resolved.
We can now observe the actual extent of the applied traction, with the maximum force being applied
at the central point of the surface causing the largest compression.
Even though very high strains are experienced in the domain,
especially at the boundary of the region of applied traction,
the solution remains accurate.
The pressure field is captured in far greater detail than before.
There is a clear distinction and transition between regions of compression and expansion,
and the linear approximation of the pressure field allows a refined visualization
of the pressure at the sub-element scale.
It should however be noted that the pressure field remains discontinuous
and could be smoothed on a continuous grid for the post-processing purposes.



<table align="center" class="tutorial" cellspacing="3" cellpadding="3">
  <tr>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q2-P1_gr_3_p_ratio_80-displacement.png" alt="">
	<p align="center">
        Z-displacement solution for the 3-d problem.
	</p>
    </td>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q2-P1_gr_3_p_ratio_80-pressure.png" alt="">
	<p align="center">
        Discontinuous linear pressure field.
	</p>
    </td>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Q2-P1_gr_3_p_ratio_80-dilatation.png" alt="">
	<p align="center">
        Discontinuous linear dilatation field.
	</p>
    </td>
  </tr>
</table>

This brief analysis of the results demonstrates that the three-field formulation is effective
in circumventing volumetric locking for highly-incompressible media.
The mixed formulation is able to accurately simulate the displacement of a
near-incompressible block under compression.
The command-line output indicates that the volumetric change under extreme compression resulted in
less than 0.01% volume change for a Poisson's ratio of 0.4999.

In terms of run-time, the $Q_2-DGPM_1-DGPM_1$ formulation tends to be more computationally expensive
than the $Q_1-DGPM_0-DGPM_0$ for a similar number of degrees-of-freedom
(produced by adding an extra grid refinement level for the lower-order interpolation).
This is shown in the graph below for a batch of tests run consecutively on a single 4-core (8-thread) machine.
The increase in computational time for the higher-order method is likely due to
the increased band-width required for the higher-order elements.
As previously mentioned, the use of a better solver and preconditioner may mitigate the
expense of using a higher-order formulation.
It was observed that for the given problem using the multithreaded Jacobi preconditioner can reduce the
computational runtime by up to 72% (for the worst case being a higher-order formulation with a large number
of degrees-of-freedom) in comparison to the single-thread SSOR preconditioner.
However, it is the author's experience that the Jacobi method of preconditioning may not be suitable for
some finite-strain problems involving alternative constitutive models.


<table align="center" class="tutorial" cellspacing="3" cellpadding="3">
  <tr>
     <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.Normalised_runtime.png" alt="">
	<p align="center">
        Runtime on a 4-core machine, normalised against the lowest grid resolution $Q_1-DGPM_0-DGPM_0$ solution that utilised a SSOR preconditioner.
	</p>
    </td>
  </tr>
</table>


Lastly, results for the displacement solution for the 2-d problem are showcased below for
two different levels of grid refinement.
It is clear that due to the extra constraints imposed by simulating in 2-d that the resulting
displacement field, although qualitatively similar, is different to that of the 3-d case.


<table align="center" class="tutorial" cellspacing="3" cellpadding="3">
  <tr>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.2d-gr_2.png" alt="">
	<p align="center">
        Y-displacement solution in 2-d for 2 global grid refinement levels.
	</p>
    </td>
    <td align="center">
        <img src="https://www.dealii.org/images/steps/developer/step-44.2d-gr_5.png" alt="">
	<p align="center">
        Y-displacement solution in 2-d for 5 global grid refinement levels.
	</p>
    </td>
  </tr>
</table>

<a name="extensions"></a>
<h3>Possibilities for extensions</h3>

There are a number of obvious extensions for this work:

- Firstly, an additional constraint could be added to the free-energy
  function in order to enforce a high degree of incompressibility in
  materials. An additional Lagrange multiplier would be introduced,
  but this could most easily be dealt with using the principle of
  augmented Lagrange multipliers. This is demonstrated in <em>Simo and
  Taylor (1991) </em>.
- The constitutive relationship used in this
  model is relatively basic. It may be beneficial to split the material
  class into two separate classes, one dealing with the volumetric
  response and the other the isochoric response, and produce a generic
  materials class (i.e. having abstract virtual functions that derived
  classes have to implement) that would allow for the addition of more complex
  material models. Such models could include other hyperelastic
  materials, plasticity and viscoelastic materials and others.
- The program has been developed for solving problems on single-node
  multicore machines. With a little effort, the program could be
  extended to a large-scale computing environment through the use of
  Petsc or Trilinos, using a similar technique to that demonstrated in
  step-40. This would mostly involve changes to the setup, assembly,
  <code>PointHistory</code> and linear solver routines.
- As this program assumes quasi-static equilibrium, extensions to
  include dynamic effects would be necessary to study problems where
  inertial effects are important, e.g. problems involving impact.
- Load and solution limiting procedures may be necessary for highly
  nonlinear problems. It is possible to add a linesearch algorithm to
  limit the step size within a Newton increment to ensure optimum
  convergence. It may also be necessary to use a load limiting method,
  such as the Riks method, to solve unstable problems involving
  geometric instability such as buckling and snap-through.
- Many physical problems involve contact. It is possible to include
  the effect of frictional or frictionless contact between objects
  into this program. This would involve the addition of an extra term
  in the free-energy functional and therefore an addition to the
  assembly routine. One would also need to manage the contact problem
  (detection and stress calculations) itself. An alternative to
  additional penalty terms in the free-energy functional would be to
  use active set methods such as the one used in step-41.
- The complete condensation procedure using LinearOperators has been
  coded into the linear solver routine. This could also have been
  achieved through the application of the schur_complement()
  operator to condense out one or more of the fields in a more
  automated manner.
- Finally, adaptive mesh refinement, as demonstrated in step-6 and
  step-18, could provide additional solution accuracy.
