# How to restrict solutions or stresses to subdomains?

**URL:** <https://fenicsproject.discourse.group/t/how-to-restrict-solutions-or-stresses-to-subdomains/6300>\
**Category:** I/O\
**Created:** [July 27, 2021, 7:22am UTC](https://fenicsproject.discourse.group/t/how-to-restrict-solutions-or-stresses-to-subdomains/6300 "2021-07-27T07:22:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [July 29, 2021, 7:14am UTC](https://fenicsproject.discourse.group/t/how-to-restrict-solutions-or-stresses-to-subdomains/6300/6 "2021-07-29T07:14:36Z")

</div>

> [@steve](#):
>
> Your example, dokker, worked perfectly well as long as the bodies didn’t have different material properties

Note that you can use a DG0 function for the Lame parameters, such that you only need one definition og sigma, see: [How to define different materials / importet 3D geometry (gmsh) - #2 by dokken](https://fenicsproject.discourse.group/t/how-to-define-different-materials-importet-3d-geometry-gmsh/2709/2)

> [@steve](#):
>
> By the way, the element order of the FunctionSpace for von Mises stresses are reduced by one compared to that of the displacments, because of the derivative in sigma and epsilon. Did I get that right?

That is correct.

---

_[View the full topic](https://fenicsproject.discourse.group/t/how-to-restrict-solutions-or-stresses-to-subdomains/6300)._
