Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 10353)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 10354)
@@ -39,8 +39,8 @@
 
 		/*Create flag for nodes above the hydrostatic equilibrium: */
-		double* potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters);
+		double* vertices_potentially_ungrounding=PotentialSheetUngrounding(elements,vertices,parameters);
 
 		/*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */
-		double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,potential_sheet_ungrounding);
+		double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,vertices_potentially_ungrounding);
 
 		/*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf 
@@ -58,5 +58,5 @@
 
 		/*free ressouces: */
-		xfree((void**)&potential_sheet_ungrounding);
+		xfree((void**)&vertices_potentially_ungrounding);
 		xfree((void**)&sheet_ungrounding);
 	}
Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h	(revision 10353)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h	(revision 10354)
@@ -7,10 +7,11 @@
 
 class Elements;
+class Vertices;
 class Nodes;
 class Parameters;
 
 /* local prototypes: */
-double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters);
-double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* potential_sheet_ungrounding);
+double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);
+double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* vertices_potentially_ungrounding);
 bool*      CreateElementOnGroundingline(Elements* elements,double* element_on_iceshelf);
 double*    CreateElementOnIceShelf(Elements* elements);
Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp	(revision 10353)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp	(revision 10354)
@@ -7,5 +7,4 @@
 #include "../../shared/shared.h"
 #include "../../io/io.h"
-#include "../../io/io.h"
 #include "../../include/include.h"
 #include "../../toolkits/toolkits.h"
@@ -13,37 +12,31 @@
 
 /*FUNCTION PotentialSheetUngrounding {{{1*/
-double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters){ 
-
-	int      i;
-	Element* element=NULL;
-	Vec      vec_potential_sheet_ungrounding=NULL;
-	double*  potential_sheet_ungrounding=NULL;
-	int      numnods;
-	int      configuration_type;
-
-	/*recover parameters: */
-	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
-	
-	/*First, initialize vec_new_shelf_nodes, which will track which nodes have changed status: */
-	numnods=nodes->NumberOfNodes(configuration_type);
-	vec_potential_sheet_ungrounding=NewVec(numnods);
-
-	/*Loop through elements, and fill vec_potential_sheet_ungrounding: */
-	for(i=0;i<elements->Size();i++){
-		element=(Element*)elements->GetObjectByOffset(i);
-		element->PotentialSheetUngrounding(vec_potential_sheet_ungrounding);
-	}
-
-	/*Assemble vector: */
-	VecAssemblyBegin(vec_potential_sheet_ungrounding);
-	VecAssemblyEnd(vec_potential_sheet_ungrounding);
+double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ 
+
+	int      i,numberofvertices;
+	double*  vertices_potentially_ungrounding      = NULL;
+	Vec      vec_vertices_potentially_ungrounding = NULL;
+	Element* element                               = NULL;
+
+	/*Initialize vector with number of vertices*/
+	numberofvertices=vertices->NumberOfVertices();
+	vec_vertices_potentially_ungrounding=NewVec(numberofvertices); //grounded vertex that could start floating
+
+	/*Fill vector vertices_potentially_floating: */
+	for(i=0;i<elements->Size();i++){
+		element=(Element*)elements->GetObjectByOffset(i);
+		element->PotentialSheetUngrounding(vec_vertices_potentially_ungrounding);
+	}
+
+	/*Assemble vector: */
+	VecAssemblyBegin(vec_vertices_potentially_ungrounding);
+	VecAssemblyEnd(vec_vertices_potentially_ungrounding);
 
 	/*Serialize vector: */
-	VecToMPISerial(&potential_sheet_ungrounding,vec_potential_sheet_ungrounding);
-
-	/*free ressouces: */
-	VecFree(&vec_potential_sheet_ungrounding);
-
-	return potential_sheet_ungrounding;
+	VecToMPISerial(&vertices_potentially_ungrounding,vec_vertices_potentially_ungrounding);
+
+	/*free ressouces and return: */
+	VecFree(&vec_vertices_potentially_ungrounding);
+	return vertices_potentially_ungrounding;
 }
 /*}}}*/
