1// FFCS: for regression tests 2real regtest; 3{ 4 // example of mesh with a given set of internal point (P) 5 // P(i,0) x, 6 // P(i,1) y, 7 // P(i,2) = mesh density close to x,y not mandatory .. 8 verbosity=1; 9 10 real[int,int] P(100,3); 11 for(int i=0; i<P.n; ++i) 12 { 13 P(i,0) = 0.5+0.1*cos(i*0.02*pi); 14 P(i,1) = 0.5+0.1*sin(i*0.02*pi); 15 P(i,2) = 0.05*0.02*2*pi;// mesh size auron point.. 16 } 17// multy border syntax version 3.30 avril 2014 ... 18 real[int] xx=[0,1,1,0], 19 yy=[0,0,1,1]; 20 // radius, centre of the 4 circles .. 21 real[int] RC=[ 0.1, 0.05, 0.05, 0.1], 22 XC= [0.2,0.8,0.2,0.8], 23 YC= [0.2,0.8,0.8,0.2]; 24 int[int] NC=[-10,-11,-12,13]; //list number of $\pm$ segments 25 // of the 4 circles borders 26 27 border bb(t=0,1;i) 28 { 29 // i is the the index variable of the multi border loop 30 int ii = (i+1)%4; real t1 = 1-t; 31 x = xx[i]*t1 + xx[ii]*t; 32 y = yy[i]*t1 + yy[ii]*t; 33 label = 0; ; 34 } 35 36 border cc(t=0,2*pi;i) 37 { 38 x = RC[i]*cos(t)+XC[i]; 39 y = RC[i]*sin(t)+YC[i]; 40 label = i+1; 41 } 42 int[int] nn=[4,4,5,7];// 4 border , with 4,4,5,7 segment respectively . 43 plot(bb(nn),cc(NC),wait=1); 44 mesh th= buildmesh(bb(nn)+cc(NC), points=P,nbvx=100000) ; 45 plot(th,wait=1,ps="multy-border+internal.eps"); 46 regtest = th.area; 47} 48