Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 14367)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 14368)
@@ -1119,13 +1119,19 @@
 	/*Computeportion of the element that is grounded*/ 
 
-	bool mainlyfloating=true;
-	IssmDouble phi,s1,s2,area_init,area_grounded;
-	IssmDouble gl[3];
-	IssmDouble xyz_bis[3][3];
-	GaussTria *gauss    = NULL;
+	bool               mainlyfloating = true;
+	const IssmPDouble  epsilon= 1.e-15;
+	IssmDouble         phi,s1,s2,area_init,area_grounded;
+	IssmDouble         gl[3];
+	IssmDouble         xyz_bis[3][3];
+	GaussTria         *gauss = NULL;
 
 	/*Recover parameters and values*/
 	GetInputListOnVertices(&gl[0],GLlevelsetEnum);
 	
+	/*Be sure that values are not zero*/
+	if(gl[0]==0) gl[0]=gl[0]+epsilon;
+	if(gl[1]==0) gl[1]=gl[1]+epsilon;
+	if(gl[2]==0) gl[2]=gl[2]+epsilon;
+
 	/*Check that not all nodes are grounded or floating*/
 	if(gl[0]>0 && gl[1]>0 && gl[2]>0){ // All grounded
@@ -1136,5 +1142,4 @@
 	}
 	else{
-
 		/*Figure out if two nodes are floating or grounded*/
 		if(gl[0]*gl[1]*gl[2]>0) mainlyfloating=false;
@@ -1209,5 +1214,4 @@
 
 	if(phi>1 || phi<0) _error_("Error. Problem with portion of grounded element: value should be between 0 and 1");
-   //this->inputs->AddInput(new DoubleInput(GroundedPortionEnum,phi));
 
 	return phi;
Index: /issm/trunk-jpl/src/c/solutions/transient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 14367)
+++ /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 14368)
@@ -148,5 +148,4 @@
 			if(isgroundingline && groundingline_migration==SubelementMigrationEnum){
 				InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,GLlevelsetEnum);
-				//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,GroundedPortionEnum);
 			}
 
