Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 3104)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 3105)
@@ -34,9 +34,10 @@
 	/*icefront intermediary data: */
 	char icefront_type[ICEFRONTSTRING];
-	int icefront_element_type;
-	int	icefront_sid;
-	int icefront_eid;
-	int icefront_mparid;
-	int	icefront_node_ids[MAX_ICEFRONT_GRIDS];
+	int  icefront_fill;
+	int  icefront_element_type;
+	int  icefront_sid;
+	int  icefront_eid;
+	int  icefront_mparid;
+	int  icefront_node_ids[MAX_ICEFRONT_GRIDS];
 	double icefront_h[MAX_ICEFRONT_GRIDS];
 	double	icefront_b[MAX_ICEFRONT_GRIDS];
@@ -115,5 +116,6 @@
 		icefront_mparid=iomodel->numberofelements+1; //matlab indexing
 		icefront_sid=i+1; //matlab indexing
-		icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
+		icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 
+		icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
 		icefront_element_type=element_type;
 
@@ -150,5 +152,5 @@
 		}
 
-		icefront = new Icefront(icefront_type,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
+		icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
 		
 		loads->AddObject(icefront);
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3104)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3105)
@@ -33,6 +33,7 @@
 	/*icefront intermediary data: */
 	char icefront_type[ICEFRONTSTRING];
-	int icefront_element_type;
-	int	icefront_sid;
+	int  icefront_fill;
+	int  icefront_element_type;
+	int  icefront_sid;
 	int icefront_eid;
 	int icefront_mparid;
@@ -92,5 +93,6 @@
 		icefront_mparid=iomodel->numberofelements+1; //matlab indexing
 		icefront_sid=count+1; //matlab indexing
-		icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
+		icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
+		icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
 		icefront_element_type=PentaEnum();
 
@@ -115,5 +117,5 @@
 		icefront_b[3]=iomodel->bed[i4-1];
 	
-		icefront = new Icefront(icefront_type,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
+		icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
 		
 		loads->AddObject(icefront);
Index: /issm/trunk/src/c/objects/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Icefront.cpp	(revision 3104)
+++ /issm/trunk/src/c/objects/Icefront.cpp	(revision 3105)
@@ -26,5 +26,5 @@
 /*}}}*/
 /*FUNCTION Icefront creation {{{1*/
-Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type, 
+Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type, 
 		int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double	icefront_b[MAX_ICEFRONT_GRIDS]){
 
@@ -32,4 +32,5 @@
 	
 	strcpy(type,icefront_type);
+	fill=icefront_fill;
 	sid=icefront_sid;
 	
@@ -75,4 +76,5 @@
 
 	memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type);
+	memcpy(&fill,marshalled_dataset,sizeof(fill));marshalled_dataset+=sizeof(fill);
 	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	
@@ -116,4 +118,5 @@
 	/*marshall Icefront data: */
 	memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type);
+	memcpy(marshalled_dataset,&fill,sizeof(fill));marshalled_dataset+=sizeof(fill);
 	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	
@@ -139,4 +142,5 @@
 
 	return sizeof(type)+
+	  sizeof(fill)+
 		sizeof(sid)+
 		sizeof(mparid)+
@@ -251,5 +255,5 @@
 }	
 /*}}}*/
-/*FUNCTION Icefront CreatePVectorDiagnosticHorizStokes {{{1*/
+/*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/
 #undef __FUNCT__ 
 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHorizSegment"
@@ -277,5 +281,4 @@
 	double normal[2];
 	double length;
-	int    fill;
 
 	/*Objects: */
@@ -287,8 +290,6 @@
 	inputs=(ParameterInputs*)vinputs;
 
-	/*Recover material and fill parameters: */
+	/*Recover material */
 	matpar=(Matpar*)element->GetMatPar();
-	if (element->GetShelf())fill=WaterEnum();
-	else fill=AirEnum();
 
 	//check that the element is onbed (collapsed formulation) otherwise:pe=0
@@ -380,5 +381,4 @@
 	int   doflist[numdofs];
 
-	int    fill;
 	double xyz_list[numgrids][3];
 	double xyz_list_quad[numgrids+1][3]; //center node
@@ -416,8 +416,6 @@
 		throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
 	}
-	/*Recover material and fill parameters: */
+	/*Recover material*/
 	matpar=(Matpar*)element->GetMatPar();
-	if (element->GetShelf())fill=WaterEnum();
-	else fill=AirEnum();
 
 	/* Set pe_g to 0: */
@@ -543,5 +541,4 @@
 	int   doflist[numdofs];
 
-	int    fill;
 	double xyz_list[numgrids][3];
 	double xyz_list_quad[numgrids+1][3]; //center node
@@ -579,8 +576,6 @@
 		throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
 	}
-	/*Recover material and fill parameters: */
+	/*Recover material*/
 	matpar=(Matpar*)element->GetMatPar();
-	if (element->GetShelf())fill=WaterEnum();
-	else fill=AirEnum();
 
 	/* Set pe_g to 0: */
@@ -699,4 +694,5 @@
 	printf("Icefront:\n");
 	printf("   type: %s\n",type);
+	printf("   fill: %i\n",fill);
 	printf("   sid: %i\n",sid);
 	
@@ -743,4 +739,5 @@
 	printf("Icefront:\n");
 	printf("   type: %s\n",type);
+	printf("   fill: %i\n",fill);
 	printf("   sid: %i\n",sid);
 	
@@ -1415,5 +1412,5 @@
 		}
 		else{
-			throw ErrorException(__FUNCT__," fill type not supported yet");
+			throw ErrorException(__FUNCT__,exprintf("fill type %i not supported yet",fill));
 		}
 
Index: /issm/trunk/src/c/objects/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Icefront.h	(revision 3104)
+++ /issm/trunk/src/c/objects/Icefront.h	(revision 3105)
@@ -19,5 +19,6 @@
 	private: 
 		char	type[ICEFRONTSTRING];
-		int		sid;
+		int   fill;
+		int	sid;
 	
 		/*material: */
@@ -44,5 +45,5 @@
 
 		Icefront();
-		Icefront(char type[ICEFRONTSTRING],int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double	b[MAX_ICEFRONT_GRIDS]);
+		Icefront(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double	b[MAX_ICEFRONT_GRIDS]);
 		~Icefront();
 
