MPI - Gather and distribute a function to all processes (That I can evaluate at a point)

Have a look at: Problem with evaluation at a point in parallel - #6 by MiroK