Thank you for the info. I know that when we impose Dirichlet BCs we know what the values at the boundary should be but I was thinking of evaluating the solution as a sanity check. I will give this a try. ------------------ Francis Poulin Associate Dean, Undergraduate Studies 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: Wednesday, November 8, 2017 4:15 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] problems with importing a mesh On 08/11/17 09:13, Lawrence Mitchell wrote:
On 03/11/17 20:15, Francis Poulin wrote:
If yes, then I think I'm in good shape. One problem is that the boundary layer is very narrow for my choice of parameters so it's hard to know whether the boundary value is really zero. I don't suppose there is an easy way to find out the maximum of the boundary value in the numerical solution?
If you are imposing strong (Dirichlet) conditions, then the solution on the boundary nodes is, by definition, whatever you set it to.
If you have some other means of enforcing boundary conditions and just want to know that the values are on the boundary, you could do:
V = FunctionSpace(...)
selector = DirichletBC(V, 0, "on_boundary")
f = Function(V)
# solve into f
boundary_values = f.dat.data_ro[selector.nodes, ...]
Note this assumes that inspecting the point values of your space makes sense: this is fine for CG and DG, not so for other spaces. Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake