Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 1834)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 1835)
@@ -11,8 +11,8 @@
 #include "../../objects/objects.h"
 #include "../../shared/shared.h"
-#include "../Model.h"
+#include "../IoModel.h"
 
 
-void	CreateConstraintsDiagnosticHutter(DataSet** pconstraints, Model* model,ConstDataHandle model_handle){
+void	CreateConstraintsDiagnosticHutter(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
 
 	int i,j;
@@ -40,19 +40,19 @@
 
 	/*Now, is the flag ishutter on? otherwise, do nothing: */
-	if (!model->ishutter)goto cleanup_and_return;
+	if (!iomodel->ishutter)goto cleanup_and_return;
 
 	count=0;
 	
 	/*Fetch data: */
-	ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat");
 
 	/*vx and vy are spc'd if we are not on gridonhutter: */
-	for (i=0;i<model->numberofnodes;i++){
+	for (i=0;i<iomodel->numberofnodes;i++){
 	#ifdef _PARALLEL_
 	/*keep only this partition's nodes:*/
-	if((model->my_grids[i])){
+	if((iomodel->my_grids[i])){
 	#endif
 
-		if (!(int)model->gridonhutter[i]){
+		if (!(int)iomodel->gridonhutter[i]){
 	
 			spc_sid=count;
@@ -81,5 +81,5 @@
 
 	/*Free data: */
-	xfree((void**)&model->gridonhutter);
+	xfree((void**)&iomodel->gridonhutter);
 
 	/*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 1834)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 1835)
@@ -12,8 +12,8 @@
 #include "../../shared/shared.h"
 #include "../../MeshPartitionx/MeshPartitionx.h"
-#include "../Model.h"
-
-
-void	CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, Model* model,ConstDataHandle model_handle){
+#include "../IoModel.h"
+
+
+void	CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
 
 
@@ -113,8 +113,8 @@
 
 	/*Now, is the flag ishutter on? otherwise, do nothing: */
-	if (!model->ishutter)goto cleanup_and_return;
+	if (!iomodel->ishutter)goto cleanup_and_return;
 
 	/*Width of elements: */
-	if(strcmp(model->meshtype,"2d")==0){
+	if(strcmp(iomodel->meshtype,"2d")==0){
 		elements_width=3; //tria elements
 	}
@@ -125,27 +125,27 @@
 	#ifdef _PARALLEL_
 	/*Determine parallel partitioning of elements: we use Metis for now. First load the data, then partition*/
-	if(strcmp(model->meshtype,"2d")==0){
+	if(strcmp(iomodel->meshtype,"2d")==0){
 		/*load elements: */
-		ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");
+		IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat");
 	}
 	else{
 		/*load elements2d: */
-		ModelFetchData((void**)&model->elements2d,NULL,NULL,model_handle,"elements2d","Matrix","Mat");
-	}
-
-	MeshPartitionx(&epart, &npart,model->numberofelements,model->numberofnodes,model->elements, model->numberofelements2d,model->numberofnodes2d,model->elements2d,model->numlayers,elements_width, model->meshtype,num_procs);
+		IoModelFetchData((void**)&iomodel->elements2d,NULL,NULL,iomodel_handle,"elements2d","Matrix","Mat");
+	}
+
+	MeshPartitionx(&epart, &npart,iomodel->numberofelements,iomodel->numberofnodes,iomodel->elements, iomodel->numberofelements2d,iomodel->numberofnodes2d,iomodel->elements2d,iomodel->numlayers,elements_width, iomodel->meshtype,num_procs);
 
 	/*Free elements and elements2d: */
-	xfree((void**)&model->elements);
-	xfree((void**)&model->elements2d);
+	xfree((void**)&iomodel->elements);
+	xfree((void**)&iomodel->elements2d);
 
 	/*Used later on: */
-	my_grids=(int*)xcalloc(model->numberofnodes,sizeof(int));
-	#endif
-
-	#ifdef _PARALLEL_
-	if(strcmp(model->meshtype,"2d")==0){
-		ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");
-		for (i=0;i<model->numberofelements;i++){
+	my_grids=(int*)xcalloc(iomodel->numberofnodes,sizeof(int));
+	#endif
+
+	#ifdef _PARALLEL_
+	if(strcmp(iomodel->meshtype,"2d")==0){
+		IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat");
+		for (i=0;i<iomodel->numberofelements;i++){
 			if(my_rank==epart[i]){ 
 				/*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 
@@ -154,20 +154,20 @@
 				 will hold which grids belong to this partition*/
 
-				my_grids[(int)*(model->elements+elements_width*i+0)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+1)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+2)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+0)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+1)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+2)-1]=1;
 			}
 		}
 	}
 	else{
-		ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");
-		for (i=0;i<model->numberofelements;i++){
+		IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat");
+		for (i=0;i<iomodel->numberofelements;i++){
 			if(my_rank==epart[i]){ 
-				my_grids[(int)*(model->elements+elements_width*i+0)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+1)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+2)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+3)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+4)-1]=1;
-				my_grids[(int)*(model->elements+elements_width*i+5)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+0)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+1)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+2)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+3)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+4)-1]=1;
+				my_grids[(int)*(iomodel->elements+elements_width*i+5)-1]=1;
 			}
 		}
@@ -176,7 +176,7 @@
 	/*From the element partitioning, we can determine which grids are on the inside of this cpu's 
 	 *element partition, and which are on its border with other nodes:*/
-	gridborder=NewVec(model->numberofnodes);
-
-	for (i=0;i<model->numberofnodes;i++){
+	gridborder=NewVec(iomodel->numberofnodes);
+
+	for (i=0;i<iomodel->numberofnodes;i++){
 		if(my_grids[i])VecSetValue(gridborder,i,1,ADD_VALUES);
 	}
@@ -192,5 +192,5 @@
 	#ifdef _DEBUG_
 	if(my_rank==0){
-		for (i=0;i<model->numberofnodes;i++){
+		for (i=0;i<iomodel->numberofnodes;i++){
 			printf("Grid id %i Border grid %lf\n",i+1,my_bordergrids[i]);
 		}
@@ -203,19 +203,19 @@
 
 	/*Fetch data temporarily needed: */
-	ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");
-	ModelFetchData((void**)&model->thickness,NULL,NULL,model_handle,"thickness","Matrix","Mat");
-	ModelFetchData((void**)&model->surface,NULL,NULL,model_handle,"surface","Matrix","Mat");
-	ModelFetchData((void**)&model->bed,NULL,NULL,model_handle,"bed","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");
-	ModelFetchData((void**)&model->uppernodes,NULL,NULL,model_handle,"uppergrids","Matrix","Mat");
-	ModelFetchData((void**)&model->drag,NULL,NULL,model_handle,"drag","Matrix","Mat");
-	ModelFetchData((void**)&model->B,NULL,NULL,model_handle,"B","Matrix","Mat");
-	ModelFetchData((void**)&model->n,NULL,NULL,model_handle,"n","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->surface,NULL,NULL,iomodel_handle,"surface","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->bed,NULL,NULL,iomodel_handle,"bed","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->uppernodes,NULL,NULL,iomodel_handle,"uppergrids","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->drag,NULL,NULL,iomodel_handle,"drag","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->B,NULL,NULL,iomodel_handle,"B","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->n,NULL,NULL,iomodel_handle,"n","Matrix","Mat");
 
 	/*2d mesh: */
-	if (strcmp(model->meshtype,"2d")==0){
-
-		for (i=0;i<model->numberofnodes;i++){
+	if (strcmp(iomodel->meshtype,"2d")==0){
+
+		for (i=0;i<iomodel->numberofnodes;i++){
 		#ifdef _PARALLEL_
 		/*keep only this partition's nodes:*/
@@ -223,13 +223,13 @@
 		#endif
 
-			if(model->gridonhutter[i]){
+			if(iomodel->gridonhutter[i]){
 				
 				/*Deal with sing element: */
 				sing_id=i+1; 
 				sing_mid=i+1; //refers to the corresponding material property card
-				sing_mparid=model->numberofnodes+1;//refers to the corresponding matpar property card
+				sing_mparid=iomodel->numberofnodes+1;//refers to the corresponding matpar property card
 				sing_g=i+1;
-				sing_h=model->thickness[i];
-				sing_k=model->drag[i];
+				sing_h=iomodel->thickness[i];
+				sing_k=iomodel->drag[i];
 
 				/*Create sing element using its constructor:*/
@@ -241,6 +241,6 @@
 				/*Deal with material property card: */
 				matice_mid=i+1; //same as the material id from the geom2 elements.
-				matice_B=model->B[i];	
-				matice_n=(double)model->n[1]; //n defined on elements not grids, so take the first value everywhere
+				matice_B=iomodel->B[i];	
+				matice_n=(double)iomodel->n[1]; //n defined on elements not grids, so take the first value everywhere
 			
 				/*Create matice using its constructor:*/
@@ -255,9 +255,9 @@
 		#endif
 
-		} //for (i=0;i<model->numberofnodes;i++)
-	} //if (strcmp(model->meshtype,"2d")==0)
+		} //for (i=0;i<iomodel->numberofnodes;i++)
+	} //if (strcmp(iomodel->meshtype,"2d")==0)
 	else{
 
-		for (i=0;i<model->numberofnodes;i++){
+		for (i=0;i<iomodel->numberofnodes;i++){
 		#ifdef _PARALLEL_
 		/*keep only this partition's nodes:*/
@@ -265,24 +265,24 @@
 		#endif
 
-			if(model->gridonhutter[i]){
-
-				if(!model->gridonsurface[i]){ 
+			if(iomodel->gridonhutter[i]){
+
+				if(!iomodel->gridonsurface[i]){ 
 					
 					/*Deal with sing element: */
 					beam_id=i+1; 
 					beam_mid=i+1; //refers to the corresponding material property card
-					beam_mparid=model->numberofnodes-model->numberofnodes2d+1;//refers to the corresponding matpar property card
+					beam_mparid=iomodel->numberofnodes-iomodel->numberofnodes2d+1;//refers to the corresponding matpar property card
 					beam_g[0]=i+1;
-					beam_g[1]=(int)model->uppernodes[i]; //grid that lays right on top
-					beam_h[0]=model->thickness[i];
-					beam_h[1]=model->thickness[(int)(model->uppernodes[i]-1)];
-					beam_s[0]=model->surface[i];
-					beam_s[1]=model->surface[(int)(model->uppernodes[i]-1)];
-					beam_b[0]=model->bed[i];
-					beam_b[1]=model->bed[(int)(model->uppernodes[i]-1)];
-					beam_k[0]=model->drag[i];
-					beam_k[1]=model->drag[(int)(model->uppernodes[i]-1)];
-
-					beam_onbed=(bool)model->gridonbed[i];
+					beam_g[1]=(int)iomodel->uppernodes[i]; //grid that lays right on top
+					beam_h[0]=iomodel->thickness[i];
+					beam_h[1]=iomodel->thickness[(int)(iomodel->uppernodes[i]-1)];
+					beam_s[0]=iomodel->surface[i];
+					beam_s[1]=iomodel->surface[(int)(iomodel->uppernodes[i]-1)];
+					beam_b[0]=iomodel->bed[i];
+					beam_b[1]=iomodel->bed[(int)(iomodel->uppernodes[i]-1)];
+					beam_k[0]=iomodel->drag[i];
+					beam_k[1]=iomodel->drag[(int)(iomodel->uppernodes[i]-1)];
+
+					beam_onbed=(bool)iomodel->gridonbed[i];
 
 					/*Create beam element ubeam its constructor:*/
@@ -294,6 +294,6 @@
 					/*Deal with material property card: */
 					matice_mid=i+1; //same as the material id from the geom2 elements.
-					matice_B=model->B[i];	
-					matice_n=(double)model->n[1]; //n defined on elements not grids, so take the first value everywhere
+					matice_B=iomodel->B[i];	
+					matice_n=(double)iomodel->n[1]; //n defined on elements not grids, so take the first value everywhere
 				
 					/*Create matice ubeam its constructor:*/
@@ -309,34 +309,34 @@
 		#endif
 
-		} //for (i=0;i<model->numberofnodes;i++)
-
-	} //if (strcmp(model->meshtype,"2d")==0)
+		} //for (i=0;i<iomodel->numberofnodes;i++)
+
+	} //if (strcmp(iomodel->meshtype,"2d")==0)
 	
 
 	/*Free data: */
-	xfree((void**)&model->elements);
-	xfree((void**)&model->gridonhutter);
-	xfree((void**)&model->thickness);
-	xfree((void**)&model->surface);
-	xfree((void**)&model->bed);
-	xfree((void**)&model->gridonsurface);
-	xfree((void**)&model->uppernodes);
-	xfree((void**)&model->drag);
-	xfree((void**)&model->B);
-	xfree((void**)&model->n);
+	xfree((void**)&iomodel->elements);
+	xfree((void**)&iomodel->gridonhutter);
+	xfree((void**)&iomodel->thickness);
+	xfree((void**)&iomodel->surface);
+	xfree((void**)&iomodel->bed);
+	xfree((void**)&iomodel->gridonsurface);
+	xfree((void**)&iomodel->uppernodes);
+	xfree((void**)&iomodel->drag);
+	xfree((void**)&iomodel->B);
+	xfree((void**)&iomodel->n);
 	
 
 	/*Add one constant material property to materials: */
-	matpar_mid=model->numberofnodes-model->numberofnodes2d+1; //put it at the end of the materials
-	matpar_g=model->g; 
-	matpar_rho_ice=model->rho_ice; 
-	matpar_rho_water=model->rho_water; 
-	matpar_thermalconductivity=model->thermalconductivity; 
-	matpar_heatcapacity=model->heatcapacity; 
-	matpar_latentheat=model->latentheat; 
-	matpar_beta=model->beta; 
-	matpar_meltingpoint=model->meltingpoint; 
-	matpar_mixed_layer_capacity=model->mixed_layer_capacity; 
-	matpar_thermal_exchange_velocity=model->thermal_exchange_velocity; 
+	matpar_mid=iomodel->numberofnodes-iomodel->numberofnodes2d+1; //put it at the end of the materials
+	matpar_g=iomodel->g; 
+	matpar_rho_ice=iomodel->rho_ice; 
+	matpar_rho_water=iomodel->rho_water; 
+	matpar_thermalconductivity=iomodel->thermalconductivity; 
+	matpar_heatcapacity=iomodel->heatcapacity; 
+	matpar_latentheat=iomodel->latentheat; 
+	matpar_beta=iomodel->beta; 
+	matpar_meltingpoint=iomodel->meltingpoint; 
+	matpar_mixed_layer_capacity=iomodel->mixed_layer_capacity; 
+	matpar_thermal_exchange_velocity=iomodel->thermal_exchange_velocity; 
 
 	/*Create matpar object using its constructor: */
@@ -351,23 +351,23 @@
 		
 	/*First fetch data: */
-	if (strcmp(model->meshtype,"3d")==0){
-		ModelFetchData((void**)&model->deadgrids,NULL,NULL,model_handle,"deadgrids","Matrix","Mat");
-		ModelFetchData((void**)&model->uppernodes,NULL,NULL,model_handle,"uppergrids","Matrix","Mat");
-	}
-	ModelFetchData((void**)&model->x,NULL,NULL,model_handle,"x","Matrix","Mat");
-	ModelFetchData((void**)&model->y,NULL,NULL,model_handle,"y","Matrix","Mat");
-	ModelFetchData((void**)&model->z,NULL,NULL,model_handle,"z","Matrix","Mat");
-	ModelFetchData((void**)&model->thickness,NULL,NULL,model_handle,"thickness","Matrix","Mat");
-	ModelFetchData((void**)&model->bed,NULL,NULL,model_handle,"bed","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");
-	ModelFetchData((void**)&model->gridonicesheet,NULL,NULL,model_handle,"gridonicesheet","Matrix","Mat");
-	ModelFetchData((void**)&model->gridoniceshelf,NULL,NULL,model_handle,"gridoniceshelf","Matrix","Mat");
+	if (strcmp(iomodel->meshtype,"3d")==0){
+		IoModelFetchData((void**)&iomodel->deadgrids,NULL,NULL,iomodel_handle,"deadgrids","Matrix","Mat");
+		IoModelFetchData((void**)&iomodel->uppernodes,NULL,NULL,iomodel_handle,"uppergrids","Matrix","Mat");
+	}
+	IoModelFetchData((void**)&iomodel->x,NULL,NULL,iomodel_handle,"x","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->y,NULL,NULL,iomodel_handle,"y","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->z,NULL,NULL,iomodel_handle,"z","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->bed,NULL,NULL,iomodel_handle,"bed","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet","Matrix","Mat");
+	IoModelFetchData((void**)&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf","Matrix","Mat");
 	
 	/*Get number of dofs per node: */
-	DistributeNumDofs(&node_numdofs,model->analysis_type,model->sub_analysis_type);
-
-	for (i=0;i<model->numberofnodes;i++){
+	DistributeNumDofs(&node_numdofs,iomodel->analysis_type,iomodel->sub_analysis_type);
+
+	for (i=0;i<iomodel->numberofnodes;i++){
 	#ifdef _PARALLEL_
 	/*keep only this partition's nodes:*/
@@ -389,20 +389,20 @@
 		#endif
 
-		node_x[0]=model->x[i];
-		node_x[1]=model->y[i];
-		node_x[2]=model->z[i];
-		node_sigma=(model->z[i]-model->bed[i])/(model->thickness[i]);
+		node_x[0]=iomodel->x[i];
+		node_x[1]=iomodel->y[i];
+		node_x[2]=iomodel->z[i];
+		node_sigma=(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]);
 		
-		node_onbed=(int)model->gridonbed[i];
-		node_onsurface=(int)model->gridonsurface[i];	
-		node_onshelf=(int)model->gridoniceshelf[i];	
-		node_onsheet=(int)model->gridonicesheet[i];	
-
-		if (strcmp(model->meshtype,"3d")==0){
-			if (isnan(model->uppernodes[i])){
+		node_onbed=(int)iomodel->gridonbed[i];
+		node_onsurface=(int)iomodel->gridonsurface[i];	
+		node_onshelf=(int)iomodel->gridoniceshelf[i];	
+		node_onsheet=(int)iomodel->gridonicesheet[i];	
+
+		if (strcmp(iomodel->meshtype,"3d")==0){
+			if (isnan(iomodel->uppernodes[i])){
 				node_upper_node_id=node_id;  //nodes on surface do not have upper nodes, only themselves.
 			}
 			else{
-				node_upper_node_id=(int)model->uppernodes[i];
+				node_upper_node_id=(int)iomodel->uppernodes[i];
 			}
 		}
@@ -416,5 +416,5 @@
 
 		/*set single point constraints.: */
-		if (!model->gridonhutter[i]){
+		if (!iomodel->gridonhutter[i]){
 			for(k=1;k<=node_numdofs;k++){
 				node->FreezeDof(k);
@@ -437,24 +437,24 @@
 
 	/*Clean fetched data: */
-	xfree((void**)&model->deadgrids);
-	xfree((void**)&model->x);
-	xfree((void**)&model->y);
-	xfree((void**)&model->z);
-	xfree((void**)&model->thickness);
-	xfree((void**)&model->bed);
-	xfree((void**)&model->gridonbed);
-	xfree((void**)&model->gridonsurface);
-	xfree((void**)&model->gridonhutter);
-	xfree((void**)&model->uppernodes);
-	xfree((void**)&model->gridonicesheet);
-	xfree((void**)&model->gridoniceshelf);
-	
-
-	/*Keep partitioning information into model*/
-	model->epart=epart;
-	model->my_grids=my_grids;
-	model->my_bordergrids=my_bordergrids;
-
-	/*Keep partitioning information into model*/
+	xfree((void**)&iomodel->deadgrids);
+	xfree((void**)&iomodel->x);
+	xfree((void**)&iomodel->y);
+	xfree((void**)&iomodel->z);
+	xfree((void**)&iomodel->thickness);
+	xfree((void**)&iomodel->bed);
+	xfree((void**)&iomodel->gridonbed);
+	xfree((void**)&iomodel->gridonsurface);
+	xfree((void**)&iomodel->gridonhutter);
+	xfree((void**)&iomodel->uppernodes);
+	xfree((void**)&iomodel->gridonicesheet);
+	xfree((void**)&iomodel->gridoniceshelf);
+	
+
+	/*Keep partitioning information into iomodel*/
+	iomodel->epart=epart;
+	iomodel->my_grids=my_grids;
+	iomodel->my_bordergrids=my_bordergrids;
+
+	/*Keep partitioning information into iomodel*/
 	#ifdef _PARALLEL_
 	xfree((void**)&all_numgrids);
@@ -462,5 +462,5 @@
 	VecFree(&gridborder);
 	#endif
-	model->npart=npart;
+	iomodel->npart=npart;
 
 	cleanup_and_return:
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp	(revision 1834)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp	(revision 1835)
@@ -11,8 +11,8 @@
 #include "../../shared/shared.h"
 #include "../../include/macros.h"
-#include "../Model.h"
+#include "../IoModel.h"
 
 
-void	CreateLoadsDiagnosticHutter(DataSet** ploads, Model* model,ConstDataHandle model_handle){
+void	CreateLoadsDiagnosticHutter(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
 
 	DataSet*    loads    = NULL;
@@ -22,5 +22,5 @@
 
 	/*Now, is the flag ishutter on? otherwise, do nothing: */
-	if (!model->ishutter)goto cleanup_and_return;
+	if (!iomodel->ishutter)goto cleanup_and_return;
 
 	cleanup_and_return:
