Index: /issm/trunk/src/c/parallel/thermalstatic_core.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermalstatic_core.cpp	(revision 1820)
+++ /issm/trunk/src/c/parallel/thermalstatic_core.cpp	(revision 1821)
@@ -13,5 +13,5 @@
 #include "../issm.h"
 
-void thermalstatic_core(DataSet* results,FemModel* fems, ParameterInputs* inputs){
+void thermalstatic_core(DataSet* results,Model* model, ParameterInputs* inputs){
 
 	extern int my_rank;
@@ -54,11 +54,11 @@
 
 	/*recover fem models: */
-	fem_dh=fems+0;
-	fem_dv=fems+1;
-	fem_ds=fems+2;
-	fem_dhu=fems+3;
-	fem_sl=fems+4;
-	fem_t=fems+5;
-	fem_m=fems+6;
+	fem_dh=model->DiagnosticHorizontal();
+	fem_dv=model->DiagnosticVertical();
+	fem_ds=model->DiagnosticStokes();
+	fem_dhu=model->DiagnosticHutter();
+	fem_sl=model->Slope();
+	fem_t=model->Thermal();
+	fem_m=model->Melting();
 
 	//first recover parameters common to all solutions
@@ -68,6 +68,4 @@
 	fem_ds->parameters->FindParam((void*)&isstokes,"isstokes");
 
-	
-		
 	//initialize: 
 	converged=0;
@@ -86,5 +84,5 @@
 		}
 		results_thermal=new DataSet(ResultsEnum()); 
-		thermal_core(results_thermal,fems+5,inputs);
+		thermal_core(results_thermal,model,inputs);
 	
 		//get t_g and m_g;
@@ -103,5 +101,5 @@
 		//now compute diagnostic velocity using the steady state temperature.
 		results_diagnostic=new DataSet(ResultsEnum());
-		diagnostic_core(results_diagnostic,fems, inputs);
+		diagnostic_core(results_diagnostic,model, inputs);
 
 		//get p_g and u_g
