# Matrix in two dimension of space

**URL:** https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040
**Category:** General Discussion
**Created:** [June 16, 2021, 9:18am UTC](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040 "2021-06-16T09:18:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aicha](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aicha](https://community.freefem.org/u/Aicha)
#### Post date: [June 16, 2021, 9:18am UTC](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040/1 "2021-06-16T09:18:27Z")

</div>

Hi,  
can anyone help in this question please

i found in a code FF++ in one dimension of space the follwing instructions:

int Nbx=1e4;  
real tau=10.;  
meshL Th=segment(Nbx,[x\*L,0.]);  
fespace Vh(Th,typeFE);  
Vh I0;  
Vh Itmtau=oldI,Itausave;  
int ntau=(tau)/dt;  
real[int,int] Itau(Vh.ndof,ntau+2);  
Itausave=oldI;  
Itau(:,0)=Itausave[];  
int op=0,ittau=0,ittmtau=0;  
int it,itsave;

My question is: what are the changes  
to be made on this piece of code when we are in 2D of space:  
real H=20., L=20.;  
mesh Th = square(N,N,[L_x,H_y]);

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [June 16, 2021, 9:35am UTC](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040/2 "2021-06-16T09:35:03Z")

</div>

This is a good way to start.

---

<div class="post-metadata">

### Author: ![Aicha](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aicha](https://community.freefem.org/u/Aicha)
#### Post date: [June 16, 2021, 9:39am UTC](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040/3 "2021-06-16T09:39:53Z")

</div>

So what are the changes we have to do in 2D? Please
