Index: /issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 17248)
@@ -283,5 +283,5 @@
 
 		this->StrainRateFS(&epsilon[0],xyz_list,gauss,vx_input,vy_input,vz_input);
-		this->material->GetViscosity3dFS(&viscosity,&epsilon[0]);
+		this->ViscosityFS(&viscosity,3,xyz_list,gauss,vx_input,vy_input,vz_input);
 		this->GetPhi(&phi,&epsilon[0],viscosity);
 
@@ -303,15 +303,20 @@
 	IssmDouble epsilon3d[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
 	IssmDouble epsilon2d[3]; /* epsilon=[exx,eyy,exy];            */
+	IssmDouble eps_eff;
+	IssmDouble eps0=1.e-27;
 
 	if(dim==3){
-		/*3D*/
+		/* eps_eff^2 = exx^2 + eyy^2 + exy^2 + exz^2 + eyz^2 + exx*eyy */
 		this->StrainRateFS(&epsilon3d[0],xyz_list,gauss,vx_input,vy_input,vz_input);
-		material->GetViscosity3dFS(&viscosity, &epsilon3d[0]);
+		eps_eff = sqrt(epsilon3d[0]*epsilon3d[0] + epsilon3d[1]*epsilon3d[1] + epsilon3d[3]*epsilon3d[3] +  epsilon3d[4]*epsilon3d[4] + epsilon3d[5]*epsilon3d[5] + epsilon3d[0]*epsilon3d[1]+eps0*eps0);
 	}
 	else{
-		/*2D*/
+		/* eps_eff^2 = exx^2 + eyy^2 + 2*exy^2 */
 		this->StrainRateSSA(&epsilon2d[0],xyz_list,gauss,vx_input,vy_input);
-		material->GetViscosity2dvertical(&viscosity,&epsilon2d[0]);
-	}
+		eps_eff = sqrt(epsilon2d[0]*epsilon2d[0] + epsilon2d[1]*epsilon2d[1] + 2.*epsilon2d[2]*epsilon2d[2]);
+	}
+
+	/*Get viscosity*/
+	material->GetViscosity(&viscosity,eps_eff);
 
 	/*Assign output pointer*/
@@ -384,13 +389,19 @@
 	IssmDouble epsilon3d[5];/* epsilon=[exx,eyy,exy,exz,eyz];*/
 	IssmDouble epsilon2d[2]; /* epsilon=[exx,exy];           */
+	IssmDouble eps_eff;
 
 	if(dim==3){
+		/* eps_eff^2 = exx^2 + eyy^2 + exy^2 + exz^2 + eyz^2 + exx*eyy */
 		this->StrainRateHO(&epsilon3d[0],xyz_list,gauss,vx_input,vy_input);
-		material->GetViscosity3d(&viscosity, &epsilon3d[0]);
+		eps_eff = sqrt(epsilon3d[0]*epsilon3d[0] + epsilon3d[1]*epsilon3d[1] + epsilon3d[2]*epsilon3d[2] +  epsilon3d[3]*epsilon3d[3] + epsilon3d[4]*epsilon3d[4] + epsilon3d[0]*epsilon3d[1]);
 	}
 	else{
+		/* eps_eff^2 = exx^2 + exy^2 */
 		this->StrainRateHO2dvertical(&epsilon2d[0],xyz_list,gauss,vx_input,vy_input);
-		material->GetViscosity2dverticalHO(&viscosity, &epsilon2d[0]);
-	}
+		eps_eff = sqrt(epsilon2d[0]*epsilon2d[0] + epsilon2d[1]*epsilon2d[1]);
+	}
+
+	/*Get viscosity*/
+	material->GetViscosity(&viscosity,eps_eff);
 
 	/*Assign output pointer*/
@@ -402,7 +413,13 @@
 	IssmDouble viscosity;
 	IssmDouble epsilon[3];/* epsilon=[exx,eyy,exy];    */
-
+	IssmDouble eps_eff;
+
+	/*Get effective strain rate
+	 * eps_eff^2 = exx^2 + eyy^2 + exy^2 + exx*eyy+*/
 	this->StrainRateSSA(&epsilon[0],xyz_list,gauss,vx_input,vy_input);
-	material->GetViscosity2d(&viscosity, &epsilon[0]);
+	eps_eff = sqrt(epsilon[0]*epsilon[0] + epsilon[1]*epsilon[1] + epsilon[2]*epsilon[2] + epsilon[0]*epsilon[1]);
+
+	/*Get viscosity*/
+	material->GetViscosityBar(&viscosity,eps_eff);
 
 	/*Assign output pointer*/
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 17248)
@@ -254,5 +254,5 @@
 		/*Compute strain rate viscosity and pressure: */
 		this->StrainRateFS(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
-		material->GetViscosity3dFS(&viscosity,&epsilon[0]);
+		this->ViscosityFS(&viscosity,3,&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
 		pressure_input->GetInputValue(&pressure,gauss);
 
@@ -320,5 +320,5 @@
 		/*Compute strain rate viscosity and pressure: */
 		this->StrainRateFS(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
-		material->GetViscosity3d(&viscosity,&epsilon[0]);
+		this->ViscosityFS(&viscosity,3,&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
 		pressure_input->GetInputValue(&pressure,gauss);
 
@@ -3138,5 +3138,5 @@
 	_assert_(gauss->Enum()==GaussPentaEnum);
 	this->StrainRateFS(&epsilon[0],xyz_list,(GaussPenta*)gauss,vx_input,vy_input,vz_input);
-	material->GetViscosity3dFS(&viscosity,&epsilon[0]);
+	this->ViscosityFS(&viscosity,3,xyz_list,(GaussPenta*)gauss,vx_input,vy_input,vz_input);
 	GetPhi(&phi,&epsilon[0],viscosity);
 
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 17248)
@@ -204,14 +204,14 @@
 void  Tria::ComputeStressTensor(){
 
-	IssmDouble      xyz_list[NUMVERTICES][3];
-	IssmDouble      pressure,viscosity;
-	IssmDouble      epsilon[3]; /* epsilon=[exx,eyy,exy];*/
-	IssmDouble      sigma_xx[NUMVERTICES];
-	IssmDouble		sigma_yy[NUMVERTICES];
-	IssmDouble		sigma_zz[NUMVERTICES]={0,0,0};
-	IssmDouble      sigma_xy[NUMVERTICES];
-	IssmDouble		sigma_xz[NUMVERTICES]={0,0,0};
-	IssmDouble		sigma_yz[NUMVERTICES]={0,0,0};
-	GaussTria* gauss=NULL;
+	IssmDouble  xyz_list[NUMVERTICES][3];
+	IssmDouble  pressure,viscosity;
+	IssmDouble  epsilon[3]; /* epsilon=[exx,eyy,exy];*/
+	IssmDouble  sigma_xx[NUMVERTICES];
+	IssmDouble	sigma_yy[NUMVERTICES];
+	IssmDouble	sigma_zz[NUMVERTICES]={0,0,0};
+	IssmDouble  sigma_xy[NUMVERTICES];
+	IssmDouble	sigma_xz[NUMVERTICES]={0,0,0};
+	IssmDouble	sigma_yz[NUMVERTICES]={0,0,0};
+	GaussTria*  gauss=NULL;
 
 	/* Get node coordinates and dof list: */
@@ -230,5 +230,5 @@
 		/*Compute strain rate viscosity and pressure: */
 		this->StrainRateSSA(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
-		material->GetViscosity2d(&viscosity,&epsilon[0]);
+		this->ViscositySSA(&viscosity,&xyz_list[0][0],gauss,vx_input,vy_input);
 		pressure_input->GetInputValue(&pressure,gauss);
 
Index: /issm/trunk-jpl/src/c/classes/Materials/Material.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Material.h	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Materials/Material.h	(revision 17248)
@@ -26,9 +26,6 @@
 		virtual void       Configure(Elements* elements)=0;
 		virtual void       GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum)=0;
-		virtual void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon)=0;
-		virtual void       GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon)=0;
-		virtual void       GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon)=0;
-		virtual void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon)=0;
-		virtual void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0;
+		virtual void       GetViscosity(IssmDouble* pviscosity,IssmDouble epseff)=0;
+		virtual void       GetViscosityBar(IssmDouble* pviscosity,IssmDouble epseff)=0;
 		virtual void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0;
 		virtual void       GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0;
Index: /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp	(revision 17248)
@@ -240,15 +240,15 @@
 }
 /*}}}*/
-/*FUNCTION Matice::GetViscosity2d {{{*/
-void  Matice::GetViscosity2d(IssmDouble* pviscosity, IssmDouble* epsilon){
+/*FUNCTION Matice::GetViscosity {{{*/
+void  Matice::GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){
 	/*From a string tensor and a material object, return viscosity, using Glen's flow law.
-												    (1-D) B
-	  viscosity= -------------------------------------------------------------------
-						  2[ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]
-
-	  where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity 
-	  vector, and n the flow law exponent.
-
-	  If epsilon is NULL, it means this is the first time SystemMatrices is being run, and we 
+								(1-D) B
+	  viscosity= -------------------------
+						  2 eps_eff ^[(n-1)/n]
+
+	  where viscosity is the viscotiy, B the flow law parameter , eps_eff is the effective strain rate
+	  and n the flow law exponent.
+
+	  If eps_eff = 0 , it means this is the first time SystemMatrices is being run, and we 
 	  return 10^14, initial viscosity.
 	  */
@@ -257,40 +257,26 @@
 	IssmDouble viscosity;
 
-	/*input strain rate: */
-	IssmDouble exx,eyy,exy;
-
 	/*Intermediary: */
-	IssmDouble A,e;
 	IssmDouble B,D,n;
 
 	/*Get B and n*/
-	B=GetBbar();
-	n=GetN();
-	D=GetDbar();
-
-	if (n==1){
-		/*Viscous behaviour! viscosity=B: */
-		viscosity=(1-D)*B/2;
+	B=GetB(); _assert_(B>0.);
+	n=GetN(); _assert_(n>0.);
+	D=GetD(); _assert_(D>=0. && D<1.);
+
+	if (n==1.){
+		/*Linear Viscous behavior (Newtonian fluid) viscosity=B/2: */
+		viscosity=(1.-D)*B/2.;
 	}
 	else{
-		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
-			viscosity=0.5*pow(10.,14);
-		}
+
+		/*if no strain rate, return maximum viscosity*/
+		if(eps_eff==0.){
+			viscosity = 1.e+14/2.;
+			//viscosity=2.5*pow(10.,17);
+		}
+
 		else{
-			/*Retrive strain rate components: */
-			exx=*(epsilon+0);
-			eyy=*(epsilon+1);
-			exy=*(epsilon+2);
-
-			/*Build viscosity: viscosity=B/(2*A^e) */
-			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+exx*eyy;
-			if(A==0){
-				/*Maxiviscositym viscosity for 0 shear areas: */
-				viscosity=2.5*pow(10.,17);
-			}
-			else{
-				e=(n-1)/(2*n);
-				viscosity=(1-D)*B/(2*pow(A,e));
-			}
+			viscosity=(1.-D)*B/(2.*pow(eps_eff,(n-1.)/n));
 		}
 	}
@@ -298,7 +284,4 @@
 	/*Checks in debugging mode*/
 	if(viscosity<=0) _error_("Negative viscosity");
-	_assert_(B>0);
-	_assert_(n>0);
-	_assert_(D>=0 && D<1);
 
 	/*Return: */
@@ -306,15 +289,15 @@
 }
 /*}}}*/
-/*FUNCTION Matice::GetViscosity2dvertical {{{*/
-void  Matice::GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* epsilon){
+/*FUNCTION Matice::GetViscosityBar {{{*/
+void  Matice::GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){
 	/*From a string tensor and a material object, return viscosity, using Glen's flow law.
-									   (1-D) B
-	  viscosity= --------------------------------------
-						  2[ exx^2+eyy^2+ 2exy^2]^[(n-1)/2n]
-
-	  where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity 
-	  vector, and n the flow law exponent.
-
-	  If epsilon is NULL, it means this is the first time SystemMatrices is being run, and we 
+								(1-D) B
+	  viscosity= -------------------------
+						  2 eps_eff ^[(n-1)/n]
+
+	  where viscosity is the viscotiy, B the flow law parameter , eps_eff is the effective strain rate
+	  and n the flow law exponent.
+
+	  If eps_eff = 0 , it means this is the first time SystemMatrices is being run, and we 
 	  return 10^14, initial viscosity.
 	  */
@@ -323,40 +306,26 @@
 	IssmDouble viscosity;
 
-	/*input strain rate: */
-	IssmDouble exx,eyy,exy;
-
 	/*Intermediary: */
-	IssmDouble A,e;
 	IssmDouble B,D,n;
 
 	/*Get B and n*/
-	B=GetB();
-	n=GetN();
-	D=GetD();
-
-	if (n==1){
-		/*Viscous behaviour! viscosity=B: */
-		viscosity=(1-D)*B/2;
+	B=GetBbar(); _assert_(B>0.);
+	n=GetN();    _assert_(n>0.);
+	D=GetDbar(); _assert_(D>=0. && D<1.);
+
+	if (n==1.){
+		/*Linear Viscous behavior (Newtonian fluid) viscosity=B/2: */
+		viscosity=(1.-D)*B/2.;
 	}
 	else{
-		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
-			viscosity=0.5*pow(10.,14);
-		}
+
+		/*if no strain rate, return maximum viscosity*/
+		if(eps_eff==0.){
+			viscosity = 1.e+14/2.;
+			//viscosity=2.5*pow(10.,17);
+		}
+
 		else{
-			/*Retrive strain rate components: */
-			exx=epsilon[0];
-			eyy=epsilon[1];
-			exy=epsilon[2];
-
-			/*Build viscosity: viscosity=B/(2*A^e) */
-			A=exx*exx+eyy*eyy+2.*exy*exy;
-			if(A==0.){
-				/*Maxiviscositym viscosity for 0 shear areas: */
-				viscosity=2.5*2.e+17;
-			}
-			else{
-				e=(n-1.)/(2.*n);
-				viscosity=(1.-D)*B/(2.*pow(A,e));
-			}
+			viscosity=(1.-D)*B/(2.*pow(eps_eff,(n-1.)/n));
 		}
 	}
@@ -364,222 +333,7 @@
 	/*Checks in debugging mode*/
 	if(viscosity<=0) _error_("Negative viscosity");
-	_assert_(B>0);
-	_assert_(n>0);
-	_assert_(D>=0 && D<1);
 
 	/*Return: */
 	*pviscosity=viscosity;
-}
-/*}}}*/
-/*FUNCTION Matice::GetViscosity2dverticalHO {{{*/
-void  Matice::GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* epsilon){
-	/*From a string tensor and a material object, return viscosity, using Glen's flow law.
-									   (1-D) B
-	  viscosity= --------------------------------------
-						  2[ 2exx^2 + 2exy^2]^[(n-1)/2n]
-
-	  where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity 
-	  vector, and n the flow law exponent.
-
-	  If epsilon is NULL, it means this is the first time SystemMatrices is being run, and we 
-	  return 10^14, initial viscosity.
-	  */
-
-	/*output: */
-	IssmDouble viscosity;
-
-	/*input strain rate: */
-	IssmDouble exx,exy;
-
-	/*Intermediary: */
-	IssmDouble A,e;
-	IssmDouble B,D,n;
-
-	/*Get B and n*/
-	B=GetB();
-	n=GetN();
-	D=GetD();
-
-	if (n==1){
-		/*Viscous behaviour! viscosity=B: */
-		viscosity=(1-D)*B/2;
-	}
-	else{
-		if((epsilon[0]==0) && (epsilon[1]==0)){
-			viscosity=0.5*pow(10.,14);
-		}
-		else{
-			/*Retrive strain rate components: */
-			exx=epsilon[0];
-			exy=epsilon[1];
-
-			/*Build viscosity: viscosity=B/(2*A^e) */
-			A=2*exx*exx+2.*exy*exy;
-			if(A==0.){
-				/*Maxiviscositym viscosity for 0 shear areas: */
-				viscosity=2.5*2.e+17;
-			}
-			else{
-				e=(n-1.)/(2.*n);
-				viscosity=(1.-D)*B/(2.*pow(A,e));
-			}
-		}
-	}
-
-	/*Checks in debugging mode*/
-	if(viscosity<=0) _error_("Negative viscosity");
-	_assert_(B>0);
-	_assert_(n>0);
-	_assert_(D>=0 && D<1);
-
-	/*Return: */
-	*pviscosity=viscosity;
-}
-/*}}}*/
-/*FUNCTION Matice::GetViscosity3d {{{*/
-void  Matice::GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* epsilon){
-
-	/*Return viscosity accounting for steady state power law creep [Thomas and SSA, 1982]: 
-	 *
-	 *                                               (1-D)*B
-	 * viscosity3d= -------------------------------------------------------------------
-	 *                      2[ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]
-	 *
-	 *     where mu is the viscotiy, B the flow law parameter , (u,v) the velocity 
-	 *     vector, and n the flow law exponent.
-	 *
-	 * If epsilon is NULL, it means this is the first time Emg is being run, and we 
-	 * return g, initial viscosity.
-	 */
-
-	/*output: */
-	IssmDouble viscosity3d;
-
-	/*input strain rate: */
-	IssmDouble exx,eyy,exy,exz,eyz;
-
-	/*Intermediaries: */
-	IssmDouble A,e;
-	IssmDouble B,D,n;
-
-	/*Get B and n*/
-	B=GetB();
-	D=GetD();
-	n=GetN();
-
-	if (n==1){
-		/*Viscous behaviour! viscosity3d=B: */
-		viscosity3d=(1-D)*B/2;
-	}
-	else{
-		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
-				(epsilon[3]==0) && (epsilon[4]==0)){
-			viscosity3d=0.5*pow(10.,14);
-		}
-		else{
-
-			/*Retrive strain rate components: */
-			exx=*(epsilon+0);
-			eyy=*(epsilon+1);
-			exy=*(epsilon+2);
-			exz=*(epsilon+3);
-			eyz=*(epsilon+4);
-
-			/*Build viscosity: viscosity3d=2*B/(2*A^e) */
-			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy;
-			if(A==0){
-				/*Maxiviscosity3dm viscosity for 0 shear areas: */
-				viscosity3d=2.25*pow(10.,17);
-			}
-			else{
-				e=(n-1)/2/n;
-
-				viscosity3d=(1-D)*B/(2*pow(A,e));
-			}
-		}
-	}
-
-	/*Checks in debugging mode*/
-	if(viscosity3d<=0) _error_("Negative viscosity");
-	_assert_(B>0);
-	_assert_(n>0);
-	_assert_(D>=0 && D<1);
-
-	/*Assign output pointers:*/
-	*pviscosity3d=viscosity3d;
-}
-/*}}}*/
-/*FUNCTION Matice::GetViscosity3dFS {{{*/
-void  Matice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){
-	/*Return viscosity accounting for steady state power law creep [Thomas and SSA, 1982]: 
-	 *
-	 *                                          (1-D)*B
-	 * viscosity3d= -------------------------------------------------------------------
-	 *                   2[ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]
-	 *
-	 *     where mu is the viscotiy, B the flow law parameter , (u,v) the velocity 
-	 *     vector, and n the flow law exponent.
-	 *
-	 * If epsilon is NULL, it means this is the first time Emg is being run, and we 
-	 * return g, initial viscosity.
-	 */
-
-	/*output: */
-	IssmDouble viscosity3d;
-
-	/*input strain rate: */
-	IssmDouble exx,eyy,exy,exz,eyz,ezz;
-
-	/*Intermediaries: */
-	IssmDouble A,e;
-	IssmDouble B,D,n;
-	IssmDouble eps0;
-
-	/*Get B and n*/
-	eps0=pow(10.,-27);
-	B=GetB();
-	D=GetD();
-	n=GetN();
-
-	if (n==1){
-		/*Viscous behaviour! viscosity3d=B: */
-		viscosity3d=(1-D)*B/2;
-	}
-	else{
-		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
-				(epsilon[3]==0) && (epsilon[4]==0) && (epsilon[5]==0)){
-			viscosity3d=0.5*pow(10.,14);
-		}
-		else{
-
-			/*Retrive strain rate components: */
-			exx=*(epsilon+0);
-			eyy=*(epsilon+1);
-			ezz=*(epsilon+2); //not used
-			exy=*(epsilon+3);
-			exz=*(epsilon+4);
-			eyz=*(epsilon+5);
-
-			/*Build viscosity: viscosity3d=B/(2*A^e) */
-			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy+pow(eps0,2);
-			if(A==0){
-				/*Maxiviscosity3dm viscosity for 0 shear areas: */
-				viscosity3d=2.25*pow(10.,17);
-			}
-			else{
-				e=(n-1)/2/n;
-				viscosity3d=(1-D)*B/(2*pow(A,e));
-			}
-		}
-	}
-
-	/*Checks in debugging mode*/
-	if(viscosity3d<=0) _error_("Negative viscosity");
-	_assert_(B>0);
-	_assert_(n>0);
-	_assert_(D>=0 && D<1);
-
-	/*Assign output pointers:*/
-	*pviscosity3d=viscosity3d;
 }
 /*}}}*/
