Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4492)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4493)
@@ -2963,22 +2963,21 @@
 void  Tria::CreateKMatrixDiagnosticHorizFriction(Mat Kgg){
 
-
 	/* local declarations */
-	int             i,j;
-	int analysis_type;
+	int       i,j;
+	int       analysis_type;
 
 	/* node data: */
-	const int    numgrids=3;
-	const int    numdof=2*numgrids;
-	double       xyz_list[numgrids][3];
-	int          doflist[numdof];
-	int          numberofdofspernode;
-	
+	const int numvertices = 3;
+	const int numdof   = 2 *numvertices;
+	double    xyz_list[numvertices][3];
+	int       doflist[numdof];
+	int       numberofdofspernode;
+
 	/* gaussian points: */
 	int     num_gauss,ig;
-	double* first_gauss_area_coord  =  NULL;
-	double* second_gauss_area_coord =  NULL;
-	double* third_gauss_area_coord  =  NULL;
-	double* gauss_weights           =  NULL;
+	double *first_gauss_area_coord  = NULL;
+	double *second_gauss_area_coord = NULL;
+	double *third_gauss_area_coord  = NULL;
+	double *gauss_weights           = NULL;
 	double  gauss_weight;
 	double  gauss_l1l2l3[3];
@@ -3000,6 +2999,9 @@
 
 	/*friction: */
-	Friction* friction=NULL;
-	double alpha2;
+	Friction *friction = NULL;
+	double    alpha2;
+	double    alpha2_list[numvertices];                                       //TO BE DELETED
+	double    gauss[numvertices][numvertices] = {{1,0,0},{0,1,0},{0,0,1}}; //TO BE DELETED
+
 
 	double MAXSLOPE=.06; // 6 %
@@ -3018,5 +3020,5 @@
 	
 	/* Get node coordinates and dof list: */
-	GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
+	GetVerticesCoordinates(&xyz_list[0][0], nodes, numvertices);
 	GetDofList(&doflist[0],&numberofdofspernode);
 
@@ -3029,4 +3031,9 @@
 	if (drag_type!=2)ISSMERROR(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
+
+	/*COMPUT alpha2_list (TO BE DELETED)*/
+	for(i=0;i<numvertices;i++){
+		friction->GetAlpha2(&alpha2_list[i],&gauss[i][0],VxEnum,VyEnum,VzEnum); // TO UNCOMMENT
+	}
 
 	/* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
@@ -3042,5 +3049,7 @@
 
 		/*Friction: */
-		friction->GetAlpha2(&alpha2, gauss_l1l2l3,VxEnum,VyEnum,VzEnum);
+		// friction->GetAlpha2(&alpha2, gauss_l1l2l3,VxEnum,VyEnum,VzEnum); // TO UNCOMMENT
+		GetParameterValue(&alpha2,&alpha2_list[0],gauss_l1l2l3); // TO BE DELETED
+
 
 		// If we have a slope > 6% for this element,  it means  we are on a mountain. In this particular case, 
