Index: ../trunk-jpl/test/NightlyRun/test275.m
===================================================================
--- ../trunk-jpl/test/NightlyRun/test275.m	(revision 18816)
+++ ../trunk-jpl/test/NightlyRun/test275.m	(revision 18817)
@@ -15,14 +15,16 @@
 md.damage.stabilization=1;
 
 md.damage.requested_outputs={'default','DamageF'};
+md.transient.isdamageevolution=1;
 
 md=setflowequation(md,'SSA','all');
 md.cluster=generic('name',oshostname(),'np',3);
-md=solve(md,DamageEvolutionSolutionEnum());
+%md=solve(md,DamageEvolutionSolutionEnum());
 
-field_names={'D','F'};
-field_tolerances={1e-13,1e-13};
-field_values={...
-		(md.results.DamageEvolutionSolution.DamageDbar),...
-		(md.results.DamageEvolutionSolution.DamageF),...
-	};
+%field_names={'D','F'};
+%field_tolerances={1e-13,1e-13};
+%field_values={...
+%		(md.results.DamageEvolutionSolution.DamageDbar),...
+%		(md.results.DamageEvolutionSolution.DamageF),...
+%	};
+md=solve(md,TransientSolutionEnum());
Index: ../trunk-jpl/test/NightlyRun/test807.m
===================================================================
--- ../trunk-jpl/test/NightlyRun/test807.m	(revision 0)
+++ ../trunk-jpl/test/NightlyRun/test807.m	(revision 18817)
@@ -0,0 +1,60 @@
+md=triangle(model(),'../Exp/Square.exp',50000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelf.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+
+x = md.mesh.x;
+xmin = min(x);
+xmax = max(x);
+Lx = (xmax-xmin);
+alpha = 2./3.;
+md.mask.ice_levelset = ((x - alpha*Lx)>0) - ((x - alpha*Lx)<0);
+
+md.timestepping.time_step=10;
+md.timestepping.final_time=30;
+
+%Transient
+md.transient.isstressbalance=1;
+md.transient.islevelset=1;
+md.transient.ismasstransport=1;
+md.transient.isthermal=0;
+md.transient.isgroundingline=0;
+md.transient.isgia=0;
+md.transient.iscalving=1;
+
+md.calving.calvingrate=zeros(md.mesh.numberofvertices,1);
+md.calving.meltingrate=10000*ones(md.mesh.numberofvertices,1);
+
+md=solve(md,TransientSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1'...
+		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2'...
+		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,...
+		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-11};
+field_values={...
+	md.results.TransientSolution(1).Vx,...
+	md.results.TransientSolution(1).Vy,...
+	md.results.TransientSolution(1).Vel,...
+	md.results.TransientSolution(1).Pressure,...
+	md.results.TransientSolution(1).Thickness,...
+	md.results.TransientSolution(1).Surface,...
+	md.results.TransientSolution(1).MaskIceLevelset,...
+	md.results.TransientSolution(2).Vx,...
+	md.results.TransientSolution(2).Vy,...
+	md.results.TransientSolution(2).Vel,...
+	md.results.TransientSolution(2).Pressure,...
+	md.results.TransientSolution(2).Thickness,...
+	md.results.TransientSolution(2).Surface,...
+	md.results.TransientSolution(2).MaskIceLevelset,...
+	md.results.TransientSolution(3).Vx,...
+	md.results.TransientSolution(3).Vy,...
+	md.results.TransientSolution(3).Vel,...
+	md.results.TransientSolution(3).Pressure,...
+	md.results.TransientSolution(3).Thickness,...
+	md.results.TransientSolution(3).Surface,...
+	md.results.TransientSolution(3).MaskIceLevelset,...
+	};
Index: ../trunk-jpl/test/NightlyRun/test807.py
===================================================================
--- ../trunk-jpl/test/NightlyRun/test807.py	(revision 0)
+++ ../trunk-jpl/test/NightlyRun/test807.py	(revision 18817)
@@ -0,0 +1,74 @@
+from model import *
+from triangle import *
+from squaremesh import *
+from setmask import *
+from parameterize import *
+from setflowequation import *
+from EnumDefinitions import *
+from solve import *
+from MatlabFuncs import *
+import numpy
+
+md=triangle(model(),'../Exp/Square.exp',50000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelf.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+
+x = md.mesh.x
+xmin = min(x)
+xmax = max(x)
+Lx = (xmax-xmin)
+alpha = 2./3.
+md.mask.ice_levelset = numpy.float_((x - alpha*Lx)>0) - numpy.float_((x - alpha*Lx)<0)
+
+md.timestepping.time_step=10
+md.timestepping.final_time=30
+
+
+
+#Transient
+md.transient.isstressbalance=True
+md.transient.islevelset=True
+md.transient.ismasstransport=True
+md.transient.isthermal=False
+md.transient.isgroundingline=False
+md.transient.isgia=False
+md.transient.iscalving=True;
+
+md.calving.calvingrate=numpy.zeros((md.mesh.numberofvertices,1))
+md.calving.meltingrate=10000*numpy.ones((md.mesh.numberofvertices,1))
+
+md=solve(md,TransientSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\
+		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\
+		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
+		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,\
+		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-11]
+field_values=[\
+	md.results.TransientSolution[0].Vx,\
+	md.results.TransientSolution[0].Vy,\
+	md.results.TransientSolution[0].Vel,\
+	md.results.TransientSolution[0].Pressure,\
+	md.results.TransientSolution[0].Thickness,\
+	md.results.TransientSolution[0].Surface,\
+	md.results.TransientSolution[0].MaskIceLevelset,\
+	md.results.TransientSolution[1].Vx,\
+	md.results.TransientSolution[1].Vy,\
+	md.results.TransientSolution[1].Vel,\
+	md.results.TransientSolution[1].Pressure,\
+	md.results.TransientSolution[1].Thickness,\
+	md.results.TransientSolution[1].Surface,\
+	md.results.TransientSolution[1].MaskIceLevelset,\
+	md.results.TransientSolution[2].Vx,\
+	md.results.TransientSolution[2].Vy,\
+	md.results.TransientSolution[2].Vel,\
+	md.results.TransientSolution[2].Pressure,\
+	md.results.TransientSolution[2].Thickness,\
+	md.results.TransientSolution[2].Surface,\
+	md.results.TransientSolution[2].MaskIceLevelset,\
+
+	]
Index: ../trunk-jpl/test/Archives/Archive807.nc
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: ../trunk-jpl/test/Archives/Archive807.nc
===================================================================
--- ../trunk-jpl/test/Archives/Archive807.nc	(revision 18816)
+++ ../trunk-jpl/test/Archives/Archive807.nc	(revision 18817)

Property changes on: ../trunk-jpl/test/Archives/Archive807.nc
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: ../trunk-jpl/src/m/enum/CalvingLawEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvingLawEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/CalvingLawEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=CalvingLawEnum()
-%CALVINGLAWENUM - Enum of CalvingLaw
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=CalvingLawEnum()
-
-macro=StringToEnum('CalvingLaw');
Index: ../trunk-jpl/src/m/enum/HydrologydcEplflipLockEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/HydrologydcEplflipLockEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/HydrologydcEplflipLockEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=HydrologydcEplflipLockEnum()
-%HYDROLOGYDCEPLFLIPLOCKENUM - Enum of HydrologydcEplflipLock
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=HydrologydcEplflipLockEnum()
-
-macro=StringToEnum('HydrologydcEplflipLock');
Index: ../trunk-jpl/src/m/enum/TransientIscalvingEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/TransientIscalvingEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/TransientIscalvingEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=TransientIscalvingEnum()
-%TRANSIENTISCALVINGENUM - Enum of TransientIscalving
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=TransientIscalvingEnum()
-
-macro=StringToEnum('TransientIscalving');
Index: ../trunk-jpl/src/m/enum/CalvingLevermannEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvingLevermannEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/CalvingLevermannEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=CalvingLevermannEnum()
-%CALVINGLEVERMANNENUM - Enum of CalvingLevermann
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=CalvingLevermannEnum()
-
-macro=StringToEnum('CalvingLevermann');
Index: ../trunk-jpl/src/m/enum/FrictionWaterLayerEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/FrictionWaterLayerEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/FrictionWaterLayerEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=FrictionWaterLayerEnum()
-%FRICTIONWATERLAYERENUM - Enum of FrictionWaterLayer
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=FrictionWaterLayerEnum()
-
-macro=StringToEnum('FrictionWaterLayer');
Index: ../trunk-jpl/src/m/enum/CalvingCalvingrateEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvingCalvingrateEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/CalvingCalvingrateEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=CalvingCalvingrateEnum()
-%CALVINGCALVINGRATEENUM - Enum of CalvingCalvingrate
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=CalvingCalvingrateEnum()
-
-macro=StringToEnum('CalvingCalvingrate');
Index: ../trunk-jpl/src/m/enum/CalvingRequestedOutputsEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvingRequestedOutputsEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/CalvingRequestedOutputsEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=CalvingRequestedOutputsEnum()
-%CALVINGREQUESTEDOUTPUTSENUM - Enum of CalvingRequestedOutputs
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=CalvingRequestedOutputsEnum()
-
-macro=StringToEnum('CalvingRequestedOutputs');
Index: ../trunk-jpl/src/m/enum/CalvinglevermannCoeffEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvinglevermannCoeffEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/CalvinglevermannCoeffEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=CalvinglevermannCoeffEnum()
-%CALVINGLEVERMANNCOEFFENUM - Enum of CalvinglevermannCoeff
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=CalvinglevermannCoeffEnum()
-
-macro=StringToEnum('CalvinglevermannCoeff');
Index: ../trunk-jpl/src/m/enum/DefaultCalvingEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/DefaultCalvingEnum.m	(revision 18816)
+++ ../trunk-jpl/src/m/enum/DefaultCalvingEnum.m	(revision 18817)
@@ -1,11 +0,0 @@
-function macro=DefaultCalvingEnum()
-%DEFAULTCALVINGENUM - Enum of DefaultCalving
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
-%            Please read src/c/shared/Enum/README for more information
-%
-%   Usage:
-%      macro=DefaultCalvingEnum()
-
-macro=StringToEnum('DefaultCalving');
Index: ../trunk-jpl/src/m/enum/CalvinglevermannMeltingrateEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvinglevermannMeltingrateEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/CalvinglevermannMeltingrateEnum.m	(revision 18817)
@@ -0,0 +1,11 @@
+function macro=CalvinglevermannMeltingrateEnum()
+%CALVINGLEVERMANNMELTINGRATEENUM - Enum of CalvinglevermannMeltingrate
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=CalvinglevermannMeltingrateEnum()
+
+macro=StringToEnum('CalvinglevermannMeltingrate');
Index: ../trunk-jpl/src/m/enum/CalvingMeltingrateEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/CalvingMeltingrateEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/CalvingMeltingrateEnum.m	(revision 18817)
@@ -0,0 +1,11 @@
+function macro=CalvingMeltingrateEnum()
+%CALVINGMELTINGRATEENUM - Enum of CalvingMeltingrate
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=CalvingMeltingrateEnum()
+
+macro=StringToEnum('CalvingMeltingrate');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18816)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18817)
@@ -212,10 +212,12 @@
 def StressIntensityFactorEnum(): return StringToEnum("StressIntensityFactor")[0]
 def CalvingLawEnum(): return StringToEnum("CalvingLaw")[0]
 def CalvingCalvingrateEnum(): return StringToEnum("CalvingCalvingrate")[0]
