Hi, i am getting a term as following:
intalledges(Th) ((average(v1vv1) +average(v2vv2)) /nTonEdge*(nTonEdge-1)) , where v1, v2 are unkowns and vv1 and vv2 are test functions.
How, incorporate this term in FreeFem++??.
Hi, i am getting a term as following:
intalledges(Th) ((average(v1vv1) +average(v2vv2)) /nTonEdge*(nTonEdge-1)) , where v1, v2 are unkowns and vv1 and vv2 are test functions.
How, incorporate this term in FreeFem++??.
Sorry the average of product in not implemented, but if the fonction are P1 you have just use a quadrature with 1 point
Respected professor, can you give details code of this term if the function v1, vv1, v2, and vv2 are all in Vh(Th, P1dc) and also what will be that term if all v1, vv1, v2, and vv2 are in Vh(Th, P2dc). In addition, if the space Vh(Th, P3dc) then what will be that term code sir??. I need details code of that term so that no error comes on FreeFem++.
I need a general codes so that i can implement it for any P^k polynomials sir.
Thanks for your replies sir.
If I understand well, by average you mean half the sum of the two values on each side of the edge.
For a single function u this is mean(u)=(u_1+u_2)/2 where the indices 1 and 2 refer to the two sides of the edge.
Now if you have the product mean(u*v), you can use the quadratic identity
\frac{u_1v_1+u_2v_2}{2}=\frac{u_1+u_2}{2}\frac{v_1+v_2}{2}
+\frac{u_2-u_1}{2}\frac{v_2-v_1}{2}
Hence mean(u*v)=mean(u)*mean(v)+jump(u)*jump(v)/4.
This formula is directly usable in FreeFem
Thank you so much dear professor.