border C2(t=0.1,0.5*pi){x=cos(t); y=sin(t);}//gap border C3(t=0.5,0.51*pi){x=cos(t); y=sin(t);}//2nd elec border C4(t=0.51,1*pi){x=cos(t); y=sin(t);}//gap border C5(t=1,1.1*pi){x=cos(t); y=sin(t);}//3rd elec border C6(t=1.1,1.5*pi){x=cos(t); y=sin(t);}//gap border C7(t=1.5,1.51*pi){x=cos(t); y=sin(t);}//4th elec border C8(t=1.51,2*pi){x=cos(t); y=sin(t);}//gap //border E1(t=0,2*pi) { x=0.2*cos(t)-0.5; y=0.2*sin(t)+0.5; }// circle with in a circle //border b(t=0,2*pi){ x=0.3+0.3*cos(t); y=0.3*sin(t);label=2;} // plot(a(50)+b(+30)) ; // to see a plot of the border mesh // mesh Thwithouthole= buildmesh(a(50)+b(+30)); //plot(Thwithhole,wait=1,ps="Thwithhole.eps"); mesh Th = buildmesh (C(50)); fespace Vh(Th,P1); Vh u,v; func f= 0; // definition of a called f function real cpu=clock(); // get the clock is second solve Poisson(u,v,solver=LU) = int2d(Th)(sigma*dx(u)*dx(v) + sigma*dy(u)*dy(v)) + int1d(Th)(c1,1*v)+ int1d(Th)(c2,-1*v);//from the varaitional formulation, current 1 milli amp plot(u); cout << " CPU time = " << clock()-cpu << endl;