Suppose I have an interval mesh from (0,1) and u is the solution created on the mesh. I need to get the value on a point, such as on 0.25 in (0,1) of the solution u. I find some functions such as get_local, array() (which seems to be no longer supported)
I am using fenics2018 version. Is there any simply way to do it? Any help is appreciated.
is supported.
If your point does not match a mesh vertex, you need to call the function eval function, i.e. print(u(Point(0.25))) to get the solution at that point.
@dokken, what about the case if many points need to be evaluated, not only one point? For example, I am interested in evaluating u at all Gauss points, saying that I already obtained their coordinates.