Index: ../trunk-jpl/src/c/bamg/Mesh.cpp
===================================================================
--- ../trunk-jpl/src/c/bamg/Mesh.cpp	(revision 18485)
+++ ../trunk-jpl/src/c/bamg/Mesh.cpp	(revision 18486)
@@ -3142,16 +3142,25 @@
 		int verbose=bamgopts->verbose;
 
 		/*First, insert old points if requested*/
-		if (KeepVertices && (&Bh != this) && (nbv+Bh.nbv< maxnbv)){
+		if(KeepVertices && (&Bh != this) && (nbv+Bh.nbv< maxnbv)){
 			if (verbose>5) _printf_("         Inserting initial mesh points\n");
+			bool pointsoutside = false;
 			for (i=0;i<Bh.nbv;i++){ 
 				BamgVertex &bv=Bh[i];
+				/*Do not insert if the point is outside*/
+				long long det3[3];
+				Triangle* tcvj=TriangleFindFromCoord(bv.i,det3);
+				if(tcvj->det<0){
+					pointsoutside = true;
+					continue;
+				}
 				if (!bv.GeomEdgeHook){
 					vertices[nbv].r              = bv.r;
 					vertices[nbv].PreviousNumber = i+1;
 					vertices[nbv++].m = bv.m;
 				}
 			}
+			if(pointsoutside) _printf_("WARNING: One or more points of the initial mesh fall outside of the geometric boundary\n");
 			Bh.CreateSingleVertexToTriangleConnectivity();     
 			InsertNewPoints(nbvold,NbTSwap,bamgopts->random);
 		}  
