Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12570)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12571)
@@ -125,14 +125,14 @@
 		 * we must clone the nodes on this partition so that the loads (Numericalflux)
 		 * will have access to their properties (dofs,...)*/
-		if(my_elements[(int)e1] && !xIsNan<IssmDouble>(e2) && !my_elements[(int)e2]){ 
+		if(my_elements[reCast<int>(e1)] && !xIsNan<IssmDouble>(e2) && !my_elements[reCast<int>(e2)]){
 
 			/*1: Get vertices ids*/
-			i1=(int)edges[4*i+0];
-			i2=(int)edges[4*i+1];
+			i1=reCast<int>(edges[4*i+0]);
+			i2=reCast<int>(edges[4*i+1]);
 
 			/*2: Get the column where these ids are located in the index*/
 			pos=UNDEF;
 			for(j=0;j<3;j++){
-				if ((int)elements[3*(int)e2+j]==i1) pos=j;
+				if (reCast<int>(elements[3*(reCast<int>(e2))+j])==i1) pos=j;
 			}
 
@@ -140,14 +140,14 @@
 			 * we can now create the corresponding nodes:*/
 			if (pos==0){
-				my_nodes[(int)e2*3+0]=true;
-				my_nodes[(int)e2*3+2]=true;
+				my_nodes[reCast<int>(e2)*3+0]=true;
+				my_nodes[reCast<int>(e2)*3+2]=true;
 			}
 			else if(pos==1){
-				my_nodes[(int)e2*3+1]=true;
-				my_nodes[(int)e2*3+0]=true;
+				my_nodes[reCast<int>(e2)*3+1]=true;
+				my_nodes[reCast<int>(e2)*3+0]=true;
 			}
 			else if (pos==2){
-				my_nodes[(int)e2*3+2]=true;
-				my_nodes[(int)e2*3+1]=true;
+				my_nodes[reCast<int>(e2)*3+2]=true;
+				my_nodes[reCast<int>(e2)*3+1]=true;
 			}
 			else{
