Hi,
I am trying to solve a generalized eigenvalue problem with periodic boundary condition in linear elasticity. However, I noticed that after defining the weak form and assembling the matrices, the left hand side matrix is not symmetric. As the operator is self adjoint, the assembled matrices should be symmetric. For example consider the following simple form (it is just a part of the total weak form):
k=as_vector([kx,ky,kz])
def F2(u,w):
f2=-(inner(mu*grad(u)*k,w))
return f2
var=F2(uR,wR)*dx
assemble(var,tensor=A)
temp=A.array()
if we define the operator L(u)=i*mu*grad(u)*k
we have : <w*,L(u)>=<u*,L(w)>*
which means that the assembled matrix A should be symmetric but it is not. Does any body know how should I fix this issue?
my mesh and function spaces are:
mesh = BoxMesh(Point(-a/2, -a/2, -a/2),Point(a/2, a/2, a/2),10,10,10)
V = VectorElement("Lagrange", mesh.ufl_cell(), 1)
W = MixedElement([V, V])
Vcomplex = FunctionSpace(mesh, W, constrained_domain=PeriodicBoundary())
###Variational Problem
uR, uI = TrialFunctions(Vcomplex)
wR, wI = TestFunctions(Vcomplex)