I debug code following:
mesh = Mesh("test.xml")
element = VectorElement('P', 'triangle', 1, dim=4)
ME = FunctionSpace(mesh, element)
# Define test functions
du = TrialFunction(ME)
v_c, v_bs, v_bm, v_bd = TestFunctions(ME)
# Define functions
u = Function(ME) # current solution
u0 = Function(ME) # solution from previous converged step
# # Split system functions to access components
c, bs, bm, bd = split(u)
c0, bs0, bm0, bd0 = split(u0)
grad(c) #debug test!
where test.xml is converted from a gmsh test.msh file using dilfin-convert(the msh file is created by PointWise and saved as .msh format, it shows a cube with a very small circle zone at the center of bottom face). when it debug down to the last line, it throw a exception: "cannot determine the geometric dimension from experession". I traced it and seems the Grad(f) function return type has some unkown problems, but c is recognized well. It is strange that 1) within 1.6 version, the code is fine; 2) if I change the first line with mesh = UnitSquareMesh(16, 16)
, no error.
So I have no idea that whether the error due to the incompatible problem between the new version fenics and dolfin-convert module, or duo to the .msh file itself, or I missed some fenics grammer?
Here are test.xml and test.msh.