This is a proof-of-concept implementation of the algorithm introduced in 
A low-rank in time approach to PDE-constrained optimization, 
M Stoll, T Breiten, SIAM Journal on Scientific Computing, 2015


Please run
run_heat_example.m

1) This codes requires the control toolbox as kpik, the Sylvester solver needs to 
solve a small matrix equation via lyap. You can replace this with your own solver.
2) The performance of this code can be improved if instead of a direct solve a multigrid package is used.
   We employed the HSL_MI20 AMG routines and one can find the calls still in the code mostly commented out.
3) More advanced implementations for the Sylvester equation shall be used. We here explicitly inverted the mass
   matrix, which was diagonal. This can be avoided if other tools are used but should.
   
4) Please rememeber the code is not perfect. Suggestions are welcome at
stollm@mpi-magdeburg.mpg.de


