Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 4139)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 4140)
@@ -27,5 +27,5 @@
 /*}}}*/
 /*FUNCTION Node::Node(int id, int vertex_id, int uppernode_id, int numdofs, NodeProperties*) {{{2*/
-Node::Node(int node_id,int node_vertex_id, int node_upper_node_id, int node_numdofs):
+Node::Node(int node_id,int node_sid, int node_vertex_id, int node_upper_node_id, int node_numdofs):
 	indexing(node_numdofs),
     hvertex(&node_vertex_id,1),
@@ -33,9 +33,10 @@
 
 	this->id=node_id;
+	this->sid=node_sid;
 	this->inputs=new Inputs();
 }
 /*}}}*/
 /*FUNCTION Node::Node(int id, DofIndexing* indexing, Hook* vertex, Hook* uppernode,Inputs* inputs,int analysis_type){{{2*/
-Node::Node(int node_id,DofIndexing* node_indexing, Hook* node_vertex, Hook* node_upper_node,Inputs* node_inputs,int analysis_type):
+Node::Node(int node_id,int node_sid, DofIndexing* node_indexing, Hook* node_vertex, Hook* node_upper_node,Inputs* node_inputs,int analysis_type):
 	    indexing(node_indexing),
 		hvertex(node_vertex),
@@ -44,4 +45,5 @@
 	    /*all the initialization has been done by the initializer, just fill in the id: */
 	    this->id=node_id;
+	    this->sid=node_sid;
 		this->analysis_type=analysis_type;
 
@@ -55,5 +57,5 @@
 /*}}}*/
 /*FUNCTION Node::Node(int node_id,int vertex_id,int io_index, IoModel* iomodel,int analysis_type) {{{2*/
