How do I evaluate a grad of a solution on multiple points?

Hi,

I am new to fenics.

I am solving a pde and managed to get a solution, say ‘u’. I am interested in evaluating the gradient of the solution, ‘grad(u)’ . The plot function manages to plot it, but I want to evaluate grad(u) at specific points.

I can evaluate u simply by u(Point(0,0), but how do I evaluate grad(u)?

Something like

p=point(x1,y1)
gu=grad(u)
gu§

Thanks!

P.S. Where can I learn more about these kind of things? I find it hard jumping from the initial fenic tutorial to find how all of these works :slight_smile:

OK. That was fast and easy once I wrote the question.

I just used

gu=grad(u)
Gu=dolfin.project(gu)
Gu(Point(0,0))