Hello
I have a 2 dimensional problem with this variational form:
a = inner(u,v)*dens*dx + dt*dt*inner(C*grad(u), grad(v))*dx+dt*dt*inner(C*nabla_grad(u), grad(v))*dx
C is a 6*6 matrix like:
C= Constant(((249,93,88,0,0,0),
(93,249,88,0,0,0),
(88,88,284,0,0,0),
(0,0,0,70,0,0),
(0,0,0,0,70,0),
(0,0,0,0,0,78)))
Other required details are:
dens=2700
domain = mshr.Rectangle(Point(0,0), Point(6,3))
mesh = mshr.generate_mesh(domain, 30)
V=VectorFunctionSpace(mesh, 'CG', 1)
u = TrialFunction(V)
v = TestFunction(V)
When I run my code I get the "shape mismatch" error in the line where I have defined "a" (variational form).
The thing is when I change the shape of matrix C from 66 to 22 like:
C= Constant(((249,0),
(0,249)))
then my code works but I have to use the 6*6 matrix. Does anybody know how I can fix this error? Thanks in advance for your help.