Optimality conditions for a class of inverse optimal control problems with partial differential equations. (4th March 2019)