On 17/02/16 14:36, Tomasz Salwa [RPG] wrote:
Dear All,
How do I instruct Firedrake about the dimension of the problem when using external mesh from gmsh?
I had a working code with utility mesh. I changed:
mesh = RectangleMesh(nx, nz, Lx, Lz)
V = VectorFunctionSpace(mesh, "CG", 1)
to:
mesh = Mesh("mesh.msh")
Is this a 3-D mesh, or a 2-D mesh?
V = VectorFunctionSpace(mesh, "CG", 1, dim=2)
yet I get the error at further expressions that worked previously:
...
File "/home/mmtjs/work/programs/lin_coupled_fd_2d/lib/beam.py", line 73, in initialize_solvers + self.mu * ( fd.inner( delX, delv_B + fd.transpose(delv_B) ) )
Is delv_B a tensor? If so, what is its shape? It's possible that if you have a 3D mesh and build a 2D VectorFunctionSpace then if you have: f = grad(Function(V)) f will have shape (3, 2) whereas transpose(f) will have shape (2, 3). So clearly those don't match. Lawrence