Dear Lawrence, Thanks for the response and I will happily open an issue on github. In case others are following this, I am copying my circle.geo code with the one additional line, and it does work. Cheers, Francis lc = 0.1; ln = 1.0; Point(1) = { 0, 0.5*ln, 0, lc}; Point(2) = { ln, 0.5*ln, 0, lc}; Point(3) = { 0.5*ln, 0.5*ln, 0, lc}; Circle(1) = {1,3,2}; Circle(2) = {2,3,1}; Line Loop(100) = {1,2}; Plane Surface(200) = {100}; Physical Surface(300) = {200}; Physical Line(1) = {1,2} ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Friday, March 24, 2017 12:33 PM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] imposing BCs on msh grid 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 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake