Index: issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12063)
+++ issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12093)
@@ -20,5 +20,5 @@
 /*}}}*/
 
-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order){
+void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
 
 	/*indexing: */
@@ -48,10 +48,9 @@
 		in.numberofpoints+=contour->nods;
 	}
-	if (rifts){
-		for (i=0;i<rifts->Size();i++){
-			contour=(Contour*)rifts->GetObjectByOffset(i);
-			in.numberofpoints+=contour->nods;
-		}
-	}
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		in.numberofpoints+=contour->nods;
+	}
+
 	/*number of point attributes: */
 	in.numberofpointattributes=1;
@@ -69,12 +68,10 @@
 		}
 	}
-	if(rifts){
-		for (i=0;i<rifts->Size();i++){
-			contour=(Contour*)rifts->GetObjectByOffset(i);
-			for (j=0;j<contour->nods;j++){
-				in.pointlist[2*counter+0]=contour->x[j];
-				in.pointlist[2*counter+1]=contour->y[j];
-				counter++;
-			}
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		for (j=0;j<contour->nods;j++){
+			in.pointlist[2*counter+0]=contour->x[j];
+			in.pointlist[2*counter+1]=contour->y[j];
+			counter++;
 		}
 	}
@@ -94,10 +91,8 @@
 		in.numberofsegments+=contour->nods;
 	}
-	if(rifts){
-		for(i=0;i<rifts->Size();i++){
-			contour=(Contour*)rifts->GetObjectByOffset(i);
-			/*for rifts, we have one less segment as we have vertices*/
-			in.numberofsegments+=contour->nods-1;
-		}
+	for(i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		/*for rifts, we have one less segment as we have vertices*/
+		in.numberofsegments+=contour->nods-1;
 	}
 	
@@ -122,16 +117,14 @@
 	}
 	counter2=counter;
-	if(rifts){
-		for (i=0;i<rifts->Size();i++){
-			contour=(Contour*)rifts->GetObjectByOffset(i);
-			for (j=0;j<(contour->nods-1);j++){
-				in.segmentlist[2*counter2+0]=counter;
-				in.segmentlist[2*counter2+1]=counter+1;
-				in.segmentmarkerlist[counter2]=2+i;
-				counter2++;
-				counter++;
-			}
-			counter++;
-		}
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		for (j=0;j<(contour->nods-1);j++){
+			in.segmentlist[2*counter2+0]=counter;
+			in.segmentlist[2*counter2+1]=counter+1;
+			in.segmentmarkerlist[counter2]=2+i;
+			counter2++;
+			counter++;
+		}
+		counter++;
 	}
 	
@@ -196,7 +189,5 @@
 
 	/*Order segments so that their normals point outside the domain: */
-	if(order){
-		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
-	}
+	OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
 
 	/*Output : */
Index: issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12063)
+++ issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12093)
@@ -11,5 +11,5 @@
 
 /* local prototypes: */
-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order);
+void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
 
 #endif  /* _TRIMESHX_H */
Index: issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12063)
+++ issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12093)
@@ -20,5 +20,5 @@
 /*}}}*/
 
-void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order){
+void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
 
 	/*indexing: */
@@ -35,5 +35,5 @@
 
 	/*intermediary: */
-	int      counter,backcounter;
+	int      counter,counter2,backcounter;
 	Contour* contour=NULL;
 
@@ -48,4 +48,9 @@
 		in.numberofpoints+=contour->nods;
 	}
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		in.numberofpoints+=contour->nods;
+	}
+
 	/*number of point attributes: */
 	in.numberofpointattributes=1;
@@ -63,7 +68,15 @@
 		}
 	}
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		for (j=0;j<contour->nods;j++){
+			in.pointlist[2*counter+0]=contour->x[j];
+			in.pointlist[2*counter+1]=contour->y[j];
+			counter++;
+		}
+	}
 	
 	/*fill in the point attribute list: */
-	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
+	in.pointattributelist = (REAL*)xmalloc(in.numberofpoints*in.numberofpointattributes*sizeof(REAL));
 	for (i=0;i<in.numberofpoints;i++) in.pointattributelist[i] = 0.0;
 	
@@ -77,4 +90,9 @@
 		contour=(Contour*)domain->GetObjectByOffset(i);
 		in.numberofsegments+=contour->nods;
+	}
+	for(i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		/*for rifts, we have one less segment as we have vertices*/
+		in.numberofsegments+=contour->nods-1;
 	}
 	
@@ -97,4 +115,16 @@
 		 counter++;
 		 backcounter=counter;
+	}
+	counter2=counter;
+	for (i=0;i<rifts->Size();i++){
+		contour=(Contour*)rifts->GetObjectByOffset(i);
+		for (j=0;j<(contour->nods-1);j++){
+			in.segmentlist[2*counter2+0]=counter;
+			in.segmentlist[2*counter2+1]=counter+1;
+			in.segmentmarkerlist[counter2]=2+i;
+			counter2++;
+			counter++;
+		}
+		counter++;
 	}
 	
@@ -159,7 +189,5 @@
 
 	/*Order segments so that their normals point outside the domain: */
-	if(order){
-		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
-	}
+	OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
 
 	/*Output : */
Index: issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12063)
+++ issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12093)
@@ -7,10 +7,9 @@
 
 #include "string.h"
-
 #include "../../Container/Container.h"
 #include "../../objects/objects.h"
 
 /* local prototypes: */
-void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order);
+void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
 
 #endif  /* _TRIMESHX_H */
