Index: /issm/trunk-jpl/src/m/modules/ContourToMesh.m
===================================================================
--- /issm/trunk-jpl/src/m/modules/ContourToMesh.m	(revision 20845)
+++ /issm/trunk-jpl/src/m/modules/ContourToMesh.m	(revision 20845)
@@ -0,0 +1,28 @@
+function [in_nod,in_elem] = ContourToMesh(index,x,y,contourname,interptype,edgevalue);
+%CONTOURTOMESH - Flag the elements or nodes inside a contour
+%
+%	 Usage:
+%      [in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue);
+%	
+%   index,x,y: mesh triangulation
+%   contourname: name of .exp file containing the contours.
+%   interptype: string defining type of interpolation ('element', or 'node').
+%   edgevalue: integer (0, 1, or 2) defining the value associated to the nodes on the edges of the polygons.
+%   in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node',
+%      or of size 0 otherwise
+%   in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node',
+%      or of size 0 otherwise.    
+%
+%   Example:
+%      in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)
+%      in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)
+%      [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)
+
+%Check usage
+if nargin~=6
+	help ContourToMesh
+	error('Wrong usage(see above)');
+end
+
+%Call mex module
+[in_nod,in_elem] = ContourToMesh_matlab(index,x,y,contourname,interptype,edgevalue);
Index: /issm/trunk-jpl/src/m/modules/ContourToMesh.py
===================================================================
--- /issm/trunk-jpl/src/m/modules/ContourToMesh.py	(revision 20845)
+++ /issm/trunk-jpl/src/m/modules/ContourToMesh.py	(revision 20845)
@@ -0,0 +1,29 @@
+from ContourToMesh_python import ContourToMesh_python
+
+def ContourToMesh(index,x,y,contourname,interptype,edgevalue):
+	"""
+	
+	CONTOURTOMESH - Flag the elements or nodes inside a contour
+
+		Usage:
+			[in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue)
+
+			index,x,y: mesh triangulation.
+			contourname: name of .exp file containing the contours.
+			interptype: string defining type of interpolation ('element', or 'node').
+			edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.
+			in_nod: vector of flags (0 or 1), of size nel if interptype is set to 'node' or 'element and node',
+				or of size 0 otherwise.
+			in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node',
+				or of size 0 otherwise.
+
+		Example:
+			in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)
+			in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)
+			[in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)
+	"""
+	#Call mex module
+	[in_nod,in_elem] = ContourToMesh_python(index,x,y,contourname,interptype,edgevalue);
+
+	#return
+	return [in_nod,in_elem]
Index: /issm/trunk-jpl/src/wrappers/matlab/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 20844)
+++ /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 20845)
@@ -40,5 +40,5 @@
 						 BamgConvertMesh.la\
 						 BamgTriangulate.la\
-						 ContourToMesh.la\
+						 ContourToMesh_matlab.la\
 						 ContourToNodes_matlab.la\
 						 DistanceToMaskBoundary.la\
@@ -155,6 +155,6 @@
 endif
 
-ContourToMesh_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
-ContourToMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+ContourToMesh_matlab_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
+ContourToMesh_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 ExpToLevelSet_la_SOURCES = ../ExpToLevelSet/ExpToLevelSet.cpp
Index: /issm/trunk-jpl/src/wrappers/python/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/wrappers/python/Makefile.am	(revision 20844)
+++ /issm/trunk-jpl/src/wrappers/python/Makefile.am	(revision 20845)
@@ -30,5 +30,5 @@
 lib_LTLIBRARIES += BamgConvertMesh.la\
 						BamgMesher.la\
-						ContourToMesh.la\
+						ContourToMesh_python.la\
 						ContourToNodes_python.la\
 						ElementConnectivity.la\
@@ -96,6 +96,6 @@
 BamgMesher_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
 
-ContourToMesh_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
-ContourToMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+ContourToMesh_python_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
+ContourToMesh_python_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
 
 ContourToNodes_python_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp
