Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4458)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4459)
@@ -5528,5 +5528,5 @@
 }
 /*}}}*/
-/*FUNCTION Penta::GetParameterValue {{{1*/
+/*FUNCTION Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord) {{{1*/
 void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){
 
@@ -5537,4 +5537,34 @@
 
 	*pvalue=l1l6[0]*v_list[0]+l1l6[1]*v_list[1]+l1l6[2]*v_list[2]+l1l6[3]*v_list[3]+l1l6[4]*v_list[4]+l1l6[5]*v_list[5];
+}
+/*}}}*/
+/*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype) {{{1*/
+void Penta::GetParameterValue(double* pvalue,Node* node,int enumtype){
+
+	/*Output*/
+	double value;
+
+	/*Intermediaries*/
+	const int numnodes=6;
+	int       grid=-1;
+	int       i;
+	double gauss[numnodes][numnodes]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{1,0,0,1},{0,1,0,1},{0,0,1,1}};
+
+	/*go through 3 nodes (all nodes for tria) and identify 1st and 2nd nodes: */
+	ISSMASSERT(nodes);
+	for(i=0;i<numnodes;i++){
+		if (node==nodes[i]){
+			grid=i;
+			break;
+		}
+	}
+
+	/*Check that the node has been found*/
+	if (grid==-1) ISSMERROR("Node pointer not found in Penta's nodes");
+
+	/*Get Parameter value on node*/
+	inputs->GetParameterValue(pvalue,&gauss[grid][0],enumtype);
+	return;
+
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4458)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4459)
@@ -159,4 +159,5 @@
 		void	  GetParameterDerivativeValue(double* p, double* p_list,double* xyz_list, double* gauss_coord);
 		void	  GetParameterValue(double* pvalue, double* v_list,double* gauss_coord);
+		void    GetParameterValue(double* pvalue,Node* node,int enumtype);
 		void	  GetPhi(double* phi, double*  epsilon, double viscosity);
 		void	  GetSolutionFromInputsDiagnosticHoriz(Vec solutiong);
Index: /issm/trunk/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 4458)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 4459)
@@ -399,4 +399,25 @@
 }
 /*}}}*/
+/*FUNCTION Pengrid::GetParameterValue {{{1*/
+void Pengrid::GetParameterValue(double* pvalue,int enumtype){
+
+	/*output: */
+	double value;
+
+	/*dynamic objects pointed to by hooks: */
+	Penta* penta=NULL;
+	Node*  node=NULL;
+
+	/*recover objects from hooks: */
+	penta=(Penta*)helement->delivers();
+	node =(Node*)hnode->delivers();
+
+	/*Get value on Element 1*/
+	penta->GetParameterValue(&value,node,enumtype);
+
+	/*Assign output pointers:*/
+	*pvalue=value;
+}
+/*}}}*/
 /*FUNCTION Pengrid::PenaltyConstrain {{{1*/
 void  Pengrid::PenaltyConstrain(int* punstable){
@@ -536,6 +557,6 @@
 
 	//recover slope: */
-	penta->inputs->GetParameterValue(&slope[0],node,BedSlopeXEnum);
-	penta->inputs->GetParameterValue(&slope[1],node,BedSlopeYEnum);
+	this->GetParameterValue(&slope[0],BedSlopeXEnum);
+	this->GetParameterValue(&slope[1],BedSlopeYEnum);
 	
 	/*recover parameters: */
Index: /issm/trunk/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 4458)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 4459)
@@ -70,4 +70,5 @@
 		void  PenaltyCreateKMatrixDiagnosticStokes(Mat Kgg,double kmax);
 		void  GetDofList(int* doflist,int* pnumberofdofspernode);
+		void  GetParameterValue(double* pvalue,int enumtype);
 		void  PenaltyCreateKMatrixThermal(Mat Kgg,double kmax);
 		void  PenaltyCreateKMatrixMelting(Mat Kgg,double kmax);
