Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15969)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15970)
@@ -2779,5 +2779,5 @@
 
 	for(i=0;i<NUMVERTICES;i++){
-		if (flags[vertices[i]->Sid()]<0.){
+		if (flags[vertices[i]->Pid()]<0.){
 			shelf=true;
 			break;
@@ -11253,6 +11253,5 @@
 					nodes[i]->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,false));
 				}
-				//else if(migration_style==SoftMigrationEnum && reCast<int,IssmDouble>(sheet_ungrounding[vertices[i]->Sid()])){
-				else if(migration_style==SoftMigrationEnum && phi_ungrounding[vertices[i]->Sid()]<0.){
+				else if(migration_style==SoftMigrationEnum && phi_ungrounding[vertices[i]->Pid()]<0.){
 					s[i]        = (1-density)*h[i];
 					b[i]        = -density*h[i];
@@ -11303,6 +11302,5 @@
 		if(migration_style==SoftMigrationEnum){
 			bed_hydro=-density*h[i];
-			//if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
-			if(phi[i]<0. || bed_hydro<=r[i] || phi_ungrounding[vertices[i]->Sid()]<0.){
+			if(phi[i]<0. || bed_hydro<=r[i] || phi_ungrounding[vertices[i]->Pid()]<0.){
 				phi[i]=h[i]+r[i]/density;
 			}
@@ -11343,5 +11341,5 @@
 			if(bed_hydro>r[i]){
 				/*Vertex that could potentially unground, flag it*/
-				potential_ungrounding->SetValue(vertices[i]->Sid(),1,INS_VAL);
+				potential_ungrounding->SetValue(vertices[i]->Pid(),1,INS_VAL);
 			}
 		}
@@ -11357,9 +11355,9 @@
 	/*Go through nodes, and whoever is on the potential_ungrounding, ends up in nodes_on_iceshelf: */
 	for(i=0;i<NUMVERTICES;i++){
-		if (reCast<bool,IssmDouble>(vertices_potentially_ungrounding[nodes[i]->Sid()])){
-			vec_nodes_on_iceshelf->SetValue(vertices[i]->Sid(),-1.,INS_VAL);
+		if (reCast<bool,IssmDouble>(vertices_potentially_ungrounding[nodes[i]->Pid()])){
+			vec_nodes_on_iceshelf->SetValue(vertices[i]->Pid(),-1.,INS_VAL);
 
 			/*If node was not on ice shelf, we flipped*/
-			if(nodes_on_iceshelf[vertices[i]->Sid()]>=0.){
+			if(nodes_on_iceshelf[vertices[i]->Pid()]>=0.){
 				nflipped++;
 			}
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15969)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15970)
@@ -1981,5 +1981,5 @@
 
 	for(i=0;i<NUMVERTICES;i++){
-		if (flags[vertices[i]->Sid()]<0.){
+		if (flags[vertices[i]->Pid()]<0.){
 			shelf=true;
 			break;
@@ -7363,6 +7363,5 @@
 					nodes[i]->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,false));
 				}
-				//else if(migration_style==SoftMigrationEnum && reCast<bool>(sheet_ungrounding[vertices[i]->Sid()])){
-				else if(migration_style==SoftMigrationEnum && phi_ungrounding[vertices[i]->Sid()]<0.){
+				else if(migration_style==SoftMigrationEnum && phi_ungrounding[vertices[i]->Pid()]<0.){
 					s[i]        = (1-density)*h[i];
 					b[i]        = -density*h[i];
@@ -7414,6 +7413,5 @@
 		if(migration_style==SoftMigrationEnum){
 			bed_hydro=-density*h[i];
-			if(phi[i]<0. || bed_hydro<=r[i] || phi_ungrounding[vertices[i]->Sid()]<0.){
-			//if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[vertices[i]->Sid()])){
+			if(phi[i]<0. || bed_hydro<=r[i] || phi_ungrounding[vertices[i]->Pid()]<0.){
 				phi[i]=h[i]+r[i]/density;
 			}
@@ -7446,5 +7444,5 @@
 			if(bed_hydro>r[i]){
 				/*Vertex that could potentially unground, flag it*/
-				potential_ungrounding->SetValue(vertices[i]->Sid(),1,INS_VAL);
+				potential_ungrounding->SetValue(vertices[i]->Pid(),1,INS_VAL);
 			}
 		}
@@ -7460,9 +7458,9 @@
 	/*Go through nodes, and whoever is on the potential_ungrounding, ends up in nodes_on_iceshelf: */
 	for(i=0;i<3;i++){
-		if (reCast<bool>(vertices_potentially_ungrounding[vertices[i]->Sid()])){
-			vec_nodes_on_iceshelf->SetValue(vertices[i]->Sid(),-1.,INS_VAL);
+		if (reCast<bool>(vertices_potentially_ungrounding[vertices[i]->Pid()])){
+			vec_nodes_on_iceshelf->SetValue(vertices[i]->Pid(),-1.,INS_VAL);
 
 			/*If node was not on ice shelf, we flipped*/
-			if(nodes_on_iceshelf[vertices[i]->Sid()]>=0.){
+			if(nodes_on_iceshelf[vertices[i]->Pid()]>=0.){
 				nflipped++;
 			}
