# How to interpolate the solution at arbitrary points

**URL:** <https://fenicsproject.discourse.group/t/how-to-interpolate-the-solution-at-arbitrary-points/10555>\
**Category:** dolfinx\
**Created:** [March 1, 2023, 1:30am UTC](https://fenicsproject.discourse.group/t/how-to-interpolate-the-solution-at-arbitrary-points/10555 "2023-03-01T01:30:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gakenshizu](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gakenshizu](https://fenicsproject.discourse.group/u/gakenshizu)\
**Post date:** [March 1, 2023, 1:30am UTC](https://fenicsproject.discourse.group/t/how-to-interpolate-the-solution-at-arbitrary-points/10555/1 "2023-03-01T01:30:02Z")

</div>

Hello, I’m using dolfinx\_mpc v0.6.1.post0 of the docker image.  
I’m new to FEniCSx and not familiar with English, so I apologize if the text is hard to read.

My question is,  
Is there any way to obtain the interpolation of the solution at arbitrary points, given a solved FunctinSpace?

I want to obtain the solution at rectangular grids, given (solved) FunctionSpace at the mesh shown below.

 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/d/d76c620869ca638f7c5f87a3da7dc7e28180529b.jpeg)

---

<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, 2023, 6:15am UTC](https://fenicsproject.discourse.group/t/how-to-interpolate-the-solution-at-arbitrary-points/10555/2 "2023-03-01T06:15:14Z")

</div>

You can get the solution at any point inside the mesh by using eval, see for instance  
[https://jsdokken.com/dolfinx-tutorial/chapter1/membrane\_code.html#making-curve-plots-throughout-the-domain](https://jsdokken.com/dolfinx-tutorial/chapter1/membrane_code.html#making-curve-plots-throughout-the-domain)  
Getting the solution outside the computational requires extrapolation, which can be implemented (But it is not as straightforward as Eval).

---

<div class="post-metadata">

**Author:** ![gakenshizu](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gakenshizu](https://fenicsproject.discourse.group/u/gakenshizu)\
**Post date:** [March 1, 2023, 7:09am UTC](https://fenicsproject.discourse.group/t/how-to-interpolate-the-solution-at-arbitrary-points/10555/3 "2023-03-01T07:09:48Z")

</div>

Thank you so much!  
I could calculate the solution.
