Index: /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 1177)
+++ /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 1178)
@@ -116,5 +116,7 @@
 	/*Initialize output*/
 	data_prime=NewVec(nods_prime);
+	for (i=0;i<nods_prime;i++) VecSetValue(data_prime,i,default_value,INSERT_VALUES);
 
+	/*Loop over the elements*/
 	printf("\n   interpolation progress:   %5.2lf %%",0.0);
 	for (i=0;i<nels_data;i++){
@@ -146,5 +148,5 @@
 
 			/*is the current point in the current element?*/
-			if ((area_1>0 || area_1==0) && (area_2>0 || area_2==0) && (area_3>0 || area_3==0)){
+			if (area_1>=0 && area_2>=0 && area_3>=0){
 
 				/*Yes ! compute the value on the point*/
Index: /issm/trunk/src/mex/InterpFromMesh3d/InterpFromMesh3d.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMesh3d/InterpFromMesh3d.cpp	(revision 1177)
+++ /issm/trunk/src/mex/InterpFromMesh3d/InterpFromMesh3d.cpp	(revision 1178)
@@ -121,5 +121,7 @@
 	/*Initialize output*/
 	data_prime=NewVec(nods_prime);
-
+	for (i=0;i<nods_prime;i++) VecSetValue(data_prime,i,default_value,INSERT_VALUES);
+
+	/*Loop over the elements*/
 	printf("\n   interpolation progress:   %5.2lf %%",0.0);
 	for (i=0;i<nels_data;i++){
@@ -151,5 +153,5 @@
 
 			/*is the current point in the current 2d element?*/
-			if ((area_1>0 || area_1==0) && (area_2>0 || area_2==0) && (area_3>0 || area_3==0)){
+			if (area_1>=0 && area_2>=0 && area_3>=0){
 
 				/*compute bottom and top height of the element at this 2d position*/
