Index: issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 16947)
@@ -83,7 +83,56 @@
 }
 /*}}}*/
+void Element::GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity){/*{{{*/
+	/*Compute deformational heating from epsilon and viscosity */
+
+	IssmDouble epsilon_matrix[3][3];
+	IssmDouble epsilon_eff;
+	IssmDouble epsilon_sqr[3][3];
+
+	/* Build epsilon matrix */
+	epsilon_matrix[0][0]=epsilon[0];
+	epsilon_matrix[1][0]=epsilon[3];
+	epsilon_matrix[2][0]=epsilon[4];
+	epsilon_matrix[0][1]=epsilon[3];
+	epsilon_matrix[1][1]=epsilon[1];
+	epsilon_matrix[2][1]=epsilon[5];
+	epsilon_matrix[0][2]=epsilon[4];
+	epsilon_matrix[1][2]=epsilon[5];
+	epsilon_matrix[2][2]=epsilon[2];
+
+	/* Effective value of epsilon_matrix */
+	epsilon_sqr[0][0]=epsilon_matrix[0][0]*epsilon_matrix[0][0];
+	epsilon_sqr[1][0]=epsilon_matrix[1][0]*epsilon_matrix[1][0];
+	epsilon_sqr[2][0]=epsilon_matrix[2][0]*epsilon_matrix[2][0];
+	epsilon_sqr[0][1]=epsilon_matrix[0][1]*epsilon_matrix[0][1];
+	epsilon_sqr[1][1]=epsilon_matrix[1][1]*epsilon_matrix[1][1];
+	epsilon_sqr[2][1]=epsilon_matrix[2][1]*epsilon_matrix[2][1];
+	epsilon_sqr[0][2]=epsilon_matrix[0][2]*epsilon_matrix[0][2];
+	epsilon_sqr[1][2]=epsilon_matrix[1][2]*epsilon_matrix[1][2];
+	epsilon_sqr[2][2]=epsilon_matrix[2][2]*epsilon_matrix[2][2];
+	epsilon_eff=1/sqrt(2.)*sqrt(epsilon_sqr[0][0]+epsilon_sqr[0][1]+ epsilon_sqr[0][2]+ epsilon_sqr[1][0]+ epsilon_sqr[1][1]+ epsilon_sqr[1][2]+ epsilon_sqr[2][0]+ epsilon_sqr[2][1]+ epsilon_sqr[2][2]);
+
+	/*Phi = Tr(sigma * eps) 
+	 *    = Tr(sigma'* eps)
+	 *    = 2 * eps_eff * sigma'_eff
+	 *    = 4 * mu * eps_eff ^2*/
+	*phi=4.*epsilon_eff*epsilon_eff*viscosity;
+}
+/*}}}*/
 Input* Element::GetInput(int inputenum){/*{{{*/
 	return inputs->GetInput(inputenum);
 }/*}}}*/
+void Element::GetVerticesSidList(int* sidlist){/*{{{*/
+
+	int numvertices = this->GetNumberOfVertices();
+	for(int i=0;i<numvertices;i++) sidlist[i]=this->vertices[i]->Sid();
+}
+/*}}}*/
+void Element::GetVerticesConnectivityList(int* connectivity){/*{{{*/
+
+	int numvertices = this->GetNumberOfVertices();
+	for(int i=0;i<numvertices;i++) connectivity[i]=this->vertices[i]->Connectivity();
+}
+/*}}}*/
 bool Element::IsFloating(){/*{{{*/
 
@@ -104,9 +153,139 @@
 	return shelf;
 }/*}}}*/
