Dear Francis,
On 24 Mar 2017, at 16:14, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello,
When I define a rectanglemesh, as say the following,
mesh = RectangleMesh(n0, n0, Lx, Ly, reorder = None)
I know that I can impose zero Dirichlet boundary conditions using
bc = DirichletBC(Vcg, 0.0, "on_boundary")
However, if I impose a mesh created by gmsh (the circle I asked about last week) say using
mesh = Mesh("circle.msh")
I get the right geometry but it doesn't impose the zero boundary conditions.
Is there something you need to do to impose these boundary conditions?
We currently only "notice" boundaries in the mesh that you loaded from Gmsh if they are marked with physical ids. You need to add something like: Physical Line(1) = {1, 2}; To your .geo file and regenerate the mesh. Then you can either use DirichletBC(V, ..., 1) or DirichletBC(V, ..., "on_boundary"). We should fix the "on_boundary" case to just apply to the entirety of the boundary of the mesh, irrespective of whether there are physical markers. Can you open a github issue so we can track this? Cheers, Lawrence