Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4374)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4375)
@@ -345,6 +345,15 @@
 		InputUpdateFromSolutionAdjoint( solution);
 	}
-	else if (analysis_type==BedSlopeXAnalysisEnum || analysis_type==SurfaceSlopeXAnalysisEnum || analysis_type==BedSlopeYAnalysisEnum || analysis_type==SurfaceSlopeYAnalysisEnum){
-		InputUpdateFromSolutionSlopeCompute( solution);
+	else if (analysis_type==BedSlopeXAnalysisEnum){
+		InputUpdateFromSolutionBedSlopeX( solution);
+	}
+	else if (analysis_type==BedSlopeYAnalysisEnum){
+		InputUpdateFromSolutionBedSlopeY( solution);
+	}
+	else if (analysis_type==SurfaceSlopeXAnalysisEnum){
+		InputUpdateFromSolutionSurfaceSlopeX( solution);
+	}
+	else if (analysis_type==SurfaceSlopeYAnalysisEnum){
+		InputUpdateFromSolutionSurfaceSlopeY( solution);
 	}
 	else if (analysis_type==PrognosticAnalysisEnum){
@@ -5452,7 +5461,106 @@
 }
 /*}}}*/
-/*FUNCTION Tria::InputUpdateFromSolutionSlopeCompute {{{1*/
-void  Tria::InputUpdateFromSolutionSlopeCompute(double* solution){
-	ISSMERROR(" not supported yet!");
+/*FUNCTION Tria::InputUpdateFromSolutionBedSlopeX {{{1*/
+void  Tria::InputUpdateFromSolutionBedSlopeX(double* solution){
+
+	int i;
+
+	const int    numvertices=3;
+	const int    numdofpervertex=1;
+	const int    numdof=numdofpervertex*numvertices;
+
+	int          doflist[numdof];
+	double       values[numdof];
+
+	int          dummy;
+
+	/*Get dof list: */
+	GetDofList(&doflist[0],&dummy);
+
+	/*Use the dof list to index into the solution vector: */
+	for(i=0;i<numdof;i++){
+		values[i]=solution[doflist[i]];
+	}
+
+	/*Add slopex as inputs to the tria element: */
+	this->inputs->AddInput(new TriaVertexInput(BedSlopeXEnum,values));
+}
+/*}}}*/
+/*FUNCTION Tria::InputUpdateFromSolutionBedSlopeX {{{1*/
+void  Tria::InputUpdateFromSolutionBedSlopeY(double* solution){
+
+	int i;
+
+	const int    numvertices=3;
+	const int    numdofpervertex=1;
+	const int    numdof=numdofpervertex*numvertices;
+
+	int          doflist[numdof];
+	double       values[numdof];
+
+	int          dummy;
+
+	/*Get dof list: */
+	GetDofList(&doflist[0],&dummy);
+
+	/*Use the dof list to index into the solution vector: */
+	for(i=0;i<numdof;i++){
+		values[i]=solution[doflist[i]];
+	}
+
+	/*Add slopex as inputs to the tria element: */
+	this->inputs->AddInput(new TriaVertexInput(BedSlopeYEnum,values));
+}
+/*}}}*/
+/*FUNCTION Tria::InputUpdateFromSolutionSurfaceSlopeX {{{1*/
+void  Tria::InputUpdateFromSolutionSurfaceSlopeX(double* solution){
+
+	int i;
+
+	const int    numvertices=3;
+	const int    numdofpervertex=1;
+	const int    numdof=numdofpervertex*numvertices;
+
+	int          doflist[numdof];
+	double       values[numdof];
+
+	int          dummy;
+
+	/*Get dof list: */
+	GetDofList(&doflist[0],&dummy);
+
+	/*Use the dof list to index into the solution vector: */
+	for(i=0;i<numdof;i++){
+		values[i]=solution[doflist[i]];
+	}
+
+	/*Add slopex as inputs to the tria element: */
+	this->inputs->AddInput(new TriaVertexInput(SurfaceSlopeXEnum,values));
+}
+/*}}}*/
+/*FUNCTION Tria::InputUpdateFromSolutionSurfaceSlopeY {{{1*/
+void  Tria::InputUpdateFromSolutionSurfaceSlopeY(double* solution){
+
+	int i;
+
+	const int    numvertices=3;
+	const int    numdofpervertex=1;
+	const int    numdof=numdofpervertex*numvertices;
+
+	int          doflist[numdof];
+	double       values[numdof];
+
+	int          dummy;
+
+	/*Get dof list: */
+	GetDofList(&doflist[0],&dummy);
+
+	/*Use the dof list to index into the solution vector: */
+	for(i=0;i<numdof;i++){
+		values[i]=solution[doflist[i]];
+	}
+
+	/*Add slopex as inputs to the tria element: */
+	this->inputs->AddInput(new TriaVertexInput(SurfaceSlopeYEnum,values));
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4374)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4375)
@@ -154,5 +154,8 @@
 		void	  InputUpdateFromSolutionAdjoint( double* solution);
 		void	  InputUpdateFromSolutionDiagnosticHoriz( double* solution);
-		void	  InputUpdateFromSolutionSlopeCompute( double* solution);
+		void	  InputUpdateFromSolutionBedSlopeX( double* solution);
+		void	  InputUpdateFromSolutionBedSlopeY( double* solution);
+		void	  InputUpdateFromSolutionSurfaceSlopeX( double* solution);
+		void	  InputUpdateFromSolutionSurfaceSlopeY( double* solution);
 		void	  InputUpdateFromSolutionPrognostic( double* solution);
 		void	  InputUpdateFromSolutionPrognostic2(double* solution);