+void Element::ResultInterpolation(int* pinterpolation,int output_enum){/*{{{*/
+
+	Input* input=this->inputs->GetInput(output_enum);
+
+	/*If this input is not already in Inputs, maybe it needs to be computed?*/
+	if(!input){
+		switch(output_enum){
+			case ViscousHeatingEnum:
+				this->ViscousHeatingCreateInput();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensorxxEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensorxyEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensorxzEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensoryyEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensoryzEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			case StressTensorzzEnum: 
+				this->ComputeStressTensor();
+				input=this->inputs->GetInput(output_enum);
+				break;
+			default:
+				_error_("input "<<EnumToStringx(output_enum)<<" not found in element");
+		}
+	}
+
+	/*Assign output pointer*/
+	*pinterpolation = input->GetResultInterpolation();
+}/*}}}*/
+void Element::ResultToVector(Vector<IssmDouble>* vector,int output_enum){/*{{{*/
+
+	Input* input=this->inputs->GetInput(output_enum);
+	if(!input) _error_("input "<<EnumToStringx(output_enum)<<" not found in element");
+
+	switch(input->GetResultInterpolation()){
+		case P0Enum:{
+			IssmDouble  value;
+			bool        bvalue;
+			Input*      input = this->GetInput(output_enum); _assert_(input);
+			switch(input->ObjectEnum()){
+				case DoubleInputEnum:
+					input->GetInputValue(&value);
+					break;
+				case BoolInputEnum:
+					input->GetInputValue(&bvalue);
+					value=reCast<IssmDouble>(bvalue);
+					break;
+				default:
+					_error_("Input of type "<<EnumToStringx(input->GetResultInterpolation())<<" not supported");
+			}
+			vector->SetValue(this->Sid(),value,INS_VAL);
+			break;
+		}
+		case P1Enum:{
+			int         numvertices = this->GetNumberOfVertices();
+			IssmDouble *values      = xNew<IssmDouble>(numvertices);
+			int        *connectivity= xNew<int>(numvertices);
+			int        *sidlist     = xNew<int>(numvertices);
+
+			this->GetVerticesSidList(sidlist);
+			this->GetVerticesConnectivityList(connectivity);
+			this->GetInputListOnVertices(values,output_enum);
+			for(int i=0;i<numvertices;i++) values[i] = values[i]/reCast<IssmDouble>(connectivity[i]);
+
+			vector->SetValues(numvertices,sidlist,values,ADD_VAL);
+
+			xDelete<IssmDouble>(values);
+			xDelete<int>(connectivity);
+			xDelete<int>(sidlist);
+			break;
+		}
+		default:
+					 _error_("interpolation "<<EnumToStringx(input->GetResultInterpolation())<<" not supported yet");
+	}
+} /*}}}*/
 IssmDouble Element::TMeltingPoint(IssmDouble pressure){/*{{{*/
 	_assert_(matpar);
 	return this->matpar->TMeltingPoint(pressure);
 }/*}}}*/
-
+void Element::ViscousHeatingCreateInput(void){/*{{{*/
+
+	/*Intermediaries*/
+	IssmDouble phi;
+	IssmDouble viscosity;
+	IssmDouble epsilon[6];
+	IssmDouble thickness;
+	IssmDouble *xyz_list = NULL;
+
+	/*Fetch number vertices and allocate memory*/
+	int         numvertices    = this->GetNumberOfVertices();
+	IssmDouble* viscousheating = xNew<IssmDouble>(numvertices);
+
+	/*Retrieve all inputs and parameters*/
+	this->GetVerticesCoordinatesBase(&xyz_list);
+	Input* vx_input        = this->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input        = this->GetInput(VyEnum); _assert_(vy_input);
+	Input* vz_input        = this->GetInput(VzEnum); _assert_(vz_input);
+	Input* thickness_input = this->GetInput(ThicknessEnum); _assert_(thickness_input);
+
+	/*loop over vertices: */
+	Gauss* gauss=this->NewGauss();
+	for (int iv=0;iv<numvertices;iv++){
+		gauss->GaussVertex(iv);
+
+		thickness_input->GetInputValue(&thickness,gauss);
+
+		this->StrainRateFS(&epsilon[0],xyz_list,gauss,vx_input,vy_input,vz_input);
+		this->material->GetViscosity3dFS(&viscosity,&epsilon[0]);
+		this->GetPhi(&phi,&epsilon[0],viscosity);
+
+		viscousheating[iv]=phi*thickness;
+	}
+
+	/*Create PentaVertex input, which will hold the basal friction:*/
+	this->AddInput(ViscousHeatingEnum,viscousheating,P1Enum);
+
+	/*Clean up and return*/
+	xDelete<IssmDouble>(viscousheating);
+	delete gauss;
+}
+/*}}}*/
 void Element::ViscosityFS(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/
 
Index: issm/trunk-jpl/src/c/classes/Elements/Element.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 16947)
@@ -61,9 +61,15 @@
 		Input*     GetInput(int inputenum);
 		IssmDouble GetMaterialParameter(int enum_in);