@@ -706,7 +460,4 @@
 	IssmDouble exx,eyy,exy,exz,eyz;
 
-	/*Get visocisty and n*/
-	GetViscosity3d(&mu,epsilon);
-	n=GetN();
 
 	if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
@@ -715,4 +466,5 @@
 	}
 	else{
+
 		/*Retrive strain rate components: */
 		exx=epsilon[0];
@@ -723,5 +475,7 @@
 		eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy + exz*exz + eyz*eyz;
 
-		mu_prime=(1-n)/(2*n) * mu/eff2;
+		GetViscosity(&mu,sqrt(eff2));
+		n=GetN();
+		mu_prime=(1.-n)/(2.*n) * mu/eff2;
 	}
 
@@ -739,8 +493,4 @@
 	/*input strain rate: */
 	IssmDouble exx,eyy,exy,exz,eyz,ezz;
-
-	/*Get visocisty and n*/
-	GetViscosity3d(&mu,epsilon);
-	n=GetN();
 
 	if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
@@ -758,4 +508,6 @@
 		eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy + exz*exz + eyz*eyz;
 
+		GetViscosity(&mu,sqrt(eff2));
+		n=GetN();
 		mu_prime=(1-n)/(2*n) * mu/eff2;
 	}
@@ -774,8 +526,4 @@
 	/*input strain rate: */
 	IssmDouble exx,eyy,exy;
