in the example code, the source term is
prode = -0.126kp(pow(2dx(Ux),2)+pow(2dy(Uy),2)+2pow(dx(Uy)+dy(Ux),2))/2;
prodk = -prodekp/epp*0.09/0.126;
but both of them should be negative, so prodk should be
prodk = prodekp/epp0.09/0.126;
in the example code, the source term is
prode = -0.126kp(pow(2dx(Ux),2)+pow(2dy(Uy),2)+2pow(dx(Uy)+dy(Ux),2))/2;
prodk = -prodekp/epp*0.09/0.126;
but both of them should be negative, so prodk should be
prodk = prodekp/epp0.09/0.126;