Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10313)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10314)
@@ -283,15 +283,14 @@
 	int     i;
 	bool    elementonshelf = false;
-	double  h[3],s[3],b[3],ba[3];
 	double  bed_hydro;
 	double  rho_water,rho_ice,density;
+	double  h[3],s[3],b[3],ba[3];
 	double *values         = NULL;
 
+	/*vertices and material parameters: */
 	GetInputListOnVertices(&h[0],ThicknessEnum);
 	GetInputListOnVertices(&s[0],SurfaceEnum);
 	GetInputListOnVertices(&b[0],BedEnum);
 	GetInputListOnVertices(&ba[0],BathymetryEnum);
-
-	/*material parameters: */
 	rho_water=matpar->GetRhoWater();
 	rho_ice=matpar->GetRhoIce();
@@ -301,25 +300,16 @@
 	for(i=0;i<3;i++){
 		if (nodes[i]->IsFloating()){
-			/*This node is on the shelf. See if its bed is going under the bathymetry: */
-			if(b[i]<=ba[i]){ //<= because Neff being 0 when b=ba, drag will be 0 anyway.
-				/*The ice shelf is getting grounded, the thickness is the same, so just update the bed to stick to the bathymetry and elevate the surface accordingly: */
+			/*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
+			if(b[i]<=ba[i]){ 
 				b[i]=ba[i];
 				s[i]=b[i]+h[i];
 			}
-			else{
-				/*do nothing, we are still floating.*/
-			}
 		}
 		else{
-			/*This node is on the sheet, near the grounding line. See if wants to unground. To 
-			 * do so, we compute the hydrostatic bed, and if it is > bathymetry, then we unground: */
+			/*Ice sheet: if hydrostatic bed above bathymetry, the ice sheet start to unground, elso do nothing */
 			bed_hydro=-density*h[i];
 			if (bed_hydro>ba[i]){
-				/*We are now floating, bed and surface are determined from hydrostatic equilibrium: */
 				s[i]=(1-density)*h[i];
 				b[i]=-density*h[i];
-			}
-			else{
-				/*do nothing, we are still grounded.*/
 			}
 		}
