[firedrake] problems with importing a mesh
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Wed Nov 8 09:15:01 GMT 2017
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
More information about the firedrake
mailing list