Index: /issm/trunk-jpl/src/m/mech/mechanicalproperties.m
===================================================================
--- /issm/trunk-jpl/src/m/mech/mechanicalproperties.m	(revision 13478)
+++ /issm/trunk-jpl/src/m/mech/mechanicalproperties.m	(revision 13479)
@@ -51,11 +51,24 @@
 power=(md.materials.rheology_n-1)./(2*md.materials.rheology_n);
 second_inv=(ux.^2+vy.^2+((uy+vx).^2)/4+ux.*vy);
+
 %some corrections
-location=find(second_inv~=0);
-nu(location)=B_bar(location)./(second_inv(location).^power(location));
 location=find(second_inv==0 & power~=0);
 nu(location)=10^18; 	%arbitrary maximum viscosity to apply where there is no effective shear
-location=find(second_inv==0 & power==0);
-nu(location)=B_bar(location);
+
+if isa(md.materials,'matice')
+	location=find(second_inv~=0);
+	nu(location)=B_bar(location)./(second_inv(location).^power(location));
+	location=find(second_inv==0 & power==0);
+	nu(location)=B_bar(location);
+elseif isa(md.materials,'matdamageice')
+	Zinv=md.materials.rheology_Z(index)*summation/3;
+	location=find(second_inv~=0);
+	nu(location)=Zinv(location).*B_bar(location)./(second_inv(location).^power(location));
+	location=find(second_inv==0 & power==0);
+	nu(location)=Zinv(location).*B_bar(location);
+	clear Zinv
+else
+	error(['class of md.materials (' class(md.materials) ') not recognized or not supported']);
+end
 clear B_bar location second_inv power
 
