# Order of variables in matrix generated with varf with a \[P1, P1, P0\] fespace

**URL:** https://community.freefem.org/t/order-of-variables-in-matrix-generated-with-varf-with-a-p1-p1-p0-fespace/3489
**Category:** General Discussion
**Created:** [September 17, 2024, 2:51pm UTC](https://community.freefem.org/t/order-of-variables-in-matrix-generated-with-varf-with-a-p1-p1-p0-fespace/3489 "2024-09-17T14:51:22Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![pi.3.141](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@pi.3.141](https://community.freefem.org/u/pi.3.141)
#### Post date: [May 29, 2025, 2:28pm UTC](https://community.freefem.org/t/order-of-variables-in-matrix-generated-with-varf-with-a-p1-p1-p0-fespace/3489/6 "2025-05-29T14:28:15Z")

</div>

Hello,  
I have a closely related question. To make it more precise, assume we have

fespace UP(Th,[P1b,P1]);  
fespace XY(Th,[P1,P1]);  
varf UPxXY([u,p],[xh,yh]) = int(Th)(…); // for example …=u_xh+u_yh+p_xh+p_yh);  
matrix M=UPxXY(UP,XY);

One can take UP instead of XY, or vice-versa. Motivated by problem specifics, I want to modify M, say its element M(i,j). For this, I need to know the dof corresponding to ith row and to jth column.

Wondering how to get this information directly or a posteriori. Definitely this depends on the algorithm the developers have used for computing M. I hope anyone can help.

Thank you!

---

_[View the full topic](https://community.freefem.org/t/order-of-variables-in-matrix-generated-with-varf-with-a-p1-p1-p0-fespace/3489)._