-
-	/*Get visocisty and n*/
-	GetViscosity2d(&mu,epsilon);
-	n=GetN();
 
 	if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
@@ -789,5 +537,7 @@
 		eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy ;
 
-		mu_prime=(1-n)/(2*n) * mu/eff2;
+		GetViscosityBar(&mu,sqrt(eff2));
+		n=GetN();
+		mu_prime=(1.-n)/(2.*n)*mu/eff2;
 	}
 
Index: /issm/trunk-jpl/src/c/classes/Materials/Matice.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matice.h	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matice.h	(revision 17248)
@@ -52,9 +52,6 @@
 		void   GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum);
 		void       SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
-		void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon);
-		void       GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon);
-		void       GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon);
-		void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon);
-		void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon);
+		void       GetViscosity(IssmDouble* pviscosity, IssmDouble eps_eff);
+		void       GetViscosityBar(IssmDouble* pviscosity, IssmDouble eps_eff);
 		void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon);
 		void       GetViscosityDComplement(IssmDouble*, IssmDouble*);
Index: /issm/trunk-jpl/src/c/classes/Materials/Matpar.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 17247)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 17248)
@@ -82,9 +82,6 @@
 		void       Configure(Elements* elements);
 		void       GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){return;}
-		void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");};
-		void       GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");};
-		void       GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");};
-		void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon){_error_("not supported");};
-		void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");};
+		void       GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){_error_("not supported");};
+		void       GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){_error_("not supported");};
 		void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");};
 		void       GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");};