+def CalvingMeltingrateEnum(): return StringToEnum("CalvingMeltingrate")[0]
 def CalvingLevermannEnum(): return StringToEnum("CalvingLevermann")[0]
 def DefaultCalvingEnum(): return StringToEnum("DefaultCalving")[0]
 def CalvingRequestedOutputsEnum(): return StringToEnum("CalvingRequestedOutputs")[0]
 def CalvinglevermannCoeffEnum(): return StringToEnum("CalvinglevermannCoeff")[0]
+def CalvinglevermannMeltingrateEnum(): return StringToEnum("CalvinglevermannMeltingrate")[0]
 def CalvingratexEnum(): return StringToEnum("Calvingratex")[0]
 def CalvingrateyEnum(): return StringToEnum("Calvingratey")[0]
 def CalvingratexAverageEnum(): return StringToEnum("CalvingratexAverage")[0]
Index: ../trunk-jpl/examples/ISMIP/CheatyRunme.m
===================================================================
--- ../trunk-jpl/examples/ISMIP/CheatyRunme.m	(revision 18816)
+++ ../trunk-jpl/examples/ISMIP/CheatyRunme.m	(revision 18817)
@@ -2,7 +2,7 @@
 %step 7 is specific to ISMIPA
 %step 8 is specific to ISMIPF
 
