# How to get stress field of a subdomain created by MeshView?

**URL:** <https://fenicsproject.discourse.group/t/how-to-get-stress-field-of-a-subdomain-created-by-meshview/5166>\
**Category:** Linear Algebra\
**Created:** [February 26, 2021, 4:20pm UTC](https://fenicsproject.discourse.group/t/how-to-get-stress-field-of-a-subdomain-created-by-meshview/5166 "2021-02-26T16:20:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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 1, 2021, 2:34pm UTC](https://fenicsproject.discourse.group/t/how-to-get-stress-field-of-a-subdomain-created-by-meshview/5166/5 "2021-03-01T14:34:17Z")

</div>

You should try to reduce your problem to the smallest possible problem, with as few variables as possible, that reproduces your error. See for instance: [How to define a Function in a submesh based on function values present in an adjoining submesh? - #4 by dokken](https://fenicsproject.discourse.group/t/how-to-define-a-function-in-a-submesh-based-on-function-values-present-in-an-adjoining-submesh/4047/4) which reduces the original example: [How to define a Function in a submesh based on function values present in an adjoining submesh? - #3 by Sabarish\_Gopi](https://fenicsproject.discourse.group/t/how-to-define-a-function-in-a-submesh-based-on-function-values-present-in-an-adjoining-submesh/4047/3) from over 100 lines of code to 48.

The key to get help is to identify what particular function causes the issue, remove all code that should be called after this error, and then remove one and one variable, and check that your code still produces the error.

---

_[View the full topic](https://fenicsproject.discourse.group/t/how-to-get-stress-field-of-a-subdomain-created-by-meshview/5166)._
