Index: /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp
===================================================================
--- /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 13639)
+++ /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 13640)
@@ -100,20 +100,4 @@
 }
 /*}}}*/
-/*FUNCTION PyArrayFromCopiedData(int dims[2],double* data){{{*/
-PyObject* PyArrayFromCopiedData(int dims[2],double* data){
-
-	double* pydata;
-	npy_intp pydims[2]={0,0};
-
-	/*  note that PyArray_SimpleNewFromData does not copy the data, so that when the original
-	object (e.g. bamggeom,bamgmesh) is deleted, the data is gone.  */
-
-	pydims[0]=(npy_intp)dims[0];
-	pydims[1]=(npy_intp)dims[1];
-	pydata=xNew<IssmDouble>(dims[0]*dims[1]);
-	memcpy(pydata,data,dims[0]*dims[1]*sizeof(double));
-	return PyArray_SimpleNewFromData(2,pydims,NPY_DOUBLE,pydata);
-}
-/*}}}*/
 /*FUNCTION WriteData(PyObject* py_tuple,int index,SeqMat<double>* matrix){{{*/
 void WriteData(PyObject* py_tuple,int index,SeqMat<double>* matrix){
@@ -149,2 +133,26 @@
 }
 /*}}}*/
+/*FUNCTION WriteData(PyObject* py_tuple,int index,RiftStruct* riftstruct){{{*/
+void WriteData(PyObject* py_tuple,int index,RiftStruct* riftstruct){
+
+	_error_("not implemented yet... good luck John!");
+}
+/*}}}*/
+
+/*Utils*/
+/*FUNCTION PyArrayFromCopiedData(int dims[2],double* data){{{*/
+PyObject* PyArrayFromCopiedData(int dims[2],double* data){
+
+	double* pydata;
+	npy_intp pydims[2]={0,0};
+
+	/*  note that PyArray_SimpleNewFromData does not copy the data, so that when the original
+		 object (e.g. bamggeom,bamgmesh) is deleted, the data is gone.  */
+
+	pydims[0]=(npy_intp)dims[0];
+	pydims[1]=(npy_intp)dims[1];
+	pydata=xNew<IssmDouble>(dims[0]*dims[1]);
+	memcpy(pydata,data,dims[0]*dims[1]*sizeof(double));
+	return PyArray_SimpleNewFromData(2,pydims,NPY_DOUBLE,pydata);
+}
+/*}}}*/
Index: /issm/trunk-jpl/src/c/python/io/pythonio.h
===================================================================
--- /issm/trunk-jpl/src/c/python/io/pythonio.h	(revision 13639)
+++ /issm/trunk-jpl/src/c/python/io/pythonio.h	(revision 13640)
@@ -24,4 +24,5 @@
 void WriteData(PyObject* py_tuple,int index, BamgGeom* bamggeom);
 void WriteData(PyObject* py_tuple,int index, BamgMesh* bamgmesh);
+void WriteData(PyObject* py_tuple,int index, RiftStruct* riftstruct);
 
 void FetchData(double** pvector,int* pM,PyObject* py_ref);
Index: /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 13639)
+++ /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 13640)
@@ -346,15 +346,4 @@
 
 	return noerr;
-}/*}}}*/
-/*FUNCTION pnpoly{{{*/
-int pnpoly(int npol, double *xp, double *yp, double x, double y) {
-	int i, j, c = 0;
-	for (i = 0, j = npol-1; i < npol; j = i++) {
-		if ((((yp[i]<=y) && (y<yp[j])) ||
-					((yp[j]<=y) && (y<yp[i]))) &&
-				(x < (xp[j] - xp[i]) * (y - yp[i]) / (yp[j] - yp[i]) + xp[i]))
-			c = !c;
-	}
-	return c;
 }/*}}}*/
 /*FUNCTION FindElement{{{*/
Index: /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 13639)
+++ /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 13640)
@@ -22,5 +22,4 @@
 int DetermineGridElementListOnOneSideOfRift(int* pNumGridElementListOnOneSideOfRift, int** pGridElementListOnOneSideOfRift, int segmentnumber, int nriftsegs, int* riftsegments, int node,double* index,int nel);
 int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs,int nods,int nel);
-int pnpoly(int npol, double *xp, double *yp, double x, double y);
 int FindElement(double A,double B,double* index,int nel);
 int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel);
Index: /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h
===================================================================
--- /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 13639)
+++ /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 13640)
@@ -48,5 +48,5 @@
 #define YIN              PyTuple_GetItem(args,2)
 #define SEGMENTSIN       PyTuple_GetItem(args,3)
-#define SEGMENTSMARKERSIN PyTuple_GetItem(args,4)
+#define SEGMENTMARKERSIN PyTuple_GetItem(args,4)
 /* serial output macros: */
 #define INDEXOUT          output,0
Index: /issm/trunk-jpl/src/modules/python/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/modules/python/Makefile.am	(revision 13639)
+++ /issm/trunk-jpl/src/modules/python/Makefile.am	(revision 13640)
@@ -14,5 +14,6 @@
 						NodeConnectivity.la\
 						StringToEnum.la\
-						TriMesh.la
+						TriMesh.la\
+						TriMeshProcessRifts.la
 endif 
 #}}}
@@ -97,3 +98,7 @@
 							../TriMesh/TriMesh.h
 TriMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(TRIANGLELIB)
+
+TriMeshProcessRifts_la_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
+											../TriMeshProcessRifts/TriMeshProcessRifts.h
+TriMeshProcessRifts_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
 #}}}
