Index: /issm/trunk-jpl/src/m/mech/mechanicalproperties.m
===================================================================
--- /issm/trunk-jpl/src/m/mech/mechanicalproperties.m	(revision 20213)
+++ /issm/trunk-jpl/src/m/mech/mechanicalproperties.m	(revision 20214)
@@ -1,3 +1,3 @@
-function md=mechanicalproperties(md,vx,vy)
+function md=mechanicalproperties(md,vx,vy,varargin)
 %MECHANICALPROPERTIES - compute stress and strain rate for a goven velocity
 %
@@ -23,4 +23,8 @@
 	disp('Warning: the model has some non SSA elements. These will be treated like SSA''s elements');
 end
+
+%get damage, if passed
+options = pairoptions(varargin{:});
+damage = getfieldvalue(options,'damage',zeros(md.mesh.numberofvertices,1));
 
 %initialization
@@ -62,6 +66,5 @@
 	nu(location)=B_bar(location);
 elseif isa(md.materials,'matdamageice')
-	% FIXME this needs to use md.damage.D or damage from a solution
-	Zinv=md.materials.rheology_Z(index)*summation/3;
+	Zinv=1-damage(index)*summation/3;
 	location=find(second_inv~=0);
 	nu(location)=Zinv(location).*B_bar(location)./(second_inv(location).^power(location));
