Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18552)
+++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18553)
@@ -273,6 +273,7 @@
 	SurfaceEnum,
 	ThermalIsenthalpyEnum,
 	ThermalIsdynamicbasalspcEnum,
+	ThermalReltolEnum,
 	ThermalMaxiterEnum,
 	ThermalPenaltyFactorEnum,
 	ThermalPenaltyLockEnum,
Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18552)
+++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18553)
@@ -281,6 +281,7 @@
 		case SurfaceEnum : return "Surface";
 		case ThermalIsenthalpyEnum : return "ThermalIsenthalpy";
 		case ThermalIsdynamicbasalspcEnum : return "ThermalIsdynamicbasalspc";
+		case ThermalReltolEnum : return "ThermalReltol";
 		case ThermalMaxiterEnum : return "ThermalMaxiter";
 		case ThermalPenaltyFactorEnum : return "ThermalPenaltyFactor";
 		case ThermalPenaltyLockEnum : return "ThermalPenaltyLock";
Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18552)
+++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18553)
@@ -287,6 +287,7 @@
 	      else if (strcmp(name,"Surface")==0) return SurfaceEnum;
 	      else if (strcmp(name,"ThermalIsenthalpy")==0) return ThermalIsenthalpyEnum;
 	      else if (strcmp(name,"ThermalIsdynamicbasalspc")==0) return ThermalIsdynamicbasalspcEnum;
+	      else if (strcmp(name,"ThermalReltol")==0) return ThermalReltolEnum;
 	      else if (strcmp(name,"ThermalMaxiter")==0) return ThermalMaxiterEnum;
 	      else if (strcmp(name,"ThermalPenaltyFactor")==0) return ThermalPenaltyFactorEnum;
 	      else if (strcmp(name,"ThermalPenaltyLock")==0) return ThermalPenaltyLockEnum;
@@ -381,11 +382,11 @@
 	      else if (strcmp(name,"HydrologyDCEfficientAnalysis")==0) return HydrologyDCEfficientAnalysisEnum;
 	      else if (strcmp(name,"HydrologySolution")==0) return HydrologySolutionEnum;
 	      else if (strcmp(name,"MeltingAnalysis")==0) return MeltingAnalysisEnum;
-	      else if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum;
          else stage=4;
    }
    if(stage==4){
-	      if (strcmp(name,"MasstransportSolution")==0) return MasstransportSolutionEnum;
+	      if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum;
+	      else if (strcmp(name,"MasstransportSolution")==0) return MasstransportSolutionEnum;
 	      else if (strcmp(name,"FreeSurfaceBaseAnalysis")==0) return FreeSurfaceBaseAnalysisEnum;
 	      else if (strcmp(name,"FreeSurfaceTopAnalysis")==0) return FreeSurfaceTopAnalysisEnum;
 	      else if (strcmp(name,"SurfaceNormalVelocity")==0) return SurfaceNormalVelocityEnum;
@@ -504,11 +505,11 @@
 	      else if (strcmp(name,"Converged")==0) return ConvergedEnum;
 	      else if (strcmp(name,"Fill")==0) return FillEnum;
 	      else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum;
-	      else if (strcmp(name,"Friction")==0) return FrictionEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"Internal")==0) return InternalEnum;
+	      if (strcmp(name,"Friction")==0) return FrictionEnum;
+	      else if (strcmp(name,"Internal")==0) return InternalEnum;
 	      else if (strcmp(name,"MassFlux")==0) return MassFluxEnum;
 	      else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum;
 	      else if (strcmp(name,"Misfit")==0) return MisfitEnum;
@@ -627,11 +628,11 @@
 	      else if (strcmp(name,"MisfitName")==0) return MisfitNameEnum;
 	      else if (strcmp(name,"MisfitModelEnum")==0) return MisfitModelEnumEnum;
 	      else if (strcmp(name,"MisfitObservation")==0) return MisfitObservationEnum;
-	      else if (strcmp(name,"MisfitObservationEnum")==0) return MisfitObservationEnumEnum;
          else stage=6;
    }
    if(stage==6){
-	      if (strcmp(name,"MisfitTimeinterpolation")==0) return MisfitTimeinterpolationEnum;
+	      if (strcmp(name,"MisfitObservationEnum")==0) return MisfitObservationEnumEnum;
+	      else if (strcmp(name,"MisfitTimeinterpolation")==0) return MisfitTimeinterpolationEnum;
 	      else if (strcmp(name,"MisfitWeights")==0) return MisfitWeightsEnum;
 	      else if (strcmp(name,"MisfitWeightsEnum")==0) return MisfitWeightsEnumEnum;
 	      else if (strcmp(name,"SurfaceObservation")==0) return SurfaceObservationEnum;
@@ -750,11 +751,11 @@
 	      else if (strcmp(name,"Matseaice")==0) return MatseaiceEnum;
 	      else if (strcmp(name,"MaterialsPoisson")==0) return MaterialsPoissonEnum;
 	      else if (strcmp(name,"MaterialsYoungModulus")==0) return MaterialsYoungModulusEnum;
-	      else if (strcmp(name,"MaterialsTimeRelaxationStress")==0) return MaterialsTimeRelaxationStressEnum;
          else stage=7;
    }
    if(stage==7){
-	      if (strcmp(name,"MaterialsTimeRelaxationDamage")==0) return MaterialsTimeRelaxationDamageEnum;
+	      if (strcmp(name,"MaterialsTimeRelaxationStress")==0) return MaterialsTimeRelaxationStressEnum;
+	      else if (strcmp(name,"MaterialsTimeRelaxationDamage")==0) return MaterialsTimeRelaxationDamageEnum;
 	      else if (strcmp(name,"MaterialsRidgingExponent")==0) return MaterialsRidgingExponentEnum;
 	      else if (strcmp(name,"MaterialsCohesion")==0) return MaterialsCohesionEnum;
 	      else if (strcmp(name,"MaterialsInternalFrictionCoef")==0) return MaterialsInternalFrictionCoefEnum;
Index: ../trunk-jpl/src/m/classes/thermal.m
===================================================================
--- ../trunk-jpl/src/m/classes/thermal.m	(revision 18552)
+++ ../trunk-jpl/src/m/classes/thermal.m	(revision 18553)
@@ -8,6 +8,7 @@
 		spctemperature    = NaN;
 		penalty_threshold = 0;
 		stabilization     = 0;
+		reltol				= 0;
 		maxiter           = 0;
 		penalty_lock      = 0;
 		penalty_factor    = 0;
@@ -30,6 +31,7 @@
             fprintf(fid,'%s\n%s\n','       <option value="2" type="string" default="false"> </option>','</parameter>');
 
             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="stabilization" type="',class(obj.stabilization),'" default="',convert2str(obj.stabilization),'">','     <section name="thermal" />','     <help> maximum number of non linear iterations </help>','  </parameter>');
+				fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="reltol" type="',class(obj.reltol),'" default="',convert2str(obj.reltol),'">','     <section name="steadystate" />','     <help> relative tolerance criterion [K] </help>','  </parameter>');
             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="maxiter" type="',class(obj.maxiter),'" default="',convert2str(obj.maxiter),'">','     <section name="thermal" />','     <help> stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization) </help>','  </parameter>');
             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="penalty_lock" type="',class(obj.penalty_lock),'" default="',convert2str(obj.penalty_lock),'">','     <section name="thermal" />','     <help> threshold to declare convergence of thermal solution (default is 0)  </help>','  </parameter>');
             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="penalty_factor" type="',class(obj.penalty_factor),'" default="',convert2str(obj.penalty_factor),'">','     <section name="thermal" />','     <help> scaling exponent (default is 3) </help>','  </parameter>');
@@ -64,6 +66,9 @@
 			%Type of stabilization used
 			obj.stabilization=1;
 
+			%Relative tolerance for the enthalpy convergence
+			obj.reltol=0.01;
+
 			%Maximum number of iterations
 			obj.maxiter=100;
 
@@ -93,6 +98,10 @@
 				md = checkfield(md,'fieldname','thermal.isenthalpy','numel',[1],'values',[0 1]);
 				md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel', [1],'values',[0 1]);
 				if(md.thermal.isenthalpy)
+					md = checkfield(md,'fieldname','thermal.reltol','>',0.,'message','reltol must be larger than zero');
+					if isnan(md.stressbalance.reltol),
+						md = checkmessage(md,['for a steadystate computation, stressbalance.reltol (relative convergence criterion) must be defined!']);
+					end
 					md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel', [1],'values',[1], 'message',['for enthalpy run thermal.isdynamicbasalspc should be 1']);
 				end
 	    end
@@ -104,6 +113,7 @@
 
 			fielddisplay(obj,'spctemperature','temperature constraints (NaN means no constraint) [K]');
 			fielddisplay(obj,'stabilization','0: no, 1: artificial_diffusivity, 2: SUPG');
+			fielddisplay(obj,'reltol','relative tolerance convergence criterion for enthalpy');
 			fielddisplay(obj,'maxiter','maximum number of non linear iterations');
 			fielddisplay(obj,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)');
 			fielddisplay(obj,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)');
@@ -117,6 +127,7 @@
 			WriteData(fid,'object',obj,'fieldname','spctemperature','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1);
 			WriteData(fid,'object',obj,'fieldname','penalty_threshold','format','Integer');
 			WriteData(fid,'object',obj,'fieldname','stabilization','format','Integer');
+			WriteData(fid,'object',obj,'fieldname','reltol','format','Double');
 			WriteData(fid,'object',obj,'fieldname','maxiter','format','Integer');
 			WriteData(fid,'object',obj,'fieldname','penalty_lock','format','Integer');
 			WriteData(fid,'object',obj,'fieldname','penalty_factor','format','Double');
Index: ../trunk-jpl/src/m/enum/ThermalReltolEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/ThermalReltolEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/ThermalReltolEnum.m	(revision 18553)
@@ -0,0 +1,11 @@
+function macro=ThermalReltolEnum()
+%THERMALRELTOLENUM - Enum of ThermalReltol
+%
+%   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=ThermalReltolEnum()
+
+macro=StringToEnum('ThermalReltol');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18552)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18553)
@@ -273,6 +273,7 @@
 def SurfaceEnum(): return StringToEnum("Surface")[0]
 def ThermalIsenthalpyEnum(): return StringToEnum("ThermalIsenthalpy")[0]
 def ThermalIsdynamicbasalspcEnum(): return StringToEnum("ThermalIsdynamicbasalspc")[0]
+def ThermalReltolEnum(): return StringToEnum("ThermalReltol")[0]
 def ThermalMaxiterEnum(): return StringToEnum("ThermalMaxiter")[0]
 def ThermalPenaltyFactorEnum(): return StringToEnum("ThermalPenaltyFactor")[0]
 def ThermalPenaltyLockEnum(): return StringToEnum("ThermalPenaltyLock")[0]
