Hello Dear orange, your code is giving very good results. But which formulation you used in the code??. Why you are defining two spaces??.
Do you used the formulation in the following:
(equation: 3)
I have not understand your problem formulation: you have not taken (dxx(sigma1)+dyy(sigma2)) term still you have used others.
Blockquote
problem WGM([sigma1, sigma2, uh], [tau1, tau2, vh], solver=UMFPACK)
= -int2d(Th)( vh*(dx(sigma1)+dy(sigma2)) )
+intalledges(Th)( (1-nTonEdge)( mean(vh)(jump(sigma1)N.x + jump(sigma2)N.y) )/nTonEdge )
+intalledges(Th)((jump(uh)jump(vh))/lenEdge)
+int2d(Th)(sigma1tau1 + sigma2tau2)
+int2d(Th)( uh(dx(tau1)+dy(tau2)) )
-intalledges(Th)( (1-nTonEdge)( mean(uh)(jump(tau1)N.x + jump(tau2)N.y) )/nTonEdge )
//+int2d(Th)(ghvh)
-int2d(Th)(fvh)// linear form
+on(1,2,3,4,uh=0)
Blockquote
Does you taken the formulation of the following paper or anything else:
J Comp and app math 2014.pdf (377.6 KB)
Specifically, why you taken the following term:
Blockquote
+int2d(Th)(sigma1tau1 + sigma2tau2)
+int2d(Th)( uh*(dx(tau1)+dy(tau2)) )
-intalledges(Th)( (1-nTonEdge)( mean(uh)(jump(tau1)*N.x + jump(tau2)N.y) )/nTonEdge )
//+int2d(Th)(ghvh)
Blockquote
I have not found like any term in the above paper. Can you share your formulation pls??
Also, I have observed :
Blockquote
fespace Vh(Th,P2dc); // Discontinous P2 finite element
Vh uh,vh;
Blockquote
fespace Wh(Th,P1dc);
Wh sigma1,sigma2;
Wh tau1, tau2;
This two spaces Vh and Wh should be such that Wh has one less polynomial degree. Why you taken like this ??.
I need your clarification brother.
In the paper still they define with same degree>
Regarding boundary condition: +on(1,2,3,4,uh=0) . You have to take it as you used uex=sin(pi*x)sin(piy) which is zero on boundary of the domain D=[0,1]^2.
I have checked your code with P1, P2, and P3. All gives good results.
Thanks in advance.