Index: /issm/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp
===================================================================
--- /issm/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 11320)
+++ /issm/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 11321)
@@ -54,9 +54,9 @@
 	//index
 	FetchMatlabData(&double_index,&nel,&dummy,INDEX);
-	if(dummy!=3)_error_(" element triangulation should be of 3 column width!");
+	if(dummy!=3 && dummy!=6)_error_(" element triangulation should be of 3 or 6 column width!");
 	index=(int*)xmalloc(nel*3*sizeof(int));
 	for(i=0;i<nel;i++){
 		for(j=0;j<3;j++){
-			*(index+3*i+j)=(int)*(double_index+3*i+j)-1; //"C" style indexing
+			*(index+3*i+j)=(int)*(double_index+dummy*i+j)-1; //"C" style indexing
 		}
 	}
