Hello,
I am trying to debug a domain decomposition (DD) code that uses FEniCS to assemble the subdomain problems. The DD method I have coded converges at a different rate and with a different optimality parameter than the same algorithm in FreeFEM++ and my own finite element implementation.
To get to the bottom of this, I have stored the assembled right hand side vector $\int f \cdot v$ in all three cases. I was able to get the FreeFEM++ code to match my attempt at the integration using one-point Gaussian quadrature, but I cannot get the FEniCS code to match the other two. Below is the FEniCS code forcing the particular quadrature rule. Am I doing something wrong?
from dolfin import *
parameters["form_compiler"]["representation"] = "quadrature"
parameters["form_compiler"]["quadrature_degree"] = 2
n = 9
x = np.linspace(0,1,n)
y = np.linspace(0,1,n)
mesh = UnitSquareMesh(n-1,n-1)
f = Expression('(-8.*pi*pi) * ( sin((2.0*pi*x[0]) - (0.75*pi)) * \
sin((2.0*pi*x[1]) - (0.75*pi)) )')
# Function spaces
V = FunctionSpace(mesh, 'CG', 1)
v2d = vertex_to_dof_map(V)
v = TestFunction(V)
L = assemble(inner(f,v)*dx)