Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp	(revision 747)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp	(revision 748)
@@ -319,14 +319,15 @@
 				materials->AddObject(matice);
 		
-				#ifdef _PARALLEL_
-				/*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 
-				 *the  element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 
-				 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 
-				 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;
-				#endif
 			} //if(!HutterEnum)
+
+			#ifdef _PARALLEL_
+			/*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 
+			 *the  element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 
+			 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 
+			 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;
+			#endif
 
 		#ifdef _PARALLEL_
@@ -445,17 +446,18 @@
 				materials->AddObject(matice);
 				
-				#ifdef _PARALLEL_
-				/*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 
-				 *the  element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 
-				 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 
-				 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)*(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;
-				#endif
 			}
+
+			#ifdef _PARALLEL_
+			/*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 
+			 *the  element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 
+			 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 
+			 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)*(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;
+			#endif
 
 		#ifdef _PARALLEL_
@@ -577,4 +579,5 @@
 	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");
 
 	/*Get number of dofs per node: */
@@ -583,4 +586,5 @@
 	for (i=0;i<model->numberofnodes;i++){
 	#ifdef _PARALLEL_
+
 	/*keep only this partition's nodes:*/
 	if((my_grids[i]==1)){
@@ -589,5 +593,4 @@
 		node_id=i+1; //matlab indexing
 			
-		
 		
 		#ifdef _PARALLEL_
@@ -635,4 +638,9 @@
 			}
 		}
+		if (model->gridonhutter[i]){
+			for(k=1;k<=node_numdofs;k++){
+				node->FreezeDof(k);
+			}
+		}
 		/*Add node to nodes dataset: */
 		nodes->AddObject(node);
@@ -656,4 +664,5 @@
 	xfree((void**)&model->gridonbed);
 	xfree((void**)&model->gridonsurface);
+	xfree((void**)&model->gridonhutter);
 	xfree((void**)&model->uppernodes);
 		
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 747)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp	(revision 748)
@@ -424,5 +424,5 @@
 
 	#ifdef _PARALLEL_
-	} //if(npart[i]==my_rank)
+	} //if(my_grids[i])
 	#endif
 	}
