Let me phrase what I think you are trying to do differently: In your global
MPI universe, you have many function objects and there are instances where one
process has to ask another process to evaluate one of these functions object
within the latter's process space. In order to do this, the former process
needs to (i) be able to identify the rank of the latter process, and (ii)
describe to the latter which function to evaluate and where.
You can do this in many different ways. One is a pair
(hash, point)
another would be
(string, point)
where in either case, the first element of the pair uniquely identifies the
function you want to evaluate in a way that is globally unique. If you have a
way to create a has, that's fine. If you can describe each function by a name
(string), that's fine too. Which you use is probably immaterial. Either way,
it's probably going to end up as a map from hash (or string) to
pointer-to-function.
The approach does not require that each process actually stores all function
objects. It only needs to store those that it will ever be asked to evaluate.
If you name these functions by a string, you can also just create function
objects on each process on-demand, as soon as a request to evaluate it for the
first time comes in.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/