-Node::Node(int node_id,int vertex_id,int io_index, IoModel* iomodel,int analysis_type){
+Node::Node(int node_id,int node_sid,int vertex_id,int io_index, IoModel* iomodel,int analysis_type){
 
 	/*Intermediary*/
@@ -63,5 +65,6 @@
 
 	/*id: */
-	this->id=node_id; //matlab indexing
+	this->id=node_id; 
+	this->sid=node_sid; 
 	this->analysis_type=analysis_type;
 
@@ -188,5 +191,5 @@
 Object* Node::copy() {
 		
-	return new Node(this->id,&this->indexing, &this->hvertex,&this->hupper_node,this->inputs,this->analysis_type);
+	return new Node(this->id,this->sid,&this->indexing, &this->hvertex,&this->hupper_node,this->inputs,this->analysis_type);
 
 }
@@ -198,4 +201,5 @@
 	printf("Node:\n");
 	printf("   id: %i\n",id);
+	printf("   sid: %i\n",sid);
 	printf("   analysis_type: %s\n",EnumAsString(analysis_type));
 	indexing.DeepEcho();
@@ -222,4 +226,5 @@
 
 	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
 	
@@ -242,4 +247,5 @@
 	printf("Node:\n");
 	printf("   id: %i\n",id);
+	printf("   sid: %i\n",sid);
 	printf("   analysis_type: %s\n",EnumAsString(analysis_type));
 	indexing.Echo();
@@ -290,4 +296,7 @@
 int    Node::Id(void){ return id; }
 /*}}}*/
+/*FUNCTION Node::Sid{{{2*/
+int    Node::Sid(void){ return sid; }
+/*}}}*/
 /*FUNCTION Node::GetVertexId {{{2*/
 int   Node::GetVertexId(void){
@@ -327,4 +336,5 @@
 	/*marshall Node data: */
 	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
 	
@@ -351,4 +361,5 @@
 
 	return sizeof(id)+
+		sizeof(sid)+
 		indexing.MarshallSize()+
 		hvertex.MarshallSize()+
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 4139)
+++ /issm/trunk/src/c/objects/Node.h	(revision 4140)
@@ -22,5 +22,6 @@
 	private: 
 
-		int	    id; 
+		int	    id;  //unique arbitrary id.
+		int     sid; //sid for "serial" id, ie the rank of this node in the nodes dataset, if the dataset was serial on 1 cpu.
 				
 		DofIndexing    indexing;
@@ -34,7 +35,7 @@
 		/*FUNCTION constructors, destructors {{{1*/
 		Node();
-		Node(int id,int vertex_id, int upper_node_id, int numberofdofs);
-		Node(int id,DofIndexing* indexing, Hook* vertex, Hook* upper_node, Inputs* inputs,int analysis_type);
-		Node(int node_id,int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
+		Node(int id,int sid, int vertex_id, int upper_node_id, int numberofdofs);
+		Node(int id,ind sid, DofIndexing* indexing, Hook* vertex, Hook* upper_node, Inputs* inputs,int analysis_type);
+		Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
 		~Node();
 		/*}}}*/
@@ -46,4 +47,5 @@
 		int   Enum();
 		int   Id(void); 
+		int   Sid(void); 
 		int   GetVertexDof(void);
 		int   GetVertexId(void);
Index: /issm/trunk/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Vertex.cpp	(revision 4139)
+++ /issm/trunk/src/c/objects/Vertex.cpp	(revision 4140)
@@ -24,13 +24,14 @@
 /*}}}*/
 /*FUNCTION Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){{{2*/
-Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
-	this->Init(vertex_id, vertex_x, vertex_y, vertex_z, vertex_sigma);
+Vertex::Vertex(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
+	this->Init(vertex_id, vertex_sid,vertex_x, vertex_y, vertex_z, vertex_sigma);
 }
 /*}}}*/
 /*FUNCTION Vertex::Init{{{2*/
-void Vertex::Init(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
+void Vertex::Init(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
 
 	/*all the initialization has been done by the initializer, just fill in the id: */
 	this->id=vertex_id;
+	this->sid=vertex_sid;
 	this->x=vertex_x;
 	this->y=vertex_y;
@@ -42,8 +43,8 @@
 }
 /*}}}*/
-/*FUNCTION Vertex::Vertex(int vertex_id, int i, IoModel* iomodel) {{{2*/
-Vertex::Vertex(int vertex_id, int i, IoModel* iomodel){
-
-	this->Init(vertex_id, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
+/*FUNCTION Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel) {{{2*/
+Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
+
+	this->Init(vertex_id, vertex_sid, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
 
 }
@@ -82,4 +83,5 @@
 
 	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	memcpy(&x,marshalled_dataset,sizeof(x));marshalled_dataset+=sizeof(x);
 	memcpy(&y,marshalled_dataset,sizeof(y));marshalled_dataset+=sizeof(y);
@@ -100,4 +102,5 @@
 	printf("Vertex:\n");
 	printf("   id: %i\n",id);
+	printf("   sid: %i\n",sid);
 	printf("   x: %g\n",x);
 	printf("   y: %g\n",y);
@@ -120,4 +123,7 @@
 int    Vertex::Id(void){ return id; }
 /*}}}*/
+/*FUNCTION Sid{{{2*/
+int    Vertex::Sid(void){ return sid; }
+/*}}}*/
 /*FUNCTION Marshall {{{2*/
 void  Vertex::Marshall(char** pmarshalled_dataset){
@@ -137,4 +143,5 @@
 	/*marshall Vertex data: */
 	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
 	memcpy(marshalled_dataset,&x,sizeof(x));marshalled_dataset+=sizeof(x);
 	memcpy(marshalled_dataset,&y,sizeof(y));marshalled_dataset+=sizeof(y);
@@ -152,4 +159,5 @@
 	
 	return sizeof(id)+
+		sizeof(sid)+
 		sizeof(x)+
 		sizeof(y)+
Index: /issm/trunk/src/c/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/objects/Vertex.h	(revision 4139)
+++ /issm/trunk/src/c/objects/Vertex.h	(revision 4140)
@@ -22,4 +22,5 @@
 
 		int  id;
+		int  sid; //sid for "serial" id, ie the rank of this vertex in the vertices dataset, if the dataset was serial on 1 cpu.
 		double x;
 		double y;
@@ -33,7 +34,7 @@
 		/*FUNCTION constructors, destructors {{{1*/
 		Vertex();
-		Vertex(int id, double x, double y, double z, double sigma); 
-		void Init(int id, double x, double y, double z, double sigma);
-		Vertex(int id, int i, IoModel* iomodel);
+		Vertex(int id, int sid,double x, double y, double z, double sigma); 
+		void Init(int id, int sid, double x, double y, double z, double sigma);
+		Vertex(int id, int sid, int i, IoModel* iomodel);
 		~Vertex();
 		/*}}}*/
@@ -45,4 +46,5 @@
 		int   Enum();
 		int   Id(void); 
+		int   Sid(void); 
 		void  Marshall(char** pmarshalled_dataset);
 		int   MarshallSize();
