Use shared_ptr for multimesh Function parts