# How to rotate strain field?

**URL:** <https://community.freefem.org/t/how-to-rotate-strain-field/2409>\
**Category:** General Discussion\
**Created:** [April 20, 2023, 10:10am UTC](https://community.freefem.org/t/how-to-rotate-strain-field/2409 "2023-04-20T10:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keita](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@Keita](https://community.freefem.org/u/Keita)\
**Post date:** [April 20, 2023, 10:10am UTC](https://community.freefem.org/t/how-to-rotate-strain-field/2409/1 "2023-04-20T10:10:51Z")

</div>

Hi, developpers!!

I’m wondering how to rotate the strain field.  
Is it possible?  
I asked this question because I stumbled upon it.  
I would appreciate it if you could tell me how to do this.

---

<div class="post-metadata">

**Author:** ![vlaude](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/vlaude/32/939_2.png) [@vlaude](https://community.freefem.org/u/vlaude)\
**Post date:** [April 21, 2023, 6:55am UTC](https://community.freefem.org/t/how-to-rotate-strain-field/2409/2 "2023-04-21T06:55:50Z")

</div>

Hi,  
(I am not a developer, this is a community wiki)  
I guess you have a solution u on a domain that is invariant under rotation (e.g. a disk) and you want to obtain R(u) with R some rotation.  
I did that in the past by copying the mesh Th to a rotated version RTh (use function movemesh()), copy the dofs of the FE function u to the dofs (degrees of freedom) in the rotated mesh, in a new FE function v defined on RTh. Finally interpolate between the two meshes by setting w=v with w defined over Th. w approximates the rotated field Ru:

```auto
// not an actual code, just a suggestion
fespace Vh(Th, P2);
Vh u ,w;
// obtain u
// rotate the mesh Th to RTh
fespace RVh(RTh, P2);
RVh v;
for (int i=0; i<RVh.ndof; i++) v[][i]=u[][i];
w=v;

```
