Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 4167)
+++ /issm/trunk/src/c/Makefile.am	(revision 4168)
@@ -380,4 +380,6 @@
 					./modules/NodesDofx/NodesDofx.h\
 					./modules/NodesDofx/NodesDofx.cpp\
+					./modules/VerticesDofx/VerticesDofx.h\
+					./modules/VerticesDofx/VerticesDofx.cpp\
 					./modules/OutputResultsx/OutputResultsx.h\
 					./modules/OutputResultsx/OutputResultsx.cpp\
@@ -901,4 +903,6 @@
 					./modules/NodesDofx/NodesDofx.h\
 					./modules/NodesDofx/NodesDofx.cpp\
+					./modules/VerticesDofx/VerticesDofx.h\
+					./modules/VerticesDofx/VerticesDofx.cpp\
 					./modules/OutputResultsx/OutputResultsx.h\
 					./modules/OutputResultsx/OutputResultsx.cpp\
Index: /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.cpp
===================================================================
--- /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.cpp	(revision 4168)
+++ /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.cpp	(revision 4168)
@@ -0,0 +1,50 @@
+/*!\file VerticesDofx
+ * \brief: establish degrees of freedom for all vertices, and return partitioning vector. Do only once.
+ */
+
+#include "./VerticesDofx.h"
+
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+void VerticesDofx( Vec* ppartition, Vec* ptpartition, DataSet* vertices, Parameters* parameters) {
+
+	int i;
+
+	int  found=0;
+	extern int num_procs;
+	extern int my_rank;
+	
+	/*intermediary: */
+	int  numberofvertices;
+
+	/*output: */
+	Vec partition=NULL;
+	Vec tpartition=NULL;
+
+	if(*ppartition) return; //do not create partition vector twice! we only have on set of vertices
+
+	/*figure out how many vertices we have: */
+	vertices->NumberOfVertices(&numberofvertices);
+
+	/*Ensure that only for each cpu, the partition border vertices only will be taken into account once 
+	 * across the cluster. To do so, we flag all the clone vertices: */
+	vertices->FlagClones(numberofvertices);
+
+	/*Go through all vertices and distribute 1 dof at a time. When a  vertex has already been distributed his dof on a cpu, 
+	 * all other cpus with the same vertex cannot distribute it anymore. Use clone field to be sure of that: */
+	vertices->DistributeDofs(numberofvertices,1); //only 1 dof per vertex.
+
+	/*Now that dofs have been distributed, create partitioning vector and its transpose: */
+	vertices->CreatePartitioningVector(&partition,numberofvertices);
+
+	/*Transpose partition into tpartition: */
+	VecTranspose(&tpartition,partition);
+
+	/*Assign output pointers: */
+	*ppartition=partition;
+	*ptpartition=tpartition;
+	
+}
Index: /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.h
===================================================================
--- /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.h	(revision 4168)
+++ /issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.h	(revision 4168)
@@ -0,0 +1,15 @@
+/*!\file:  VerticesDofx.h
+ * \brief header file for degree of freedoms distribution routines.
+ */ 
+
+#ifndef _VERTICESDOFX_H
+#define _VERTICESDOFX_H
+
+#include "../../DataSet/DataSet.h"
+#include "../../objects/objects.h"
+
+/* local prototypes: */
+void VerticesDofx( Vec* partition, Vec* ptpartition,DataSet* vertices, Parameters* parameters);
+
+#endif  /* _VERTICESDOFX_H */
+
Index: /issm/trunk/src/c/modules/modules.h
===================================================================
--- /issm/trunk/src/c/modules/modules.h	(revision 4167)
+++ /issm/trunk/src/c/modules/modules.h	(revision 4168)
@@ -8,4 +8,5 @@
 /*Modules: */
 #include "./ModelProcessorx/ModelProcessorx.h"
+#include "./VerticesDofx/VerticesDofx.h"
 #include "./NodesDofx/NodesDofx.h"
 #include "./Dux/Dux.h"
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 4167)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 4168)
@@ -62,4 +62,5 @@
 	
 		_printf_("      create degrees of freedom\n");
+		VerticesDofx(&partition,&tpartition,vertices,parameters);
 		NodesDofx(nodes,parameters);
 
