I found an error in my Surface integration weights calculations. In some triangles the direction of the normal was found wrong.
Instead of using distance function at location of the normal, I should make sure dot product of normal vector at each quadrature point with normal of interface edge is positive.
Update: fixed above error.
Description.
I'm integrating f(x) over the zero level set of a narrow-band region using the quadrature method by Muller. f(x) is either a constant function or $cos(9 \theta)$ in 1st quadrant.
The scheme produced should be precise for polynomials up to 2nd order in each triangle, so the total error should be of order O(h^2).
Nodes are taken from a 13-point Gaussian quadrature over triangles. 1-D integration over the edges is done using Gaussian rule precise for polynomials of order 9.
Below table is for mesh refinements.
h Time | f=1 error f=$cos(9 \theta)$ error
---------------------------------------------------------------------------------------
0.100000 0:0:0s | 2.95e-06 9.92e-05
0.050000 0:0:1s | 4.22e-09 9.45 3.87e-06 4.68
0.025000 0:0:1s | 1.01e-08 -1.25 5.29e-07 2.87
0.012500 0:0:2s | 6.17e-10 4.03 7.47e-09 6.15
0.006250 0:0:4s | 1.17e-10 2.40 2.38e-09 1.65
0.003125 0:0:7s | 4.90e-12 4.57 3.44e-10 2.79
0.001563 0:0:15s | 3.48e-13 3.82 1.28e-11 4.74
0.000781 0:0:31s | 7.99e-15 5.44 2.11e-13 5.93
-----------------------------------------------------------------------------------------
I'm somewhat puzzled how to interpret these results. ...