Ignore:
Timestamp:
08/20/12 17:39:30 (13 years ago)
Author:
cborstad
Message:

merged trunk-jpl through revision 13099 into branch

Location:
issm/branches/trunk-jpl-damage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-jpl-damage

    • Property svn:ignore
      •  

        old new  
         1projects
        12autom4te.cache
        23aclocal.m4
    • Property svn:mergeinfo changed
      /issm/trunk-jplmerged: 12948-13099
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Mesh.cpp

    r12946 r13101  
    117117                          delete [] kk;
    118118                          delete [] refv;
    119                           _error2_("imaxnbv != nbv");
     119                          _error_("imaxnbv != nbv");
    120120                  }
    121121                  for (i=0;i<Tho.nbt;i++)
     
    128128                                if (i0<0 || i1<0 || i2<0){
    129129                                        delete [] refv;
    130                                         _error2_("i0<0 || i1<0 || i2< 0");
     130                                        _error_("i0<0 || i1<0 || i2< 0");
    131131                                }
    132132                                if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){
    133                                         _error2_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
     133                                        _error_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
    134134                                }
    135135                                triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]);
     
    138138                          }
    139139                  if (kt!=nbt){
    140                           _error2_("kt!=nbt");
     140                          _error_("kt!=nbt");
    141141                  }
    142142                  if (nbt==0 && nbv==0) {
    143                           _error2_("All triangles have been removed");
     143                          _error_("All triangles have been removed");
    144144                  }
    145145                  delete [] kk;
     
    153153
    154154                  if (!nbsubdomains){
    155                           _error2_("nbsubdomains==0");
     155                          _error_("nbsubdomains==0");
    156156                  }
    157157                  if (!subdomains[0].head || !subdomains[0].head->link){
    158                           _error2_("!subdomains[0].head || !subdomains[0].head->link");
     158                          _error_("!subdomains[0].head || !subdomains[0].head->link");
    159159                  }
    160160
     
    323323                        }
    324324                }
    325                 if(isorphan) _error2_("Orphan found in mesh, see ids above");
     325                if(isorphan) _error_("Orphan found in mesh, see ids above");
    326326
    327327                /*Clean up*/
     
    362362                }
    363363                else{
    364                         if(verbose>5) _error2_("no Vertices found in the initial mesh");
     364                        if(verbose>5) _error_("no Vertices found in the initial mesh");
    365365                }
    366366
     
    380380                }
    381381                else{
    382                         if(verbose>5) _error2_("no Triangles found in the initial mesh");
     382                        if(verbose>5) _error_("no Triangles found in the initial mesh");
    383383                }
    384384
     
    506506                                //Check value
    507507                                if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) {
    508                                         _error2_("ReadMesh error: EdgesOnGeomEdge edge provided (line " << i1+1 << ": [" << i+1 << " " << j+1 << "]) is incorrect (must be positive, [0<i<nbe=" << nbe << " 0<j<Gh.nbe=" << Gh.nbe << "]");
     508                                        _error_("ReadMesh error: EdgesOnGeomEdge edge provided (line " << i1+1 << ": [" << i+1 << " " << j+1 << "]) is incorrect (must be positive, [0<i<nbe=" << nbe << " 0<j<Gh.nbe=" << Gh.nbe << "]");
    509509                                }
    510510                                edges[i].GeomEdgeHook=Gh.edges+j;
     
    522522                                head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing
    523523                                direction=(int)bamgmesh->SubDomains[i*3+2];
    524                                 if (i3!=23) _error2_("Bad Subdomain definition: first number should be 3");
    525                                 if (head<0 || head>=nbt) _error2_("Bad Subdomain definition: head should in [1 " << nbt << "] (triangle number)");
     524                                if (i3!=23) _error_("Bad Subdomain definition: first number should be 3");
     525                                if (head<0 || head>=nbt) _error_("Bad Subdomain definition: head should in [1 " << nbt << "] (triangle number)");
    526526                                subdomains[i].head = triangles+head;
    527527                        }
     
    567567                                for (j=0;j<3;j++){
    568568                                        int v=GetId(triangles[i][j]); //jth vertex of the ith triangle
    569                                         if (k>3*nbt-1 || k<0) _error2_("k = " << k << ", nbt = " << nbt);
     569                                        if (k>3*nbt-1 || k<0) _error_("k = " << k << ", nbt = " << nbt);
    570570                                        next_1[k]=head_1[v];
    571                                         if (v>nbv-1 || v<0)   _error2_("v = " << v << ", nbv = " << nbv);
     571                                        if (v>nbv-1 || v<0)   _error_("v = " << v << ", nbv = " << nbv);
    572572                                        head_1[v]=k++;
    573573                                        connectivitysize_1[v]+=1;
     
    707707                                }
    708708                                if (!stop){
    709                                         _error2_("Element holding segment [" << i1+1 << " " << i2+1 << "] not found...");
     709                                        _error_("Element holding segment [" << i1+1 << " " << i2+1 << "] not found...");
    710710                                }
    711711                        }
     
    805805                                const VertexOnGeom &v=VerticesOnGeomEdge[i];
    806806                                if (!v.OnGeomEdge()){
    807                                         _error2_("A vertices supposed to be OnGeomEdge is actually not");
     807                                        _error_("A vertices supposed to be OnGeomEdge is actually not");
    808808                                }
    809809                                bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
     
    888888                        for (j=0;j<2;j++){
    889889                                int v=(int)bamgmesh->IssmEdges[i*i2+j]-1; //back to C indexing
    890                                 if (k>2*i1-1 || k<0) _error2_("Index exceed matrix dimensions (k=" << k << " not in [0 " << 2*i1-1 << "]");
     890                                if (k>2*i1-1 || k<0) _error_("Index exceed matrix dimensions (k=" << k << " not in [0 " << 2*i1-1 << "]");
    891891                                next_2[k]=head_2[v];
    892                                 if (v>nbv-1 || v<0)   _error2_("Index exceed matrix dimensions (v=" << v << " not in [0 " << nbv-1 << "])");
     892                                if (v>nbv-1 || v<0)   _error_("Index exceed matrix dimensions (v=" << v << " not in [0 " << nbv-1 << "])");
    893893                                head_2[v]=k++;
    894894                                connectivitysize_2[v]+=1;
     
    10611061                //check that hmax is positive
    10621062                if (hmax<=0){
    1063                         _error2_("hmax<=0");
     1063                        _error_("hmax<=0");
    10641064                }
    10651065
     
    10901090
    10911091                                if (ht<=0 || hn<=0){
    1092                                         _error2_("ht<=0 || hn<=0");
     1092                                        _error_("ht<=0 || hn<=0");
    10931093                                }
    10941094                                EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg);
     
    11151115                }
    11161116                else{
    1117                         _error2_("Hessiantype " << Hessiantype << " not supported yet (1->use Green formula, 0-> double P2 projection)");
     1117                        _error_("Hessiantype " << Hessiantype << " not supported yet (1->use Green formula, 0-> double P2 projection)");
    11181118                }
    11191119        }
     
    11591159                //some checks
    11601160                if (( infvertexindex <0 ) && (detOld <0) ||  ( infvertexindex >=0  ) && (detOld >0) ){
    1161                         _error2_("inconsistent configuration (Contact ISSM developers)");
     1161                        _error_("inconsistent configuration (Contact ISSM developers)");
    11621162                }
    11631163
     
    12011201                        }
    12021202                        else{
    1203                                 _error2_("Cannot add a vertex more than once. Check duplicates");
     1203                                _error_("Cannot add a vertex more than once. Check duplicates");
    12041204                        }
    12051205                }
     
    12141214                tt[2]= &triangles[nbt++];
    12151215
    1216                 if (nbt>maxnbt) _error2_("Not enough triangles");
     1216                if (nbt>maxnbt) _error_("Not enough triangles");
    12171217
    12181218                *tt[1]=*tt[2]=*t;
     
    12511251
    12521252                        if (!rswap) {
    1253                                 _error2_("swap the point s is on a edge");
     1253                                _error_("swap the point s is on a edge");
    12541254                        }
    12551255                }
     
    13181318                //check that the mesh is not empty
    13191319                if (nbt<=0 || nbv <=0 ) {
    1320                         _error2_("nbt or nbv is negative (Mesh empty?)");
     1320                        _error_("nbt or nbv is negative (Mesh empty?)");
    13211321                }
    13221322
     
    13401340                if (nbe !=  edge4->nb()){
    13411341                        delete [] st;
    1342                         _error2_("Some Double edge in the mesh, the number is " << nbe << ", nbe4=" << edge4->nb());
     1342                        _error_("Some Double edge in the mesh, the number is " << nbe << ", nbe4=" << edge4->nb());
    13431343                }
    13441344                //keep nbe in nbeold
     
    13601360                                        //check that it is not an edge on boundary (should not already exist)
    13611361                                        if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){
    1362                                                 _error2_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
     1362                                                _error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
    13631363                                        }
    13641364                                        //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list
     
    13781378                                        _printLine_("Edge " << (-st[k]+2)%3 << " of triangle " << (-st[k]+2)/3);
    13791379                                        _printLine_("Edge " << triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)) << " of triangle " << GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
    1380                                         _error2_("An edge belongs to more than 2 triangles");
     1380                                        _error_("An edge belongs to more than 2 triangles");
    13811381                                }       
    13821382                        }
     
    14601460                        //check that we have been through all edges
    14611461                        if (k!=nbe){
    1462                                 _error2_("problem in edge construction process: k!=nbe (should not happen)");
     1462                                _error_("problem in edge construction process: k!=nbe (should not happen)");
    14631463                        }
    14641464                        //delete edgessave
     
    15051505                                        //check that we have the correct vertex
    15061506                                        if (v!=edges[i0 ].v[j0]){
    1507                                                 _error2_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
     1507                                                _error_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
    15081508                                        }
    15091509
     
    15221522                //check that nbsubdomains is empty
    15231523                if (nbsubdomains){
    1524                         _error2_("nbsubdomains should be 0");
     1524                        _error_("nbsubdomains should be 0");
    15251525                }
    15261526                nbsubdomains=0;
     
    15911591                if (k!= nbsubdomains){
    15921592                        delete [] colorT;
    1593                         _error2_("k!= nbsubdomains");
     1593                        _error_("k!= nbsubdomains");
    15941594                }
    15951595                //delete colorT and st
     
    16521652                if (Gh.coefIcoor<=0){
    16531653                        delete [] colorV;
    1654                         _error2_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
     1654                        _error_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
    16551655                }
    16561656
     
    17051705                                delete [] len;
    17061706                                delete [] colorV;
    1707                                 _error2_("problem in Edge4 construction: k != i");
     1707                                _error_("problem in Edge4 construction: k != i");
    17081708                        }
    17091709                }
     
    17341734                        }
    17351735                        else
    1736                          _error2_("%i should be >=0");
     1736                         _error_("%i should be >=0");
    17371737                  }
    17381738
     
    17681768
    17691769                /*Check size*/
    1770                 if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
     1770                if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have " << nbv << " rows");
    17711771
    17721772                //initialization of some variables
     
    19731973
    19741974                /*Check size*/
    1975                 if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
     1975                if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have " << nbv << " rows");
    19761976
    19771977                //initialization of some variables
     
    22982298                                if (splitvertex[i1]==3 || splitvertex[i2]==3){
    22992299                                        delete [] splitvertex;
    2300                                         _error2_("Crossing rifts not supported yet");
     2300                                        _error_("Crossing rifts not supported yet");
    23012301                                }
    23022302                        }
     
    23762376                                //_printLine_(element_renu[GetId(ta.t)] << " -> " << GetId((*ta.t)[0])+1 << " " << GetId((*ta.t)[1])+1 << " " << GetId((*ta.t)[2])+1 << ", edge [" << i1 << "->" << j1 << " " << i2 << "->" << j2 << "]");
    23772377                                ta = Next(ta).Adj();
    2378                                 if (count++>50) _error2_("Maximum number of iteration exceeded");
     2378                                if (count++>50) _error_("Maximum number of iteration exceeded");
    23792379                        }while ((tbegin != ta));
    23802380                }
     
    23832383                for(i=0;i<NbCrackedEdges;i++){
    23842384                        if (Edgeflags[i]!=2){
    2385                                 _error2_("A problem occured: at least one crack edge (number " << i+1 << ") does not belong to 2 elements");
     2385                                _error_("A problem occured: at least one crack edge (number " << i+1 << ") does not belong to 2 elements");
    23862386                        }
    23872387                }
     
    24332433                        }
    24342434                        if (k!=0) {
    2435                                 _error2_("there is " << k << " triangles of mes = 0");
     2435                                _error_("there is " << k << " triangles of mes = 0");
    24362436                        }
    24372437
     
    24472447                                if (nbswp) nbfe++;
    24482448                                if ( nbswp < 0 && k < 5){
    2449                                         _error2_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1]));
     2449                                        _error_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1]));
    24502450                                }
    24512451                        }
    24522452
    24532453                        if (k!=0) {
    2454                                 _error2_("There are " << k << " lost edges, the boundary might be crossing");
     2454                                _error_("There are " << k << " lost edges, the boundary might be crossing");
    24552455                        }
    24562456                        for (int j=0;j<nbv;j++){
     
    25342534                        if (nbt == nbtout ||  !NbSubDomTot) {
    25352535                                delete [] HeapArete;
    2536                                 _error2_("The boundary is not close: all triangles are outside");
     2536                                _error_("The boundary is not close: all triangles are outside");
    25372537                        }
    25382538
     
    25722572                                                if (k!=nbsubdomains){
    25732573                                                        delete [] mark;
    2574                                                         _error2_("k!=nbsubdomains");
     2574                                                        _error_("k!=nbsubdomains");
    25752575                                                }
    25762576                                                if(OutSide)
     
    26622662                                                         subdomains[i].head=t=ta;
    26632663                                                        if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) {
    2664                                                                 _error2_("bad definition of SubSomain " << i);
     2664                                                                _error_("bad definition of SubSomain " << i);
    26652665                                                        }
    26662666                                                        long it = GetId(t);
     
    26772677                                                                kkk++;
    26782678                                                                if (mark[GetId(tt)]>=0){
    2679                                                                         _error2_("mark[GetId(tt)]>=0");
     2679                                                                        _error_("mark[GetId(tt)]>=0");
    26802680                                                                }
    26812681                                                                mark[GetId(tt)]=i;
     
    26862686                                                ta = Previous(Adj(ta));         
    26872687                                                if(t == (Triangle *) ta) {
    2688                                                         _error2_("bad definition of SubSomain " << i);
     2688                                                        _error_("bad definition of SubSomain " << i);
    26892689                                                }
    26902690                                        }
     
    28482848                        //if i is higher than nbv, it means that all the determinants are 0,
    28492849                        //all vertices are aligned!
    2850                         if  (++i>=nbv) _error2_("all the vertices are aligned");
     2850                        if  (++i>=nbv) _error_("all the vertices are aligned");
    28512851                }
    28522852                // exchange i et 2 in "orderedvertices" so that
     
    29842984                                long  j=vj.ReferenceNumber;
    29852985                                if (&vj!=orderedvertices[j]){
    2986                                         _error2_("&vj!= orderedvertices[j]");
     2986                                        _error_("&vj!= orderedvertices[j]");
    29872987                                }
    29882988                                if(i!=j){
     
    29942994                                if (tcvj && !tcvj->link){
    29952995                                        tcvj->Echo();
    2996                                         _error2_("problem inserting point in InsertNewPoints (tcvj=" << tcvj << " and tcvj->link=" << tcvj->link << ")");
     2996                                        _error_("problem inserting point in InsertNewPoints (tcvj=" << tcvj << " and tcvj->link=" << tcvj->link << ")");
    29972997                                }
    29982998                                quadtree->Add(vj);
     
    30263026
    30273027                if (!Gh.nbe){
    3028                         _error2_("!Gh.nbe");
     3028                        _error_("!Gh.nbe");
    30293029                }
    30303030                Edge **e= new (Edge* [Gh.nbe]);
     
    30593059                        }
    30603060                }
    3061                 if(kk) _error2_("See above");
     3061                if(kk) _error_("See above");
    30623062
    30633063                return e;
     
    32583258                                //check i
    32593259                                if (i<0 || i>=nbt ){
    3260                                         _error2_("Index problem in NewPoints (i=" << i << " not in [0 " << nbt-1 << "])");
     3260                                        _error_("Index problem in NewPoints (i=" << i << " not in [0 " << nbt-1 << "])");
    32613261                                }
    32623262                                //change first_np_or_next_t[i]
     
    33093309                                        }
    33103310                                        if (ta.EdgeVertex(0)!=s){
    3311                                                 _error2_("ta.EdgeVertex(0)!=s");
     3311                                                _error_("ta.EdgeVertex(0)!=s");
    33123312                                        }
    33133313                                        ta = Next(Adj(ta));
     
    33443344                }
    33453345                else {
    3346                         _error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vA) << " forget call to SetVertexFieldOnBTh");
     3346                        _error_("ProjectOnCurve On BamgVertex " << BTh.GetId(vA) << " forget call to SetVertexFieldOnBTh");
    33473347                }
    33483348
     
    33553355                }
    33563356                else {
    3357                         _error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vB) << " forget call to SetVertexFieldOnBTh");
     3357                        _error_("ProjectOnCurve On BamgVertex " << BTh.GetId(vB) << " forget call to SetVertexFieldOnBTh");
    33583358                }
    33593359                Edge * e = &BhAB;
    33603360                if (!pA || !pB || !e){
    3361                         _error2_("!pA || !pB || !e");
     3361                        _error_("!pA || !pB || !e");
    33623362                }
    33633363                // be carefull the back ground edge e is on same geom edge
     
    33653365                //check Is a background Mesh;   
    33663366                if (e<BTh.edges || e>=BTh.edges+BTh.nbe){
    3367                         _error2_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
     3367                        _error_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
    33683368                }
    33693369                // walk on BTh edge
     
    33883388                  }
    33893389                else{ // do the search by walking
    3390                         _error2_("case not supported yet");
     3390                        _error_("case not supported yet");
    33913391                  }
    33923392
     
    34523452
    34533453                  }
    3454                 _error2_("Big bug...");
     3454                _error_("Big bug...");
    34553455                return 0; // just for the compiler
    34563456        }                 
     
    34933493        }
    34943494        if (kk != nbe){
    3495                 _error2_("There are " << kk-nbe << " double edges in the mesh");
     3495                _error_("There are " << kk-nbe << " double edges in the mesh");
    34963496        }
    34973497
     
    35253525                        //An edge belongs to 2 triangles
    35263526                        else {
    3527                                 _error2_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles");
     3527                                _error_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles");
    35283528                        }
    35293529                }
     
    35633563        }
    35643564        if(k) {
    3565                 _error2_(k << " boundary edges (from the geometry) are not defined as mesh edges");
     3565                _error_(k << " boundary edges (from the geometry) are not defined as mesh edges");
    35663566        }
    35673567
     
    35903590        for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;)
    35913591         if  (++i>=nbvb) {
    3592                  _error2_("ReconstructExistingMesh: All the vertices are aligned");
     3592                 _error_("ReconstructExistingMesh: All the vertices are aligned");
    35933593         }
    35943594        //Move this vertex (i) to the 2d position in orderedvertices
     
    36503650        }
    36513651        if(nbloss) {
    3652                 _error2_("we lost " << nbloss << " existing edges other " << knbe);
     3652                _error_("we lost " << nbloss << " existing edges other " << knbe);
    36533653        }
    36543654
     
    37253725        subdomains = savesubdomains;
    37263726        if (k) {
    3727                 _error2_("number of triangles edges alone = " << k);
     3727                _error_("number of triangles edges alone = " << k);
    37283728        }
    37293729        FindSubDomain();
     
    37553755
    37563756                                                _printLine_("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required");
    3757                                                 _error2_("See above (might be cryptic...)");
     3757                                                _error_("See above (might be cryptic...)");
    37583758                                        }
    37593759                                }
     
    37783778                        t=t0=subdomains[i].head;
    37793779                        if (!t0){ // not empty sub domain
    3780                                 _error2_("!t0");
     3780                                _error_("!t0");
    37813781                        }
    37823782                        do {
    37833783                                long kt = GetId(t);
    37843784                                if (kt<0 || kt >= nbt ){
    3785                                         _error2_("kt<0 || kt >= nbt");
     3785                                        _error_("kt<0 || kt >= nbt");
    37863786                                }
    37873787                                if (renu[kt]!=-1){
    3788                                         _error2_("renu[kt]!=-1");
     3788                                        _error_("renu[kt]!=-1");
    37893789                                }
    37903790                                renu[kt]=k++;
     
    38033803                }
    38043804                if (k != nbt){
    3805                         _error2_("k != nbt");
     3805                        _error_("k != nbt");
    38063806                }
    38073807                // do the change on all the pointeur
     
    39293929        coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    39303930        if (coefIcoor<=0){
    3931                 _error2_("coefIcoor should be positive, a problem in the geometry is likely");
     3931                _error_("coefIcoor should be positive, a problem in the geometry is likely");
    39323932        }
    39333933
     
    39653965        }
    39663966
    3967         if (number_of_errors) _error2_("Fatal error: some triangles have negative areas, see above");
     3967        if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above");
    39683968}
    39693969/*}}}*/
     
    41464146                        register Triangle* t= vertices[i].t;
    41474147                        if (!t){
    4148                                 _error2_("!t");
     4148                                _error_("!t");
    41494149                        }
    41504150                        BamgVertex & vi = vertices[i];
     
    41544154                                ta=Previous(Adj(ta));
    41554155                                if (vertices+i != ta.EdgeVertex(1)){
    4156                                         _error2_("vertices+i != ta.EdgeVertex(1)");
     4156                                        _error_("vertices+i != ta.EdgeVertex(1)");
    41574157                                }
    41584158                                BamgVertex & vj = *(ta.EdgeVertex(0));
     
    41604160                                        j= &vj-vertices;
    41614161                                        if (j<0 || j >= nbv){
    4162                                                 _error2_("j<0 || j >= nbv");
     4162                                                _error_("j<0 || j >= nbv");
    41634163                                        }
    41644164                                        R2 Aij = (R2) vj - (R2) vi;
     
    42844284                                        // the first PB is to now a background edge between the 2 vertices
    42854285                                        if (!edgesGtoB){
    4286                                                 _error2_("!edgesGtoB");
     4286                                                _error_("!edgesGtoB");
    42874287                                        }
    42884288                                        ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)],
     
    43564356                        Triangle & t = triangles[i];
    43574357                        if (!t.link){
    4358                                 _error2_("!t.link");
     4358                                _error_("!t.link");
    43594359                        }
    43604360                        for(int j=0;j<3;j++)
     
    43834383                                                                                ||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
    43844384                                                        _printLine_(ke + nbvold << " not in triangle " << i << " In= " << !!t.link << " " << aa << " " << bb << " " << cc << " " << dd);
    4385                                                         _error2_("Number of triangles with P2 interpolation Problem");
     4385                                                        _error_("Number of triangles with P2 interpolation Problem");
    43864386                                                }
    43874387                                        }
     
    43914391                                                                                ||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
    43924392                                                        _printLine_(ke + nbvold << " not in triangle " << ii << " In= " << !!tt.link << " " << aa << " " << bb << " " << cc << " " << dd);
    4393                                                         _error2_("Number of triangles with P2 interpolation Problem");
     4393                                                        _error_("Number of triangles with P2 interpolation Problem");
    43944394                                                }
    43954395                                        }
     
    44394439                                                  } // tt
    44404440                                                else
    4441                                                  _error2_("Bug...");
     4441                                                 _error_("Bug...");
    44424442                                          } // ke<0           
    44434443                                        else
     
    44524452                          }
    44534453                        if (nbinvisible>=2){
    4454                                 _error2_("nbinvisible>=2");
     4454                                _error_("nbinvisible>=2");
    44554455                        }
    44564456                        switch (nbsplitedge) {
     
    44644464                        }
    44654465                        if (ksplit[i]<40){
    4466                                 _error2_("ksplit[i]<40");
     4466                                _error_("ksplit[i]<40");
    44674467                        }
    44684468                  }
     
    44814481                        int  ke=(int) (ksplit[i]%10);
    44824482                        if (kk>=7 || kk<=0){
    4483                                 _error2_("kk>=7 || kk<=0");
     4483                                _error_("kk>=7 || kk<=0");
    44844484                        }
    44854485
     
    44984498
    44994499                        if (nbmkadj>=10){
    4500                                 _error2_("nbmkadj>=10");
     4500                                _error_("nbmkadj>=10");
    45014501                        }
    45024502                        // --------------------------
     
    45164516                                                        t1=t0;
    45174517                                                        if (kedge[3*i+i0]<0){
    4518                                                                 _error2_("kedge[3*i+i0]<0");
     4518                                                                _error_("kedge[3*i+i0]<0");
    45194519                                                        }
    45204520                                                        BamgVertex * v3 = vertices + kedge[3*i+k0];
     
    45324532                                                        t2=t1=t0;
    45334533                                                        if (kedge[3*i+k1]<0){
    4534                                                                 _error2_("kedge[3*i+k1]<0");
     4534                                                                _error_("kedge[3*i+k1]<0");
    45354535                                                        }
    45364536                                                        if (kedge[3*i+k2]<0){
    4537                                                                 _error2_("kedge[3*i+k2]<0");
     4537                                                                _error_("kedge[3*i+k2]<0");
    45384538                                                        }
    45394539
     
    45594559                                                        t3=t2=t1=t0;
    45604560                                                        if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){
    4561                                                                 _error2_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
     4561                                                                _error_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
    45624562                                                        }
    45634563                                                        BamgVertex * v12 = vertices + kedge[3*i+k0];
     
    46334633                                }
    46344634                        if (nbmkadj>13){// 13 = 6 + 4 +
    4635                                 _error2_("nbmkadj>13");
     4635                                _error_("nbmkadj>13");
    46364636                        }
    46374637
     
    47594759                        quadtree->Add(vi);
    47604760                        if (!tcvi || tcvi->det<0){// internal
    4761                                 _error2_("!tcvi || tcvi->det < 0");
     4761                                _error_("!tcvi || tcvi->det < 0");
    47624762                        }
    47634763                        AddVertex(vi,tcvi,det3);
     
    48024802
    48034803                /*Check that the quadtree does exist*/
    4804                 if (!quadtree) _error2_("no starting triangle provided and no quadtree available");
     4804                if (!quadtree) _error_("no starting triangle provided and no quadtree available");
    48054805
    48064806                /*Call NearestVertex*/
     
    48084808
    48094809                /*Check output (Vertex a)*/
    4810                 if (!a)    _error2_("problem while trying to find nearest vertex from a given point. No output found");
    4811                 if (!a->t) _error2_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)");
     4810                if (!a)    _error_("problem while trying to find nearest vertex from a given point. No output found");
     4811                if (!a->t) _error_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)");
    48124812                _assert_(a>=vertices && a<vertices+nbv);
    48134813
     
    48444844
    48454845                /*Increase counter*/
    4846                 if (++counter>=10000) _error2_("Maximum number of iteration reached (threshold = " << counter << ").");
     4846                if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = " << counter << ").");
    48474847
    48484848                j= OppositeVertex[jj];
     
    49084908
    49094909                //check that the subdomain is not empty
    4910                 if (!t0){ _error2_("At least one subdomain is empty");}
     4910                if (!t0){ _error_("At least one subdomain is empty");}
    49114911
    49124912                //loop
     
    49914991                //allocate
    49924992                VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 
    4993                 if(NbVerticesOnGeomVertex >= maxnbv) _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
     4993                if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
    49944994                _assert_(nbv==0);
    49954995                //Build VerticesOnGeomVertex
     
    50805080                                                                NbNewPoints=0;
    50815081                                                                NbEdgeCurve=0;
    5082                                                                 if (nbvend>=maxnbv) _error2_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
     5082                                                                if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
    50835083                                                                lcurve =0;
    50845084                                                                s = lstep; //-1 initially, then length of each sub edge
     
    53225322                printf("\n");
    53235323                if(NbVerticesOnGeomVertex >= maxnbv){
    5324                         _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
     5324                        _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
    53255325                }
    53265326
     
    53935393                if (bfind!=Gh.nbcurves){
    53945394                        delete [] bcurve;
    5395                         _error2_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)");
     5395                        _error_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)");
    53965396                }
    53975397
     
    54925492                                                                        double se= (sNew-L0)/LAB;
    54935493                                                                        if (se<0 || se>=1.000000001){
    5494                                                                                 _error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
     5494                                                                                _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
    54955495                                                                        }
    54965496                                                                        se = abscisseInterpole(v0.m,v1.m,AB,se,1);
    54975497                                                                        if (se<0 || se>1){
    5498                                                                                 _error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
     5498                                                                                _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
    54995499                                                                        }
    55005500                                                                        se = k1         ? se : 1. - se;
     
    55285528                                                        }
    55295529                                                        if (!ee.adj[k1]) {
    5530                                                                 _error2_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
     5530                                                                _error_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
    55315531                                                        }
    55325532                                                        pe = ee.adj[k1]; // next edge
     
    55665566                        if(step==0){
    55675567                                if(nbv+NbOfNewPoints > maxnbv) {
    5568                                         _error2_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv);
     5568                                        _error_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv);
    55695569                                }
    55705570                                edges = new Edge[NbOfNewEdge];
     
    56115611                int dir=0;
    56125612                if (k<0){
    5613                         _error2_("k<0");
     5613                        _error_("k<0");
    56145614                }
    56155615                int kkk=0; 
     
    56195619                        kkk++;
    56205620                        if (kkk>=1000){
    5621                                 _error2_("kkk>=1000");
     5621                                _error_("kkk>=1000");
    56225622                        }
    56235623                        BamgVertex  &vI =  *edge.EdgeVertex(0);
     
    56365636                                                        double IJ2 = IJ_IA + IJ_AJ;
    56375637                                                        if (IJ2==0){
    5638                                                                 _error2_("IJ2==0");
     5638                                                                _error_("IJ2==0");
    56395639                                                        }
    56405640                                                        a= IJ_AJ/IJ2;
     
    56505650        int NbSwap =0;
    56515651        if (!a.t || !b.t){ // the 2 vertex is in a mesh
    5652                 _error2_("!a.t || !b.t");
     5652                _error_("!a.t || !b.t");
    56535653        }
    56545654        int k=0;
     
    56675667                vbegin =v2;
    56685668                if (!v2){
    5669                         _error2_("!v2");
     5669                        _error_("!v2");
    56705670                }
    56715671                det2 = det(*v2,a,b);
     
    56845684                        tc = Previous(tc);
    56855685                        if (!v1 || !v2){
    5686                                 _error2_("!v1 || !v2");
     5686                                _error_("!v1 || !v2");
    56875687                        }
    56885688                        Icoor2 detss = 0,l=0,ks;
    56895689                        while ((ks=SwapForForcingEdge(  va,  vb, tc, detss, det1,det2,NbSwap)))
    56905690                         if(l++ > 10000000) {
    5691                                  _error2_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big");
     5691                                 _error_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big");
    56925692                         }
    56935693                        BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1);
     
    57085708                k++;
    57095709                if (k>=2000){
    5710                         _error2_("k>=2000");
     5710                        _error_("k>=2000");
    57115711                }
    57125712                if ( vbegin == v2 ) return -1;// error
     
    57805780                short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles
    57815781                if ( a1<0 || a1>=3 ){
    5782                         _error2_("a1<0 || a1>=3");
     5782                        _error_("a1<0 || a1>=3");
    57835783                }
    57845784
     
    57925792                Icoor2 detT = det1+det2;
    57935793                if ((det1<=0 ) || (det2<=0)){
    5794                         _error2_("(det1<=0 ) || (det2<=0)");
     5794                        _error_("(det1<=0 ) || (det2<=0)");
    57955795                }
    57965796                if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb
    5797                         _error2_("(detsa>=0) || (detsb<=0)");
     5797                        _error_("(detsa>=0) || (detsb<=0)");
    57985798                }
    57995799                Icoor2 ndet1 = bamg::det(s1,sa,s2);
Note: See TracChangeset for help on using the changeset viewer.