Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5728)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5729)
@@ -4159,43 +4159,4 @@
 }
 /*}}}*/
-/*FUNCTION Penta::GaussFromNode {{{1*/
-double* Penta::GaussFromNode(Node* node){
-
-	/*variable declaration*/
-	int i,pos;
-	double*  gauss=NULL;
-
-	/*Allocate gauss*/
-	gauss=(double*)xmalloc(4*sizeof(double));
-
-	for(i=0;i<6;i++){
-		if (node==nodes[i]){
-			switch(i){
-				case 0:
-					gauss[0]=1.0; gauss[1]=0.0; gauss[2]=0.0; gauss[3]= -1.0;
-					return gauss;
-				case 1:
-					gauss[0]=0.0; gauss[1]=1.0; gauss[2]=0.0; gauss[3]= -1.0;
-					return gauss;
-				case 2:
-					gauss[0]=0.0; gauss[1]=0.0; gauss[2]=1.0; gauss[3]= -1.0;
-					return gauss;
-				case 3:
-					gauss[0]=1.0; gauss[1]=0.0; gauss[2]=0.0; gauss[3]=1.0;
-					return gauss;
-				case 4:
-					gauss[0]=0.0; gauss[1]=1.0; gauss[2]=0.0; gauss[3]=1.0;
-					return gauss;
-				case 5:
-					gauss[0]=0.0; gauss[1]=0.0; gauss[2]=1.0; gauss[3]=1.0;
-					return gauss;
-			}
-		}
-	}
-
-	/*output error if not found*/
-	ISSMERROR("Node not found in Penta");
-}
-/*}}}*/
 /*FUNCTION Penta::GetDofList {{{1*/
 void  Penta::GetDofList(int** pdoflist,int approximation_enum){
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 5728)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 5729)
@@ -147,5 +147,4 @@
 		void	  CreatePVectorSlope( Vec pg);
 		void	  CreatePVectorThermal( Vec pg);
-		double*   GaussFromNode(Node* node);
 		void	  GetDofList(int** pdoflist,int approximation_enum=0);
 		void	  GetDofList1(int* doflist);
Index: /issm/trunk/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 5728)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 5729)
@@ -502,5 +502,5 @@
 	int    reset_penalties=0;
 	int    stabilize_constraints;
-	double* gauss=NULL;
+	GaussPenta* gauss=NULL;
 
 	/*pointers: */
@@ -518,5 +518,6 @@
 
 	//First recover pressure and temperature values, using the element: */
-	gauss=penta->GaussFromNode(node);
+	gauss=new GaussPenta();
+	gauss->GaussVertex(penta->GetNodeIndex(node));
 	penta->inputs->GetParameterValue(&pressure,gauss,PressureEnum);
 	penta->inputs->GetParameterValue(&temperature,gauss,TemporaryTemperatureEnum);
@@ -564,5 +565,5 @@
 
 	/*Clean up*/
-	xfree((void**)&gauss);
+	delete gauss;
 }
 /*}}}1*/
@@ -627,5 +628,5 @@
 	int*      doflist=NULL;
 	double    meltingpoint;
-	double*   gauss=NULL;
+	GaussPenta*   gauss=NULL;
 
 	double pressure;
@@ -644,5 +645,6 @@
 
 	//First recover pressure and temperature values, using the element: */
-	gauss=penta->GaussFromNode(node);
+	gauss=new GaussPenta();
+	gauss->GaussVertex(penta->GetNodeIndex(node));
 	penta->inputs->GetParameterValue(&pressure,gauss,PressureEnum);
 	penta->inputs->GetParameterValue(&temperature,gauss,TemperatureEnum);
@@ -667,5 +669,5 @@
 
 	/*Clean up*/
-	xfree((void**)&gauss);
+	delete gauss;
 	xfree((void**)&doflist);
 }
@@ -718,5 +720,5 @@
 	double t_pmp;
 	double dt,penalty_offset;
-	double* gauss=NULL;
+	GaussPenta* gauss=NULL;
 
 	/*pointers: */
@@ -733,5 +735,6 @@
 
 	//First recover pressure and temperature values, using the element: */
-	gauss=penta->GaussFromNode(node);
+	gauss=new GaussPenta();
+	gauss->GaussVertex(penta->GetNodeIndex(node));
 	penta->inputs->GetParameterValue(&pressure,gauss,PressureEnum);
 	penta->inputs->GetParameterValue(&temperature,gauss,TemperatureEnum);
@@ -768,5 +771,5 @@
 
 	/*Clean up*/
-	xfree((void**)&gauss);
+	delete gauss;
 	xfree((void**)&doflist);
 
@@ -788,5 +791,5 @@
 	double t_pmp;
 	double penalty_offset;
-	double* gauss=NULL;
+	GaussPenta* gauss=NULL;
 
 	/*pointers: */
@@ -802,5 +805,6 @@
 
 	//First recover pressure  and penalty_offset
-	gauss=penta->GaussFromNode(node);
+	gauss=new GaussPenta();
+	gauss->GaussVertex(penta->GetNodeIndex(node));
 	penta->inputs->GetParameterValue(&pressure,gauss,PressureEnum);
 	parameters->FindParam(&penalty_offset,PenaltyOffsetEnum);
@@ -818,5 +822,5 @@
 
 	/*Clean up*/
-	xfree((void**)&gauss);
+	delete gauss;
 	xfree((void**)&doflist);
 
