Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5722)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5723)
@@ -567,5 +567,5 @@
 	/* Start  looping on the number of gaussian points: */
 	gauss=new GaussPenta(0,1,2,2);
-	for (ig=0; ig<num_gauss; ig++){
+	for (ig=gauss->begin();ig<gauss->end();ig++){
 
 		gauss->GaussPoint(ig);
@@ -574,5 +574,5 @@
 		this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
 		matice->GetViscosity3dStokes(&viscosity,&epsilon[0]);
-		pressure_input->GetParameterValue(&pressure, &gauss_coord[0]);
+		pressure_input->GetParameterValue(&pressure,gauss);
 
 		/*Compute Stress*/
@@ -592,8 +592,7 @@
 		basalforce[2] += sigma_xz*bed_normal[0] + sigma_yz*bed_normal[1] + sigma_zz*bed_normal[2];
 
-		/*Get the Jacobian determinant */
 		GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
-		value+=sigma_zz*Jdet2d*gauss_weight;
-		surface+=Jdet2d*gauss_weight;
+		value+=sigma_zz*Jdet2d*gauss->weight;
+		surface+=Jdet2d*gauss->weight;
 	}
 	value=value/surface;
@@ -3826,6 +3825,6 @@
 
 		/* Start looping on the number of gauss 2d (nodes on the bedrock) */
-		gauss=new GaussPenta(0,1,2,2)
-		for (ig=gauss->begin();ig<gauss->end();ig++){
+		gauss=new GaussPenta(0,1,2,2);
+		for(ig=gauss->begin();ig<gauss->end();ig++){
 
 			gauss->GaussPoint(ig);
