How to get the Function value on some points or the mesh boundary?

See: How to get nemrical solution value for a given point? - #2 by dokken