+		void       GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity);
+		void       GetVerticesSidList(int* sidlist);
+		void       GetVerticesConnectivityList(int* connectivitylist);
 		bool       IsFloating(); 
+		void       ResultInterpolation(int* pinterpolation,int output_enum);
+		void       ResultToVector(Vector<IssmDouble>* vector,int output_enum);
 		void       StrainRateSSA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input);
 		void       StrainRateHO(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input);
 		void       StrainRateFS(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input);
 		IssmDouble TMeltingPoint(IssmDouble pressure);
+		void       ViscousHeatingCreateInput(void);
 		void       ViscosityFS(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input);
 		void       ViscosityHO(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input);
@@ -77,6 +83,6 @@
 		void       TransformLoadVectorCoord(ElementVector* pe,int transformenum);
 		void       TransformLoadVectorCoord(ElementVector* pe,int* transformenum_list);
-		void       TransformLoadVectorCoord(ElementVector* pe,int numnodes,int transformenum){_error_("not implemented yet");};      /*Tiling only*/
-		void       TransformLoadVectorCoord(ElementVector* pe,int numnodes,int* transformenum_list){_error_("not implemented yet");};      /*Tiling only*/
+		void       TransformLoadVectorCoord(ElementVector* pe,int numnodes,int transformenum){_error_("not implemented yet");};/*Tiling only*/
+		void       TransformLoadVectorCoord(ElementVector* pe,int numnodes,int* transformenum_list){_error_("not implemented yet");};/*Tiling only*/
 		void       TransformLoadVectorCoord(ElementVector* pe,Node** nodes_list,int numnodes,int* transformenum_list);
 		void       TransformSolutionCoord(IssmDouble* values,int transformenum);
@@ -87,5 +93,5 @@
 		void       TransformStiffnessMatrixCoord(ElementMatrix* Ke,int* transformenum_list);
 		void       TransformStiffnessMatrixCoord(ElementMatrix* Ke,int numnodes,int transformenum);
-		void       TransformStiffnessMatrixCoord(ElementMatrix* Ke,int numnodes,int* transformenum_list){_error_("not implemented yet");};      /*Tiling only*/
+		void       TransformStiffnessMatrixCoord(ElementMatrix* Ke,int numnodes,int* transformenum_list){_error_("not implemented yet");};/*Tiling only*/
 		void       TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes_list,int numnodes,int* transformenum_list);
 
@@ -168,6 +174,5 @@
 		virtual void   ComputeStrainRate(Vector<IssmDouble>* eps)=0;
 		virtual void   ComputeStressTensor(void)=0;
-		virtual void   ResultInterpolation(int* pinterpolation,int output_enum)=0;
-		virtual void   ResultToVector(Vector<IssmDouble>* vector,int output_enum)=0;
+
 		virtual void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finite_element)=0;
 		virtual void   InputDuplicate(int original_enum,int new_enum)=0;
Index: issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16947)
@@ -1153,16 +1153,4 @@
 }
 /*}}}*/
