Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 8566)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 8567)
@@ -2767,5 +2767,5 @@
 
 	/*material parameters: */
-	double rho_ice, rho_water, g;
+	double rho_ice, rho_water, g,hydro_p,hydro_q;
 	double dsdx, dsdy;
 	double dbdx, dbdy;
@@ -2778,4 +2778,6 @@
 	g=matpar->GetG();
 	kn=matpar->GetKn();
+	hydro_p=matpar->GetHydroP();
+	hydro_q=matpar->GetHydroQ();
 	Input* surfaceslopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(surfaceslopex_input);
 	Input* surfaceslopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(surfaceslopey_input);
@@ -2796,10 +2798,7 @@
 	watercolumn_input->GetParameterValue(&w,gauss);
 
-	K[0]=pow(w,2)*(rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn* w * (dsdx - dbdx ) * surface_slope;
-	K[1]=pow(w,2)*(rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn *w * (dsdy - dbdy ) * surface_slope;
-  
-	//bk
-	//K[0]=fabs(pow(w,2)*(rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn* w * (dsdx - dbdx ) * surface_slope);
-	//K[1]=fabs(pow(w,2)*(rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn *w * (dsdy - dbdy ) * surface_slope);
+	K[0]=pow(w,hydro_p)*pow((rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn/w * (dsdx - dbdx ) * surface_slope,hydro_q);
+	K[1]=pow(w,hydro_p)*pow((rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn/w * (dsdy - dbdy ) * surface_slope,hydro_q);
+	
 	//printf("K[0]=%g,K[1]=%g,w=%g\n",K[0],K[1],w); //bk
 	//if (w<0) {printf("negative w!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
