Index: /issm/trunk/src/c/objects/Elements/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Element.h	(revision 5726)
+++ /issm/trunk/src/c/objects/Elements/Element.h	(revision 5727)
@@ -38,5 +38,4 @@
 		virtual void   GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue)=0;
 		virtual void   GetParameterValue(double* pvalue,Node* node,int enumtype)=0;
-		virtual void   GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in)=0;
 		virtual void   Gradj(Vec gradient,int control_type)=0;
 		virtual void   GradjDrag(Vec gradient)=0;
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5726)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5727)
@@ -4331,100 +4331,4 @@
 }
 /*}}}*/
-/*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in) {{{1*/
-void Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in){
-
-	/*Output*/
-	double value;
-
-	/*Intermediaries*/
-	const int numnodes=6;
-	int       grid1=-1,grid2=-1;
-	int       grid3;
-	int       i;
-	double    gauss_penta[numnodes];
-
-	/*go through 6 nodes (all nodes for penta) and identify 1st and 2nd nodes: */
-	ISSMASSERT(nodes);
-	for(i=0;i<numnodes;i++){
-		if (node1==nodes[i]) grid1=i;
-		if (node2==nodes[i]) grid2=i;
-	}
-
-	/*Reverse grid1 and 2 if necessary*/
-	if (grid1>grid2){
-
-		/*Reverse grid1 and grid2*/
-		grid3=grid1; grid1=grid2; grid2=grid3;
-
-		/*Change segment gauss point (between -1 and +1)*/
-		gauss_seg=-gauss_seg;
-	}
-
-	/*Build Penta Gauss point*/
-	if (grid2<3){
-
-		/*We are on the basal triangle*/
-		gauss_penta[3]=-1.;
-
-		if (grid1==0 && grid2==1){
-			/*gauss_seg is between 0 and 1*/
-			gauss_penta[0]=0.5*(1.-gauss_seg);
-			gauss_penta[1]=1.-0.5*(1.-gauss_seg);
-			gauss_penta[2]=0.;
-		}
-		else if (grid1==0 && grid2==2){
-			/*gauss_seg is between 0 and 2*/
-			gauss_penta[0]=0.5*(1.-gauss_seg);
-			gauss_penta[1]=0.;
-			gauss_penta[2]=1.-0.5*(1.-gauss_seg);
-		}
-		else if (grid1==1 && grid2==2){
-			/*gauss_seg is between 1 and 2*/
-			gauss_penta[0]=0.;
-			gauss_penta[1]=0.5*(1.-gauss_seg);
-			gauss_penta[2]=1.-0.5*(1.-gauss_seg);
-		}
-		else{
-			ISSMERROR("The 2 nodes provided are either the same or did not match current Penta nodes");
-		}
-	}
-	else if(grid1>2){
-
-		/*We are on the surface triangle*/
-		gauss_penta[3]=+1.;
-
-		if (grid1==3 && grid2==4){
-			/*gauss_seg is between 0 and 1*/
-			gauss_penta[0]=0.5*(1.-gauss_seg);
-			gauss_penta[1]=1.-0.5*(1.-gauss_seg);
-			gauss_penta[2]=0.;
-		}
-		else if (grid1==3 && grid2==5){
-			/*gauss_seg is between 0 and 2*/
-			gauss_penta[0]=0.5*(1.-gauss_seg);
-			gauss_penta[1]=0.;
-			gauss_penta[2]=1.-0.5*(1.-gauss_seg);
-		}
-		else if (grid1==4 && grid2==5){
-			/*gauss_seg is between 1 and 2*/
-			gauss_penta[0]=0.;
-			gauss_penta[1]=0.5*(1.-gauss_seg);
-			gauss_penta[2]=1.-0.5*(1.-gauss_seg);
-		}
-		else{
-			ISSMERROR("The 2 nodes provided are either the same or did not match current Penta nodes");
-		}
-	}
-	else{
-		ISSMERROR("vertical segments not implemented yet");
-	}
-
-	/*OK, now we can call input method*/
-	input_in->GetParameterValue(&value, &gauss_penta[0]);
-
-	/*Assign output pointers:*/
-	*pvalue=value;
-}
-/*}}}*/
 /*FUNCTION Penta::GetPhi {{{1*/
 void Penta::GetPhi(double* phi, double*  epsilon, double viscosity){
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 5726)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 5727)
@@ -160,5 +160,4 @@
 		void    GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue);
 		void      GetParameterValue(double* pvalue,Node* node,int enumtype);
-		void      GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in);
 		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 5726)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 5727)
@@ -24,6 +24,9 @@
 	this->parameters=NULL;
 	this->hnode=NULL;
+	this->node=NULL;
 	this->helement=NULL;
+	this->element=NULL;
 	this->hmatpar=NULL;
