Index: /issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 18856)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 18857)
@@ -1226,27 +1226,13 @@
 	density     = rho_ice/rho_water;
 
-	if(migration_style == ContactEnum){
-		for(i = 0;i < numvertices;i++) phi[i] = phi_ungrounding[vertices[i]->Pid()];
-		this->AddInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum);
-
-		/*go through vertices, and update inputs, considering them to be TriaVertex type: */
-		for(i = 0;i < numvertices;i++){
-			/*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
-			if(phi[i] >= 0.){
-					b[i]  = r[i];
-			}
-		}
-
-		/*Update inputs*/
-		this->AddInput(BaseEnum,&b[0],P1Enum);
-		return;
-	}
-
-	this->AddInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum);
-
 	/*go through vertices, and update inputs, considering them to be TriaVertex type: */
 	for(i=0;i<numvertices;i++){
+		/* Contact FS*/
+		if(migration_style == ContactEnum && phi_ungrounding[vertices[i]->Pid()]<10){
+			phi[i]=phi_ungrounding[vertices[i]->Pid()]; 
+			if(phi[i]>=0.) b[i]=r[i];
+		}
 		/*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
-		if(phi[i]<=0.){
+		else if(phi[i]<=0.){
 			if(b[i]<=r[i]){ 
 				b[i]        = r[i];