-/*FUNCTION Penta::GetVertexSidList{{{*/
-void  Penta::GetVertexSidList(int* sidlist){
-
-	for(int i=0;i<NUMVERTICES;i++) sidlist[i]=vertices[i]->Sid();
-
-}
-/*}}}*/
-/*FUNCTION Penta::GetConnectivityList {{{*/
-void  Penta::GetConnectivityList(int* connectivity){
-	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=vertices[i]->Connectivity();
-}
-/*}}}*/
 /*FUNCTION Penta::GetElementType {{{*/
 int Penta::GetElementType(){
@@ -1448,42 +1436,4 @@
 	input->GetInputValue(pvalue,gauss);
 	delete gauss;
-}
-/*}}}*/
-/*FUNCTION Penta::GetPhi {{{*/
-void Penta::GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity){
-	/*Compute deformational heating from epsilon and viscosity */
-
-	IssmDouble epsilon_matrix[3][3];
-	IssmDouble epsilon_eff;
-	IssmDouble epsilon_sqr[3][3];
-
-	/* Build epsilon matrix */
-	epsilon_matrix[0][0]=*(epsilon+0);
-	epsilon_matrix[1][0]=*(epsilon+3);
-	epsilon_matrix[2][0]=*(epsilon+4);
-	epsilon_matrix[0][1]=*(epsilon+3);
-	epsilon_matrix[1][1]=*(epsilon+1);
-	epsilon_matrix[2][1]=*(epsilon+5);
-	epsilon_matrix[0][2]=*(epsilon+4);
-	epsilon_matrix[1][2]=*(epsilon+5);
-	epsilon_matrix[2][2]=*(epsilon+2);
-
-	/* Effective value of epsilon_matrix */
-	epsilon_sqr[0][0]=pow(epsilon_matrix[0][0],2);
-	epsilon_sqr[1][0]=pow(epsilon_matrix[1][0],2);
-	epsilon_sqr[2][0]=pow(epsilon_matrix[2][0],2);
-	epsilon_sqr[0][1]=pow(epsilon_matrix[0][1],2);
-	epsilon_sqr[1][1]=pow(epsilon_matrix[1][1],2);
-	epsilon_sqr[2][1]=pow(epsilon_matrix[2][1],2);
-	epsilon_sqr[0][2]=pow(epsilon_matrix[0][2],2);
-	epsilon_sqr[1][2]=pow(epsilon_matrix[1][2],2);
-	epsilon_sqr[2][2]=pow(epsilon_matrix[2][2],2);
-	epsilon_eff=1/pow(2,0.5)*pow((epsilon_sqr[0][0]+epsilon_sqr[0][1]+ epsilon_sqr[0][2]+ epsilon_sqr[1][0]+ epsilon_sqr[1][1]+ epsilon_sqr[1][2]+ epsilon_sqr[2][0]+ epsilon_sqr[2][1]+ epsilon_sqr[2][2]),0.5);
-
-	/*Phi = Tr(sigma * eps) 
-	 *    = Tr(sigma'* eps)
-	 *    = 2 * eps_eff * sigma'_eff
-	 *    = 4 * mu * eps_eff ^2*/
-	*phi=4*pow(epsilon_eff,2.0)*viscosity;
 }
 /*}}}*/
@@ -2724,80 +2674,4 @@
 		}
 	}
-}
-/*}}}*/
-/*FUNCTION Penta::ResultInterpolation{{{*/
-void Penta::ResultInterpolation(int* pinterpolation,int output_enum){
-
-	Input* input=this->inputs->GetInput(output_enum);
-
-	/*If this input is not already in Inputs, maybe it needs to be computed?*/
-	if(!input){
-		switch(output_enum){
-			case ViscousHeatingEnum:
-				this->ViscousHeatingCreateInput();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorxxEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorxyEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorxzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensoryyEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensoryzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorzzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			default:
-				_error_("input "<<EnumToStringx(output_enum)<<" not found in element");
-		}
-	}
-
-	/*Assign output pointer*/
-	*pinterpolation = input->GetResultInterpolation();
-
-}
-/*}}}*/
-/*FUNCTION Penta::ResultToVector{{{*/
-void Penta::ResultToVector(Vector<IssmDouble>* vector,int output_enum){
-
-	Input* input=this->inputs->GetInput(output_enum);
-	if(!input) _error_("input "<<EnumToStringx(output_enum)<<" not found in element");
-
-	switch(input->GetResultInterpolation()){
-		case P0Enum:
-			_error_("P0 not implemented yet for input "<<EnumToStringx(output_enum));
-			break;
-		case P1Enum:{
-			IssmDouble  values[NUMVERTICES];
-			int         connectivity[NUMVERTICES];
-			int         sidlist[NUMVERTICES];
-
-			this->GetVertexSidList(&sidlist[0]);
-			this->GetConnectivityList(&connectivity[0]);
-			this->GetInputListOnVertices(&values[0],output_enum);
-			for(int i=0;i<NUMVERTICES;i++) values[i] = values[i]/reCast<IssmDouble>(connectivity[i]);
-
-			vector->SetValues(NUMVERTICES,&sidlist[0],&values[0],ADD_VAL);
-			break;
-					}
-		default:
-			_error_("interpolation "<<EnumToStringx(input->GetResultInterpolation())<<" not supported yet");
-	}
-
-
 }
 /*}}}*/
