Unable to create mesh entity using mixed VectorElements

Hello,

I’ve modelled a linear elasticity problem similar to that of https://comet-fenics.readthedocs.io/en/latest/demo/beams_3D/beams_3D.html where 1D beam elements exist in a 3D space. This script was previously working roughly 2 months ago, however, upon revisiting it today I’m recieving an error when generating the mixed vector function space using,

Ue = VectorElement("CG", mesh.ufl_cell(), 1, dim=3)
W = FunctionSpace(mesh, Ue*Ue) 

Prior to this I read in the mesh (.xdmf) using the following,

# Read in mesh
mesh = Mesh()
filename = r"shared/Mesh/mesh.xdmf"
f = XDMFFile(filename)
f.read(mesh)

The error I’m recieving is:

*** Error:   Unable to create mesh entity.
*** Reason:  Mesh entity index 30401 out of range [0, 1265] for entity of dimension 1.
*** Where:   This error was encountered inside MeshEntity.cpp.
*** Process: 0

If anybody knows why this might be occuring I’d greatly appreciate any information or guidance.

Thanks for reading.

Please add a minimal example. Does your code (up to this point) work if you use an IntervalMesh? It is a bit challenging to help you with only two snippets that are not yielding a reproducible code.

My apologies, after a little more investigation (using the example shell.xdmf from the link provided) it seems that the problem lies within my conversion from .msh to .xdmf.

When viewing the converted .xdmf file in Paraview there appears to be connectivity between the end node and nodes that exist on the horizontal axis. As viewed below,


The .msh file shows no connectivity and is as expected.
image
Are you able to suggest a method of conversion for 1D elements?