Changeset 3570
- Timestamp:
- 04/19/10 16:26:55 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/objects/Edge.h
r3566 r3570 39 39 int Intersection(const Edge & e) const { 40 40 if (!(adj[0]==&e || adj[1]==&e)){ 41 ISSMERROR( exprintf("Intersection bug"));41 ISSMERROR("Intersection bug"); 42 42 } 43 43 if (adj[0]!=&e && adj[1]!=&e){ 44 ISSMERROR( exprintf("adj[0]!=&e && adj[1]!=&e"));44 ISSMERROR("adj[0]!=&e && adj[1]!=&e"); 45 45 } 46 46 return adj[0]==&e ? 0 : 1; -
issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp
r3335 r3570 93 93 double ca,cb,cta,ctb; 94 94 if ( theta<-1e-12){ 95 ISSMERROR( exprintf("theta<-1e-12"));95 ISSMERROR("theta<-1e-12"); 96 96 } 97 97 if ( theta>1+1e-12){ 98 ISSMERROR( exprintf("theta>1+1e-12"));98 ISSMERROR("theta>1+1e-12"); 99 99 } 100 100 if (TgA()) -
issm/trunk/src/c/Bamgx/objects/Geometry.cpp
r3407 r3570 33 33 subdomains[i].Set(Gh.subdomains[i],Gh,*this); 34 34 if (nbt); { 35 ISSMERROR( exprintf("nbt"));35 ISSMERROR("nbt"); 36 36 } 37 37 } … … 44 44 45 45 if (NbRef>0){ 46 ISSMERROR( exprintf("NbRef>0"));46 ISSMERROR("NbRef>0"); 47 47 } 48 48 if(vertices) delete [] vertices;vertices=0; … … 83 83 } 84 84 if (bamggeom->Edges==NULL){ 85 ISSMERROR( exprintf("the domain provided does not contain any edge"));85 ISSMERROR("the domain provided does not contain any edge"); 86 86 } 87 87 … … 89 89 if (bamggeom->Vertices){ 90 90 if(verbose>5) printf(" processing Vertices\n"); 91 if (bamggeom->VerticesSize[1]!=3) ISSMERROR( exprintf("Vertices should have 3 columns"));91 if (bamggeom->VerticesSize[1]!=3) ISSMERROR("Vertices should have 3 columns"); 92 92 vertices = new GeometricalVertex[nbvx]; 93 93 for (i=0;i<nbv;i++) { … … 116 116 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 117 117 if(coefIcoor <=0){ 118 ISSMERROR( exprintf("coefIcoor should be positive"));118 ISSMERROR("coefIcoor should be positive"); 119 119 } 120 120 } 121 121 else{ 122 ISSMERROR( exprintf("No MeshVertex provided"));122 ISSMERROR("No MeshVertex provided"); 123 123 } 124 124 … … 129 129 130 130 if(verbose>5) printf(" processing Edges\n"); 131 if (bamggeom->EdgesSize[1]!=3) ISSMERROR( exprintf("Edges should have 3 columns"));131 if (bamggeom->EdgesSize[1]!=3) ISSMERROR("Edges should have 3 columns"); 132 132 edges = new GeometricalEdge[nbe]; 133 133 … … 180 180 } 181 181 else{ 182 ISSMERROR( exprintf("No edges provided"));182 ISSMERROR("No edges provided"); 183 183 } 184 184 … … 223 223 if (bamggeom->TangentAtEdges){ 224 224 if(verbose>5) printf(" processing TangentAtEdges"); 225 if (bamggeom->TangentAtEdgesSize[1]!=4) ISSMERROR( exprintf("TangentAtEdges should have 4 columns"));225 if (bamggeom->TangentAtEdgesSize[1]!=4) ISSMERROR("TangentAtEdges should have 4 columns"); 226 226 int n,i,j,k; 227 227 R2 tg; … … 234 234 tg.y=bamggeom->TangentAtEdges[k*4+3]; 235 235 if (j!=0 && j!=1){ 236 ISSMERROR( exprintf("TangentAtEdges second index should be 1 or 2 only"));236 ISSMERROR("TangentAtEdges second index should be 1 or 2 only"); 237 237 } 238 238 edges[i].tg[j] = tg; … … 243 243 if(bamggeom->Corners){ 244 244 if(verbose>5) printf(" processing Corners"); 245 if (bamggeom->CornersSize[1]!=1) ISSMERROR( exprintf("Corners should have 1 column"));245 if (bamggeom->CornersSize[1]!=1) ISSMERROR("Corners should have 1 column"); 246 246 n=bamggeom->CornersSize[0]; 247 247 for (i=0;i<n;i++) { 248 248 j=(int)bamggeom->Corners[i]-1; //for C indexing 249 249 if (j>nbv-1 || j<0){ 250 ISSMERROR( exprintf("Bad corner definition: should in [0 %i]",nbv));250 ISSMERROR("Bad corner definition: should in [0 %i]",nbv); 251 251 } 252 252 vertices[j].SetCorner(); … … 257 257 if(bamggeom->RequiredVertices){ 258 258 if(verbose>5) printf(" processing RequiredVertices\n"); 259 if (bamggeom->RequiredVerticesSize[1]!=1) ISSMERROR( exprintf("RequiredVertices should have 1 column"));259 if (bamggeom->RequiredVerticesSize[1]!=1) ISSMERROR("RequiredVertices should have 1 column"); 260 260 n=bamggeom->RequiredVerticesSize[0]; 261 261 for (i=0;i<n;i++) { 262 262 j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing 263 263 if (j>nbv-1 || j<0){ 264 ISSMERROR( exprintf("Bad RequiredVerticess definition: should in [0 %i]",nbv));264 ISSMERROR("Bad RequiredVerticess definition: should in [0 %i]",nbv); 265 265 } 266 266 vertices[j].SetRequired(); } … … 270 270 if(bamggeom->RequiredEdges){ 271 271 if(verbose>5) printf(" processing RequiredEdges\n"); 272 if (bamggeom->RequiredEdgesSize[1]!=1) ISSMERROR( exprintf("RequiredEdges should have 1 column"));272 if (bamggeom->RequiredEdgesSize[1]!=1) ISSMERROR("RequiredEdges should have 1 column"); 273 273 n=bamggeom->RequiredEdgesSize[0]; 274 274 for (i=0;i<n;i++) { 275 275 j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing 276 276 if (j>nbe-1 || j<0){ 277 ISSMERROR( exprintf("Bad RequiredEdges definition: should in [0 %i]",nbe));277 ISSMERROR("Bad RequiredEdges definition: should in [0 %i]",nbe); 278 278 } 279 279 edges[j].SetRequired(); … … 285 285 long i0,i1,i2,i3; 286 286 if(verbose>5) printf(" processing SubDomains\n"); 287 if (bamggeom->SubDomainsSize[1]!=4) ISSMERROR( exprintf("SubDomains should have 4 columns"));287 if (bamggeom->SubDomainsSize[1]!=4) ISSMERROR("SubDomains should have 4 columns"); 288 288 NbSubDomains=bamggeom->SubDomainsSize[0]; 289 289 subdomains = new GeometricalSubDomain[NbSubDomains]; … … 293 293 i2=(int)bamggeom->SubDomains[i*4+2]; 294 294 i3=(int)bamggeom->SubDomains[i*4+3]; 295 if (i0!=2) ISSMERROR( exprintf("Bad Subdomain definition: first number should be 2 (for Edges)"));296 if (i1>nbe || i1<=0) ISSMERROR( exprintf("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe));295 if (i0!=2) ISSMERROR("Bad Subdomain definition: first number should be 2 (for Edges)"); 296 if (i1>nbe || i1<=0) ISSMERROR("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe); 297 297 subdomains[i].edge=edges + (i1-1); 298 298 subdomains[i].sens = (int) i2; … … 466 466 //check that the clostest vertex is not itself... 467 467 if ( v != &(MeshVertex &) vertices[j]){ 468 ISSMERROR( exprintf(" v != &(MeshVertex &) vertices[j]"));468 ISSMERROR(" v != &(MeshVertex &) vertices[j]"); 469 469 } 470 470 vertices[i].link = vertices + j; … … 484 484 if (!vertices[i].IsThe()) printf(" %i and %i\n",i,Number(vertices[i].The())); 485 485 } 486 ISSMERROR( exprintf("See above"));486 ISSMERROR("See above"); 487 487 } 488 488 … … 555 555 //check that its length is not 0 556 556 if(lv10==0) { 557 ISSMERROR( exprintf("Length of edge %i is 0",i));557 ISSMERROR("Length of edge %i is 0",i); 558 558 } 559 559 //compute angle in [-Pi Pi] … … 647 647 long i1 = n1/2 ,j1=n1%2; 648 648 if( edges[i1].v[j1] != edges[i].v[j]) { 649 ISSMERROR( exprintf("Bug Adj edge"));649 ISSMERROR("Bug Adj edge"); 650 650 } 651 651 edges[i1].Adj[j1] = edges + i; … … 763 763 pon = on; 764 764 if (k>=100){ 765 ISSMERROR( exprintf("k>=100"));765 ISSMERROR("k>=100"); 766 766 } 767 767 R2 A= (*on)[0]; … … 842 842 GeometricalEdge* on=e.onGeometry; 843 843 if (!on){ 844 ISSMERROR( exprintf("ProjectOnCurve error message: edge provided should be on geometry"));844 ISSMERROR("ProjectOnCurve error message: edge provided should be on geometry"); 845 845 } 846 846 if (!e[0].onGeometry || !e[1].onGeometry){ 847 ISSMERROR( exprintf("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry"));847 ISSMERROR("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry"); 848 848 } 849 849 … … 886 886 printf(" 2) code bug : be sure that we call Triangles::SetVertexFieldOn() before\n"); 887 887 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 888 ISSMERROR( exprintf("see above"));888 ISSMERROR("see above"); 889 889 } 890 890 NbTry++; … … 906 906 printf(" 2) code bug : be sure that we call Triangles::SetVertexFieldOn() before\n"); 907 907 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 908 ISSMERROR( exprintf("see above"));908 ISSMERROR("see above"); 909 909 } 910 910 GeometricalEdge* tmpge = eg1; … … 940 940 // search the geometrical edge 941 941 if (s>1.0){ 942 ISSMERROR( exprintf("s>1.0"));942 ISSMERROR("s>1.0"); 943 943 } 944 944 double ls= s*ll; … … 950 950 while ( (l1=lge[i]) < ls ) { 951 951 if (i<0 || i>mxe){ 952 ISSMERROR( exprintf("i<0 || i>mxe"));952 ISSMERROR("i<0 || i>mxe"); 953 953 } 954 954 i++,s0=1-(s1=sensge[i]),l0=l1; -
issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp
r3407 r3570 61 61 k=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 62 62 if (k<0){ 63 ISSMERROR( exprintf("k<0"));63 ISSMERROR("k<0"); 64 64 } 65 65 ocut = OppositeEdge[k]; … … 105 105 double dij = detj-deti; 106 106 if (i+j+k != 0 + 1 +2){ 107 ISSMERROR( exprintf("i+j+k != 0 + 1 +2"));107 ISSMERROR("i+j+k != 0 + 1 +2"); 108 108 } 109 109 ba[j] = detj/dij; … … 177 177 } 178 178 else { 179 ISSMERROR( exprintf("Bug Split Edge"));179 ISSMERROR("Bug Split Edge"); 180 180 } 181 181 } … … 267 267 // check Size 268 268 if (Size<=0){ 269 ISSMERROR( exprintf("Size<=0"));269 ISSMERROR("Size<=0"); 270 270 } 271 271 -
issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h
r3407 r3570 43 43 double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01; 44 44 if (lBegin>s || s>lEnd){ 45 ISSMERROR( exprintf("lBegin>s || s>lEnd"));45 ISSMERROR("lBegin>s || s>lEnd"); 46 46 } 47 47 return e->F(sBegin*c0+sEnd*c1); … … 93 93 SegInterpolation * lEn = new SegInterpolation[MaxNbSeg]; 94 94 if (!lSegsI || NbSeg>=MaxNbSeg){ 95 ISSMERROR( exprintf("!lSegsI || NbSeg>=MaxNbSeg"));95 ISSMERROR("!lSegsI || NbSeg>=MaxNbSeg"); 96 96 } 97 97 for (int i=0;i< NbSeg;i++) -
issm/trunk/src/c/Bamgx/objects/MeshVertex.cpp
r3407 r3570 37 37 j = NextEdge[jc]; 38 38 if (k>=2000){ 39 ISSMERROR( exprintf("k>=2000 (Maximum number of iterations reached)"));39 ISSMERROR("k>=2000 (Maximum number of iterations reached)"); 40 40 } 41 41 } while ( tbegin != tria); … … 104 104 j = NextEdge[jc]; 105 105 if (k>=2000){ 106 ISSMERROR( exprintf("k>=2000"));106 ISSMERROR("k>=2000"); 107 107 } 108 108 }while ( tbegin != tria); … … 163 163 } 164 164 else{ 165 ISSMERROR( exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype));165 ISSMERROR("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype); 166 166 } 167 167 -
issm/trunk/src/c/Bamgx/objects/Metric.cpp
r3332 r3570 177 177 // warning for optimisation S is in [0:0.5] not in [0:1] 178 178 if (i>=512){ 179 ISSMERROR( exprintf("i>=512"));179 ISSMERROR("i>=512"); 180 180 } 181 181 LastMetricInterpole.lab=l; … … 321 321 } 322 322 if (r>1 || r<0){ 323 ISSMERROR( exprintf("r>1 || r<0"));323 ISSMERROR("r>1 || r<0"); 324 324 } 325 325 return r ; -
issm/trunk/src/c/Bamgx/objects/QuadTree.cpp
r3407 r3570 88 88 root=NewQuadTreeBox(); 89 89 if ( MaxISize <= MaxICoor){ 90 ISSMERROR( exprintf("MaxISize <= MaxICoor"));90 ISSMERROR("MaxISize <= MaxICoor"); 91 91 } 92 92 for (int i=0;i<nbv;i++) … … 156 156 //check that l is not 0 (this should not happen as MaxDeep = 30) 157 157 if (level==0){ 158 ISSMERROR( exprintf("level==0 cannot be true as it has been initialized as MaxISize = %i",MaxISize));158 ISSMERROR("level==0 cannot be true as it has been initialized as MaxISize = %i",MaxISize); 159 159 } 160 160 … … 468 468 be = b +ll; 469 469 if (!b){ 470 ISSMERROR( exprintf("!b"));470 ISSMERROR("!b"); 471 471 } 472 472 } -
issm/trunk/src/c/Bamgx/objects/QuadTree.h
r3407 r3570 62 62 QuadTreeBox* NewQuadTreeBox(){ 63 63 if(! (sb->bc<sb->be)) sb=new StorageQuadTreeBox(lenStorageQuadTreeBox,sb); 64 if (!sb || (sb->bc->n != 0)){ISSMERROR( exprintf("!sb || (sb->bc->n != 0)"));}64 if (!sb || (sb->bc->n != 0)){ISSMERROR("!sb || (sb->bc->n != 0)");} 65 65 NbQuadTreeBox++; 66 66 return sb->bc++; -
issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp
r3335 r3570 77 77 //check that nbax <=NbOfEdges 78 78 if (nbax <=NbOfEdges ) { 79 ISSMERROR( exprintf("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax));79 ISSMERROR("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax); 80 80 } 81 81 -
issm/trunk/src/c/Bamgx/objects/SubDomain.cpp
r3332 r3570 16 16 *this = Th.subdomains[i]; 17 17 if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){ 18 ISSMERROR( exprintf("head-Th.triangles<0 || head-Th.triangles>=Th.nbt"));18 ISSMERROR("head-Th.triangles<0 || head-Th.triangles>=Th.nbt"); 19 19 } 20 20 head = ThNew.triangles + Th.Number(head) ; 21 21 if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{ 22 ISSMERROR( exprintf("edge-Th.edges<0 || edge-Th.edges>=Th.nbe"));22 ISSMERROR("edge-Th.edges<0 || edge-Th.edges>=Th.nbe"); 23 23 } 24 24 edge = ThNew.edges+ Th.Number(edge); -
issm/trunk/src/c/Bamgx/objects/Triangle.cpp
r3407 r3570 15 15 long nbv = Th->nbv; 16 16 if (i<0 || j<0 || k<0){ 17 ISSMERROR( exprintf("i<0 || j<0 || k<0"));17 ISSMERROR("i<0 || j<0 || k<0"); 18 18 } 19 19 if (i>=nbv || j>=nbv || k>=nbv){ 20 ISSMERROR( exprintf("i>=nbv || j>=nbv || k>=nbv"));20 ISSMERROR("i>=nbv || j>=nbv || k>=nbv"); 21 21 } 22 22 TriaVertices[0]=v+i; … … 114 114 //check number of iterations 115 115 if (k>=2000){ 116 ISSMERROR( exprintf("too many iteration in Triangle::FindBoundaryEdge (k>=2000)"));116 ISSMERROR("too many iteration in Triangle::FindBoundaryEdge (k>=2000)"); 117 117 } 118 118 } while (this!= t); … … 137 137 do { 138 138 while (t->swap(j,koption)){ 139 if (k>=20000) ISSMERROR( exprintf("k>=20000"));139 if (k>=20000) ISSMERROR("k>=20000"); 140 140 NbSwap++; 141 141 k++; -
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r3566 r3570 122 122 int i2 = Tho.Number(t[2]); 123 123 if (i0<0 || i1<0 || i2<0){ 124 ISSMERROR( exprintf("i0<0 || i1<0 || i2< 0"));124 ISSMERROR("i0<0 || i1<0 || i2< 0"); 125 125 } 126 126 if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){ 127 ISSMERROR( exprintf("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv"));127 ISSMERROR("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv"); 128 128 } 129 129 triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]); … … 132 132 } 133 133 if (kt!=nbt){ 134 ISSMERROR( exprintf("kt!=nbt"));134 ISSMERROR("kt!=nbt"); 135 135 } 136 136 if (nbt==0 && nbv==0) { 137 ISSMERROR( exprintf("All triangles have been removed"));137 ISSMERROR("All triangles have been removed"); 138 138 } 139 139 delete [] kk; … … 147 147 148 148 if (!NbSubDomains){ 149 ISSMERROR( exprintf("NbSubDomains==0"));149 ISSMERROR("NbSubDomains==0"); 150 150 } 151 151 if (!subdomains[0].head || !subdomains[0].head->link){ 152 ISSMERROR( exprintf("!subdomains[0].head || !subdomains[0].head->link"));152 ISSMERROR("!subdomains[0].head || !subdomains[0].head->link"); 153 153 } 154 154 … … 334 334 } 335 335 else{ 336 if(verbose>5) ISSMERROR( exprintf("no Vertices found in the initial mesh"));336 if(verbose>5) ISSMERROR("no Vertices found in the initial mesh"); 337 337 } 338 338 … … 352 352 } 353 353 else{ 354 if(verbose>5) ISSMERROR( exprintf("no Triangles found in the initial mesh"));354 if(verbose>5) ISSMERROR("no Triangles found in the initial mesh"); 355 355 } 356 356 … … 478 478 //Check value 479 479 if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) { 480 ISSMERROR( exprintf("ReadMesh error: EdgesOnGeometricEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe));480 ISSMERROR("ReadMesh error: EdgesOnGeometricEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe); 481 481 } 482 482 edges[i].onGeometry=Gh.edges+j; … … 504 504 head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing 505 505 sens=(int)bamgmesh->SubDomains[i*3+2]; 506 if (i3!=23) ISSMERROR( exprintf("Bad Subdomain definition: first number should be 3"));507 if (head<0 || head>=nbt) ISSMERROR( exprintf("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt));506 if (i3!=23) ISSMERROR("Bad Subdomain definition: first number should be 3"); 507 if (head<0 || head>=nbt) ISSMERROR("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt); 508 508 subdomains[i].head = triangles+head; 509 509 } … … 552 552 for (j=0;j<3;j++){ 553 553 int v=Number(triangles[i][j]); //jth vertex of the ith triangle 554 if (k>3*nbt-1 || k<0) ISSMERROR( exprintf("k = %i, nbt = %i",k,nbt));554 if (k>3*nbt-1 || k<0) ISSMERROR("k = %i, nbt = %i",k,nbt); 555 555 next_1[k]=head_1[v]; 556 if (v>nbv-1 || v<0) ISSMERROR( exprintf("v = %i, nbv = %i",v,nbv));556 if (v>nbv-1 || v<0) ISSMERROR("v = %i, nbv = %i",v,nbv); 557 557 head_1[v]=k++; 558 558 connectivitysize_1[v]+=1; … … 692 692 } 693 693 if (!stop){ 694 ISSMERROR( exprintf("Element holding segment [%i %i] not found...",i1+1,i2+1));694 ISSMERROR("Element holding segment [%i %i] not found...",i1+1,i2+1); 695 695 } 696 696 } … … 790 790 const VertexOnGeom &v=VerticesOnGeomEdge[i]; 791 791 if (!v.OnGeomEdge()){ 792 ISSMERROR( exprintf("A vertices supposed to be OnGeometricEdge is actually not"));792 ISSMERROR("A vertices supposed to be OnGeometricEdge is actually not"); 793 793 } 794 794 bamgmesh->VerticesOnGeometricEdge[i*3+0]=Number((MeshVertex*)v)+1; //back to Matlab indexing … … 873 873 for (j=0;j<2;j++){ 874 874 int v=(int)bamgmesh->ElementEdges[i*i2+j]-1; //back to C indexing 875 if (k>2*i1-1 || k<0) ISSMERROR( exprintf("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1));875 if (k>2*i1-1 || k<0) ISSMERROR("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1); 876 876 next_2[k]=head_2[v]; 877 if (v>nbv-1 || v<0) ISSMERROR( exprintf("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1));877 if (v>nbv-1 || v<0) ISSMERROR("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1); 878 878 head_2[v]=k++; 879 879 connectivitysize_2[v]+=1; … … 1008 1008 //check that hmax is positive 1009 1009 if (hmax<=0){ 1010 ISSMERROR( exprintf("hmax<=0"));1010 ISSMERROR("hmax<=0"); 1011 1011 } 1012 1012 … … 1037 1037 1038 1038 if (ht<=0 || hn<=0){ 1039 ISSMERROR( exprintf("ht<=0 || hn<=0"));1039 ISSMERROR("ht<=0 || hn<=0"); 1040 1040 } 1041 1041 MatVVP2x2 Vp(1/(ht*ht),1/(hn*hn),tg); … … 1062 1062 } 1063 1063 else{ 1064 ISSMERROR( exprintf("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype));1064 ISSMERROR("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype); 1065 1065 } 1066 1066 } … … 1104 1104 //some checks 1105 1105 if (( infinitevertexpos <0 ) && (detOld <0) || ( infinitevertexpos >=0 ) && (detOld >0) ){ 1106 ISSMERROR( exprintf("bug in Triangles::Add, bad configuration"));1106 ISSMERROR("bug in Triangles::Add, bad configuration"); 1107 1107 } 1108 1108 … … 1149 1149 printf("\nproblem while trying to add:\n"); 1150 1150 s.Echo(); 1151 ISSMERROR( exprintf("Bug in Triangles::Add points duplicated %i times",nbzerodet));1151 ISSMERROR("Bug in Triangles::Add points duplicated %i times",nbzerodet); 1152 1152 } 1153 1153 } … … 1163 1163 1164 1164 if (nbt>nbtx) { 1165 ISSMERROR( exprintf("Not ebough triangles"));1165 ISSMERROR("Not ebough triangles"); 1166 1166 } 1167 1167 … … 1202 1202 1203 1203 if (!rswap) { 1204 ISSMERROR( exprintf("swap the point s is on a edge"));1204 ISSMERROR("swap the point s is on a edge"); 1205 1205 } 1206 1206 } … … 1269 1269 //check that the mesh is not empty 1270 1270 if (nbt<=0 || nbv <=0 ) { 1271 ISSMERROR( exprintf("nbt or nbv is negative (Mesh empty?)"));1271 ISSMERROR("nbt or nbv is negative (Mesh empty?)"); 1272 1272 } 1273 1273 … … 1290 1290 //check that there is no double edge 1291 1291 if (nbe != edge4->nb()){ 1292 ISSMERROR( exprintf("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()));1292 ISSMERROR("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()); 1293 1293 } 1294 1294 //keep nbe in nbeold … … 1310 1310 //check that it is not an edge on boundary (should not already exist) 1311 1311 if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){ 1312 ISSMERROR( exprintf("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)"));1312 ISSMERROR("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)"); 1313 1313 } 1314 1314 //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list … … 1328 1328 printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3); 1329 1329 printf("Edge %i of triangle %i\n",triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)),Number(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3)))); 1330 ISSMERROR( exprintf("An edge belongs to more than 2 triangles"));1330 ISSMERROR("An edge belongs to more than 2 triangles"); 1331 1331 } 1332 1332 } … … 1410 1410 //check that we have been through all edges 1411 1411 if (k!=nbe){ 1412 ISSMERROR( exprintf("problem in edge construction process: k!=nbe (should not happen)"));1412 ISSMERROR("problem in edge construction process: k!=nbe (should not happen)"); 1413 1413 } 1414 1414 //delete edgessave … … 1455 1455 //check that we have the correct vertex 1456 1456 if (v!=edges[i0 ].v[j0]){ 1457 ISSMERROR( exprintf("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge"));1457 ISSMERROR("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge"); 1458 1458 } 1459 1459 … … 1472 1472 //check that NbSubDomains is empty 1473 1473 if (NbSubDomains){ 1474 ISSMERROR( exprintf("NbSubDomains should be 0"));1474 ISSMERROR("NbSubDomains should be 0"); 1475 1475 } 1476 1476 NbSubDomains=0; … … 1540 1540 //check that we have been through all subdomains 1541 1541 if (k!= NbSubDomains){ 1542 ISSMERROR( exprintf("k!= NbSubDomains"));1542 ISSMERROR("k!= NbSubDomains"); 1543 1543 } 1544 1544 //delete colorT and st … … 1600 1600 Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y)); 1601 1601 if (Gh.coefIcoor<=0){ 1602 ISSMERROR( exprintf("Gh.coefIcoor<=0 in infered Geometry (this should not happen)"));1602 ISSMERROR("Gh.coefIcoor<=0 in infered Geometry (this should not happen)"); 1603 1603 } 1604 1604 … … 1651 1651 k = edge4->SortAndAdd(i0,i1); 1652 1652 if (k != i){ 1653 ISSMERROR( exprintf("problem in Edge4 construction: k != i"));1653 ISSMERROR("problem in Edge4 construction: k != i"); 1654 1654 } 1655 1655 } … … 1680 1680 } 1681 1681 else 1682 ISSMERROR( exprintf("%i should be >=0"));1682 ISSMERROR("%i should be >=0"); 1683 1683 } 1684 1684 … … 2237 2237 //The vertex cannot be marked more than twice 2238 2238 if (splitvertex[i1]==3 || splitvertex[i2]==3){ 2239 ISSMERROR( exprintf("Crossing rifts not supported yet"));2239 ISSMERROR("Crossing rifts not supported yet"); 2240 2240 } 2241 2241 } … … 2315 2315 //printf("%i -> %i %i %i, edge [%i->%i %i->%i]\n",element_renu[Number(ta.t)],Number((*ta.t)[0])+1,Number((*ta.t)[1])+1,Number((*ta.t)[2])+1,i1,j1,i2,j2); 2316 2316 ta = Next(ta).Adj(); 2317 if (count++>50) ISSMERROR( exprintf("Maximum number of iteration exceeded"));2317 if (count++>50) ISSMERROR("Maximum number of iteration exceeded"); 2318 2318 }while ((tbegin != ta)); 2319 2319 } … … 2322 2322 for(i=0;i<NbCrackedEdges;i++){ 2323 2323 if (Edgeflags[i]!=2){ 2324 ISSMERROR( exprintf("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1));2324 ISSMERROR("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1); 2325 2325 } 2326 2326 } … … 2348 2348 } 2349 2349 if (k!=0) { 2350 ISSMERROR( exprintf("there is %i triangles of mes = 0",k));2350 ISSMERROR("there is %i triangles of mes = 0",k); 2351 2351 } 2352 2352 … … 2365 2365 printf("Edge %i: %i %i\n",j,Number(edges[j][0]),Number(edges[j][1])); 2366 2366 } 2367 ISSMERROR( exprintf("Missing Edge %i, v0=%i,v1=%i",i,Number(edges[i][0]),Number(edges[i][1])));2367 ISSMERROR("Missing Edge %i, v0=%i,v1=%i",i,Number(edges[i][0]),Number(edges[i][1])); 2368 2368 } 2369 2369 } 2370 2370 2371 2371 if (k!=0) { 2372 ISSMERROR( exprintf("There are %i lost edges, the boundary might be crossing",k));2372 ISSMERROR("There are %i lost edges, the boundary might be crossing",k); 2373 2373 } 2374 2374 for (int j=0;j<nbv;j++){ … … 2451 2451 it++;} // end while (it<nbt) 2452 2452 if (nbt == NbOutT || !NbSubDomTot) { 2453 ISSMERROR( exprintf("The boundary is not close: all triangles are outside"));2453 ISSMERROR("The boundary is not close: all triangles are outside"); 2454 2454 } 2455 2455 … … 2488 2488 it++;} // end white (it<nbt) 2489 2489 if (k!=NbSubDomains){ 2490 ISSMERROR( exprintf("k!=NbSubDomains"));2490 ISSMERROR("k!=NbSubDomains"); 2491 2491 } 2492 2492 if(OutSide) … … 2559 2559 Edge &e = *GeometricalEdgetoEdge[Gh.Number(eg)]; 2560 2560 if (&e==NULL){ 2561 ISSMERROR( exprintf("&e==NULL"));2561 ISSMERROR("&e==NULL"); 2562 2562 } 2563 2563 MeshVertex * v0 = e(0),*v1 = e(1); … … 2569 2569 subdomains[i].edge = &e; 2570 2570 if (!t || !sens){ 2571 ISSMERROR( exprintf("!t || !sens"));2571 ISSMERROR("!t || !sens"); 2572 2572 } 2573 2573 … … 2576 2576 while (1) { 2577 2577 if ( v0 != ta.EdgeVertex(1) ){ 2578 ISSMERROR( exprintf("v0 != ta.EdgeVertex(1)"));2578 ISSMERROR("v0 != ta.EdgeVertex(1)"); 2579 2579 } 2580 2580 if (ta.EdgeVertex(0) == v1) { // ok we find the edge … … 2584 2584 subdomains[i].head=t=ta; 2585 2585 if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) { 2586 ISSMERROR( exprintf("bad definition of SubSomain %i",i));2586 ISSMERROR("bad definition of SubSomain %i",i); 2587 2587 } 2588 2588 long it = Number(t); … … 2599 2599 kkk++; 2600 2600 if (mark[Number(tt)]>=0){ 2601 ISSMERROR( exprintf("mark[Number(tt)]>=0"));2601 ISSMERROR("mark[Number(tt)]>=0"); 2602 2602 } 2603 2603 mark[Number(tt)]=i; … … 2608 2608 ta = Previous(Adj(ta)); 2609 2609 if(t == (Triangle *) ta) { 2610 ISSMERROR( exprintf("bad definition of SubSomain %i",i));2610 ISSMERROR("bad definition of SubSomain %i",i); 2611 2611 } 2612 2612 } … … 2639 2639 else { 2640 2640 if (!quadtree){ 2641 ISSMERROR( exprintf("no starting triangle provided and no quadtree available"));2641 ISSMERROR("no starting triangle provided and no quadtree available"); 2642 2642 } 2643 2643 MeshVertex *a = quadtree->NearestVertex(B.x,B.y) ; … … 2647 2647 printf("TriangleContaining vertex number %i, another call to ReMakeTriangleContainingTheVertex was required\n", Number(a)); 2648 2648 } 2649 ISSMERROR( exprintf("problem in Triangles::FindTriangleContaining"));2649 ISSMERROR("problem in Triangles::FindTriangleContaining"); 2650 2650 } 2651 2651 if (a<vertices || a>=vertices+nbv){ 2652 ISSMERROR( exprintf("a<vertices || a>=vertices+nbv"));2652 ISSMERROR("a<vertices || a>=vertices+nbv"); 2653 2653 } 2654 2654 t = a->t; 2655 2655 if (t<triangles || t>=triangles+nbt){ 2656 2656 a->Echo(); 2657 ISSMERROR( exprintf("t<triangles || t>=triangles+nbt"));2657 ISSMERROR("t<triangles || t>=triangles+nbt"); 2658 2658 } 2659 2659 } … … 2667 2667 int k0=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 2668 2668 if (k0<0){ // k0 the NULL vertex 2669 ISSMERROR( exprintf("k0<0"));2669 ISSMERROR("k0<0"); 2670 2670 } 2671 2671 int k1=NextVertex[k0],k2=PreviousVertex[k0]; … … 2677 2677 kkkk++; 2678 2678 if (kkkk>=2){ 2679 ISSMERROR( exprintf("kkkk>=2"));2679 ISSMERROR("kkkk>=2"); 2680 2680 } 2681 2681 } … … 2687 2687 kkkk++; 2688 2688 if (kkkk>=2000){ 2689 ISSMERROR( exprintf("kkkk>=2000"));2689 ISSMERROR("kkkk>=2000"); 2690 2690 } 2691 2691 j= OppositeVertex[jj]; … … 2708 2708 if (k == 2 && BinaryRand()) Exchange(ii[0],ii[1]); 2709 2709 if ( k>=3){ 2710 ISSMERROR( exprintf("k>=3"));2710 ISSMERROR("k>=3"); 2711 2711 } 2712 2712 TriangleAdjacent t1 = t->Adj(jj=ii[0]); … … 2764 2764 VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 2765 2765 if( NbVerticesOnGeomVertex >= nbvx) { 2766 ISSMERROR( exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx));2766 ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx); 2767 2767 } 2768 2768 … … 2781 2781 } 2782 2782 else{ 2783 ISSMERROR( exprintf("Maximum number of vertices (nbvx = %i) too small",nbvx));2783 ISSMERROR("Maximum number of vertices (nbvx = %i) too small",nbvx); 2784 2784 } 2785 2785 … … 2797 2797 //check that edges has been allocated 2798 2798 if (edges){ 2799 ISSMERROR( exprintf("edges is empty"));2799 ISSMERROR("edges is empty"); 2800 2800 } 2801 2801 … … 2843 2843 //check that edges has been allocated 2844 2844 if (!edges){ 2845 ISSMERROR( exprintf("edges has not been allocated..."));2845 ISSMERROR("edges has not been allocated..."); 2846 2846 } 2847 2847 edges[nbe].v[0]=a->to; … … 2865 2865 NbNewPoints=0; 2866 2866 NbEdgeCurve=0; 2867 if (nbvend>=nbvx){ 2868 ISSMERROR(exprintf("nbvend>=nbvx")); 2869 } 2867 if (nbvend>=nbvx) ISSMERROR("maximum number of vertices too low! Check the domain outline or increase nbvx"); 2870 2868 lcurve =0; 2871 2869 s = lstep; … … 2940 2938 kk0=kkk,ll0=llk; 2941 2939 } 2942 if (kk1 == kk0){ 2943 ISSMERROR(exprintf("kk1 == kk0")); 2944 } 2940 ISSMASSERT(kk1!=kk0); 2945 2941 2946 2942 double sbb = (ss-ll0 )/(ll1-ll0); … … 2975 2971 k = e->DirAdj[kprev];// next vertices 2976 2972 e = e->Adj[kprev]; 2977 if (!e){ 2978 ISSMERROR(exprintf("!e")); 2979 } 2973 ISSMASSERT(e); 2980 2974 }// for(;;) 2981 2975 vb = b->to; … … 3006 3000 if(!step) { 3007 3001 if (edges){ 3008 ISSMERROR( exprintf("edges"));3002 ISSMERROR("edges"); 3009 3003 } 3010 3004 if (VerticesOnGeomEdge){ 3011 ISSMERROR( exprintf("VerticesOnGeomEdge"));3005 ISSMERROR("VerticesOnGeomEdge"); 3012 3006 } 3013 3007 edges = new Edge[nbex=nbe]; … … 3015 3009 VerticesOnGeomEdge = new VertexOnGeom[NbVerticesOnGeomEdge0]; 3016 3010 if (!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0){ 3017 ISSMERROR( exprintf("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0"));3011 ISSMERROR("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0"); 3018 3012 } 3019 3013 // do the vertex on a geometrical vertex … … 3021 3015 } 3022 3016 else if (NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0){ 3023 ISSMERROR( exprintf("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0"));3017 ISSMERROR("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0"); 3024 3018 } 3025 3019 } … … 3098 3092 int i; 3099 3093 for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++; 3100 if( NbVerticesOnGeomVertex >= nbvx) { ISSMERROR( exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx));}3094 if( NbVerticesOnGeomVertex >= nbvx) { ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx);} 3101 3095 3102 3096 VerticesOnGeomVertex = new VertexOnGeom[ NbVerticesOnGeomVertex]; … … 3157 3151 } 3158 3152 if (bfind!=Gh.NbOfCurves){ 3159 ISSMERROR( exprintf("problem generating number of curves (Gh.NbOfCurves=%i bfind=%i)",Gh.NbOfCurves,bfind));3153 ISSMERROR("problem generating number of curves (Gh.NbOfCurves=%i bfind=%i)",Gh.NbOfCurves,bfind); 3160 3154 } 3161 3155 … … 3249 3243 double se= (sNew-L0)/LAB; 3250 3244 if (se<0 || se>=1.000000001){ 3251 ISSMERROR( exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se));3245 ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se); 3252 3246 } 3253 3247 se = abscisseInterpole(v0.m,v1.m,AB,se,1); 3254 3248 if (se<0 || se>1){ 3255 ISSMERROR( exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se));3249 ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se); 3256 3250 } 3257 3251 se = k1 ? se : 1. - se; … … 3285 3279 } 3286 3280 if (!ee.adj[k1]) { 3287 ISSMERROR( exprintf(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.Number(ee),nbe,Gh.vertices));3281 ISSMERROR(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.Number(ee),nbe,Gh.vertices); 3288 3282 } 3289 3283 pe = ee.adj[k1]; // next edge … … 3327 3321 if(step==0){ 3328 3322 if(nbv+NbOfNewPoints > nbvx) { 3329 ISSMERROR( exprintf("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,nbvx));3323 ISSMERROR("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,nbvx); 3330 3324 } 3331 3325 edges = new Edge[NbOfNewEdge]; … … 3422 3416 //all vertices are aligned! 3423 3417 if ( ++i >= nbv) { 3424 ISSMERROR( exprintf("all the vertices are aligned"));3418 ISSMERROR("all the vertices are aligned"); 3425 3419 } 3426 3420 } … … 3560 3554 long j=vj.ReferenceNumber; 3561 3555 if (&vj!=ordre[j]){ 3562 ISSMERROR( exprintf("&vj!= ordre[j]"));3556 ISSMERROR("&vj!= ordre[j]"); 3563 3557 } 3564 3558 if(i!=j){ … … 3570 3564 if (tcvj && !tcvj->link){ 3571 3565 tcvj->Echo(); 3572 ISSMERROR( exprintf("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link));3566 ISSMERROR("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link); 3573 3567 } 3574 3568 quadtree->Add(vj); … … 3597 3591 3598 3592 if (!Gh.nbe){ 3599 ISSMERROR( exprintf("!Gh.nbe"));3593 ISSMERROR("!Gh.nbe"); 3600 3594 } 3601 3595 Edge **e= new (Edge* [Gh.nbe]); … … 3630 3624 } 3631 3625 } 3632 if(kk) ISSMERROR( exprintf("See above"));3626 if(kk) ISSMERROR("See above"); 3633 3627 3634 3628 return e; … … 3819 3813 //check i 3820 3814 if (i<0 || i>=nbt ){ 3821 ISSMERROR( exprintf("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1));3815 ISSMERROR("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1); 3822 3816 } 3823 3817 //change first_np_or_next_t[i] … … 3870 3864 } 3871 3865 if (ta.EdgeVertex(0)!=s){ 3872 ISSMERROR( exprintf("ta.EdgeVertex(0)!=s"));3866 ISSMERROR("ta.EdgeVertex(0)!=s"); 3873 3867 } 3874 3868 ta = Next(Adj(ta)); … … 3920 3914 vertices=new MeshVertex[nbvx]; 3921 3915 if (!vertices){ 3922 ISSMERROR( exprintf("!vertices"));3916 ISSMERROR("!vertices"); 3923 3917 } 3924 3918 ordre=new (MeshVertex* [nbvx]); 3925 3919 if (!ordre){ 3926 ISSMERROR( exprintf("!ordre"));3920 ISSMERROR("!ordre"); 3927 3921 } 3928 3922 triangles=new Triangle[nbtx]; 3929 3923 if (!triangles){ 3930 ISSMERROR( exprintf("!triangles"));3924 ISSMERROR("!triangles"); 3931 3925 } 3932 3926 } … … 3965 3959 } 3966 3960 else { 3967 ISSMERROR( exprintf("ProjectOnCurve On MeshVertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vA)));3961 ISSMERROR("ProjectOnCurve On MeshVertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vA)); 3968 3962 } 3969 3963 … … 3976 3970 } 3977 3971 else { 3978 ISSMERROR( exprintf("ProjectOnCurve On MeshVertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vB)));3972 ISSMERROR("ProjectOnCurve On MeshVertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vB)); 3979 3973 } 3980 3974 Edge * e = &BhAB; 3981 3975 if (!pA || !pB || !e){ 3982 ISSMERROR( exprintf("!pA || !pB || !e"));3976 ISSMERROR("!pA || !pB || !e"); 3983 3977 } 3984 3978 // be carefull the back ground edge e is on same geom edge … … 3986 3980 //check Is a background Mesh; 3987 3981 if (e<BTh.edges || e>=BTh.edges+BTh.nbe){ 3988 ISSMERROR( exprintf("e<BTh.edges || e>=BTh.edges+BTh.nbe"));3982 ISSMERROR("e<BTh.edges || e>=BTh.edges+BTh.nbe"); 3989 3983 } 3990 3984 // walk on BTh edge … … 4009 4003 } 4010 4004 else{ // do the search by walking 4011 ISSMERROR( exprintf("case not supported yet"));4005 ISSMERROR("case not supported yet"); 4012 4006 } 4013 4007 … … 4038 4032 kkk=kkk+1; 4039 4033 if (kkk>=100){ 4040 ISSMERROR( exprintf("kkk>=100"));4034 ISSMERROR("kkk>=100"); 4041 4035 } 4042 4036 if (!eee){ 4043 ISSMERROR( exprintf("!eee"));4037 ISSMERROR("!eee"); 4044 4038 } 4045 4039 double lg0 = lg; … … 4050 4044 double thetab = te0*(1-sss)+ sss*iii; 4051 4045 if (thetab<0 || thetab>1){ 4052 ISSMERROR( exprintf("thetab<0 || thetab>1"));4046 ISSMERROR("thetab<0 || thetab>1"); 4053 4047 } 4054 4048 BR = VertexOnEdge(&R,eee,thetab); … … 4063 4057 double lg0 = lg; 4064 4058 if (!eee){ 4065 ISSMERROR( exprintf("!eee"));4059 ISSMERROR("!eee"); 4066 4060 } 4067 4061 v1 = pvB; … … 4074 4068 double thetab = te0*(1-sss)+ sss*tB; 4075 4069 if (thetab<0 || thetab>1){ 4076 ISSMERROR( exprintf("thetab<0 || thetab>1"));4070 ISSMERROR("thetab<0 || thetab>1"); 4077 4071 } 4078 4072 BR = VertexOnEdge(&R,eee,thetab); … … 4083 4077 4084 4078 } 4085 ISSMERROR( exprintf("Big bug..."));4079 ISSMERROR("Big bug..."); 4086 4080 return 0; // just for the compiler 4087 4081 } … … 4124 4118 } 4125 4119 if (kk != nbe){ 4126 ISSMERROR( exprintf("There are %i double edges in the mesh",kk-nbe));4120 ISSMERROR("There are %i double edges in the mesh",kk-nbe); 4127 4121 } 4128 4122 … … 4156 4150 //An edge belongs to 2 triangles 4157 4151 else { 4158 ISSMERROR(exprintf("The edge (%i , %i) belongs to more than 2 triangles", 4159 Number(triangles[i][VerticesOfTriangularEdge[j][0]]),Number(triangles[i][VerticesOfTriangularEdge[j][1]]))); 4152 ISSMERROR("The edge (%i , %i) belongs to more than 2 triangles",Number(triangles[i][VerticesOfTriangularEdge[j][0]]),Number(triangles[i][VerticesOfTriangularEdge[j][1]])); 4160 4153 } 4161 4154 } … … 4195 4188 } 4196 4189 if(k) { 4197 ISSMERROR( exprintf("%i boundary edges (from the geometry) are not defined as mesh edges",k));4190 ISSMERROR("%i boundary edges (from the geometry) are not defined as mesh edges",k); 4198 4191 } 4199 4192 … … 4222 4215 for (i=2;det(ordre[0]->i,ordre[1]->i,ordre[i]->i)==0;) 4223 4216 if (++i>=nbvb) { 4224 ISSMERROR( exprintf("ReconstructExistingMesh: All the vertices are aligned"));4217 ISSMERROR("ReconstructExistingMesh: All the vertices are aligned"); 4225 4218 } 4226 4219 //Move this vertex (i) to the 2d position in ordre … … 4282 4275 } 4283 4276 if(nbloss) { 4284 ISSMERROR( exprintf("we lost %i existing edges other %i",nbloss,knbe));4277 ISSMERROR("we lost %i existing edges other %i",nbloss,knbe); 4285 4278 } 4286 4279 … … 4357 4350 subdomains = savesubdomains; 4358 4351 if (k) { 4359 ISSMERROR( exprintf("number of triangles edges alone = %i",k));4352 ISSMERROR("number of triangles edges alone = %i",k); 4360 4353 } 4361 4354 FindSubDomain(); … … 4387 4380 4388 4381 printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n"); 4389 ISSMERROR( exprintf("See above (might be cryptic...)"));4382 ISSMERROR("See above (might be cryptic...)"); 4390 4383 } 4391 4384 } … … 4410 4403 t=t0=subdomains[i].head; 4411 4404 if (!t0){ // not empty sub domain 4412 ISSMERROR( exprintf("!t0"));4405 ISSMERROR("!t0"); 4413 4406 } 4414 4407 do { 4415 4408 long kt = Number(t); 4416 4409 if (kt<0 || kt >= nbt ){ 4417 ISSMERROR( exprintf("kt<0 || kt >= nbt"));4410 ISSMERROR("kt<0 || kt >= nbt"); 4418 4411 } 4419 4412 if (renu[kt]!=-1){ 4420 ISSMERROR( exprintf("renu[kt]!=-1"));4413 ISSMERROR("renu[kt]!=-1"); 4421 4414 } 4422 4415 renu[kt]=k++; … … 4435 4428 } 4436 4429 if (k != nbt){ 4437 ISSMERROR( exprintf("k != nbt"));4430 ISSMERROR("k != nbt"); 4438 4431 } 4439 4432 // do the change on all the pointeur … … 4562 4555 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 4563 4556 if (coefIcoor<=0){ 4564 ISSMERROR( exprintf("coefIcoor should be positive, a problem in the geometry is likely"));4557 ISSMERROR("coefIcoor should be positive, a problem in the geometry is likely"); 4565 4558 } 4566 4559 … … 4583 4576 if(Nberr==1) 4584 4577 if (strfrom){ 4585 ISSMERROR( exprintf("Fatal error %s (SetInCoor) : area of Triangle %i < 0",strfrom,i));4578 ISSMERROR("Fatal error %s (SetInCoor) : area of Triangle %i < 0",strfrom,i); 4586 4579 } 4587 4580 else{ 4588 ISSMERROR( exprintf("Fatal error (SetInCoor) : area of Triangle %i < 0",i));4581 ISSMERROR("Fatal error (SetInCoor) : area of Triangle %i < 0",i); 4589 4582 } 4590 4583 } … … 4776 4769 register Triangle* t= vertices[i].t; 4777 4770 if (!t){ 4778 ISSMERROR( exprintf("!t"));4771 ISSMERROR("!t"); 4779 4772 } 4780 4773 MeshVertex & vi = vertices[i]; … … 4784 4777 ta=Previous(Adj(ta)); 4785 4778 if (vertices+i != ta.EdgeVertex(1)){ 4786 ISSMERROR( exprintf("vertices+i != ta.EdgeVertex(1)"));4779 ISSMERROR("vertices+i != ta.EdgeVertex(1)"); 4787 4780 } 4788 4781 MeshVertex & vj = *(ta.EdgeVertex(0)); … … 4790 4783 j= &vj-vertices; 4791 4784 if (j<0 || j >= nbv){ 4792 ISSMERROR( exprintf("j<0 || j >= nbv"));4785 ISSMERROR("j<0 || j >= nbv"); 4793 4786 } 4794 4787 R2 Aij = (R2) vj - (R2) vi; … … 4914 4907 // the first PB is to now a background edge between the 2 vertices 4915 4908 if (!edgesGtoB){ 4916 ISSMERROR( exprintf("!edgesGtoB"));4909 ISSMERROR("!edgesGtoB"); 4917 4910 } 4918 4911 ong= ProjectOnCurve(*edgesGtoB[Gh.Number(edges[i].onGeometry)], … … 4986 4979 Triangle & t = triangles[i]; 4987 4980 if (!t.link){ 4988 ISSMERROR( exprintf("!t.link"));4981 ISSMERROR("!t.link"); 4989 4982 } 4990 4983 for(int j=0;j<3;j++) … … 5013 5006 || (cc=Area2( t[0].r , t[1].r , A.r )) < 0.0)){ 5014 5007 printf("%i not in triangle %i In= %i %i %i %i %i\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd); 5015 ISSMERROR( exprintf("Number of triangles with P2 interpolation Problem"));5008 ISSMERROR("Number of triangles with P2 interpolation Problem"); 5016 5009 } 5017 5010 } … … 5021 5014 || (cc=Area2( tt[0].r , tt[1].r , A.r )) < 0)){ 5022 5015 printf("%i not in triangle %i In= %i %i %i %i %i\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd); 5023 ISSMERROR( exprintf("Number of triangles with P2 interpolation Problem"));5016 ISSMERROR("Number of triangles with P2 interpolation Problem"); 5024 5017 } 5025 5018 } … … 5069 5062 } // tt 5070 5063 else 5071 ISSMERROR( exprintf("Bug..."));5064 ISSMERROR("Bug..."); 5072 5065 } // ke<0 5073 5066 else … … 5082 5075 } 5083 5076 if (nbinvisible>=2){ 5084 ISSMERROR( exprintf("nbinvisible>=2"));5077 ISSMERROR("nbinvisible>=2"); 5085 5078 } 5086 5079 switch (nbsplitedge) { … … 5094 5087 } 5095 5088 if (ksplit[i]<40){ 5096 ISSMERROR( exprintf("ksplit[i]<40"));5089 ISSMERROR("ksplit[i]<40"); 5097 5090 } 5098 5091 } … … 5111 5104 int ke=(int) (ksplit[i]%10); 5112 5105 if (kk>=7 || kk<=0){ 5113 ISSMERROR( exprintf("kk>=7 || kk<=0"));5106 ISSMERROR("kk>=7 || kk<=0"); 5114 5107 } 5115 5108 … … 5128 5121 5129 5122 if (nbmkadj>=10){ 5130 ISSMERROR( exprintf("nbmkadj>=10"));5123 ISSMERROR("nbmkadj>=10"); 5131 5124 } 5132 5125 // -------------------------- … … 5146 5139 t1=t0; 5147 5140 if (kedge[3*i+i0]<0){ 5148 ISSMERROR( exprintf("kedge[3*i+i0]<0"));5141 ISSMERROR("kedge[3*i+i0]<0"); 5149 5142 } 5150 5143 MeshVertex * v3 = vertices + kedge[3*i+k0]; … … 5162 5155 t2=t1=t0; 5163 5156 if (kedge[3*i+k1]<0){ 5164 ISSMERROR( exprintf("kedge[3*i+k1]<0"));5157 ISSMERROR("kedge[3*i+k1]<0"); 5165 5158 } 5166 5159 if (kedge[3*i+k2]<0){ 5167 ISSMERROR( exprintf("kedge[3*i+k2]<0"));5160 ISSMERROR("kedge[3*i+k2]<0"); 5168 5161 } 5169 5162 … … 5189 5182 t3=t2=t1=t0; 5190 5183 if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){ 5191 ISSMERROR( exprintf("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0"));5184 ISSMERROR("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0"); 5192 5185 } 5193 5186 MeshVertex * v12 = vertices + kedge[3*i+k0]; … … 5263 5256 } 5264 5257 if (nbmkadj>13){// 13 = 6 + 4 + 5265 ISSMERROR( exprintf("nbmkadj>13"));5258 ISSMERROR("nbmkadj>13"); 5266 5259 } 5267 5260 … … 5389 5382 quadtree->Add(vi); 5390 5383 if (!tcvi || tcvi->det<0){// internal 5391 ISSMERROR( exprintf("!tcvi || tcvi->det < 0"));5384 ISSMERROR("!tcvi || tcvi->det < 0"); 5392 5385 } 5393 5386 AddVertex(vi,tcvi,dete); … … 5426 5419 5427 5420 //check that the subdomain is not empty 5428 if (!t0){ ISSMERROR( exprintf("At least one subdomain is empty"));}5421 if (!t0){ ISSMERROR("At least one subdomain is empty");} 5429 5422 5430 5423 //loop … … 5436 5429 5437 5430 //check that num is in [0 nbt[ 5438 if (num<0 || num>=nbt){ ISSMERROR( exprintf("num<0 || num>=nbt"));}5431 if (num<0 || num>=nbt){ ISSMERROR("num<0 || num>=nbt");} 5439 5432 5440 5433 //reft of this triangle is the subdomain number … … 5468 5461 int dir=0; 5469 5462 if (k<0){ 5470 ISSMERROR( exprintf("k<0"));5463 ISSMERROR("k<0"); 5471 5464 } 5472 5465 int kkk=0; … … 5476 5469 kkk++; 5477 5470 if (kkk>=1000){ 5478 ISSMERROR( exprintf("kkk>=1000"));5471 ISSMERROR("kkk>=1000"); 5479 5472 } 5480 5473 MeshVertex &vI = *edge.EdgeVertex(0); … … 5493 5486 double IJ2 = IJ_IA + IJ_AJ; 5494 5487 if (IJ2==0){ 5495 ISSMERROR( exprintf("IJ2==0"));5488 ISSMERROR("IJ2==0"); 5496 5489 } 5497 5490 a= IJ_AJ/IJ2; … … 5511 5504 // int dir=0; 5512 5505 if (t->link != 0){ 5513 ISSMERROR( exprintf("t->link != 0"));5506 ISSMERROR("t->link != 0"); 5514 5507 } 5515 5508 // to have a starting edges … … 5583 5576 } 5584 5577 if (cas ==-2){ 5585 ISSMERROR( exprintf("cas==-2"));5578 ISSMERROR("cas==-2"); 5586 5579 } 5587 5580 // l1 = ||C s1|| , l0 = ||C s0|| … … 5600 5593 kkk++; 5601 5594 if (edge.EdgeVertex(0)!=s && kkk>=10000){ 5602 ISSMERROR( exprintf("edge.EdgeVertex(0)!=s && kkk>=10000"));5595 ISSMERROR("edge.EdgeVertex(0)!=s && kkk>=10000"); 5603 5596 } 5604 5597 … … 5632 5625 5633 5626 if (!(Triangle *) er){ 5634 ISSMERROR( exprintf("!(Triangle *) er"));5627 ISSMERROR("!(Triangle *) er"); 5635 5628 } 5636 5629 I2 A((I2)*er.EdgeVertex(0)); … … 5656 5649 int NbSwap =0; 5657 5650 if (!a.t || !b.t){ // the 2 vertex is in a mesh 5658 ISSMERROR( exprintf("!a.t || !b.t"));5651 ISSMERROR("!a.t || !b.t"); 5659 5652 } 5660 5653 int k=0; … … 5673 5666 vbegin =v2; 5674 5667 if (!v2){ 5675 ISSMERROR( exprintf("!v2"));5668 ISSMERROR("!v2"); 5676 5669 } 5677 5670 det2 = det(*v2,a,b); … … 5690 5683 tc = Previous(tc); 5691 5684 if (!v1 || !v2){ 5692 ISSMERROR( exprintf("!v1 || !v2"));5685 ISSMERROR("!v1 || !v2"); 5693 5686 } 5694 5687 Icoor2 detss = 0,l=0,ks; 5695 5688 while ((ks=SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 5696 5689 if(l++ > 10000000) { 5697 ISSMERROR( exprintf("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l));5690 ISSMERROR("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l); 5698 5691 } 5699 5692 MeshVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); … … 5714 5707 k++; 5715 5708 if (k>=2000){ 5716 ISSMERROR( exprintf("k>=2000"));5709 ISSMERROR("k>=2000"); 5717 5710 } 5718 5711 if ( vbegin == v2 ) return -1;// error … … 5786 5779 short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles 5787 5780 if ( a1<0 || a1>=3 ){ 5788 ISSMERROR( exprintf("a1<0 || a1>=3"));5781 ISSMERROR("a1<0 || a1>=3"); 5789 5782 } 5790 5783 … … 5798 5791 Icoor2 detT = det1+det2; 5799 5792 if ((det1<=0 ) || (det2<=0)){ 5800 ISSMERROR( exprintf("(det1<=0 ) || (det2<=0)"));5793 ISSMERROR("(det1<=0 ) || (det2<=0)"); 5801 5794 } 5802 5795 if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb 5803 ISSMERROR( exprintf("(detsa>=0) || (detsb<=0)"));5796 ISSMERROR("(detsa>=0) || (detsb<=0)"); 5804 5797 } 5805 5798 Icoor2 ndet1 = bamg::det(s1,sa,s2); -
issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp
r3332 r3570 77 77 ccount++; 78 78 } 79 if (flags_b_local[i] && flags_c_local[i]) ISSMERROR( exprintf("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets"));79 if (flags_b_local[i] && flags_c_local[i]) ISSMERROR("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets"); 80 80 81 81 acount++; -
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp
r3332 r3570 20 20 for(i=0;i<numdofnodes;i++){ 21 21 if(isnan(p_g[i])){ 22 ISSMERROR( exprintf("NaN found in parameter p_g[%i]",i));22 ISSMERROR("NaN found in parameter p_g[%i]",i); 23 23 } 24 24 if(!isnan(cm_min)){ -
issm/trunk/src/c/DataSet/DataSet.cpp
r3567 r3570 291 291 } 292 292 else{ 293 ISSMERROR( exprintf("%s%i"," could not recognize enum type: ",enum_type));293 ISSMERROR("%s%i"," could not recognize enum type: ",enum_type); 294 294 } 295 295 … … 708 708 /*Carry out a binary search on the sorted_ids: */ 709 709 if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){ 710 ISSMERROR( exprintf("%s%i"," could not find object with id ",eid));710 ISSMERROR("%s%i"," could not find object with id ",eid); 711 711 } 712 712 … … 1501 1501 if ((node1 && !node2) || (!node1 && node2)){ 1502 1502 /*we are missing one node, not good!*/ 1503 ISSMERROR( exprintf("%s%p%s%p"," in Rgb, missing one node. node1: ",node1," node2: ",node2));1503 ISSMERROR("%s%p%s%p"," in Rgb, missing one node. node1: ",node1," node2: ",node2); 1504 1504 } 1505 1505 -
issm/trunk/src/c/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
r3332 r3570 34 34 /*Checks*/ 35 35 if (data_cols<=0){ 36 ISSMERROR( exprintf("data provided has a negative number of columns"));36 ISSMERROR("data provided has a negative number of columns"); 37 37 } 38 38 if (data_rows!=nods_data && data_rows!=nels_data){ 39 ISSMERROR( exprintf("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows));39 ISSMERROR("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows); 40 40 } 41 41 … … 101 101 for (j=0;j<data_cols;j++){ 102 102 if (it<0 || it>=nels_data){ 103 ISSMERROR( exprintf("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data));103 ISSMERROR("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data); 104 104 } 105 105 data_interp[i*data_cols+j]=data[data_cols*it+j]; -
issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp
r3538 r3570 46 46 if (strcmp(iomodel->control_type,"drag")==0) param->SetDouble(0); 47 47 else if (strcmp(iomodel->control_type,"B")==0) param->SetDouble(1); 48 else ISSMERROR( exprintf("control_type %s not supported yet!",iomodel->control_type));48 else ISSMERROR("control_type %s not supported yet!",iomodel->control_type); 49 49 parameters->AddObject(param); 50 50 -
issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp
r3567 r3570 110 110 else{ 111 111 112 ISSMERROR( exprintf("%s%i%s%i%s"," analysis_type: ",iomodel->analysis_type," sub_analysis_type: ",iomodel->sub_analysis_type," not supported yet!"));112 ISSMERROR("%s%i%s%i%s"," analysis_type: ",iomodel->analysis_type," sub_analysis_type: ",iomodel->sub_analysis_type," not supported yet!"); 113 113 114 114 } -
issm/trunk/src/c/ModelProcessorx/Partitioning.cpp
r3567 r3570 207 207 } 208 208 else{ 209 ISSMERROR( exprintf("not implemented yet"));209 ISSMERROR("not implemented yet"); 210 210 } 211 211 -
issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateElementsNodesAndMaterialsPrognostic2.cpp
r3567 r3570 68 68 } 69 69 else{ // if (strcmp(meshtype,"2d")==0) 70 ISSMERROR( exprintf("not implemented yet"));70 ISSMERROR("not implemented yet"); 71 71 } //if (strcmp(meshtype,"2d")==0) 72 72 -
issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateLoadsPrognostic2.cpp
r3567 r3570 20 20 21 21 /*Output*/ 22 DataSet* loads =NULL;22 DataSet* loads=NULL; 23 23 24 24 /*numericalflux intermediary data: */ … … 27 27 int numericalflux_node_ids[MAX_NUMERICALFLUX_NODES]; 28 28 int numericalflux_elem_id; 29 double numericalflux_h[MAX_NUMERICALFLUX_NODES]; 29 30 30 31 /*Create loads: */ … … 34 35 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,"edges"); 35 36 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements"); 37 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness"); 36 38 37 39 /*First load data:*/ … … 72 74 numericalflux_node_ids[2]=3*(int)e2+pos2; //ex: 1 2 3 73 75 numericalflux_node_ids[3]=3*(int)e2+((pos2+1)%3)+1; //ex: 3 1 2 76 77 numericalflux_h[0]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[0]-1] -1]; 78 numericalflux_h[1]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[1]-1]-1]; 79 numericalflux_h[2]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[2]-1]-1]; 80 numericalflux_h[3]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[3]-1]-1]; 74 81 } 75 82 else{ … … 87 94 numericalflux_node_ids[0]=3*(int)e1+pos1; 88 95 numericalflux_node_ids[1]=3*(int)e1+(pos1%3)+1; 96 97 numericalflux_h[0]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[0]-1]-1]; 98 numericalflux_h[1]=iomodel->thickness[(int)iomodel->elements[numericalflux_node_ids[1]-1]-1]; 99 numericalflux_h[2]=UNDEF; 100 numericalflux_h[3]=UNDEF; 89 101 } 90 102 91 loads->AddObject(new Numericalflux(numericalflux_id,numericalflux_type,numericalflux_node_ids,numericalflux_elem_id ));103 loads->AddObject(new Numericalflux(numericalflux_id,numericalflux_type,numericalflux_node_ids,numericalflux_elem_id,numericalflux_h)); 92 104 } 93 105 … … 95 107 xfree((void**)&iomodel->edges); 96 108 xfree((void**)&iomodel->elements); 109 xfree((void**)&iomodel->thickness); 97 110 98 111 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp
r3538 r3570 69 69 param= new Param(count,"t_g",DOUBLEVEC); 70 70 if(iomodel->temperature) param->SetDoubleVec(iomodel->temperature,iomodel->numberofvertices,1); 71 else ISSMERROR( exprintf("Missing initial temperature"));71 else ISSMERROR("Missing initial temperature"); 72 72 parameters->AddObject(param); 73 73 -
issm/trunk/src/c/NodeConnectivityx/NodeConnectivityx.cpp
r3332 r3570 71 71 * warn the user to increase the connectivity width: */ 72 72 for(i=0;i<nods;i++){ 73 if (*(connectivity+width*i+maxels)>maxels)ISSMERROR(exprintf("%s%g%s"," max connectivity width reached (", 74 *(connectivity+width*i+maxels),")! increase width of connectivity table")); 73 if (*(connectivity+width*i+maxels)>maxels)ISSMERROR("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table"); 75 74 } 76 75 -
issm/trunk/src/c/Qmux/DakotaResponses.cpp
r3567 r3570 328 328 else{ 329 329 if(my_rank==0)printf("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"); 330 ISSMERROR( exprintf("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"));330 ISSMERROR("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"); 331 331 } 332 332 } -
issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
r3567 r3570 154 154 155 155 } 156 else ISSMERROR( exprintf("%s%i%s%i%s"," analysis_type ",analysis_type," and sub_analysis_type ",sub_analysis_type," not supported yet!"));156 else ISSMERROR("%s%i%s%i%s"," analysis_type ",analysis_type," and sub_analysis_type ",sub_analysis_type," not supported yet!"); 157 157 158 158 -
issm/trunk/src/c/Solverx/Solverx.cpp
r3332 r3570 102 102 KSPGetIterationNumber(ksp,&iteration_number); 103 103 if (iteration_number<0){ 104 ISSMERROR( exprintf("%s%i"," Solver diverged at iteration number: ",-iteration_number));104 ISSMERROR("%s%i"," Solver diverged at iteration number: ",-iteration_number); 105 105 } 106 106 else{ -
issm/trunk/src/c/include/macros.h
r3499 r3570 20 20 /*Assertion macro*/ 21 21 #define ISSMASSERT(statement)\ 22 if (!(statement)) ISSMERROR( exprintf("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement))22 if (!(statement)) ISSMERROR("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement) 23 23 24 24 /*The following macros hide the error exception handling in a matlab module. Just put -
issm/trunk/src/c/io/FetchParams.cpp
r3332 r3570 63 63 64 64 if (M==0 | N==0){ 65 ISSMERROR( exprintf("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")"));65 ISSMERROR("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")"); 66 66 } 67 67 … … 147 147 148 148 } 149 else ISSMERROR( exprintf("%s%i","unknow type in parameters structure field ",i));149 else ISSMERROR("%s%i","unknow type in parameters structure field ",i); 150 150 } 151 151 -
issm/trunk/src/c/io/IoModelFetchData.cpp
r3332 r3570 124 124 MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 125 125 126 if(!found)ISSMERROR( exprintf("%s %s ","could not find data with name",data_name));126 if(!found)ISSMERROR("%s %s ","could not find data with name",data_name); 127 127 128 128 return fid; -
issm/trunk/src/c/io/ParameterInputsInit.cpp
r3332 r3570 82 82 break; 83 83 default: 84 ISSMERROR( exprintf("%s%i"," unknow parameter input type ",type));84 ISSMERROR("%s%i"," unknow parameter input type ",type); 85 85 } 86 86 -
issm/trunk/src/c/io/WriteParams.cpp
r3332 r3570 142 142 break; 143 143 default: 144 ISSMERROR( exprintf("%s%i","unknown parameter type: ",param->GetType()));144 ISSMERROR("%s%i","unknown parameter type: ",param->GetType()); 145 145 break; 146 146 } -
issm/trunk/src/c/io/pfclose.cpp
r3332 r3570 18 18 extern int my_rank; 19 19 if(my_rank==0){ 20 if(fclose(fid)!=0)ISSMERROR( exprintf("%s%s","could not close file ",filename));20 if(fclose(fid)!=0)ISSMERROR("%s%s","could not close file ",filename); 21 21 } 22 22 } -
issm/trunk/src/c/io/pfopen.cpp
r3332 r3570 21 21 if(my_rank==0){ 22 22 fid=fopen(filename,format); 23 if(fid==NULL) ISSMERROR( exprintf("%s%s%s","could not open file ",filename," for binary reading or writing"));23 if(fid==NULL) ISSMERROR("%s%s%s","could not open file ",filename," for binary reading or writing"); 24 24 } 25 25 -
issm/trunk/src/c/objects/BamgOpts.cpp
r3332 r3570 41 41 int i; 42 42 43 if (bamgopts->coef==0) ISSMERROR( exprintf("'coef' should be positive"));44 if (bamgopts->maxsubdiv<=1) ISSMERROR( exprintf("'maxsubdiv' should be >1"));45 if (bamgopts->Crack!=0 && bamgopts->Crack!=1) ISSMERROR( exprintf("'Crack' supported options are 0 and 1"));46 if (bamgopts->Hessiantype!=0 && bamgopts->Hessiantype!=1) ISSMERROR( exprintf("'Hessiantype' supported options are 0 and 1"));47 if (bamgopts->Metrictype!=0 && bamgopts->Metrictype!=1 && bamgopts->Metrictype!=2) ISSMERROR( exprintf("'Metrictype' supported options are 0, 1 and 2"));48 if (bamgopts->KeepVertices!=0 && bamgopts->KeepVertices!=1) ISSMERROR( exprintf("'KeepVertices' supported options are 0 and 1"));49 if (bamgopts->errg<0) ISSMERROR( exprintf("'errg' option should be >0"));50 if (bamgopts->nbjacobi<=0) ISSMERROR( exprintf("'nbjacobi' option should be >0"));51 if (bamgopts->geometricalmetric!=0 && bamgopts->geometricalmetric!=1) ISSMERROR( exprintf("'geometricalmetric' supported options are 0 and 1"));52 if (bamgopts->NbSmooth<=0) ISSMERROR( exprintf("'NbSmooth' option should be >0"));53 if (bamgopts->maxnbv<3) ISSMERROR( exprintf("'maxnbv' option should be >3"));54 if (bamgopts->hmin<=0) ISSMERROR( exprintf("'hmin' option should be >0"));55 if (bamgopts->hmax<=0 || bamgopts->hmax<bamgopts->hmin) ISSMERROR( exprintf("'hmax' option should be between 0 and hmin=%g",bamgopts->hmin));56 if (bamgopts->anisomax<1) ISSMERROR( exprintf("'anisomax' option should be >=1"));57 if (bamgopts->gradation<1) ISSMERROR( exprintf("'gradation' option should be >=1"));58 for (i=0;i<bamgopts->numfields;i++) {if (bamgopts->err[i]<=0) ISSMERROR( exprintf("'err' option should be >0"));};43 if (bamgopts->coef==0) ISSMERROR("'coef' should be positive"); 44 if (bamgopts->maxsubdiv<=1) ISSMERROR("'maxsubdiv' should be >1"); 45 if (bamgopts->Crack!=0 && bamgopts->Crack!=1) ISSMERROR("'Crack' supported options are 0 and 1"); 46 if (bamgopts->Hessiantype!=0 && bamgopts->Hessiantype!=1) ISSMERROR("'Hessiantype' supported options are 0 and 1"); 47 if (bamgopts->Metrictype!=0 && bamgopts->Metrictype!=1 && bamgopts->Metrictype!=2) ISSMERROR("'Metrictype' supported options are 0, 1 and 2"); 48 if (bamgopts->KeepVertices!=0 && bamgopts->KeepVertices!=1) ISSMERROR("'KeepVertices' supported options are 0 and 1"); 49 if (bamgopts->errg<0) ISSMERROR("'errg' option should be >0"); 50 if (bamgopts->nbjacobi<=0) ISSMERROR("'nbjacobi' option should be >0"); 51 if (bamgopts->geometricalmetric!=0 && bamgopts->geometricalmetric!=1) ISSMERROR("'geometricalmetric' supported options are 0 and 1"); 52 if (bamgopts->NbSmooth<=0) ISSMERROR("'NbSmooth' option should be >0"); 53 if (bamgopts->maxnbv<3) ISSMERROR("'maxnbv' option should be >3"); 54 if (bamgopts->hmin<=0) ISSMERROR("'hmin' option should be >0"); 55 if (bamgopts->hmax<=0 || bamgopts->hmax<bamgopts->hmin) ISSMERROR("'hmax' option should be between 0 and hmin=%g",bamgopts->hmin); 56 if (bamgopts->anisomax<1) ISSMERROR("'anisomax' option should be >=1"); 57 if (bamgopts->gradation<1) ISSMERROR("'gradation' option should be >=1"); 58 for (i=0;i<bamgopts->numfields;i++) {if (bamgopts->err[i]<=0) ISSMERROR("'err' option should be >0");}; 59 59 60 60 } -
issm/trunk/src/c/objects/Beam.cpp
r3567 r3570 384 384 } 385 385 else 386 ISSMERROR( exprintf("%s%i%s\n","sub_analysis_type: ",sub_analysis_type," not supported yet"));386 ISSMERROR("%s%i%s\n","sub_analysis_type: ",sub_analysis_type," not supported yet"); 387 387 } 388 388 else{ 389 ISSMERROR( exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));389 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 390 390 } 391 391 … … 435 435 } 436 436 else 437 ISSMERROR( exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));437 ISSMERROR("%s%i%s"," analysis ",analysis_type," not supported yet"); 438 438 } 439 439 else{ 440 ISSMERROR( exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));440 ISSMERROR("%s%i%s"," analysis ",analysis_type," not supported yet"); 441 441 } 442 442 -
issm/trunk/src/c/objects/DofVec.cpp
r3567 r3570 259 259 /*check we are not out of bounds: */ 260 260 if (dof>=numdofs){ 261 ISSMERROR( exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs));261 ISSMERROR("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs); 262 262 } 263 263 … … 284 284 /*check we are not out of bounds: */ 285 285 if (dof>=numdofs){ 286 ISSMERROR( exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs));286 ISSMERROR("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs); 287 287 } 288 288 … … 306 306 307 307 /*check we are not out of bounds: */ 308 if (requested_numdofs>=this->numdofs) ISSMERROR( exprintf("%s%i%s%i\n"," error message: requested dof list has size ",requested_numdofs," which is out of bounds for vector with number of dofs",this->numdofs));308 if (requested_numdofs>=this->numdofs) ISSMERROR("%s%i%s%i\n"," error message: requested dof list has size ",requested_numdofs," which is out of bounds for vector with number of dofs",this->numdofs); 309 309 310 310 for(i=0;i<requested_numdofs;i++){ 311 if (requested_doflist[i]>=this->numdofs)ISSMERROR( exprintf("%s%i%s%i\n"," error message: requested dof ",requested_doflist[i]," in list, is out of bounds for vector with number of dofs",this->numdofs));311 if (requested_doflist[i]>=this->numdofs)ISSMERROR("%s%i%s%i\n"," error message: requested dof ",requested_doflist[i]," in list, is out of bounds for vector with number of dofs",this->numdofs); 312 312 } 313 313 … … 335 335 336 336 /*check we are not out of bounds: */ 337 if (requested_numdofs>=this->numdofs) ISSMERROR( exprintf("%s%i%s%i\n"," error message: requested dof list has size ",requested_numdofs," which is out of bounds for vector with number of dofs",this->numdofs));337 if (requested_numdofs>=this->numdofs) ISSMERROR("%s%i%s%i\n"," error message: requested dof list has size ",requested_numdofs," which is out of bounds for vector with number of dofs",this->numdofs); 338 338 339 339 for(i=0;i<requested_numdofs;i++){ 340 if (requested_doflist[i]>=this->numdofs)ISSMERROR( exprintf("%s%i%s%i\n"," error message: requested dof ",requested_doflist[i]," in list, is out of bounds for vector with number of dofs",this->numdofs));340 if (requested_doflist[i]>=this->numdofs)ISSMERROR("%s%i%s%i\n"," error message: requested dof ",requested_doflist[i]," in list, is out of bounds for vector with number of dofs",this->numdofs); 341 341 } 342 342 … … 360 360 361 361 /*First thing, is the vector of the right size? :*/ 362 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR( exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));362 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries); 363 363 364 364 /*Create dofset: */ … … 385 385 386 386 /*First thing, is the vector of the right size? :*/ 387 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR( exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));387 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries); 388 388 389 389 /*Create dofset: */ … … 406 406 407 407 /*First thing, is the vector of the right size? :*/ 408 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR( exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));408 if (vector_size!=requested_numdofs*this->numentries)ISSMERROR("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries); 409 409 410 410 /*Create dofset: */ -
issm/trunk/src/c/objects/Hook.cpp
r3567 r3570 216 216 this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on. 217 217 /*check the id is correct!: */ 218 if (this->objects[i]->GetId()!=this->ids[i]) ISSMERROR( exprintf("%s%i%s%i%s"," wrong id: ",this->objects[i]->GetId()," vs ",this->ids[i]," in resolved pointer!"));218 if (this->objects[i]->GetId()!=this->ids[i]) ISSMERROR("%s%i%s%i%s"," wrong id: ",this->objects[i]->GetId()," vs ",this->ids[i]," in resolved pointer!"); 219 219 } 220 220 } … … 281 281 282 282 /*first, check that we only have one T object in our object list: */ 283 if (this->num!=1) ISSMERROR( exprintf("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects"));283 if (this->num!=1) ISSMERROR("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects"); 284 284 285 285 /*check NULL: */ -
issm/trunk/src/c/objects/Icefront.cpp
r3567 r3570 17 17 #include "../include/macros.h" 18 18 #include "./Icefront.h" 19 20 19 21 20 /*Object constructors and destructor*/ … … 130 129 } 131 130 else{ 132 ISSMERROR( exprintf(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)));131 ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)); 133 132 } 134 133 } … … 323 322 324 323 } 325 else ISSMERROR( exprintf("%s%i%s"," sub_analysis_type: ",sub_analysis_type," not supported yet"));324 else ISSMERROR("%s%i%s"," sub_analysis_type: ",sub_analysis_type," not supported yet"); 326 325 327 326 } 328 327 else{ 329 ISSMERROR( exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));328 ISSMERROR("%s%i%s"," analysis ",analysis_type," not supported yet"); 330 329 } 331 330 } … … 1479 1478 } 1480 1479 else{ 1481 ISSMERROR( exprintf("fill type %i not supported yet",fill));1480 ISSMERROR("fill type %i not supported yet",fill); 1482 1481 } 1483 1482 -
issm/trunk/src/c/objects/Input.cpp
r3567 r3570 253 253 254 254 if (!valuesin) ISSMERROR("valuesin has not been allocated properly (pointer is NULL)"); 255 if (type!=DOUBLEVEC) ISSMERROR( exprintf("%s%i%s"," cannot recover values from a ",type," input type"));255 if (type!=DOUBLEVEC) ISSMERROR("%s%i%s"," cannot recover values from a ",type," input type"); 256 256 257 257 /*Ok, we are trying to fill values. values is of size ndof*numnodes. The dofs -
issm/trunk/src/c/objects/Node.cpp
r3567 r3570 736 736 } 737 737 } 738 else ISSMERROR( exprintf("%s%s%s"," field ",field_name," not supported yet!"));738 else ISSMERROR("%s%s%s"," field ",field_name," not supported yet!"); 739 739 740 740 } //if (extrude) -
issm/trunk/src/c/objects/Numericalflux.cpp
r3567 r3570 26 26 /*}}}*/ 27 27 /*FUNCTION Numericalflux::Numericalflux(char numericalflux_type[NUMERICALFLUXSTRING],int numericalflux_fill...){{{1*/ 28 Numericalflux::Numericalflux(int numericalflux_id,char numericalflux_type[NUMERICALFLUXSTRING], int numericalflux_node_ids[MAX_NUMERICALFLUX_NODES],int numericalflux_element_id ){28 Numericalflux::Numericalflux(int numericalflux_id,char numericalflux_type[NUMERICALFLUXSTRING], int numericalflux_node_ids[MAX_NUMERICALFLUX_NODES],int numericalflux_element_id, double numericalflux_h[MAX_NUMERICALFLUX_NODES]){ 29 29 30 30 int i; … … 41 41 node_offsets[i]=UNDEF; 42 42 nodes[i]=NULL; 43 h[i]=numericalflux_h[i]; 43 44 } 44 45 … … 81 82 for(i=0;i<MAX_NUMERICALFLUX_NODES;i++)nodes[i]=NULL; 82 83 84 memcpy(&h,marshalled_dataset,sizeof(h));marshalled_dataset+=sizeof(h); 85 83 86 /*return: */ 84 87 *pmarshalled_dataset=marshalled_dataset; … … 110 113 memcpy(marshalled_dataset,&node_ids,sizeof(node_ids));marshalled_dataset+=sizeof(node_ids); 111 114 memcpy(marshalled_dataset,&node_offsets,sizeof(node_offsets));marshalled_dataset+=sizeof(node_offsets); 115 116 memcpy(marshalled_dataset,&h,sizeof(h));marshalled_dataset+=sizeof(h); 112 117 113 118 *pmarshalled_dataset=marshalled_dataset; … … 124 129 sizeof(node_ids)+ 125 130 sizeof(node_offsets)+ 131 sizeof(h)+ 126 132 sizeof(int); //sizeof(int) for enum type 127 133 } … … 443 449 double mean_vy; 444 450 double UdotN; 451 double thickness; 445 452 double dt; 446 453 int dofs[1]={0}; … … 489 496 490 497 //Get vx, vy and v.n 491 GetParameterValue(&vx, &vx_list[0],gauss_coord); 492 GetParameterValue(&vy, &vy_list[0],gauss_coord); 498 GetParameterValue(&vx, &vx_list[0],gauss_coord); 499 GetParameterValue(&vy, &vy_list[0],gauss_coord); 500 GetParameterValue(&thickness,&h[0], gauss_coord); 493 501 UdotN=vx*normal[0]+vy*normal[1]; 494 502 … … 497 505 498 506 /*Compute DL*/ 499 DL= - gauss_weight*Jdet*dt*UdotN ;507 DL= - gauss_weight*Jdet*dt*UdotN*thickness; 500 508 501 509 /* Add value into pe_g: */ … … 530 538 if(nodes[i])nodes[i]->Echo(); 531 539 } 540 printf(" h=[%i,%i,%i,%i]\n",h[0],h[1],h[2],h[3]); 532 541 } 533 542 else{ 534 printf(" node_ids=[%i,%i ,%i,%i]\n",node_ids[0],node_ids[1],node_ids[2],node_ids[3]);535 printf(" node_offsets=[%i,%i ,%i,%i]\n",node_offsets[0],node_offsets[1],node_offsets[2],node_offsets[3]);543 printf(" node_ids=[%i,%i]\n",node_ids[0],node_ids[1]); 544 printf(" node_offsets=[%i,%i]\n",node_offsets[0],node_offsets[1]); 536 545 for(i=0;i<2;i++){ 537 546 if(nodes[i])nodes[i]->Echo(); 538 547 } 548 printf(" h=[%i,%i]\n",h[0],h[1]); 539 549 } 540 550 return; … … 559 569 printf(" node_ids=[%i,%i,%i,%i]\n",node_ids[0],node_ids[1],node_ids[2],node_ids[3]); 560 570 printf(" node_offsets=[%i,%i,%i,%i]\n",node_offsets[0],node_offsets[1],node_offsets[2],node_offsets[3]); 571 printf(" h=[%g,%g,%g,%g]\n",h[0],h[1],h[2],h[3]); 561 572 } 562 573 else{ 563 574 printf(" node_ids=[%i,%i]\n",node_ids[0],node_ids[1]); 564 575 printf(" node_offsets=[%i,%i]\n",node_offsets[0],node_offsets[1]); 576 printf(" h=[%g,%g]\n",h[0],h[1]); 565 577 } 566 578 … … 615 627 } 616 628 } 617 else ISSMERROR( exprintf("type %s not supported yet",type));629 else ISSMERROR("type %s not supported yet",type); 618 630 619 631 /*Assign output pointers:*/ … … 741 753 void Numericalflux::UpdateFromInputs(void* vinputs){ 742 754 743 /*Do nothing ...*/744 } 745 /*}}}*/ 755 /*Do nothing FOR NOW...*/ 756 } 757 /*}}}*/ -
issm/trunk/src/c/objects/Numericalflux.h
r3565 r3570 33 33 int node_offsets[MAX_NUMERICALFLUX_NODES]; 34 34 35 /*properties: */ 36 double h[MAX_NUMERICALFLUX_NODES]; //thickness 37 35 38 public: 36 39 37 40 Numericalflux(); 38 Numericalflux(int numericalflux_id,char numericalflux_type[NUMERICALFLUXSTRING], int numericalflux_node_ids[MAX_NUMERICALFLUX_NODES],int numericalflux_element_id );41 Numericalflux(int numericalflux_id,char numericalflux_type[NUMERICALFLUXSTRING], int numericalflux_node_ids[MAX_NUMERICALFLUX_NODES],int numericalflux_element_id,double numericalflux_h[MAX_NUMERICALFLUX_NODES]); 39 42 Object* copy(); 40 43 ~Numericalflux(); -
issm/trunk/src/c/objects/Param.cpp
r3567 r3570 28 28 (param_type!=DOUBLEVEC) & (param_type!=DOUBLEMAT) & (param_type!=PETSCVEC) & (param_type!=PETSCMAT) 29 29 ){ 30 ISSMERROR( exprintf("%s%i"," unknow parameter type ",param_type));30 ISSMERROR("%s%i"," unknow parameter type ",param_type); 31 31 } 32 32 stringarray=NULL; … … 92 92 93 93 default: 94 ISSMERROR( exprintf("%s%i","unknow parameter type ",type));94 ISSMERROR("%s%i","unknow parameter type ",type); 95 95 } 96 96 } … … 210 210 211 211 default: 212 ISSMERROR( exprintf("%s%i","unknown parameter type",type));212 ISSMERROR("%s%i","unknown parameter type",type); 213 213 } 214 214 … … 311 311 312 312 default: 313 ISSMERROR( exprintf("%s%i","unknown parameter type",type));313 ISSMERROR("%s%i","unknown parameter type",type); 314 314 break; 315 315 } … … 366 366 367 367 default: 368 ISSMERROR( exprintf("%s%i","unknown parameter type",type));368 ISSMERROR("%s%i","unknown parameter type",type); 369 369 } 370 370 … … 430 430 431 431 default: 432 ISSMERROR( exprintf("%s%i","unknow parameter type ",type));432 ISSMERROR("%s%i","unknow parameter type ",type); 433 433 } 434 434 } … … 490 490 491 491 default: 492 ISSMERROR( exprintf("%s%i","unknow parameter type ",type));492 ISSMERROR("%s%i","unknow parameter type ",type); 493 493 } 494 494 } … … 518 518 Mat outmat=NULL; 519 519 520 if(type!=PETSCMAT) ISSMERROR( exprintf("%s%i"," error message: trying to recover a Petsc mat from a param with type",type));520 if(type!=PETSCMAT) ISSMERROR("%s%i"," error message: trying to recover a Petsc mat from a param with type",type); 521 521 522 522 if(mat){ … … 539 539 void Param::GetParameterValue(double* pdouble){ 540 540 541 if(type!=DOUBLE)ISSMERROR( exprintf("%s%i"," error message: trying to recover a double from a param with type",type));541 if(type!=DOUBLE)ISSMERROR("%s%i"," error message: trying to recover a double from a param with type",type); 542 542 *pdouble=ddouble; 543 543 } … … 546 546 void Param::GetParameterValue(int* pinteger){ 547 547 548 if(type!=DOUBLE)ISSMERROR( exprintf("%s%i"," error message: trying to recover an integer from a param with type",type));548 if(type!=DOUBLE)ISSMERROR("%s%i"," error message: trying to recover an integer from a param with type",type); 549 549 *pinteger=(int)ddouble; 550 550 } … … 555 555 char* outstring=NULL; 556 556 557 if(type!=STRING)ISSMERROR( exprintf("%s%i"," error message: trying to recover a string from a param with type",type));557 if(type!=STRING)ISSMERROR("%s%i"," error message: trying to recover a string from a param with type",type); 558 558 outstring=(char*)xmalloc((strlen(string)+1)*sizeof(char)); 559 559 strcpy(outstring,string); … … 566 566 567 567 int i; 568 if(type!=STRINGARRAY)ISSMERROR( exprintf("%s%i"," error message: trying to recover a string array from a param with type",type));568 if(type!=STRINGARRAY)ISSMERROR("%s%i"," error message: trying to recover a string array from a param with type",type); 569 569 570 570 char** outstringarray=NULL; … … 585 585 double* outdoublearray=NULL; 586 586 587 if((type!=DOUBLEVEC) & (type!=DOUBLEMAT)) ISSMERROR( exprintf("%s%i"," error message: trying to recover a double array from a param with type",type));587 if((type!=DOUBLEVEC) & (type!=DOUBLEMAT)) ISSMERROR("%s%i"," error message: trying to recover a double array from a param with type",type); 588 588 589 589 if(type==DOUBLEVEC){ … … 611 611 Vec outvec=NULL; 612 612 613 if(type!=PETSCVEC) ISSMERROR( exprintf("%s%i"," error message: trying to recover a Petsc vec from a param with type",type));613 if(type!=PETSCVEC) ISSMERROR("%s%i"," error message: trying to recover a Petsc vec from a param with type",type); 614 614 615 615 if(vec){ … … 636 636 /*FUNCTION Param::SetDouble(double value) {{{1*/ 637 637 void Param::SetDouble(double value){ 638 if (type!=DOUBLE) ISSMERROR( exprintf("%s%i"," trying to set double for type",type));638 if (type!=DOUBLE) ISSMERROR("%s%i"," trying to set double for type",type); 639 639 ddouble=value; 640 640 } … … 642 642 /*FUNCTION Param::SetDouble(int value) {{{1*/ 643 643 void Param::SetDouble(int value){ 644 if (type!=DOUBLE) ISSMERROR( exprintf("%s%i"," trying to set double for type",type));644 if (type!=DOUBLE) ISSMERROR("%s%i"," trying to set double for type",type); 645 645 ddouble=(double)value; 646 646 } … … 649 649 void Param::SetDoubleMat(double* value,int pM,int pN){ 650 650 651 if (type!=DOUBLEMAT) ISSMERROR( exprintf("%s%i"," trying to set doublematrix type",type));651 if (type!=DOUBLEMAT) ISSMERROR("%s%i"," trying to set doublematrix type",type); 652 652 653 653 this->M=pM; … … 661 661 /*FUNCTION Param::SetDoubleVec(double* value,int size) {{{1*/ 662 662 void Param::SetDoubleVec(double* value,int size){ 663 if (type!=DOUBLEVEC) ISSMERROR( exprintf("%s%i"," trying to set doublevecfor type",type));663 if (type!=DOUBLEVEC) ISSMERROR("%s%i"," trying to set doublevecfor type",type); 664 664 665 665 M=size; … … 677 677 /*FUNCTION Param::SetDoubleVec(double* value,int size, int numberofdofs) {{{1*/ 678 678 void Param::SetDoubleVec(double* value,int size, int numberofdofs){ 679 if (type!=DOUBLEVEC) ISSMERROR( exprintf("%s%i"," trying to set doublevecfor type",type));679 if (type!=DOUBLEVEC) ISSMERROR("%s%i"," trying to set doublevecfor type",type); 680 680 681 681 M=size; … … 689 689 /*FUNCTION Param::SetString {{{1*/ 690 690 void Param::SetString(char* value){ 691 if (type!=STRING) ISSMERROR( exprintf("%s%i"," trying to set string for type",type));691 if (type!=STRING) ISSMERROR("%s%i"," trying to set string for type",type); 692 692 strcpy(string,value); 693 693 } … … 697 697 698 698 int i; 699 if (type!=STRINGARRAY) ISSMERROR( exprintf("%s%i"," trying to set string for type",type));699 if (type!=STRINGARRAY) ISSMERROR("%s%i"," trying to set string for type",type); 700 700 M=size; 701 701 stringarray=(char**)xmalloc(M*sizeof(char*)); -
issm/trunk/src/c/objects/ParameterInputs.cpp
r3389 r3570 354 354 /*Now, pick up the parameter corresponding to root: */ 355 355 found=parameters->FindParam(¶meter,NULL,NULL,root); 356 if(!found)ISSMERROR( exprintf("%s%s%s"," could not find parameter ",root," for Dakota input update"));356 if(!found)ISSMERROR("%s%s%s"," could not find parameter ",root," for Dakota input update"); 357 357 358 358 /*We've got the parameter, we need to update it using qmu_part (a partitioning vector), and the distributed_values: */ -
issm/trunk/src/c/objects/Pengrid.cpp
r3567 r3570 273 273 } 274 274 else{ 275 ISSMERROR( exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));275 ISSMERROR("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"); 276 276 } 277 277 … … 377 377 } 378 378 else{ 379 ISSMERROR( exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));379 ISSMERROR("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"); 380 380 } 381 381 … … 517 517 } 518 518 else{ 519 ISSMERROR( exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));519 ISSMERROR("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"); 520 520 } 521 521 -
issm/trunk/src/c/objects/Penta.cpp
r3567 r3570 575 575 576 576 } 577 else ISSMERROR( exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));577 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 578 578 } 579 579 else if (analysis_type==SlopecomputeAnalysisEnum){ … … 602 602 } 603 603 else{ 604 ISSMERROR( exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));604 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 605 605 } 606 606 … … 1701 1701 CreatePVectorDiagnosticStokes( pg,inputs,analysis_type,sub_analysis_type); 1702 1702 } 1703 else ISSMERROR( exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));1703 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 1704 1704 } 1705 1705 else if (analysis_type==SlopecomputeAnalysisEnum){ … … 1728 1728 } 1729 1729 else{ 1730 ISSMERROR( exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));1730 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 1731 1731 } 1732 1732 … … 2764 2764 2765 2765 } 2766 else ISSMERROR( exprintf("%s%s%s"," field ",field_name," not supported yet!"));2766 else ISSMERROR("%s%s%s"," field ",field_name," not supported yet!"); 2767 2767 2768 2768 } //if (extrude) … … 3338 3338 3339 3339 if(*Jdet<0){ 3340 ISSMERROR( exprintf("%s%i","negative jacobian determinant on element ",id));3340 ISSMERROR("%s%i","negative jacobian determinant on element ",id); 3341 3341 } 3342 3342 } … … 4042 4042 GradjB( grad_g, inputs,analysis_type,sub_analysis_type); 4043 4043 } 4044 else ISSMERROR( exprintf("%s%s","control type not supported yet: ",control_type));4044 else ISSMERROR("%s%s","control type not supported yet: ",control_type); 4045 4045 } 4046 4046 /*}}}*/ … … 4075 4075 return; 4076 4076 } 4077 else ISSMERROR( exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));4077 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 4078 4078 } 4079 4079 /*}}}*/ -
issm/trunk/src/c/objects/Riftfront.cpp
r3567 r3570 747 747 else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice) 748 748 749 if(!shelf) ISSMERROR( exprintf("%s%i%s","fill type ",fill," not supported on ice sheets yet."));749 if(!shelf) ISSMERROR("%s%i%s","fill type ",fill," not supported on ice sheets yet."); 750 750 751 751 pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2; … … 757 757 } 758 758 else{ 759 ISSMERROR( exprintf("%s%i%s","fill type ",fill," not supported yet."));759 ISSMERROR("%s%i%s","fill type ",fill," not supported yet."); 760 760 } 761 761 -
issm/trunk/src/c/objects/Sing.cpp
r3567 r3570 354 354 } 355 355 else{ 356 ISSMERROR( exprintf("%s%i%s%i%s\n","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));356 ISSMERROR("%s%i%s%i%s\n","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"); 357 357 } 358 358 … … 391 391 } 392 392 else{ 393 ISSMERROR( exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));393 ISSMERROR("%s%i%s"," analysis ",analysis_type," not supported yet"); 394 394 } 395 395 -
issm/trunk/src/c/objects/Tria.cpp
r3567 r3570 550 550 } 551 551 else{ 552 ISSMERROR( exprintf("%s%s","unsupported control type: ",numpar->control_type));552 ISSMERROR("%s%s","unsupported control type: ",numpar->control_type); 553 553 } 554 554 … … 579 579 CreateKMatrixDiagnosticHoriz( Kgg,inputs,analysis_type,sub_analysis_type); 580 580 } 581 else ISSMERROR( exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));581 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 582 582 583 583 } … … 604 604 else{ 605 605 606 ISSMERROR( exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));606 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 607 607 } 608 608 … … 2187 2187 CreatePVectorDiagnosticHoriz( pg,inputs,analysis_type,sub_analysis_type); 2188 2188 } 2189 else ISSMERROR( exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));2189 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 2190 2190 } 2191 2191 else if (analysis_type==SlopecomputeAnalysisEnum){ … … 2210 2210 } 2211 2211 else{ 2212 ISSMERROR( exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));2212 ISSMERROR("%s%i%s"," analysis ",analysis_type," not supported yet"); 2213 2213 } 2214 2214 … … 3544 3544 else{ 3545 3545 /*Not supported yet! : */ 3546 ISSMERROR( exprintf("%s%g","unsupported type of fit: ",fit));3546 ISSMERROR("%s%g","unsupported type of fit: ",fit); 3547 3547 } 3548 3548 … … 3675 3675 return 1-((x-x3)*(y2-y3)-(x2-x3)*(y-y3))/area -((x1-x3)*(y-y3)-(x-x3)*(y1-y3))/area; 3676 3676 } 3677 else ISSMERROR( exprintf("%s%i%s\n"," error message: area coordinate ",which_one," done not exist!"));3677 else ISSMERROR("%s%i%s\n"," error message: area coordinate ",which_one," done not exist!"); 3678 3678 } 3679 3679 /*}}}*/ … … 4217 4217 GradjB( grad_g,inputs,analysis_type,sub_analysis_type); 4218 4218 } 4219 else ISSMERROR( exprintf("%s%s","control type not supported yet: ",control_type));4219 else ISSMERROR("%s%s","control type not supported yet: ",control_type); 4220 4220 } 4221 4221 /*}}}*/ … … 4916 4916 4917 4917 /*First off, check that this segment belongs to this element: */ 4918 if ((int)*(segment+4)!=this->id)ISSMERROR( exprintf("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id));4918 if ((int)*(segment+4)!=this->id)ISSMERROR("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id); 4919 4919 4920 4920 /*Recover segment node locations: */ … … 5132 5132 else{ 5133 5133 /*Not supported yet! : */ 5134 ISSMERROR( exprintf("%s%g","unsupported type of fit: ",fit));5134 ISSMERROR("%s%g","unsupported type of fit: ",fit); 5135 5135 } 5136 5136 -
issm/trunk/src/c/parallel/WriteLockFile.cpp
r3332 r3570 17 17 if(my_rank==0){ 18 18 fid=fopen(filename,"w"); 19 if(fid==NULL) ISSMERROR( exprintf("%s%s","error message: could not open lock file ",filename));19 if(fid==NULL) ISSMERROR("%s%s","error message: could not open lock file ",filename); 20 20 21 21 /*Close file: */ 22 if(fclose(fid)!=0) ISSMERROR( exprintf("%s%s","could not close lock file ",filename));22 if(fclose(fid)!=0) ISSMERROR("%s%s","could not close lock file ",filename); 23 23 } 24 24 -
issm/trunk/src/c/parallel/transient_core.cpp
r3332 r3570 26 26 transient_core_3d(results,model,inputs); 27 27 } 28 else ISSMERROR( exprintf("%s%i%s"," dimension ",dim," not supported yet!"));28 else ISSMERROR("%s%i%s"," dimension ",dim," not supported yet!"); 29 29 30 30 } -
issm/trunk/src/c/shared/Dofs/DistributeNumDofs.cpp
r3567 r3570 62 62 numdofs=1; 63 63 } 64 else ISSMERROR( exprintf("%s%i%s"," analysis type: ",analysis_type," not implemented yet!"));64 else ISSMERROR("%s%i%s"," analysis type: ",analysis_type," not implemented yet!"); 65 65 66 66 /*Assign output pointers:*/ -
issm/trunk/src/c/shared/Elements/ResolvePointers.cpp
r3332 r3570 50 50 objects[i]=(Object*)dataset->GetObjectById(object_offsets+i,object_ids[i]); //remember the offset for later on. 51 51 /*check the id is correct!: */ 52 if (objects[i]->GetId()!=object_ids[i])ISSMERROR( exprintf("%s%i%s%i%s"," wrong id: ",objects[i]->GetId()," vs ",object_ids[i]," in resolved pointer!"));52 if (objects[i]->GetId()!=object_ids[i])ISSMERROR("%s%i%s%i%s"," wrong id: ",objects[i]->GetId()," vs ",object_ids[i]," in resolved pointer!"); 53 53 } 54 54 } -
issm/trunk/src/c/shared/Exceptions/exprintf.cpp
r3332 r3570 3 3 * Instead of returning an int, it will return the char* itself. 4 4 * The advantage is to be able to do things like: 5 * ISSMERROR(exprintf("%s%i\n","test failed for id:",id));5 * ErrorException(exprintf("%s%i\n","test failed for id:",id)); 6 6 */ 7 7 -
issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp
r3332 r3570 37 37 /*open domain outline file for reading: */ 38 38 if ((fid=fopen(domainname,"r"))==NULL){ 39 ISSMERROR( exprintf("%s%s","could not find domain file ",domainname));39 ISSMERROR("%s%s","could not find domain file ",domainname); 40 40 noerr=0; goto cleanupandreturn; 41 41 } -
issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp
r3332 r3570 270 270 271 271 if (!b && nvec) { 272 ISSMERROR( exprintf("No right-hand side for nvec=%d.",nvec));272 ISSMERROR("No right-hand side for nvec=%d.",nvec); 273 273 noerr=0; 274 274 return noerr; … … 304 304 xfree((void **)&pivrc); 305 305 xfree((void **)&pindx); 306 ISSMERROR( exprintf("Pivot %f less than machine epsilon",pivot));306 ISSMERROR("Pivot %f less than machine epsilon",pivot); 307 307 noerr=0; 308 308 return noerr; -
issm/trunk/src/c/shared/Numerics/GaussPoints.cpp
r3466 r3570 393 393 if (iter >= MAX_GAUS_ITER) { 394 394 xfree((void **)&work); 395 ISSMERROR( exprintf("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER));395 ISSMERROR("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER); 396 396 } 397 397 } -
issm/trunk/src/c/toolkits/petsc/patches/NewMat.cpp
r3332 r3570 58 58 /*Same as above, except we bypass the default sparsity: */ 59 59 if(pconnectivity || pnumberofdofspernode) 60 ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 61 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 60 ISSMERROR("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode); 62 61 63 62 sparsity=*psparsity; … … 75 74 *present per row: */ 76 75 77 if(psparsity) ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 78 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 76 if(psparsity) ISSMERROR("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode); 79 77 80 78 connectivity=*pconnectivity; … … 89 87 } 90 88 else{ 91 ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 92 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 89 ISSMERROR("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode); 93 90 } 94 95 91 96 92 return outmatrix; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r3332 r3570 76 76 if(first[0]!='-'){ 77 77 /*This is not good, the option does not have '-'! Get out*/ 78 ISSMERROR( exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));78 ISSMERROR("%s%s%s","Option ",first," should be preceded by '-'!"); 79 79 } 80 80 break; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r3332 r3570 55 55 if(first[0]!='-'){ 56 56 /*This is not good, the option does not have '-'! Get out*/ 57 ISSMERROR( exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));57 ISSMERROR("%s%s%s","Option ",first," should be preceded by '-'!"); 58 58 } 59 59 /*Reduce first to bare option value*/ -
issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp
r3332 r3570 63 63 /*Now, modify idxm using the partition vector, and plug values into A*/ 64 64 for (i=0;i<range;i++){ 65 *(idxm+i)= *(row_partition_vector+lower_row+i)-1; //-1 because partition vector comes from Matlab, where indices start at 1.65 *(idxm+i)=(int)*(row_partition_vector+lower_row+i)-1; //-1 because partition vector comes from Matlab, where indices start at 1. 66 66 } 67 67 VecSetValues(A,range,idxm,values,INSERT_VALUES);
Note:
See TracChangeset
for help on using the changeset viewer.