This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem with periodic BC on imported mesh

+1 vote

I am trying to apply FEniCS to my problem and for that I need to implement periodic BCs. I looked through the example in /demo/undocumented/periodic/python/demo_periodic.py and it works very well. But when I replace the FEniCS mesh generation

mesh = UnitSquareMesh(32, 32)

with my mesh

mesh = Mesh("mesh.xml")

and repeat calculation, the periodic BC does not seem to work (see picture). Here mesh.xml (uploaded here) is the same unit interval mesh, just generated with gmsh and converted by dolfin-convert.

What am I doing wrong?

asked Oct 31, 2013 by Dem FEniCS Novice (160 points)
edited Oct 31, 2013 by Garth N. Wells

1 Answer

+1 vote
 
Best answer

Your mesh might not be periodic. Check that facets on the periodic boundaries match up.

If you're sure your mesh is periodic, then paste complete (but simple) code together with the mesh file.

answered Oct 31, 2013 by Garth N. Wells FEniCS Expert (35,930 points)
selected Nov 1, 2013 by Dem

Thanks for your help. Imposing strict correspondence of the boundary mesh in gmsh actually solved the problem. Apparently, it was not completely identical.

Best regards.

...