# When using CG degree 1, the result corresponds to degree 2

**URL:** <https://fenicsproject.discourse.group/t/when-using-cg-degree-1-the-result-corresponds-to-degree-2/2751>\
**Category:** Uncategorized\
**Created:** [March 30, 2020, 1:01am UTC](https://fenicsproject.discourse.group/t/when-using-cg-degree-1-the-result-corresponds-to-degree-2/2751 "2020-03-30T01:01:11Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [March 30, 2020, 4:28pm UTC](https://fenicsproject.discourse.group/t/when-using-cg-degree-1-the-result-corresponds-to-degree-2/2751/10 "2020-03-30T16:28:04Z")

</div>

There are two things that you are ignoring. The first one is that even if you would like to have a linear stress, you do not want a continuous lagrange representation.  
Therefore you need to use write\_checkpoint. Using a function space that is linear discontinuous you obtain the attached image.

```auto
T = TensorFunctionSpace(mesh, 'DQ', fem_order-1)
strain = project(eps(u), T)
[e11, e12, e21, e22] = strain.split(True)
file_results = XDMFFile("./output2.xdmf")
file_results.write_checkpoint(e12, "e12",0.)

```

 ![DQ](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/1X/1c6bc91165abcb9a1b0408700fe64bab4dca1d48.png)

If you plot this over the line from 0,0.2 to 2,0.2, you obtain the linear stress you are looking for.

---

_[View the full topic](https://fenicsproject.discourse.group/t/when-using-cg-degree-1-the-result-corresponds-to-degree-2/2751)._
