// Define u and v as piecewise-P1 continuous functions
func f= x*y;
// Define the PDE
solve Poisson(u, v, solver=LU)
= int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v))

int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v))

int2d(Th1)(f*v)

int2d(Th2)(f*v)

on(1,2, u=0); // The Dirichlet boundary condition

// Plot the result
plot(u,dim=3,value=true,fill=true,ShowAxes=0,ColorScheme =1);

What are those black dots ? It is not working.
Still I am getting this error–
No way to compute bilinear form with integrale of on mesh test or unkown function defined on an other mesh! sorry to hard.

define two subspaces Vh1 and Vh2 of test functions and your solution u=(u1,u2) such that u1 is the restriction of u in Vh1 and u2 the restriction of u in Vh2.

Dear, I think you haven’t understood my query. Take this example
int n=32;int m=ceil(n/sqrt(2));
border C1(t=0,-1){x=t; y=1-t;}
border C2(t=2,0) {x=-1;y=t;}
border C3(t=-1,0) {x=t;y=-t-1;}
border C4(t=-1,1){x=0; y=t;}

Suppose the original problem is to solve the poisson equation in Sh. Now I have splitted Sh into Sh1 and Sh2. I have transformed Sh1 into Th1 and Sh2 into Th2. Now Th1+Th2=Th is a square. I want to solve the poisson equation in a single integral setup. Integration is closure under addition. int_(Sh1+Sh2)=int_(Sh1)+int(Sh2). Now you have suggested to use Sh inplace of Sh1 and Sh2. Then how can I use different transformations for Sh1 and Sh2? Remember that border goes to border. Please help.

Dear sir, Poissonwithoutpartition.edp (799 Bytes)
If you look at the above code there is also the non linear term (dx(u)*dx(v)). But it’s not creating the problem there. u is the finite element solution to be approximated in the fespace Vh and v is the test function in the fespace. Can you please modify the below code of mesh partition poissonmeshpartition.edp (776 Bytes)
It will be a great help if you can help me with this code of mesh partition.