@@ -3356,43 +3230,4 @@
 }
 /*}}}*/
-/*FUNCTION Penta::ViscousHeatingCreateInput {{{*/
-void Penta::ViscousHeatingCreateInput(void){
-
-	/*Intermediaries*/
-	IssmDouble phi;
-	IssmDouble viscosity;
-	IssmDouble xyz_list[NUMVERTICES][3];
-	IssmDouble epsilon[6];
-	IssmDouble viscousheating[NUMVERTICES];
-	IssmDouble thickness;
-
-	/*Retrieve all inputs and parameters*/
-	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
-	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
-
-	/*loop over vertices: */
-	GaussPenta* gauss=new GaussPenta();
-	for (int iv=0;iv<NUMVERTICES;iv++){
-		gauss->GaussVertex(iv);
-
-		thickness_input->GetInputValue(&thickness,gauss);
-
-		this->StrainRateFS(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
-		material->GetViscosity3dFS(&viscosity,&epsilon[0]);
-		GetPhi(&phi, &epsilon[0], viscosity);
-
-		viscousheating[iv]=phi*thickness;
-	}
-
-	/*Create PentaVertex input, which will hold the basal friction:*/
-	this->inputs->AddInput(new PentaInput(ViscousHeatingEnum,&viscousheating[0],P1Enum));
-
-	/*Clean up and return*/
-	delete gauss;
-}
-/*}}}*/
 /*FUNCTION Penta::ViscousHeating{{{*/
 void Penta::ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){
@@ -5058,6 +4893,6 @@
 	IssmDouble  value,gradient;
 
-	this->GetConnectivityList(&connectivity[0]);
-	this->GetVertexSidList(&sidlist[0]);
+	this->GetVerticesConnectivityList(&connectivity[0]);
+	this->GetVerticesSidList(&sidlist[0]);
 
 	GaussPenta* gauss=new GaussPenta();
Index: issm/trunk-jpl/src/c/classes/Elements/Penta.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 16947)
@@ -108,7 +108,4 @@
 		bool   IsZeroLevelset(int levelset_enum);
 		void   ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum);
-
-		void   ResultInterpolation(int* pinterpolation,int output_enum);
-		void   ResultToVector(Vector<IssmDouble>* vector,int output_enum);
 		void   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);
 		void   ReduceMatrices(ElementMatrix* Ke,ElementVector* pe);
@@ -125,5 +122,4 @@
 		int    VertexConnectivity(int vertexindex);
 		void   VerticalSegmentIndices(int** pindices,int* pnumseg);
-		void   ViscousHeatingCreateInput(void);
 		void   ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input);
 
@@ -213,6 +209,4 @@
 
 		void	         GetVertexPidList(int* doflist);
-		void           GetVertexSidList(int* sidlist);
-		void           GetConnectivityList(int* connectivity);
 		int            GetElementType(void);
 		Input*         GetMaterialInput(int inputenum);
@@ -228,5 +222,4 @@
 		void           GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype);
 		Node*          GetNode(int node_number);
-		void	         GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity);
 		void           GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss, Input* vx_input, Input* vy_input);
 		void           GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, Gauss* gauss, Input* vx_input, Input* vy_input, Input* vz_input);
Index: issm/trunk-jpl/src/c/classes/Elements/Seg.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 16947)
@@ -179,6 +179,4 @@
 		int         NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){_error_("not implemented yet");};
 		void        PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){_error_("not implemented yet");};
-		void        ResultInterpolation(int* pinterpolation,int output_enum){_error_("not implemented");};
-		void        ResultToVector(Vector<IssmDouble>* vector,int output_enum){_error_("not implemented");};
 		void        ResetCoordinateSystem(void){_error_("not implemented yet");};
 		void        ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){_error_("not implemented yet");};
Index: issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 16947)
@@ -1510,14 +1510,4 @@
 }
 /*}}}*/
-/*FUNCTION Tria::GetVertexSidList {{{*/
-void  Tria::GetVertexSidList(int* sidlist){
-	for(int i=0;i<NUMVERTICES;i++) sidlist[i]=vertices[i]->Sid();
-}
-/*}}}*/
-/*FUNCTION Tria::GetConnectivityList {{{*/
-void  Tria::GetConnectivityList(int* connectivity){
-	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=vertices[i]->Connectivity();
-}
-/*}}}*/
 /*FUNCTION Tria::GetVectorFromInputs{{{*/
 void  Tria::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
