Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 3935)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 3936)
@@ -1028,52 +1028,40 @@
 	/*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
 	if (analysis_type==ControlAnalysisEnum){
-
 		CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type);
-
 	}
 	else if (analysis_type==DiagnosticAnalysisEnum){
-
 		if (sub_analysis_type==HorizAnalysisEnum){
-
 			CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type);
 		}
+		else if (sub_analysis_type==HutterAnalysisEnum){
+			CreateKMatrixDiagnosticHutter( Kgg,analysis_type,sub_analysis_type);
+		}
 		else if (sub_analysis_type==VertAnalysisEnum){
-
 			CreateKMatrixDiagnosticVert( Kgg,analysis_type,sub_analysis_type);
 		}
 		else if (sub_analysis_type==StokesAnalysisEnum){
-
 			CreateKMatrixDiagnosticStokes( Kgg,analysis_type,sub_analysis_type);
-
 		}
 		else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet");
 	}
 	else if (analysis_type==SlopecomputeAnalysisEnum){
-
 		CreateKMatrixSlopeCompute( Kgg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==PrognosticAnalysisEnum){
-
 		CreateKMatrixPrognostic( Kgg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==BalancedthicknessAnalysisEnum){
-
 		CreateKMatrixBalancedthickness( Kgg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==BalancedvelocitiesAnalysisEnum){
-
 		CreateKMatrixBalancedvelocities( Kgg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==ThermalAnalysisEnum){
-
 		CreateKMatrixThermal( Kgg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==MeltingAnalysisEnum){
-
 		CreateKMatrixMelting( Kgg,analysis_type,sub_analysis_type);
 	}
-	else{
-		ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet");
-	}
+	else ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet");
 
 }
@@ -1357,4 +1345,31 @@
 	xfree((void**)&third_gauss_area_coord2d);
 	xfree((void**)&gauss_weights2d);
+
+}
+/*}}}*/
+/*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{1*/
+void  Penta::CreateKMatrixDiagnosticHutter(Mat Kgg,int analysis_type,int sub_analysis_type){
+
+	/*Collapsed formulation: */
+	Beam*  beam=NULL;
+	int    i;
+
+	/*flags: */
+	bool onwater;
+
+	/*recover some inputs: */
+	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
+
+	/*If on water, skip: */
+	if(onwater)return;
+
+	/*Spawn 3 beam elements: */
+	for(i=0;i<3;i++){
+		beam=(Beam*)SpawnBeam(i,i+3); //[0 3], [1 4] and [2 5] are the four vertical edges of the Penta
+		beam->CreateKMatrix(Kgg,analysis_type,sub_analysis_type);
+	}
+
+	/*clean up*/
+	delete beam;
 
 }
@@ -2091,19 +2106,17 @@
 	/*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
 	if (analysis_type==ControlAnalysisEnum){
-
 		CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==DiagnosticAnalysisEnum){
-
 		if (sub_analysis_type==HorizAnalysisEnum){
-
 			CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
 		}
+		else if (sub_analysis_type==HutterAnalysisEnum){
+			CreatePVectorDiagnosticHutter( pg,analysis_type,sub_analysis_type);
+		}
 		else if (sub_analysis_type==VertAnalysisEnum){
-
 			CreatePVectorDiagnosticVert( pg,analysis_type,sub_analysis_type);
 		}
 		else if (sub_analysis_type==StokesAnalysisEnum){
-
 			CreatePVectorDiagnosticStokes( pg,analysis_type,sub_analysis_type);
 		}
@@ -2111,30 +2124,22 @@
 	}
 	else if (analysis_type==SlopecomputeAnalysisEnum){
-
 		CreatePVectorSlopeCompute( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==PrognosticAnalysisEnum){
-
 		CreatePVectorPrognostic( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==BalancedthicknessAnalysisEnum){
-
 		CreatePVectorBalancedthickness( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==BalancedvelocitiesAnalysisEnum){
-
 		CreatePVectorBalancedvelocities( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==ThermalAnalysisEnum){
-
 		CreatePVectorThermal( pg,analysis_type,sub_analysis_type);
 	}
 	else if (analysis_type==MeltingAnalysisEnum){
-
 		CreatePVectorMelting( pg,analysis_type,sub_analysis_type);
 	}
-	else{
-		ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet");
-	}	
+	else ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet");
 
 }
@@ -2339,4 +2344,31 @@
 	xfree((void**)&area_gauss_weights);
 	xfree((void**)&vert_gauss_weights);
+
+}
+/*}}}*/
+/*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{1*/
+void  Penta::CreatePVectorDiagnosticHutter(Vec pg,int analysis_type,int sub_analysis_type){
+
+	/*Collapsed formulation: */
+	Beam*  beam=NULL;
+	int    i;
+
+	/*flags: */
+	bool onwater;
+
+	/*recover some inputs: */
+	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
+
+	/*If on water, skip: */
+	if(onwater)return;
+
+	/*Spawn 3 beam elements: */
+	for(i=0;i<3;i++){
+		beam=(Beam*)SpawnBeam(i,i+3); //[0 3], [1 4] and [2 5] are the four vertical edges of the Penta
+		beam->CreatePVector(pg,analysis_type,sub_analysis_type);
+	}
+
+	/*clean up*/
+	delete beam;
 
 }
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 3935)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 3936)
@@ -65,4 +65,5 @@
 		void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
 		void  CreateKMatrixDiagnosticHoriz( Mat Kgg,  int analysis_type,int sub_analysis_type);
+		void  CreateKMatrixDiagnosticHutter( Mat Kgg,  int analysis_type,int sub_analysis_type);
 		void  CreateKMatrixDiagnosticVert( Mat Kgg,  int analysis_type,int sub_analysis_type);
 		void  CreatePVector(Vec pg,  int analysis_type,int sub_analysis_type);
@@ -99,4 +100,5 @@
 		void  GetJacobianInvert(double*  Jinv, double* xyz_list,double* gauss_coord);
 		void  CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type);
+		void  CreatePVectorDiagnosticHutter( Vec pg, int analysis_type,int sub_analysis_type);
 		void  CreatePVectorDiagnosticVert( Vec pg, int analysis_type,int sub_analysis_type);
 		void  GetParameterValue(double* pvalue, double* v_list,double* gauss_coord);
