File: tablefunction.edp

package info (click to toggle)
freefem%2B%2B 3.47%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 132,088 kB
  • ctags: 19,726
  • sloc: cpp: 138,951; ansic: 22,605; sh: 4,951; makefile: 2,935; fortran: 1,147; perl: 768; awk: 282; php: 182
file content (21 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
verbosity=2;
mesh Thxy=triangulate("xyf");
plot(Thxy,wait=1,ps="Thxy.ps");
fespace Vhxy(Thxy,P1);
Vhxy fxy;

{ ifstream file("xyf");
   real xx,yy;
   for(int i=0;i<fxy.n;i++)
   file >> xx >>yy >> fxy[][i]; 
}

plot(fxy,wait=1,ps="xyf.ps");

// new way to bluid a mesh   version 2.23-2
Vhxy xx=x,yy=y;

mesh Th=triangulate(xx[],yy[]);
cout << " region = " <<  triangulate(xx[],yy[])[1].region  <<endl; 
cout << fxy[]'*fxy[] << endl;
plot(Th,wait=1);