Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 4170)
+++ /issm/trunk/src/mex/Makefile.am	(revision 4171)
@@ -65,5 +65,6 @@
 				InputUpdateFromVector\
 				UpdateVertexPositions\
-				UpdateGeometry
+				UpdateGeometry\
+				VerticesDof
 
 endif
@@ -273,2 +274,6 @@
 			  UpdateVertexPositions/UpdateVertexPositions.h
 
+VerticesDof_SOURCES = VerticesDof/VerticesDof.cpp\
+			  VerticesDof/VerticesDof.h
+
+
Index: /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp
===================================================================
--- /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4171)
+++ /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4171)
@@ -0,0 +1,57 @@
+/*\file VerticesDof.c
+ *\brief: build degrees of freedom for every vertex
+ */
+
+#include "./VerticesDof.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*diverse: */
+	int   noerr=1;
+
+	/*input datasets: */
+	DataSet* vertices=NULL;
+	Parameters* parameters=NULL;
+
+	/* output datasets: */
+	DofVec* partition=NULL;
+	DofVec* tpartition=NULL;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&VerticesDofUsage);
+
+	/*Input datasets: */
+	FetchData(&vertices,VERTICESIN);
+	FetchData((DataSet**)&parameters,PARAMETERS);
+
+	/*!Generate internal degree of freedom numbers: */
+	VerticesDofx(&partition, &tpartition, vertices, parameters); 
+
+	/*partition and tpartition should be incremented by 1: */
+	VecShift(partition->vector,1.0); //matlab indexing starts at 1.
+	VecShift(tpartition->vector,1.0);
+
+	/*write output datasets: */
+	WriteData(VERTICES,vertices);
+	WriteData(PARTITION,partition);
+	WriteData(TPARTITION,tpartition);
+
+	/*Free ressources: */
+	delete vertices;
+	delete parameters;
+	delete partition;
+	delete tpartition;
+
+	/*end module: */
+	MODULEEND();
+}
+
+void VerticesDofUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: [vertices,part,tpart] = %s(vertices,parameters);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/VerticesDof/VerticesDof.h
===================================================================
--- /issm/trunk/src/mex/VerticesDof/VerticesDof.h	(revision 4171)
+++ /issm/trunk/src/mex/VerticesDof/VerticesDof.h	(revision 4171)
@@ -0,0 +1,34 @@
+/*
+	VerticesDof.h
+*/
+
+#ifndef _VERTICESDOF_H
+#define _VERTICESDOF_H
+
+/* local prototypes: */
+void VerticesDofUsage(void);
+
+#include "../../c/modules/modules.h"
+#include "../../c/DataSet/DataSet.h"
+#include "../../c/shared/shared.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "VerticesDof"
+
+/* serial input macros: */
+#define VERTICESIN (mxArray*)prhs[0]
+#define PARAMETERS (mxArray*)prhs[1]
+
+/* serial output macros: */
+#define VERTICES (mxArray**)&plhs[0]
+#define PARTITION (mxArray**)&plhs[1]
+#define TPARTITION (mxArray**)&plhs[2]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  3
+#undef NRHS
+#define NRHS  2
+
+#endif  /* _VERTICESDOF_H */
+
