Index: /issm/trunk/src/m/utils/Mesh/FixMesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/FixMesh.m	(revision 5027)
+++ /issm/trunk/src/m/utils/Mesh/FixMesh.m	(revision 5028)
@@ -38,2 +38,10 @@
 	orphans=find(flags==0);
 end
+
+
+%Check all triangles are well oriented.
+aires=GetAreas(index2,x2,y2);
+pos=find(aires<0);
+temp=index2(pos,1);
+index2(pos,1)=index2(pos,2);
+index2(pos,2)=temp;
