Index: /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 22010)
+++ /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 22011)
@@ -1525,5 +1525,5 @@
 		/*Update Rheology only if converged (we must make sure that the temperature is below melting point
 		 * otherwise the rheology could be negative*/
-		rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
+		rheology_law=element->GetIntegerMaterialParameter(MaterialsRheologyLawEnum);
 		element->GetInputListOnNodes(&surface[0],SurfaceEnum);
 		switch(rheology_law){
Index: /issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp	(revision 22010)
+++ /issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp	(revision 22011)
@@ -809,5 +809,5 @@
 		/*Update Rheology only if converged (we must make sure that the temperature is below melting point
 		 * otherwise the rheology could be negative*/
-		rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
+		rheology_law=element->GetIntegerMaterialParameter(MaterialsRheologyLawEnum);
 		element->GetInputListOnNodes(&surface[0],SurfaceEnum);
 		switch(rheology_law){
Index: /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp	(revision 22010)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp	(revision 22011)
@@ -646,5 +646,4 @@
 		case SmbRlapslgmEnum:                        return this->rlapslgm;
 		case SmbDpermilEnum:                         return this->dpermil;
-		case MaterialsRheologyLawEnum:               return this->rheology_law;
 		case MaterialsLithosphereShearModulusEnum:   return this->lithosphere_shear_modulus;
 		case MaterialsLithosphereDensityEnum:        return this->lithosphere_density;
@@ -657,4 +656,13 @@
 }
 /*}}}*/
+IssmDouble Matpar::GetIntegerMaterialParameter(int enum_in){/*{{{*/
+
+	switch(enum_in){
+		case MaterialsRheologyLawEnum:               return this->rheology_law;
+		default: _error_("Enum "<<EnumToStringx(enum_in)<<" not supported yet");
+	}
+
+}
+/*}}}*/
 IssmDouble Matpar::PureIceEnthalpy(IssmDouble pressure){/*{{{*/
 	return heatcapacity*(TMeltingPoint(pressure)-referencetemperature);
Index: /issm/trunk-jpl/src/c/classes/Materials/Matpar.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 22010)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 22011)
@@ -124,4 +124,5 @@
 		IssmDouble GetEnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure);
 		IssmDouble GetMaterialParameter(int in_enum); 
+		IssmDouble GetIntegerMaterialParameter(int in_enum); 
 		IssmDouble PureIceEnthalpy(IssmDouble pressure);
 		void       ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure);
