# Selection of finite element spaces in plasticity computations

**URL:** <https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347>\
**Category:** General Discussion\
**Created:** [August 26, 2026, 4:11pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347 "2026-08-26T16:11:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [August 26, 2026, 4:11pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/1 "2026-08-26T16:11:23Z")

</div>

Hi, everyone

I’m working on a plastic computation script [testGauss.edp](https://community.freefem.org/uploads/short-url/2M4yLjSKAfo0b3uwfKGuZfzPoOE.edp) (8.5 KB) using FreeFEM.

I use two finite‑element spaces"`P1-P0`"  
`func Pk = P1;`  
`func PkDC = P0;`

The algorithm is convergent. However, when I switch to `P1-P1` or `P2-P2`  
`func Pk = P1;`  
`func PkDC = P1;`

or  
`func Pk = P2;`  
`func PkDC = P2;`

The iterationis divergence. I suspect this is because the incremental update of `StrainPlasticity4` (which stores the plastic strain history) may lose inheritance across Gauss points.

`StrainPlasticity4 = [`  
`StrainPlasticity4[0]*(1-logicPlastApex) + ...,`  
`...`  
`];`  
My questions:  
How can I correctly implement higher-order elements (e.g., `P2-P2`)？Should I keep the plastic strain as `P0` even if displacement is upgraded to `P2`? Or is there a standard way in FreeFEM to store history variables directly at Gauss points using arrays instead of FE functions?

Any suggestions would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [August 27, 2026, 1:28pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/2 "2026-08-27T13:28:00Z")

</div>

It is difficult to give an opinion without a description of your problem and algorithm.  
If your plastic relations are not differentiable, to have the Newton algorithm convergent is not easy. Using spaces Vh2 for the displacement and VhDC4 for strain so that u\in VH2 implies strain(u)\in VhDC4 is a good thing. This property holds for the couple P1/P0. But keeping this principle at higher order is not obvious. You could try P2 and P1dc.

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [August 27, 2026, 2:16pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/3 "2026-08-27T14:16:26Z")

</div>

Some year ago , I have add finite element on quadrature point so if you interpolate with this finite element you solve your problem

see element load “Element\_QF” and exemple [FreeFem-sources/examples/plugin/Element\_QF.edp at master · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/plugin/Element_QF.edp)

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [August 28, 2026, 3:16am UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/4 "2026-08-28T03:16:43Z")

</div>

Thank you for your detailed reply, Professor Bouchut.

This algorithm is designed for plasticity computations of the Drucker‑Prager model, and the script involves numerous nonlinear calculations.

I use the following finite elements  
`func Pk = P1;`  
`func PkDC = P1dc;`  
The algorithm is convergent. So the discontinuity does improve iterative stability. However, If I use the finite elements `P2-P2dc`  
`func Pk = P2;`  
`func PkDC = P2dc;`  
The iteration diverges again. I suspect that higher‑order polynomials lead to accumulated errors in the finite‑element evaluation, especially for quantities evaluated at the Gauss points.

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [August 28, 2026, 3:28am UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/5 "2026-08-28T03:28:21Z")

</div>

Thank you, professor Hecht.

I adjust the finite‑element basis functions as follows:

`func Pk = P2;`  
`func PkDC = FEQF5;`

The convergence has been greatly improved, I am wondering whether the basis functions for `FEQF5` retain Gauss‑point values upon interpolation.

In addition, there are some similar basis‑function options `FEQF5`, `FEQF7` and `FEQF9` available in FreeFEM. I am wondering which one would be the optimal choice for my Drucker‑Prager plasticity simulation, and what criteria should be followed for their selection.

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [August 28, 2026, 8:40am UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/6 "2026-08-28T08:40:03Z")

</div>

Did you try P2 for displacement, together with P1dc for strain?

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [August 28, 2026, 1:26pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/7 "2026-08-28T13:26:02Z")

</div>

I tried the following finite elements “`P2-P1dc`”  
`func Pk = P2;`  
`func PkDC = P1dc;`

The iteration results for the first 4 steps are as follows:

```auto
Err:0.00788068 iter:1 iterN:1 dzeta:0.001
Err:0.00285782 iter:1 iterN:2 dzeta:0.001
Err:0.00101314 iter:1 iterN:3 dzeta:0.001
Err:0.00042334 iter:1 iterN:4 dzeta:0.001
Err:0.000211816 iter:1 iterN:5 dzeta:0.001
Err:0.00020721 iter:1 iterN:6 dzeta:0.001
Err:0.000117187 iter:1 iterN:7 dzeta:0.001
Err:8.4723e-05 iter:1 iterN:8 dzeta:0.001
Err:8.07591e-05 iter:1 iterN:9 dzeta:0.001
Err:6.13099e-05 iter:1 iterN:10 dzeta:0.001
Err:5.72291e-05 iter:1 iterN:11 dzeta:0.001
Err:4.0461e-05 iter:1 iterN:12 dzeta:0.001
Err:4.23251e-05 iter:1 iterN:13 dzeta:0.001
Err:3.28271e-05 iter:1 iterN:14 dzeta:0.001
Err:3.66009e-05 iter:1 iterN:15 dzeta:0.001
Err:3.67227e-05 iter:1 iterN:16 dzeta:0.001
Err:3.76409e-05 iter:1 iterN:17 dzeta:0.001
Err:2.70685e-05 iter:1 iterN:18 dzeta:0.001
Err:3.57686e-05 iter:1 iterN:19 dzeta:0.001
Err:2.6923e-05 iter:1 iterN:20 dzeta:0.001
Err:3.17623e-05 iter:1 iterN:21 dzeta:0.001
Err:2.61741e-05 iter:1 iterN:22 dzeta:0.001
Err:3.38402e-05 iter:1 iterN:23 dzeta:0.001
Err:2.52162e-05 iter:1 iterN:24 dzeta:0.001
Err:3.31919e-05 iter:1 iterN:25 dzeta:0.001

Err:0.0191632 iter:2 iterN:1 dzeta:0.001
Err:0.00630102 iter:2 iterN:2 dzeta:0.001
Err:0.00172664 iter:2 iterN:3 dzeta:0.001
Err:0.000715645 iter:2 iterN:4 dzeta:0.001
Err:0.000475505 iter:2 iterN:5 dzeta:0.001
Err:0.000331756 iter:2 iterN:6 dzeta:0.001
Err:0.00024467 iter:2 iterN:7 dzeta:0.001
Err:0.000205287 iter:2 iterN:8 dzeta:0.001
Err:0.000166779 iter:2 iterN:9 dzeta:0.001
Err:0.000146055 iter:2 iterN:10 dzeta:0.001
Err:0.000175105 iter:2 iterN:11 dzeta:0.001
Err:0.000126636 iter:2 iterN:12 dzeta:0.001
Err:0.000111689 iter:2 iterN:13 dzeta:0.001
Err:0.000105825 iter:2 iterN:14 dzeta:0.001
Err:0.000100686 iter:2 iterN:15 dzeta:0.001
Err:9.21829e-05 iter:2 iterN:16 dzeta:0.001
Err:8.24991e-05 iter:2 iterN:17 dzeta:0.001
Err:7.9788e-05 iter:2 iterN:18 dzeta:0.001
Err:7.32052e-05 iter:2 iterN:19 dzeta:0.001
Err:7.10868e-05 iter:2 iterN:20 dzeta:0.001
Err:6.58318e-05 iter:2 iterN:21 dzeta:0.001
Err:6.51684e-05 iter:2 iterN:22 dzeta:0.001
Err:6.13666e-05 iter:2 iterN:23 dzeta:0.001
Err:0.000114378 iter:2 iterN:24 dzeta:0.001
Err:8.215e-05 iter:2 iterN:25 dzeta:0.001

Err:0.0284863 iter:3 iterN:1 dzeta:0.001
Err:0.0180426 iter:3 iterN:2 dzeta:0.001
Err:0.00644425 iter:3 iterN:3 dzeta:0.001
Err:0.00105272 iter:3 iterN:4 dzeta:0.001
Err:0.000500077 iter:3 iterN:5 dzeta:0.001
Err:0.00035004 iter:3 iterN:6 dzeta:0.001
Err:0.000617088 iter:3 iterN:7 dzeta:0.001
Err:0.000374154 iter:3 iterN:8 dzeta:0.001
Err:0.000226146 iter:3 iterN:9 dzeta:0.001
Err:0.000212247 iter:3 iterN:10 dzeta:0.001
Err:0.000166299 iter:3 iterN:11 dzeta:0.001
Err:0.000153894 iter:3 iterN:12 dzeta:0.001
Err:0.000146122 iter:3 iterN:13 dzeta:0.001
Err:0.000154942 iter:3 iterN:14 dzeta:0.001
Err:0.000125897 iter:3 iterN:15 dzeta:0.001
Err:0.000120895 iter:3 iterN:16 dzeta:0.001
Err:0.000115927 iter:3 iterN:17 dzeta:0.001
Err:0.000111882 iter:3 iterN:18 dzeta:0.001
Err:0.000105446 iter:3 iterN:19 dzeta:0.001
Err:0.000102065 iter:3 iterN:20 dzeta:0.001
Err:9.62949e-05 iter:3 iterN:21 dzeta:0.001
Err:9.3869e-05 iter:3 iterN:22 dzeta:0.001
Err:8.87106e-05 iter:3 iterN:23 dzeta:0.001
Err:8.69971e-05 iter:3 iterN:24 dzeta:0.001
Err:8.22981e-05 iter:3 iterN:25 dzeta:0.001

Err:0.0174062 iter:4 iterN:1 dzeta:0.001
Err:0.0034252 iter:4 iterN:2 dzeta:0.001
Err:0.000529362 iter:4 iterN:3 dzeta:0.001
Err:0.000722043 iter:4 iterN:4 dzeta:0.001
Err:0.000617896 iter:4 iterN:5 dzeta:0.001
Err:0.000518067 iter:4 iterN:6 dzeta:0.001
Err:0.000452872 iter:4 iterN:7 dzeta:0.001
Err:0.00039023 iter:4 iterN:8 dzeta:0.001
Err:0.000330106 iter:4 iterN:9 dzeta:0.001
Err:0.000281932 iter:4 iterN:10 dzeta:0.001
Err:0.000243126 iter:4 iterN:11 dzeta:0.001
Err:0.000211403 iter:4 iterN:12 dzeta:0.001
Err:0.000182865 iter:4 iterN:13 dzeta:0.001
Err:0.000160547 iter:4 iterN:14 dzeta:0.001
Err:0.000142233 iter:4 iterN:15 dzeta:0.001
Err:0.000126655 iter:4 iterN:16 dzeta:0.001
Err:0.000115113 iter:4 iterN:17 dzeta:0.001
Err:0.000104183 iter:4 iterN:18 dzeta:0.001
Err:9.58864e-05 iter:4 iterN:19 dzeta:0.001
Err:8.89706e-05 iter:4 iterN:20 dzeta:0.001
Err:8.17956e-05 iter:4 iterN:21 dzeta:0.001
Err:7.80143e-05 iter:4 iterN:22 dzeta:0.001
Err:7.1983e-05 iter:4 iterN:23 dzeta:0.001
Err:6.94518e-05 iter:4 iterN:24 dzeta:0.001
Err:6.43855e-05 iter:4 iterN:25 dzeta:0.001

```

It can be seen from the results that the convergence is not satisfactory.

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [August 28, 2026, 2:18pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/8 "2026-08-28T14:18:04Z")

</div>

Disappointing, but thanks for the feedback!

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [August 28, 2026, 4:16pm UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/9 "2026-08-28T16:16:27Z")

</div>

As far as I understand FEQF5 already yields a 6 order integration formula for strain. Thus eventually you could use P3 or P4 for the displacement, if it gives a convergent sequence.

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [August 29, 2026, 1:54am UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347/10 "2026-08-29T01:54:45Z")

</div>

Thank you for your reply, Professor. I will give it a try and refine the mesh.
