Index: /issm/trunk-jpl/src/c/classes/Node.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Node.cpp	(revision 23627)
+++ /issm/trunk-jpl/src/c/classes/Node.cpp	(revision 23628)
@@ -756,12 +756,8 @@
 }
 /*}}}*/
-void Node::VecMerge(Vector<IssmDouble>* ug,IssmDouble* local_uf,int* indices_uf,int* pindex_uf,IssmDouble* local_ys,int* indices_ys,int* pindex_ys){/*{{{*/
+void Node::VecMerge(Vector<IssmDouble>* ug,IssmDouble* local_uf,int* indices_uf,IssmDouble* local_ys,int* indices_ys){/*{{{*/
 
 	/*Only perform operation if not clone*/
 	if(this->IsClone()) return;
-
-	/*Recover indices*/
-	int ind_uf = *pindex_uf;
-	int ind_ys = *pindex_ys;
 
 	if(this->fsize){
@@ -773,14 +769,13 @@
 			if(this->f_set[i]){
 				_assert_(local_uf);
-				_assert_(this->fdoflist[count]==indices_uf[ind_uf]);
-
-				values[count]=local_uf[ind_uf];
+				_assert_(this->fdoflist[count]==indices_uf[this->fdoflist_local[count]]);
+
+				values[count] =local_uf[this->fdoflist_local[count]];
 				indices[count]=this->gdoflist[i];
 				count++;
-				ind_uf++;
 			}
 		}
 		ug->SetValues(this->fsize,indices,values,INS_VAL);
-		/*Free ressources:*/
+
 		xDelete<IssmDouble>(values);
 		xDelete<int>(indices);
@@ -794,21 +789,16 @@
 			if(this->s_set[i]){
 				_assert_(local_ys);
-				_assert_(this->sdoflist[count]==indices_ys[ind_ys]);
-
-				values[count]=local_ys[ind_ys];
+				_assert_(this->sdoflist[count]==indices_ys[this->sdoflist_local[count]]);
+
+				values[count] =local_ys[this->sdoflist_local[count]];
 				indices[count]=this->gdoflist[i];
 				count++;
-				ind_ys++;
 			}
 		}
 		ug->SetValues(this->ssize,indices,values,INS_VAL);
-		/*Free ressources:*/
+		
 		xDelete<IssmDouble>(values);
 		xDelete<int>(indices);
 	}
-
-	/*Update index values*/
-	*pindex_uf = ind_uf;
-	*pindex_ys = ind_ys;
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Node.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Node.h	(revision 23627)
+++ /issm/trunk-jpl/src/c/classes/Node.h	(revision 23628)
@@ -105,5 +105,5 @@
 		int   Sid(void); 
 		void  UpdateCloneDofs(int* alltruerows,int setenum);
-		void  VecMerge(Vector<IssmDouble>* ug,IssmDouble* local_uf,int* indices_uf,int* pindex_uf,IssmDouble* local_ys,int* indices_ys,int* pindex_ys);
+		void  VecMerge(Vector<IssmDouble>* ug,IssmDouble* local_uf,int* indices_uf,IssmDouble* local_ys,int* indices_ys);
 		void  VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
 		void  SetApproximation(int in_approximation);
Index: /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 23627)
+++ /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 23628)
@@ -18,9 +18,5 @@
 	/*serialize uf and ys: those two vectors will be indexed by the nodes, who are the only ones 
 	 *that know which values should be plugged into ug and where: */
-	if(ssize){
-		if(flag_ys0){
-			ys->Set(0.0);
-		}
-	}
+	if(ssize) if(flag_ys0) ys->Set(0.0);
 
 	/*Get local vectors ys and uf*/
@@ -36,9 +32,7 @@
 
 	/*Let nodes figure it out*/
-	int index_uf = 0;
-	int index_ys = 0;
 	for(int i=0;i<nodes->Size();i++){
 		Node* node=(Node*)nodes->GetObjectByOffset(i);
-		node->VecMerge(ug,local_uf,indices_uf,&index_uf,local_ys,indices_ys,&index_ys);
+		node->VecMerge(ug,local_uf,indices_uf,local_ys,indices_ys);
 	}
 