-steps=[1:7];
+steps=[1:4];
 
 % parameter file to be used, choose between CheatyIsmipA.par or CheatyIsmipF.par
 ParamFile='CheatyIsmipF.par'
Index: ../trunk-jpl/examples/SquareIceShelf/Square.par
===================================================================
--- ../trunk-jpl/examples/SquareIceShelf/Square.par	(revision 18816)
+++ ../trunk-jpl/examples/SquareIceShelf/Square.par	(revision 18817)
@@ -24,7 +24,7 @@
 disp('      creating flow law parameter');
 md.materials.rheology_B=paterson((273-20)*ones(md.mesh.numberofvertices,1));
 md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
-md.damage.D=zeros(md.mesh.numberofvertices,1);
+md.damage.D=0.9*ones(md.mesh.numberofvertices,1);
 
 disp('      creating boundary conditions');
 md=SetIceShelfBC(md,'Front.exp');
Index: ../trunk-jpl/examples/SquareIceShelf/runme.m
===================================================================
--- ../trunk-jpl/examples/SquareIceShelf/runme.m	(revision 18816)
+++ ../trunk-jpl/examples/SquareIceShelf/runme.m	(revision 18817)
@@ -1,7 +1,38 @@
 md=model;
+
 md=triangle(md,'DomainOutline.exp',100000);
 md=setmask(md,'all','');
