Changeset 18486


Ignore:
Timestamp:
09/09/14 02:31:03 (11 years ago)
Author:
Mathieu Morlighem
Message:

NEW: make sure to add background vertices only if they are not outside of the geometric boundary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/bamg/Mesh.cpp

    r18455 r18486  
    31433143
    31443144                /*First, insert old points if requested*/
    3145                 if (KeepVertices && (&Bh != this) && (nbv+Bh.nbv< maxnbv)){
     3145                if(KeepVertices && (&Bh != this) && (nbv+Bh.nbv< maxnbv)){
    31463146                        if (verbose>5) _printf_("         Inserting initial mesh points\n");
     3147                        bool pointsoutside = false;
    31473148                        for (i=0;i<Bh.nbv;i++){
    31483149                                BamgVertex &bv=Bh[i];
     3150                                /*Do not insert if the point is outside*/
     3151                                long long det3[3];
     3152                                Triangle* tcvj=TriangleFindFromCoord(bv.i,det3);
     3153                                if(tcvj->det<0){
     3154                                        pointsoutside = true;
     3155                                        continue;
     3156                                }
    31493157                                if (!bv.GeomEdgeHook){
    31503158                                        vertices[nbv].r              = bv.r;
     
    31533161                                }
    31543162                        }
     3163                        if(pointsoutside) _printf_("WARNING: One or more points of the initial mesh fall outside of the geometric boundary\n");
    31553164                        Bh.CreateSingleVertexToTriangleConnectivity();     
    31563165                        InsertNewPoints(nbvold,NbTSwap,bamgopts->random);
Note: See TracChangeset for help on using the changeset viewer.