Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15898)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15899)
@@ -6494,6 +6494,5 @@
 	int        dim;
 	IssmDouble Jdettria,D_scalar,dt,h;
-	IssmDouble vel,vx,vy,dvxdx,dvydy;
-	IssmDouble dvx[2],dvy[2];
+	IssmDouble vel,vx,vy;
 	IssmDouble xyz_list[NUMVERTICES][3];
 
@@ -6527,6 +6526,4 @@
 		vx_input->GetInputValue(&vx,gauss);
 		vy_input->GetInputValue(&vy,gauss);
-		vx_input->GetInputDerivativeValue(&dvx[0],&xyz_list[0][0],gauss);
-		vy_input->GetInputDerivativeValue(&dvy[0],&xyz_list[0][0],gauss);
 
 		D_scalar=gauss->weight*Jdettria;
@@ -6540,6 +6537,4 @@
 		GetBprimeMasstransport(Bprime,&xyz_list[0][0],gauss);
 
-		dvxdx=dvx[0];
-		dvydy=dvy[1];
 		D_scalar=dt*gauss->weight*Jdettria;
 
@@ -6597,6 +6592,5 @@
 	int        dim;
 	IssmDouble Jdettria,D_scalar,dt,h;
-	IssmDouble vel,vx,vy,dvxdx,dvydy;
-	IssmDouble dvx[2],dvy[2];
+	IssmDouble vel,vx,vy;
 	IssmDouble xyz_list[NUMVERTICES][3];
 
@@ -6630,6 +6624,4 @@
 		vx_input->GetInputValue(&vx,gauss);
 		vy_input->GetInputValue(&vy,gauss);
-		vx_input->GetInputDerivativeValue(&dvx[0],&xyz_list[0][0],gauss);
-		vy_input->GetInputDerivativeValue(&dvy[0],&xyz_list[0][0],gauss);
 
 		D_scalar=gauss->weight*Jdettria;
@@ -6643,6 +6635,4 @@
 		GetBprimeMasstransport(Bprime,&xyz_list[0][0],gauss);
 
-		dvxdx=dvx[0];
-		dvydy=dvy[1];
 		D_scalar=dt*gauss->weight*Jdettria;
 
@@ -6820,5 +6810,5 @@
 	Input* vz_input     = inputs->GetInput(VzEnum);                         _assert_(vz_input);
 	Input* ms_input     = inputs->GetInput(SurfaceforcingsMassBalanceEnum); _assert_(ms_input);
-	Input* surface_input= inputs->GetInput(ThicknessEnum);              _assert_(surface_input);
+	Input* surface_input= inputs->GetInput(SurfaceEnum);                    _assert_(surface_input);
 
 	/*Initialize mb_correction to 0, do not forget!:*/
@@ -6832,4 +6822,5 @@
 		GetNodalFunctions(basis,gauss);
 
+		vz_input->GetInputValue(&vz,gauss);
 		ms_input->GetInputValue(&ms,gauss);
 		surface_input->GetInputValue(&surface,gauss);
@@ -6877,4 +6868,5 @@
 		GetNodalFunctions(basis,gauss);
 
+		vz_input->GetInputValue(&vz,gauss);
 		mb_input->GetInputValue(&mb,gauss);
 		bed_input->GetInputValue(&bed,gauss);
