Index: /issm/trunk-jpl/src/c/bamg/Mesh.cpp
===================================================================
--- /issm/trunk-jpl/src/c/bamg/Mesh.cpp	(revision 18485)
+++ /issm/trunk-jpl/src/c/bamg/Mesh.cpp	(revision 18486)
@@ -3143,8 +3143,16 @@
 
 		/*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;
@@ -3153,4 +3161,5 @@
 				}
 			}
+			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);