@@ -2537,76 +2527,4 @@
 }
 /*}}}*/
-/*FUNCTION Tria::ResultInterpolation{{{*/
-void Tria::ResultInterpolation(int* pinterpolation,int output_enum){
-
-	Input* input=this->inputs->GetInput(output_enum);
-
-	/*If this input is not already in Inputs, maybe it needs to be computed?*/
-	if(!input){
-		switch(output_enum){
-			case StressTensorxxEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorxyEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorxzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensoryyEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensoryzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			case StressTensorzzEnum: 
-				this->ComputeStressTensor();
-				input=this->inputs->GetInput(output_enum);
-				break;
-			default:
-				_error_("input "<<EnumToStringx(output_enum)<<" not found in element");
-		}
-	}
-
-	/*Assign output pointer*/
-	*pinterpolation = input->GetResultInterpolation();
-
-}
-/*}}}*/
-/*FUNCTION Tria::ResultToVector{{{*/
-void Tria::ResultToVector(Vector<IssmDouble>* vector,int output_enum){
-
-	Input* input=this->inputs->GetInput(output_enum);
-	if(!input) _error_("input "<<EnumToStringx(output_enum)<<" not found in element");
-
-	switch(input->GetResultInterpolation()){
-		case P0Enum:
-			_error_("not implemented...");
-			break;
-		case P1Enum:{
-			IssmDouble  values[NUMVERTICES];
-			int         connectivity[NUMVERTICES];
-			int         sidlist[NUMVERTICES];
-
-			this->GetVertexSidList(&sidlist[0]);
-			this->GetConnectivityList(&connectivity[0]);
-			this->GetInputListOnVertices(&values[0],output_enum);
-			for(int i=0;i<NUMVERTICES;i++) values[i] = values[i]/reCast<IssmDouble>(connectivity[i]);
-
-			vector->SetValues(NUMVERTICES,&sidlist[0],&values[0],ADD_VAL);
-			break;
-					}
-		default:
-			_error_("interpolation "<<EnumToStringx(input->GetResultInterpolation())<<" not supported yet");
-	}
-
-
-}
-/*}}}*/
 /*FUNCTION Tria::SetClone {{{*/
 void  Tria::SetClone(int* minranks){
@@ -2997,5 +2915,5 @@
 
 	/*Figure out the average for this element: */
-	this->GetVertexSidList(&offsetsid[0]);
+	this->GetVerticesSidList(&offsetsid[0]);
 	this->GetVertexPidList(&offsetdof[0]);
 	mean=0;
@@ -4569,6 +4487,6 @@
 	IssmDouble  value,gradient;
 
-	this->GetConnectivityList(&connectivity[0]);
-	this->GetVertexSidList(&sidlist[0]);
+	this->GetVerticesConnectivityList(&connectivity[0]);
+	this->GetVerticesSidList(&sidlist[0]);
 
 	GaussTria* gauss=new GaussTria();
@@ -4832,5 +4750,5 @@
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
 	GradientIndexing(&vertexpidlist[0],control_index);
-	this->GetConnectivityList(&connectivity[0]);
+	this->GetVerticesConnectivityList(&connectivity[0]);
 
 	/*Build frictoin element, needed later: */
Index: issm/trunk-jpl/src/c/classes/Elements/Tria.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 16946)
+++ issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 16947)
@@ -113,6 +113,4 @@
 		int         NodalValue(IssmDouble* pvalue, int index, int natureofdataenum);
 		void        PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);
-		void        ResultInterpolation(int* pinterpolation,int output_enum);
-		void        ResultToVector(Vector<IssmDouble>* vector,int output_enum);
 		void        ReduceMatrices(ElementMatrix* Ke,ElementVector* pe);
 		void        ResetCoordinateSystem(void);
@@ -247,6 +245,4 @@
 
 		void	         GetVertexPidList(int* doflist);
-		void           GetVertexSidList(int* sidlist);
-		void           GetConnectivityList(int* connectivity);
 		IssmDouble     GetYcoord(Gauss* gauss);
 		IssmDouble     GetZcoord(Gauss* gauss){_error_("not implemented");};
