2
mesh Th=square(50,50,[3*x-1.5,3*y-1.5]);
3
func r = sqrt(x*x +y*y);
7
lc = int1d(Th,levelset=r-1.)(1.) ;
8
cout << " len of the level set = " << lc << " = 2pi " << 2*pi ;
9
cout << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl;
10
if( abs(lc-2*pi) > 1e-1) err++;
12
// test linear and bilinear ...
13
varf vl(u,v) = int1d(Th,levelset=r-1.)(v) + int1d(Th,levelset=r-1.)(u*v);
14
real[int] vv=vl(0,Vh);
16
cout << " len of the level set (varf linear ) = " << (lc=vv.sum) << "= 2pi " << 2*pi ;
17
cout << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl;
18
if( abs(lc-2*pi) > 1e-1) err++;
19
real[int] one(Vh.ndof);
21
// sorry not implemented to day ... FH..
22
//matrix VV=vl(Vh,Vh); // no build of matrix with levelset ... sorry not implemented to day ... FH..
24
//cout << " len of the level set (varf bilinear ) = " << (lc=vv.sum) << "= 2pi " << 2*pi;
25
//cout << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl;;
26
//if( abs(lc-2*pi) > 1e-1) err++;
28
cout << " Nb err " << err << endl;