# Understanding FreeFem output

**URL:** <https://community.freefem.org/t/understanding-freefem-output/2673>\
**Category:** General Discussion\
**Created:** [August 30, 2023, 5:31pm UTC](https://community.freefem.org/t/understanding-freefem-output/2673 "2023-08-30T17:31:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![larismartins](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/larismartins/32/2712_2.png) [@larismartins](https://community.freefem.org/u/larismartins)\
**Post date:** [August 30, 2023, 5:31pm UTC](https://community.freefem.org/t/understanding-freefem-output/2673/1 "2023-08-30T17:31:28Z")

</div>

Can someone help me understand the ouput of freefem++?

when we do

```auto
cout << u[] << ;

```

it shows the values of the DoF?

if I want tha value of u on a given point, do I do:

```auto
fespace Vh(Th, P0);
Vh xx = x, yy = y;

cout << u(xx, yy) << ;

```

for example?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [August 30, 2023, 5:46pm UTC](https://community.freefem.org/t/understanding-freefem-output/2673/2 "2023-08-30T17:46:11Z")

</div>

I think the parens do interpolation and take any coordinates. See this  
example I happen to have handy. It uses a 3D line mesh so it may be  
a little confusing but has a lot of the issues in the code,

```auto
load "msh3"
//load "medit"
// load "mjm_dscope_freefem"

int nx=5;
int nx2=7;
int[int] lbe=[100,200]; // begin and end point labels 
meshL Th1=Sline(nx, [1.0*x],label=lbe);
meshL Th2=Sline(nx2, [.5+ .25*(x-.5)],label=lbe);
fespace Vh1(Th1,P1);
fespace Vh2(Th2,P2);
Vh1 u1x=x;
Vh1 u1=(x>.5)?1:0;
Vh2 u2x=x;
Vh2 u2;
matrix A=interpolate(Vh2,Vh1);
u2[]=A*u1[];
cout<<"u1x[]="<<u1x[]<<endl;
cout<<"u1[]="<<u1[]<<endl;
cout<<" u2 "<<endl;
cout<<" u2x[]="<<u2x[]<<endl;
cout<<" u2[]= "<<u2[]<<endl;
cout<<"u1x(.7123,0,0)="<<u1x(.7123,0,0)<<endl;
cout.flush;

```