+	this->matpar=NULL;
 	
 	/*not active, not zigzagging: */
@@ -65,4 +68,7 @@
 	//this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
 	this->parameters=NULL;
+	this->node=NULL;
+	this->element=NULL;
+	this->matpar=NULL;
 
 	//let's not forget internals
@@ -197,4 +203,7 @@
 	/*parameters: may not exist even yet, so let Configure handle it: */
 	this->parameters=NULL;
+	this->node=NULL;
+	this->element=NULL;
+	this->matpar=NULL;
 
 	/*return: */
@@ -233,4 +242,9 @@
 	pengrid->helement=(Hook*)this->helement->copy();
 
+	/*corresponding fields*/
+	pengrid->node  =(Node*)pengrid->hnode->delivers();
+	pengrid->matpar =(Matpar*)pengrid->hmatpar->delivers();
+	pengrid->element=(Element*)pengrid->helement->delivers();
+
 	//let's not forget internals
 	pengrid->active=this->active=0;
@@ -252,4 +266,9 @@
 	hmatpar->configure(materialsin);
 
+	/*Get corresponding fields*/
+	node=(Node*)hnode->delivers();
+	element=(Element*)helement->delivers();
+	matpar=(Matpar*)hmatpar->delivers();
+
 	/*point parameters to real dataset: */
 	this->parameters=parametersin;
@@ -408,10 +427,4 @@
 	int* doflist=NULL;
 
-	/*dynamic objects pointed to by hooks: */
-	Node* node=NULL;
-
-	/*recover objects from hooks: */
-	node=(Node*)hnode->delivers();
-
 	/*Some checks for debugging*/
 	ISSMASSERT(node);
@@ -438,9 +451,7 @@
 	/*dynamic objects pointed to by hooks: */
 	Penta* penta=NULL;
-	Node*  node=NULL;
 
 	/*recover objects from hooks: */
-	penta=(Penta*)helement->delivers();
-	node =(Node*)hnode->delivers();
+	penta=(Penta*)element;
 
 	/*Get value on Element 1*/
@@ -494,12 +505,8 @@
 
 	/*pointers: */
-	Node* node=NULL;
 	Penta* penta=NULL;
-	Matpar*  matpar=NULL;
 
 	/*recover pointers: */
-	node=(Node*)hnode->delivers();
-	penta=(Penta*)helement->delivers();
-	matpar=(Matpar*)hmatpar->delivers();
+	penta=(Penta*)element;
 	
 	/*check that pengrid is not a clone (penalty to be added only once)*/
@@ -577,10 +584,8 @@
 
 	/*pointers: */
-	Node* node=NULL;
 	Penta* penta=NULL;
 
 	/*recover pointers: */
-	node=(Node*)hnode->delivers();
-	penta=(Penta*)helement->delivers();
+	penta=(Penta*)element;
 
 	/*If not Stokes, return*/
@@ -630,12 +635,8 @@
 
 	/*pointers: */
-	Node* node=NULL;
 	Penta* penta=NULL;
-	Matpar*  matpar=NULL;
 
 	/*recover pointers: */
-	node=(Node*)hnode->delivers();
-	penta=(Penta*)helement->delivers();
-	matpar=(Matpar*)hmatpar->delivers();
+	penta=(Penta*)element;
 
 	/*check that pengrid is not a clone (penalty to be added only once)*/
@@ -720,12 +721,8 @@
 
 	/*pointers: */
-	Node* node=NULL;
 	Penta* penta=NULL;
-	Matpar*  matpar=NULL;
 
 	/*recover pointers: */
-	node=(Node*)hnode->delivers();
-	penta=(Penta*)helement->delivers();
-	matpar=(Matpar*)hmatpar->delivers();
+	penta=(Penta*)element;
 
 	/*check that pengrid is not a clone (penalty to be added only once)*/
@@ -794,12 +791,8 @@
 
 	/*pointers: */
-	Node* node=NULL;
 	Penta* penta=NULL;
-	Matpar*  matpar=NULL;
 
 	/*recover pointers: */
-	node=(Node*)hnode->delivers();
-	penta=(Penta*)helement->delivers();
-	matpar=(Matpar*)hmatpar->delivers();
+	penta=(Penta*)element;
 
 	if(!this->active)return;
Index: /issm/trunk/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 5726)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 5727)
@@ -21,7 +21,13 @@
 		int analysis_type;
 		
+		/*Hooks*/
 		Hook* hnode;  //hook to 1 node
 		Hook* helement;  //hook to 1 element
 		Hook* hmatpar; //hook to 1 matpar
+
+		/*Corresponding fields*/
+		Node    *node;
+		Element *element;
+		Matpar  *matpar;
 
 		Parameters* parameters; //pointer to solution parameters