+
+md.materials=matdamageice();
 md=parameterize(md,'Square.par');
+md.initialization.vx = ones(md.mesh.numberofvertices,1);
+md.initialization.vy = 0*ones(md.mesh.numberofvertices,1);
+md.initialization.pressure = 0*ones(md.mesh.numberofvertices,1);
+md.damage.isdamage=1;
+md.damage.law=1;
+md.damage.max_damage=0.8;
+md.damage.D=0.5*ones(md.mesh.numberofvertices,1);
+%md.damage.spcdamage=NaN*ones(md.mesh.numberofvertices,1);
+md.damage.c1=1;
+md.damage.c2=1;
+md.damage.equiv_stress=0;
+md.damage.stabilization=2;
+
+%md=extrude(md,7,3);
+md.surfaceforcings.mass_balance = zeros(md.mesh.numberofvertices,1);
+md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices,1);
+md.basalforcings.floatingice_melting_rate = zeros(md.mesh.numberofvertices,1);
 md=setflowequation(md,'SSA','all');
+
+md.timestepping.start_time = 0;
+md.timestepping.final_time = 1.;
+md.timestepping.time_step  = 0.1;
+
+md.transient.isdamageevolution=1;
+md.transient.isthermal=0;
+
 md.cluster=generic('name',oshostname,'np',2);
-md=solve(md,StressbalanceSolutionEnum);
+md.stressbalance.requested_outputs={'default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy'};
+%md=solve(md,StressbalanceSolutionEnum());
+md.verbose.solution = 1;
+md=solve(md,TransientSolutionEnum());
