Changeset 3332
- Timestamp:
- 03/24/10 16:53:27 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 225 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/AverageFilterx/AverageFilterx.cpp
r3109 r3332 4 4 * for more details. 5 5 */ 6 7 #undef __FUNCT__8 #define __FUNCT__ "AverageFilterx"9 6 10 7 #include <stdio.h> -
issm/trunk/src/c/Bamgx/Bamgx.cpp
r3329 r3332 2 2 * \brief: use Bamg capabilities. 3 3 */ 4 #undef __FUNCT__5 #define __FUNCT__ "Bamgx"6 7 4 #include "./Bamgx.h" 8 5 #include "../shared/shared.h" -
issm/trunk/src/c/Bamgx/objects/CrackedEdge.cpp
r3329 r3332 5 5 6 6 #include "CrackedEdge.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "CrackedEdge"10 7 11 8 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Curve.cpp
r3263 r3332 6 6 #include "Curve.h" 7 7 #include "Geometry.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "Curve"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Direction.cpp
r3263 r3332 5 5 6 6 #include "Direction.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "Direction"10 7 11 8 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Edge.cpp
r3263 r3332 7 7 #include "Triangles.h" 8 8 #include "Geometry.h" 9 10 #undef __FUNCT__11 #define __FUNCT__ "Edge"12 9 13 10 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Edge.h
r3280 r3332 39 39 int Intersection(const Edge & e) const { 40 40 if (!(adj[0]==&e || adj[1]==&e)){ 41 throw ErrorException(__FUNCT__,exprintf("Intersection bug"));41 ISSMERROR(exprintf("Intersection bug")); 42 42 } 43 43 if (adj[0]!=&e && adj[1]!=&e){ 44 throw ErrorException(__FUNCT__,exprintf("adj[0]!=&e && adj[1]!=&e"));44 ISSMERROR(exprintf("adj[0]!=&e && adj[1]!=&e")); 45 45 } 46 46 return adj[0]==&e ? 0 : 1; -
issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp
r3303 r3332 6 6 #include "GeometricalEdge.h" 7 7 #include "Geometry.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "GeometricalEdge"11 8 12 9 using namespace std; … … 97 94 double ca,cb,cta,ctb; 98 95 if ( theta<-1e-12){ 99 throw ErrorException(__FUNCT__,exprintf("theta<-1e-12"));96 ISSMERROR(exprintf("theta<-1e-12")); 100 97 } 101 98 if ( theta>1+1e-12){ 102 throw ErrorException(__FUNCT__,exprintf("theta>1+1e-12"));99 ISSMERROR(exprintf("theta>1+1e-12")); 103 100 } 104 101 if (TgA()) -
issm/trunk/src/c/Bamgx/objects/GeometricalSubDomain.cpp
r3263 r3332 6 6 #include "GeometricalSubDomain.h" 7 7 #include "Geometry.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "GeometricalSubDomain"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/GeometricalVertex.cpp
r3263 r3332 6 6 7 7 #include "GeometricalVertex.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "GeometricalVertex"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Geometry.cpp
r3329 r3332 34 34 subdomains[i].Set(Gh.subdomains[i],Gh,*this); 35 35 if (nbt); { 36 throw ErrorException(__FUNCT__,exprintf("nbt"));36 ISSMERROR(exprintf("nbt")); 37 37 } 38 38 } … … 45 45 46 46 if (NbRef>0){ 47 throw ErrorException(__FUNCT__,exprintf("NbRef>0"));47 ISSMERROR(exprintf("NbRef>0")); 48 48 } 49 49 if(vertices) delete [] vertices;vertices=0; … … 84 84 } 85 85 if (bamggeom->Edges==NULL){ 86 throw ErrorException(__FUNCT__,exprintf("the domain provided does not contain any edge"));86 ISSMERROR(exprintf("the domain provided does not contain any edge")); 87 87 } 88 88 … … 90 90 if (bamggeom->Vertices){ 91 91 if(verbose>5) printf(" processing Vertices\n"); 92 if (bamggeom->VerticesSize[1]!=3) throw ErrorException(__FUNCT__,exprintf("Vertices should have 3 columns"));92 if (bamggeom->VerticesSize[1]!=3) ISSMERROR(exprintf("Vertices should have 3 columns")); 93 93 vertices = new GeometricalVertex[nbvx]; 94 94 for (i=0;i<nbv;i++) { … … 117 117 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 118 118 if(coefIcoor <=0){ 119 throw ErrorException(__FUNCT__,exprintf("coefIcoor should be positive"));119 ISSMERROR(exprintf("coefIcoor should be positive")); 120 120 } 121 121 } 122 122 else{ 123 throw ErrorException(__FUNCT__,exprintf("No Vertex provided"));123 ISSMERROR(exprintf("No Vertex provided")); 124 124 } 125 125 … … 130 130 131 131 if(verbose>5) printf(" processing Edges\n"); 132 if (bamggeom->EdgesSize[1]!=3) throw ErrorException(__FUNCT__,exprintf("Edges should have 3 columns"));132 if (bamggeom->EdgesSize[1]!=3) ISSMERROR(exprintf("Edges should have 3 columns")); 133 133 edges = new GeometricalEdge[nbe]; 134 134 … … 181 181 } 182 182 else{ 183 throw ErrorException(__FUNCT__,exprintf("No edges provided"));183 ISSMERROR(exprintf("No edges provided")); 184 184 } 185 185 … … 224 224 if (bamggeom->TangentAtEdges){ 225 225 if(verbose>5) printf(" processing TangentAtEdges"); 226 if (bamggeom->TangentAtEdgesSize[1]!=4) throw ErrorException(__FUNCT__,exprintf("TangentAtEdges should have 4 columns"));226 if (bamggeom->TangentAtEdgesSize[1]!=4) ISSMERROR(exprintf("TangentAtEdges should have 4 columns")); 227 227 int n,i,j,k; 228 228 R2 tg; … … 235 235 tg.y=bamggeom->TangentAtEdges[k*4+3]; 236 236 if (j!=0 && j!=1){ 237 throw ErrorException(__FUNCT__,exprintf("TangentAtEdges second index should be 1 or 2 only"));237 ISSMERROR(exprintf("TangentAtEdges second index should be 1 or 2 only")); 238 238 } 239 239 edges[i].tg[j] = tg; … … 244 244 if(bamggeom->Corners){ 245 245 if(verbose>5) printf(" processing Corners"); 246 if (bamggeom->CornersSize[1]!=1) throw ErrorException(__FUNCT__,exprintf("Corners should have 1 column"));246 if (bamggeom->CornersSize[1]!=1) ISSMERROR(exprintf("Corners should have 1 column")); 247 247 n=bamggeom->CornersSize[0]; 248 248 for (i=0;i<n;i++) { 249 249 j=(int)bamggeom->Corners[i]-1; //for C indexing 250 250 if (j>nbv-1 || j<0){ 251 throw ErrorException(__FUNCT__,exprintf("Bad corner definition: should in [0 %i]",nbv));251 ISSMERROR(exprintf("Bad corner definition: should in [0 %i]",nbv)); 252 252 } 253 253 vertices[j].SetCorner(); … … 258 258 if(bamggeom->RequiredVertices){ 259 259 if(verbose>5) printf(" processing RequiredVertices\n"); 260 if (bamggeom->RequiredVerticesSize[1]!=1) throw ErrorException(__FUNCT__,exprintf("RequiredVertices should have 1 column"));260 if (bamggeom->RequiredVerticesSize[1]!=1) ISSMERROR(exprintf("RequiredVertices should have 1 column")); 261 261 n=bamggeom->RequiredVerticesSize[0]; 262 262 for (i=0;i<n;i++) { 263 263 j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing 264 264 if (j>nbv-1 || j<0){ 265 throw ErrorException(__FUNCT__,exprintf("Bad RequiredVerticess definition: should in [0 %i]",nbv));265 ISSMERROR(exprintf("Bad RequiredVerticess definition: should in [0 %i]",nbv)); 266 266 } 267 267 vertices[j].SetRequired(); } … … 271 271 if(bamggeom->RequiredEdges){ 272 272 if(verbose>5) printf(" processing RequiredEdges\n"); 273 if (bamggeom->RequiredEdgesSize[1]!=1) throw ErrorException(__FUNCT__,exprintf("RequiredEdges should have 1 column"));273 if (bamggeom->RequiredEdgesSize[1]!=1) ISSMERROR(exprintf("RequiredEdges should have 1 column")); 274 274 n=bamggeom->RequiredEdgesSize[0]; 275 275 for (i=0;i<n;i++) { 276 276 j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing 277 277 if (j>nbe-1 || j<0){ 278 throw ErrorException(__FUNCT__,exprintf("Bad RequiredEdges definition: should in [0 %i]",nbe));278 ISSMERROR(exprintf("Bad RequiredEdges definition: should in [0 %i]",nbe)); 279 279 } 280 280 edges[j].SetRequired(); … … 286 286 long i0,i1,i2,i3; 287 287 if(verbose>5) printf(" processing SubDomains\n"); 288 if (bamggeom->SubDomainsSize[1]!=4) throw ErrorException(__FUNCT__,exprintf("SubDomains should have 4 columns"));288 if (bamggeom->SubDomainsSize[1]!=4) ISSMERROR(exprintf("SubDomains should have 4 columns")); 289 289 NbSubDomains=bamggeom->SubDomainsSize[0]; 290 290 subdomains = new GeometricalSubDomain[NbSubDomains]; … … 294 294 i2=(int)bamggeom->SubDomains[i*4+2]; 295 295 i3=(int)bamggeom->SubDomains[i*4+3]; 296 if (i0!=2) throw ErrorException(__FUNCT__,exprintf("Bad Subdomain definition: first number should be 2 (for Edges)"));297 if (i1>nbe || i1<=0) throw ErrorException(__FUNCT__,exprintf("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe));296 if (i0!=2) ISSMERROR(exprintf("Bad Subdomain definition: first number should be 2 (for Edges)")); 297 if (i1>nbe || i1<=0) ISSMERROR(exprintf("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe)); 298 298 subdomains[i].edge=edges + (i1-1); 299 299 subdomains[i].sens = (int) i2; … … 467 467 //check that the clostest vertex is not itself... 468 468 if ( v != &(Vertex &) vertices[j]){ 469 throw ErrorException(__FUNCT__,exprintf(" v != &(Vertex &) vertices[j]"));469 ISSMERROR(exprintf(" v != &(Vertex &) vertices[j]")); 470 470 } 471 471 vertices[i].link = vertices + j; … … 485 485 if (!vertices[i].IsThe()) printf(" %i and %i\n",i,Number(vertices[i].The())); 486 486 } 487 throw ErrorException(__FUNCT__,exprintf("See above"));487 ISSMERROR(exprintf("See above")); 488 488 } 489 489 … … 556 556 //check that its length is not 0 557 557 if(lv10==0) { 558 throw ErrorException(__FUNCT__,exprintf("Length of edge %i is 0",i));558 ISSMERROR(exprintf("Length of edge %i is 0",i)); 559 559 } 560 560 //compute angle in [-Pi Pi] … … 648 648 long i1 = n1/2 ,j1=n1%2; 649 649 if( edges[i1].v[j1] != edges[i].v[j]) { 650 throw ErrorException(__FUNCT__,exprintf("Bug Adj edge"));650 ISSMERROR(exprintf("Bug Adj edge")); 651 651 } 652 652 edges[i1].Adj[j1] = edges + i; … … 764 764 pon = on; 765 765 if (k>=100){ 766 throw ErrorException(__FUNCT__,exprintf("k>=100"));766 ISSMERROR(exprintf("k>=100")); 767 767 } 768 768 R2 A= (*on)[0]; … … 843 843 GeometricalEdge* on=e.onGeometry; 844 844 if (!on){ 845 throw ErrorException(__FUNCT__,exprintf("ProjectOnCurve error message: edge provided should be on geometry"));845 ISSMERROR(exprintf("ProjectOnCurve error message: edge provided should be on geometry")); 846 846 } 847 847 if (!e[0].onGeometry || !e[1].onGeometry){ 848 throw ErrorException(__FUNCT__,exprintf("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry"));848 ISSMERROR(exprintf("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry")); 849 849 } 850 850 … … 887 887 printf(" 2) code bug : be sure that we call Triangles::SetVertexFieldOn() before\n"); 888 888 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 889 throw ErrorException(__FUNCT__,exprintf("see above"));889 ISSMERROR(exprintf("see above")); 890 890 } 891 891 NbTry++; … … 907 907 printf(" 2) code bug : be sure that we call Triangles::SetVertexFieldOn() before\n"); 908 908 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 909 throw ErrorException(__FUNCT__,exprintf("see above"));909 ISSMERROR(exprintf("see above")); 910 910 } 911 911 GeometricalEdge* tmpge = eg1; … … 941 941 // search the geometrical edge 942 942 if (s>1.0){ 943 throw ErrorException(__FUNCT__,exprintf("s>1.0"));943 ISSMERROR(exprintf("s>1.0")); 944 944 } 945 945 double ls= s*ll; … … 951 951 while ( (l1=lge[i]) < ls ) { 952 952 if (i<0 || i>mxe){ 953 throw ErrorException(__FUNCT__,exprintf("i<0 || i>mxe"));953 ISSMERROR(exprintf("i<0 || i>mxe")); 954 954 } 955 955 i++,s0=1-(s1=sensge[i]),l0=l1; -
issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp
r3263 r3332 6 6 #include "BamgObjects.h" 7 7 #include "../shared/shared.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "ListofIntersectionTriangles"11 8 12 9 namespace bamg { … … 64 61 k=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 65 62 if (k<0){ 66 throw ErrorException(__FUNCT__,exprintf("k<0"));63 ISSMERROR(exprintf("k<0")); 67 64 } 68 65 ocut = OppositeEdge[k]; … … 108 105 double dij = detj-deti; 109 106 if (i+j+k != 0 + 1 +2){ 110 throw ErrorException(__FUNCT__,exprintf("i+j+k != 0 + 1 +2"));107 ISSMERROR(exprintf("i+j+k != 0 + 1 +2")); 111 108 } 112 109 ba[j] = detj/dij; … … 180 177 } 181 178 else { 182 throw ErrorException(__FUNCT__,exprintf("Bug Split Edge"));179 ISSMERROR(exprintf("Bug Split Edge")); 183 180 } 184 181 } … … 270 267 // check Size 271 268 if (Size<=0){ 272 throw ErrorException(__FUNCT__,exprintf("Size<=0"));269 ISSMERROR(exprintf("Size<=0")); 273 270 } 274 271 -
issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h
r3280 r3332 43 43 double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01; 44 44 if (lBegin>s || s>lEnd){ 45 throw ErrorException(__FUNCT__,exprintf("lBegin>s || s>lEnd"));45 ISSMERROR(exprintf("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 throw ErrorException(__FUNCT__,exprintf("!lSegsI || NbSeg>=MaxNbSeg"));95 ISSMERROR(exprintf("!lSegsI || NbSeg>=MaxNbSeg")); 96 96 } 97 97 for (int i=0;i< NbSeg;i++) … … 109 109 register int newsize = MaxSize*2; 110 110 IntersectionTriangles* nw = new IntersectionTriangles[newsize]; 111 if (!nw) { throw ErrorException(__FUNCT__,exprintf("!nw"));}111 if (!nw) ISSMERROR("!nw"); 112 112 // recopy 113 113 for (int i=0;i<MaxSize;i++) nw[i] = lIntTria[i]; -
issm/trunk/src/c/Bamgx/objects/MatVVP2x2.cpp
r3246 r3332 5 5 6 6 #include "Metric.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "MatVVP2x2"10 7 11 8 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Metric.cpp
r3303 r3332 4 4 5 5 #include "Metric.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Metric"9 6 10 7 using namespace std; … … 180 177 // warning for optimisation S is in [0:0.5] not in [0:1] 181 178 if (i>=512){ 182 throw ErrorException(__FUNCT__,exprintf("i>=512"));179 ISSMERROR(exprintf("i>=512")); 183 180 } 184 181 LastMetricInterpole.lab=l; … … 324 321 } 325 322 if (r>1 || r<0){ 326 throw ErrorException(__FUNCT__,exprintf("r>1 || r<0"));323 ISSMERROR(exprintf("r>1 || r<0")); 327 324 } 328 325 return r ; -
issm/trunk/src/c/Bamgx/objects/QuadTree.cpp
r3267 r3332 5 5 //#include "QuadTree.h" 6 6 #include "BamgObjects.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "QuadTree"10 7 11 8 namespace bamg { … … 91 88 root=NewQuadTreeBox(); 92 89 if ( MaxISize <= MaxICoor){ 93 throw ErrorException(__FUNCT__,exprintf("MaxISize <= MaxICoor"));90 ISSMERROR(exprintf("MaxISize <= MaxICoor")); 94 91 } 95 92 for (int i=0;i<nbv;i++) … … 159 156 //check that l is not 0 (this should not happen as MaxDeep = 30) 160 157 if (level==0){ 161 throw ErrorException(__FUNCT__,exprintf("level==0 cannot be true as it has been initialized as MaxISize = %i",MaxISize));158 ISSMERROR(exprintf("level==0 cannot be true as it has been initialized as MaxISize = %i",MaxISize)); 162 159 } 163 160 … … 471 468 be = b +ll; 472 469 if (!b){ 473 throw ErrorException(__FUNCT__,exprintf("!b"));470 ISSMERROR(exprintf("!b")); 474 471 } 475 472 } -
issm/trunk/src/c/Bamgx/objects/QuadTree.h
r3280 r3332 62 62 QuadTreeBox* NewQuadTreeBox(){ 63 63 if(! (sb->bc<sb->be)) sb=new StorageQuadTreeBox(lenStorageQuadTreeBox,sb); 64 if (!sb || (sb->bc->n != 0)){ throw ErrorException(__FUNCT__,exprintf("!sb || (sb->bc->n != 0)"));}64 if (!sb || (sb->bc->n != 0)){ISSMERROR(exprintf("!sb || (sb->bc->n != 0)"));} 65 65 NbQuadTreeBox++; 66 66 return sb->bc++; -
issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp
r3309 r3332 1 1 #include <assert.h> 2 2 #include "BamgObjects.h" 3 4 #undef __FUNCT__5 #define __FUNCT__ "SetOfEdges4"6 3 7 4 using namespace std; … … 81 78 //check that nbax <=NbOfEdges 82 79 if (nbax <=NbOfEdges ) { 83 throw ErrorException(__FUNCT__,exprintf("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax));80 ISSMERROR(exprintf("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax)); 84 81 } 85 82 -
issm/trunk/src/c/Bamgx/objects/SubDomain.cpp
r3263 r3332 6 6 #include "SubDomain.h" 7 7 #include "Triangles.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "SubDomains"11 8 12 9 namespace bamg { … … 19 16 *this = Th.subdomains[i]; 20 17 if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){ 21 throw ErrorException(__FUNCT__,exprintf("head-Th.triangles<0 || head-Th.triangles>=Th.nbt"));18 ISSMERROR(exprintf("head-Th.triangles<0 || head-Th.triangles>=Th.nbt")); 22 19 } 23 20 head = ThNew.triangles + Th.Number(head) ; 24 21 if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{ 25 throw ErrorException(__FUNCT__,exprintf("edge-Th.edges<0 || edge-Th.edges>=Th.nbe"));22 ISSMERROR(exprintf("edge-Th.edges<0 || edge-Th.edges>=Th.nbe")); 26 23 } 27 24 edge = ThNew.edges+ Th.Number(edge); -
issm/trunk/src/c/Bamgx/objects/Triangle.cpp
r3263 r3332 6 6 #include "BamgObjects.h" 7 7 #include "../shared/shared.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "Triangle"11 8 12 9 namespace bamg { … … 18 15 long nbv = Th->nbv; 19 16 if (i<0 || j<0 || k<0){ 20 throw ErrorException(__FUNCT__,exprintf("i<0 || j<0 || k<0"));17 ISSMERROR(exprintf("i<0 || j<0 || k<0")); 21 18 } 22 19 if (i>=nbv || j>=nbv || k>=nbv){ 23 throw ErrorException(__FUNCT__,exprintf("i>=nbv || j>=nbv || k>=nbv"));20 ISSMERROR(exprintf("i>=nbv || j>=nbv || k>=nbv")); 24 21 } 25 22 TriaVertices[0]=v+i; … … 117 114 //check number of iterations 118 115 if (k>=2000){ 119 throw ErrorException(__FUNCT__,exprintf("too many iteration in Triangle::FindBoundaryEdge (k>=2000)"));116 ISSMERROR(exprintf("too many iteration in Triangle::FindBoundaryEdge (k>=2000)")); 120 117 } 121 118 } while (this!= t); … … 140 137 do { 141 138 while (t->swap(j,koption)){ 142 if (k>=20000) throw ErrorException(__FUNCT__,exprintf("k>=20000"));139 if (k>=20000) ISSMERROR(exprintf("k>=20000")); 143 140 NbSwap++; 144 141 k++; -
issm/trunk/src/c/Bamgx/objects/TriangleAdjacent.cpp
r3325 r3332 6 6 #include "TriangleAdjacent.h" 7 7 #include "Triangles.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "TriangleAdjacent"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r3329 r3332 7 7 #include "BamgObjects.h" 8 8 #include "../shared/shared.h" 9 10 #undef __FUNCT__11 #define __FUNCT__ "Triangles"12 9 13 10 namespace bamg { … … 116 113 } 117 114 if (inbvx != nbv){ 118 throw ErrorException(__FUNCT__,exprintf("inbvx != nbv"));115 ISSMERROR("inbvx != nbv"); 119 116 } 120 117 for (i=0;i<Tho.nbt;i++) … … 126 123 int i2 = Tho.Number(t[2]); 127 124 if (i0<0 || i1<0 || i2<0){ 128 throw ErrorException(__FUNCT__,exprintf("i0<0 || i1<0 || i2< 0"));125 ISSMERROR(exprintf("i0<0 || i1<0 || i2< 0")); 129 126 } 130 127 if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){ 131 throw ErrorException(__FUNCT__,exprintf("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv"));128 ISSMERROR(exprintf("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv")); 132 129 } 133 130 triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]); … … 136 133 } 137 134 if (kt!=nbt){ 138 throw ErrorException(__FUNCT__,exprintf("kt!=nbt"));135 ISSMERROR(exprintf("kt!=nbt")); 139 136 } 140 137 if (nbt==0 && nbv==0) { 141 throw ErrorException(__FUNCT__,exprintf("All triangles have been removed"));138 ISSMERROR(exprintf("All triangles have been removed")); 142 139 } 143 140 delete [] kk; … … 151 148 152 149 if (!NbSubDomains){ 153 throw ErrorException(__FUNCT__,exprintf("NbSubDomains==0"));150 ISSMERROR(exprintf("NbSubDomains==0")); 154 151 } 155 152 if (!subdomains[0].head || !subdomains[0].head->link){ 156 throw ErrorException(__FUNCT__,exprintf("!subdomains[0].head || !subdomains[0].head->link"));153 ISSMERROR(exprintf("!subdomains[0].head || !subdomains[0].head->link")); 157 154 } 158 155 … … 337 334 } 338 335 else{ 339 if(verbose>5) throw ErrorException(__FUNCT__,exprintf("no Vertices found in the initial mesh"));336 if(verbose>5) ISSMERROR(exprintf("no Vertices found in the initial mesh")); 340 337 } 341 338 … … 355 352 } 356 353 else{ 357 if(verbose>5) throw ErrorException(__FUNCT__,exprintf("no Triangles found in the initial mesh"));354 if(verbose>5) ISSMERROR(exprintf("no Triangles found in the initial mesh")); 358 355 } 359 356 … … 481 478 //Check value 482 479 if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) { 483 throw ErrorException(__FUNCT__,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(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)); 484 481 } 485 482 edges[i].onGeometry=Gh.edges+j; … … 507 504 head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing 508 505 sens=(int)bamgmesh->SubDomains[i*3+2]; 509 if (i3!=23) throw ErrorException(__FUNCT__,exprintf("Bad Subdomain definition: first number should be 3"));510 if (head<0 || head>=nbt) throw ErrorException(__FUNCT__,exprintf("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt));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)); 511 508 subdomains[i].head = triangles+head; 512 509 } … … 555 552 for (j=0;j<3;j++){ 556 553 int v=Number(triangles[i][j]); //jth vertex of the ith triangle 557 if (k>3*nbt-1 || k<0) throw ErrorException(__FUNCT__,exprintf("k = %i, nbt = %i",k,nbt));554 if (k>3*nbt-1 || k<0) ISSMERROR(exprintf("k = %i, nbt = %i",k,nbt)); 558 555 next_1[k]=head_1[v]; 559 if (v>nbv-1 || v<0) throw ErrorException(__FUNCT__,exprintf("v = %i, nbv = %i",v,nbv));556 if (v>nbv-1 || v<0) ISSMERROR(exprintf("v = %i, nbv = %i",v,nbv)); 560 557 head_1[v]=k++; 561 558 connectivitysize_1[v]+=1; … … 679 676 } 680 677 if (!stop){ 681 throw ErrorException(__FUNCT__,exprintf("Element holding segment [%i %i] not found...",i1+1,i2+1));678 ISSMERROR(exprintf("Element holding segment [%i %i] not found...",i1+1,i2+1)); 682 679 } 683 680 } … … 777 774 const VertexOnGeom &v=VerticesOnGeomEdge[i]; 778 775 if (!v.OnGeomEdge()){ 779 throw ErrorException(__FUNCT__,exprintf("A vertices supposed to be OnGeometricEdge is actually not"));776 ISSMERROR(exprintf("A vertices supposed to be OnGeometricEdge is actually not")); 780 777 } 781 778 bamgmesh->VerticesOnGeometricEdge[i*3+0]=Number((Vertex*)v)+1; //back to Matlab indexing … … 860 857 for (j=0;j<2;j++){ 861 858 int v=(int)bamgmesh->ElementEdges[i*i2+j]-1; //back to C indexing 862 if (k>2*i1-1 || k<0) throw ErrorException(__FUNCT__,exprintf("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1));859 if (k>2*i1-1 || k<0) ISSMERROR(exprintf("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1)); 863 860 next_2[k]=head_2[v]; 864 if (v>nbv-1 || v<0) throw ErrorException(__FUNCT__,exprintf("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1));861 if (v>nbv-1 || v<0) ISSMERROR(exprintf("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1)); 865 862 head_2[v]=k++; 866 863 connectivitysize_2[v]+=1; … … 995 992 //check that hmax is positive 996 993 if (hmax<=0){ 997 throw ErrorException(__FUNCT__,exprintf("hmax<=0"));994 ISSMERROR(exprintf("hmax<=0")); 998 995 } 999 996 … … 1024 1021 1025 1022 if (ht<=0 || hn<=0){ 1026 throw ErrorException(__FUNCT__,exprintf("ht<=0 || hn<=0"));1023 ISSMERROR(exprintf("ht<=0 || hn<=0")); 1027 1024 } 1028 1025 MatVVP2x2 Vp(1/(ht*ht),1/(hn*hn),tg); … … 1049 1046 } 1050 1047 else{ 1051 throw ErrorException(__FUNCT__,exprintf("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype));1048 ISSMERROR(exprintf("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype)); 1052 1049 } 1053 1050 } … … 1091 1088 //some checks 1092 1089 if (( infinitevertexpos <0 ) && (detOld <0) || ( infinitevertexpos >=0 ) && (detOld >0) ){ 1093 throw ErrorException(__FUNCT__,exprintf("bug in Triangles::Add, bad configuration"));1090 ISSMERROR(exprintf("bug in Triangles::Add, bad configuration")); 1094 1091 } 1095 1092 … … 1136 1133 printf("\nproblem while trying to add:\n"); 1137 1134 s.Echo(); 1138 throw ErrorException(__FUNCT__,exprintf("Bug in Triangles::Add points duplicated %i times",nbzerodet));1135 ISSMERROR(exprintf("Bug in Triangles::Add points duplicated %i times",nbzerodet)); 1139 1136 } 1140 1137 } … … 1150 1147 1151 1148 if (nbt>nbtx) { 1152 throw ErrorException(__FUNCT__,exprintf("Not ebough triangles"));1149 ISSMERROR(exprintf("Not ebough triangles")); 1153 1150 } 1154 1151 … … 1189 1186 1190 1187 if (!rswap) { 1191 throw ErrorException(__FUNCT__,exprintf("swap the point s is on a edge"));1188 ISSMERROR(exprintf("swap the point s is on a edge")); 1192 1189 } 1193 1190 } … … 1256 1253 //check that the mesh is not empty 1257 1254 if (nbt<=0 || nbv <=0 ) { 1258 throw ErrorException(__FUNCT__,exprintf("nbt or nbv is negative (Mesh empty?)"));1255 ISSMERROR(exprintf("nbt or nbv is negative (Mesh empty?)")); 1259 1256 } 1260 1257 … … 1277 1274 //check that there is no double edge 1278 1275 if (nbe != edge4->nb()){ 1279 throw ErrorException(__FUNCT__,exprintf("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()));1276 ISSMERROR(exprintf("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb())); 1280 1277 } 1281 1278 //keep nbe in nbeold … … 1297 1294 //check that it is not an edge on boundary (should not alrady exist) 1298 1295 if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){ 1299 throw ErrorException(__FUNCT__,exprintf("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)"));1296 ISSMERROR(exprintf("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)")); 1300 1297 } 1301 1298 //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list … … 1315 1312 printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3); 1316 1313 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)))); 1317 throw ErrorException(__FUNCT__,exprintf("An edge belongs to more than 2 triangles"));1314 ISSMERROR(exprintf("An edge belongs to more than 2 triangles")); 1318 1315 } 1319 1316 } … … 1397 1394 //check that we have been through all edges 1398 1395 if (k!=nbe){ 1399 throw ErrorException(__FUNCT__,exprintf("problem in edge construction process: k!=nbe (should not happen)"));1396 ISSMERROR(exprintf("problem in edge construction process: k!=nbe (should not happen)")); 1400 1397 } 1401 1398 //delete edgessave … … 1442 1439 //check that we have the correct vertex 1443 1440 if (v!=edges[i0 ].v[j0]){ 1444 throw ErrorException(__FUNCT__,exprintf("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge"));1441 ISSMERROR(exprintf("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge")); 1445 1442 } 1446 1443 … … 1459 1456 //check that NbSubDomains is empty 1460 1457 if (NbSubDomains){ 1461 throw ErrorException(__FUNCT__,exprintf("NbSubDomains should be 0"));1458 ISSMERROR(exprintf("NbSubDomains should be 0")); 1462 1459 } 1463 1460 NbSubDomains=0; … … 1527 1524 //check that we have been through all subdomains 1528 1525 if (k!= NbSubDomains){ 1529 throw ErrorException(__FUNCT__,exprintf("k!= NbSubDomains"));1526 ISSMERROR(exprintf("k!= NbSubDomains")); 1530 1527 } 1531 1528 //delete colorT and st … … 1587 1584 Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y)); 1588 1585 if (Gh.coefIcoor<=0){ 1589 throw ErrorException(__FUNCT__,exprintf("Gh.coefIcoor<=0 in infered Geometry (this should not happen)"));1586 ISSMERROR(exprintf("Gh.coefIcoor<=0 in infered Geometry (this should not happen)")); 1590 1587 } 1591 1588 … … 1638 1635 k = edge4->SortAndAdd(i0,i1); 1639 1636 if (k != i){ 1640 throw ErrorException(__FUNCT__,exprintf("problem in Edge4 construction: k != i"));1637 ISSMERROR(exprintf("problem in Edge4 construction: k != i")); 1641 1638 } 1642 1639 } … … 1667 1664 } 1668 1665 else 1669 throw ErrorException(__FUNCT__,exprintf("%i should be >=0"));1666 ISSMERROR(exprintf("%i should be >=0")); 1670 1667 } 1671 1668 … … 2224 2221 //The vertex cannot be marked more than twice 2225 2222 if (splitvertex[i1]==3 || splitvertex[i2]==3){ 2226 throw ErrorException(__FUNCT__,exprintf("Crossing rifts not supported yet"));2223 ISSMERROR(exprintf("Crossing rifts not supported yet")); 2227 2224 } 2228 2225 } … … 2302 2299 //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); 2303 2300 ta = Next(ta).Adj(); 2304 if (count++>50) throw ErrorException(__FUNCT__,exprintf("Maximum number of iteration exceeded"));2301 if (count++>50) ISSMERROR(exprintf("Maximum number of iteration exceeded")); 2305 2302 }while ((tbegin != ta)); 2306 2303 } … … 2309 2306 for(i=0;i<NbCrackedEdges;i++){ 2310 2307 if (Edgeflags[i]!=2){ 2311 throw ErrorException(__FUNCT__,exprintf("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1));2308 ISSMERROR(exprintf("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1)); 2312 2309 } 2313 2310 } … … 2335 2332 } 2336 2333 if (k!=0) { 2337 throw ErrorException(__FUNCT__,exprintf("there is %i triangles of mes = 0",k));2334 ISSMERROR(exprintf("there is %i triangles of mes = 0",k)); 2338 2335 } 2339 2336 … … 2352 2349 printf("Edge %i: %i %i\n",j,Number(edges[j][0]),Number(edges[j][1])); 2353 2350 } 2354 throw ErrorException(__FUNCT__,exprintf("Missing Edge %i, v0=%i,v1=%i",i,Number(edges[i][0]),Number(edges[i][1])));2351 ISSMERROR(exprintf("Missing Edge %i, v0=%i,v1=%i",i,Number(edges[i][0]),Number(edges[i][1]))); 2355 2352 } 2356 2353 } 2357 2354 2358 2355 if (k!=0) { 2359 throw ErrorException(__FUNCT__,exprintf("There are %i lost edges, the boundary might be crossing",k));2356 ISSMERROR(exprintf("There are %i lost edges, the boundary might be crossing",k)); 2360 2357 } 2361 2358 for (int j=0;j<nbv;j++){ … … 2438 2435 it++;} // end while (it<nbt) 2439 2436 if (nbt == NbOutT || !NbSubDomTot) { 2440 throw ErrorException(__FUNCT__,exprintf("The boundary is not close: all triangles are outside"));2437 ISSMERROR(exprintf("The boundary is not close: all triangles are outside")); 2441 2438 } 2442 2439 … … 2475 2472 it++;} // end white (it<nbt) 2476 2473 if (k!=NbSubDomains){ 2477 throw ErrorException(__FUNCT__,exprintf("k!=NbSubDomains"));2474 ISSMERROR(exprintf("k!=NbSubDomains")); 2478 2475 } 2479 2476 if(OutSide) … … 2546 2543 Edge &e = *GeometricalEdgetoEdge[Gh.Number(eg)]; 2547 2544 if (&e==NULL){ 2548 throw ErrorException(__FUNCT__,exprintf("&e==NULL"));2545 ISSMERROR(exprintf("&e==NULL")); 2549 2546 } 2550 2547 Vertex * v0 = e(0),*v1 = e(1); … … 2556 2553 subdomains[i].edge = &e; 2557 2554 if (!t || !sens){ 2558 throw ErrorException(__FUNCT__,exprintf("!t || !sens"));2555 ISSMERROR(exprintf("!t || !sens")); 2559 2556 } 2560 2557 … … 2563 2560 while (1) { 2564 2561 if ( v0 != ta.EdgeVertex(1) ){ 2565 throw ErrorException(__FUNCT__,exprintf("v0 != ta.EdgeVertex(1)"));2562 ISSMERROR(exprintf("v0 != ta.EdgeVertex(1)")); 2566 2563 } 2567 2564 if (ta.EdgeVertex(0) == v1) { // ok we find the edge … … 2571 2568 subdomains[i].head=t=ta; 2572 2569 if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) { 2573 throw ErrorException(__FUNCT__,exprintf("bad definition of SubSomain %i",i));2570 ISSMERROR(exprintf("bad definition of SubSomain %i",i)); 2574 2571 } 2575 2572 long it = Number(t); … … 2586 2583 kkk++; 2587 2584 if (mark[Number(tt)]>=0){ 2588 throw ErrorException(__FUNCT__,exprintf("mark[Number(tt)]>=0"));2585 ISSMERROR(exprintf("mark[Number(tt)]>=0")); 2589 2586 } 2590 2587 mark[Number(tt)]=i; … … 2595 2592 ta = Previous(Adj(ta)); 2596 2593 if(t == (Triangle *) ta) { 2597 throw ErrorException(__FUNCT__,exprintf("bad definition of SubSomain %i",i));2594 ISSMERROR(exprintf("bad definition of SubSomain %i",i)); 2598 2595 } 2599 2596 } … … 2626 2623 else { 2627 2624 if (!quadtree){ 2628 throw ErrorException(__FUNCT__,exprintf("no starting triangle provided and no quadtree available"));2625 ISSMERROR(exprintf("no starting triangle provided and no quadtree available")); 2629 2626 } 2630 2627 Vertex *a = quadtree->NearestVertex(B.x,B.y) ; … … 2634 2631 printf("TriangleContaining vertex number %i, another call to ReMakeTriangleContainingTheVertex was required\n", Number(a)); 2635 2632 } 2636 throw ErrorException(__FUNCT__,exprintf("problem in Triangles::FindTriangleContaining"));2633 ISSMERROR(exprintf("problem in Triangles::FindTriangleContaining")); 2637 2634 } 2638 2635 if (a<vertices || a>=vertices+nbv){ 2639 throw ErrorException(__FUNCT__,exprintf("a<vertices || a>=vertices+nbv"));2636 ISSMERROR(exprintf("a<vertices || a>=vertices+nbv")); 2640 2637 } 2641 2638 t = a->t; 2642 2639 if (t<triangles || t>=triangles+nbt){ 2643 2640 a->Echo(); 2644 throw ErrorException(__FUNCT__,exprintf("t<triangles || t>=triangles+nbt"));2641 ISSMERROR(exprintf("t<triangles || t>=triangles+nbt")); 2645 2642 } 2646 2643 } … … 2654 2651 int k0=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 2655 2652 if (k0<0){ // k0 the NULL vertex 2656 throw ErrorException(__FUNCT__,exprintf("k0<0"));2653 ISSMERROR(exprintf("k0<0")); 2657 2654 } 2658 2655 int k1=NextVertex[k0],k2=PreviousVertex[k0]; … … 2664 2661 kkkk++; 2665 2662 if (kkkk>=2){ 2666 throw ErrorException(__FUNCT__,exprintf("kkkk>=2"));2663 ISSMERROR(exprintf("kkkk>=2")); 2667 2664 } 2668 2665 } … … 2674 2671 kkkk++; 2675 2672 if (kkkk>=2000){ 2676 throw ErrorException(__FUNCT__,exprintf("kkkk>=2000"));2673 ISSMERROR(exprintf("kkkk>=2000")); 2677 2674 } 2678 2675 j= OppositeVertex[jj]; … … 2695 2692 if (k == 2 && BinaryRand()) Exchange(ii[0],ii[1]); 2696 2693 if ( k>=3){ 2697 throw ErrorException(__FUNCT__,exprintf("k>=3"));2694 ISSMERROR(exprintf("k>=3")); 2698 2695 } 2699 2696 TriangleAdjacent t1 = t->Adj(jj=ii[0]); … … 2751 2748 VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 2752 2749 if( NbVerticesOnGeomVertex >= nbvx) { 2753 throw ErrorException(__FUNCT__,exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx));2750 ISSMERROR(exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx)); 2754 2751 } 2755 2752 … … 2768 2765 } 2769 2766 else{ 2770 throw ErrorException(__FUNCT__,exprintf("Maximum number of vertices (nbvx = %i) too small",nbvx));2767 ISSMERROR(exprintf("Maximum number of vertices (nbvx = %i) too small",nbvx)); 2771 2768 } 2772 2769 … … 2784 2781 //check that edges has been allocated 2785 2782 if (edges){ 2786 throw ErrorException(__FUNCT__,exprintf("edges is empty"));2783 ISSMERROR(exprintf("edges is empty")); 2787 2784 } 2788 2785 … … 2830 2827 //check that edges has been allocated 2831 2828 if (!edges){ 2832 throw ErrorException(__FUNCT__,exprintf("edges has not been allocated..."));2829 ISSMERROR(exprintf("edges has not been allocated...")); 2833 2830 } 2834 2831 edges[nbe].v[0]=a->to; … … 2853 2850 NbEdgeCurve=0; 2854 2851 if (nbvend>=nbvx){ 2855 throw ErrorException(__FUNCT__,exprintf("nbvend>=nbvx"));2852 ISSMERROR(exprintf("nbvend>=nbvx")); 2856 2853 } 2857 2854 lcurve =0; … … 2928 2925 } 2929 2926 if (kk1 == kk0){ 2930 throw ErrorException(__FUNCT__,exprintf("kk1 == kk0"));2927 ISSMERROR(exprintf("kk1 == kk0")); 2931 2928 } 2932 2929 … … 2963 2960 e = e->Adj[kprev]; 2964 2961 if (!e){ 2965 throw ErrorException(__FUNCT__,exprintf("!e"));2962 ISSMERROR(exprintf("!e")); 2966 2963 } 2967 2964 }// for(;;) … … 2993 2990 if(!step) { 2994 2991 if (edges){ 2995 throw ErrorException(__FUNCT__,exprintf("edges"));2992 ISSMERROR(exprintf("edges")); 2996 2993 } 2997 2994 if (VerticesOnGeomEdge){ 2998 throw ErrorException(__FUNCT__,exprintf("VerticesOnGeomEdge"));2995 ISSMERROR(exprintf("VerticesOnGeomEdge")); 2999 2996 } 3000 2997 edges = new Edge[nbex=nbe]; … … 3002 2999 VerticesOnGeomEdge = new VertexOnGeom[NbVerticesOnGeomEdge0]; 3003 3000 if (!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0){ 3004 throw ErrorException(__FUNCT__,exprintf("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0"));3001 ISSMERROR(exprintf("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0")); 3005 3002 } 3006 3003 // do the vertex on a geometrical vertex … … 3008 3005 } 3009 3006 else if (NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0){ 3010 throw ErrorException(__FUNCT__,exprintf("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0"));3007 ISSMERROR(exprintf("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0")); 3011 3008 } 3012 3009 } … … 3085 3082 int i; 3086 3083 for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++; 3087 if( NbVerticesOnGeomVertex >= nbvx) { throw ErrorException(__FUNCT__,exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx));}3084 if( NbVerticesOnGeomVertex >= nbvx) { ISSMERROR(exprintf("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,nbvx));} 3088 3085 3089 3086 VerticesOnGeomVertex = new VertexOnGeom[ NbVerticesOnGeomVertex]; … … 3144 3141 } 3145 3142 if (bfind!=Gh.NbOfCurves){ 3146 throw ErrorException(__FUNCT__,exprintf("problem generating number of curves (Gh.NbOfCurves=%i bfind=%i)",Gh.NbOfCurves,bfind));3143 ISSMERROR(exprintf("problem generating number of curves (Gh.NbOfCurves=%i bfind=%i)",Gh.NbOfCurves,bfind)); 3147 3144 } 3148 3145 … … 3236 3233 double se= (sNew-L0)/LAB; 3237 3234 if (se<0 || se>=1.000000001){ 3238 throw ErrorException(__FUNCT__,exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se));3235 ISSMERROR(exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se)); 3239 3236 } 3240 3237 se = abscisseInterpole(v0.m,v1.m,AB,se,1); 3241 3238 if (se<0 || se>1){ 3242 throw ErrorException(__FUNCT__,exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se));3239 ISSMERROR(exprintf("Problem creating point on a boundary: se=%g should be in [0 1]",se)); 3243 3240 } 3244 3241 se = k1 ? se : 1. - se; … … 3272 3269 } 3273 3270 if (!ee.adj[k1]) { 3274 throw ErrorException(__FUNCT__,exprintf(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.Number(ee),nbe,Gh.vertices));3271 ISSMERROR(exprintf(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.Number(ee),nbe,Gh.vertices)); 3275 3272 } 3276 3273 pe = ee.adj[k1]; // next edge … … 3314 3311 if(step==0){ 3315 3312 if(nbv+NbOfNewPoints > nbvx) { 3316 throw ErrorException(__FUNCT__,exprintf("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,nbvx));3313 ISSMERROR(exprintf("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,nbvx)); 3317 3314 } 3318 3315 edges = new Edge[NbOfNewEdge]; … … 3409 3406 //all vertices are aligned! 3410 3407 if ( ++i >= nbv) { 3411 throw ErrorException(__FUNCT__,exprintf("all the vertices are aligned"));3408 ISSMERROR(exprintf("all the vertices are aligned")); 3412 3409 } 3413 3410 } … … 3547 3544 long j=vj.ReferenceNumber; 3548 3545 if (&vj!=ordre[j]){ 3549 throw ErrorException(__FUNCT__,exprintf("&vj!= ordre[j]"));3546 ISSMERROR(exprintf("&vj!= ordre[j]")); 3550 3547 } 3551 3548 if(i!=j){ … … 3557 3554 if (tcvj && !tcvj->link){ 3558 3555 tcvj->Echo(); 3559 throw ErrorException(__FUNCT__,exprintf("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link));3556 ISSMERROR(exprintf("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link)); 3560 3557 } 3561 3558 quadtree->Add(vj); … … 3584 3581 3585 3582 if (!Gh.nbe){ 3586 throw ErrorException(__FUNCT__,exprintf("!Gh.nbe"));3583 ISSMERROR(exprintf("!Gh.nbe")); 3587 3584 } 3588 3585 Edge **e= new (Edge* [Gh.nbe]); … … 3617 3614 } 3618 3615 } 3619 if(kk) throw ErrorException(__FUNCT__,exprintf("See above"));3616 if(kk) ISSMERROR(exprintf("See above")); 3620 3617 3621 3618 return e; … … 3806 3803 //check i 3807 3804 if (i<0 || i>=nbt ){ 3808 throw ErrorException(__FUNCT__,exprintf("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1));3805 ISSMERROR(exprintf("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1)); 3809 3806 } 3810 3807 //change first_np_or_next_t[i] … … 3857 3854 } 3858 3855 if (ta.EdgeVertex(0)!=s){ 3859 throw ErrorException(__FUNCT__,exprintf("ta.EdgeVertex(0)!=s"));3856 ISSMERROR(exprintf("ta.EdgeVertex(0)!=s")); 3860 3857 } 3861 3858 ta = Next(Adj(ta)); … … 3907 3904 vertices=new Vertex[nbvx]; 3908 3905 if (!vertices){ 3909 throw ErrorException(__FUNCT__,exprintf("!vertices"));3906 ISSMERROR(exprintf("!vertices")); 3910 3907 } 3911 3908 ordre=new (Vertex* [nbvx]); 3912 3909 if (!ordre){ 3913 throw ErrorException(__FUNCT__,exprintf("!ordre"));3910 ISSMERROR(exprintf("!ordre")); 3914 3911 } 3915 3912 triangles=new Triangle[nbtx]; 3916 3913 if (!triangles){ 3917 throw ErrorException(__FUNCT__,exprintf("!triangles"));3914 ISSMERROR(exprintf("!triangles")); 3918 3915 } 3919 3916 } … … 3952 3949 } 3953 3950 else { 3954 throw ErrorException(__FUNCT__,exprintf("ProjectOnCurve On Vertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vA)));3951 ISSMERROR(exprintf("ProjectOnCurve On Vertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vA))); 3955 3952 } 3956 3953 … … 3963 3960 } 3964 3961 else { 3965 throw ErrorException(__FUNCT__,exprintf("ProjectOnCurve On Vertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vB)));3962 ISSMERROR(exprintf("ProjectOnCurve On Vertex %i forget call to SetVertexFieldOnBTh",BTh.Number(vB))); 3966 3963 } 3967 3964 Edge * e = &BhAB; 3968 3965 if (!pA || !pB || !e){ 3969 throw ErrorException(__FUNCT__,exprintf("!pA || !pB || !e"));3966 ISSMERROR(exprintf("!pA || !pB || !e")); 3970 3967 } 3971 3968 // be carefull the back ground edge e is on same geom edge … … 3973 3970 //check Is a background Mesh; 3974 3971 if (e<BTh.edges || e>=BTh.edges+BTh.nbe){ 3975 throw ErrorException(__FUNCT__,exprintf("e<BTh.edges || e>=BTh.edges+BTh.nbe"));3972 ISSMERROR(exprintf("e<BTh.edges || e>=BTh.edges+BTh.nbe")); 3976 3973 } 3977 3974 // walk on BTh edge … … 3996 3993 } 3997 3994 else{ // do the search by walking 3998 throw ErrorException(__FUNCT__,exprintf("case not supported yet"));3995 ISSMERROR(exprintf("case not supported yet")); 3999 3996 } 4000 3997 … … 4025 4022 kkk=kkk+1; 4026 4023 if (kkk>=100){ 4027 throw ErrorException(__FUNCT__,exprintf("kkk>=100"));4024 ISSMERROR(exprintf("kkk>=100")); 4028 4025 } 4029 4026 if (!eee){ 4030 throw ErrorException(__FUNCT__,exprintf("!eee"));4027 ISSMERROR(exprintf("!eee")); 4031 4028 } 4032 4029 double lg0 = lg; … … 4037 4034 double thetab = te0*(1-sss)+ sss*iii; 4038 4035 if (thetab<0 || thetab>1){ 4039 throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));4036 ISSMERROR(exprintf("thetab<0 || thetab>1")); 4040 4037 } 4041 4038 BR = VertexOnEdge(&R,eee,thetab); … … 4050 4047 double lg0 = lg; 4051 4048 if (!eee){ 4052 throw ErrorException(__FUNCT__,exprintf("!eee"));4049 ISSMERROR(exprintf("!eee")); 4053 4050 } 4054 4051 v1 = pvB; … … 4061 4058 double thetab = te0*(1-sss)+ sss*tB; 4062 4059 if (thetab<0 || thetab>1){ 4063 throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));4060 ISSMERROR(exprintf("thetab<0 || thetab>1")); 4064 4061 } 4065 4062 BR = VertexOnEdge(&R,eee,thetab); … … 4070 4067 4071 4068 } 4072 throw ErrorException(__FUNCT__,exprintf("Big bug..."));4069 ISSMERROR(exprintf("Big bug...")); 4073 4070 return 0; // just for the compiler 4074 4071 } … … 4111 4108 } 4112 4109 if (kk != nbe){ 4113 throw ErrorException(__FUNCT__,exprintf("There are %i double edges in the mesh",kk-nbe));4110 ISSMERROR(exprintf("There are %i double edges in the mesh",kk-nbe)); 4114 4111 } 4115 4112 … … 4143 4140 //An edge belongs to 2 triangles 4144 4141 else { 4145 throw ErrorException(__FUNCT__,exprintf("The edge (%i , %i) belongs to more than 2 triangles",4142 ISSMERROR(exprintf("The edge (%i , %i) belongs to more than 2 triangles", 4146 4143 Number(triangles[i][VerticesOfTriangularEdge[j][0]]),Number(triangles[i][VerticesOfTriangularEdge[j][1]]))); 4147 4144 } … … 4182 4179 } 4183 4180 if(k) { 4184 throw ErrorException(__FUNCT__,exprintf("%i boundary edges (from the geometry) are not defined as mesh edges",k));4181 ISSMERROR(exprintf("%i boundary edges (from the geometry) are not defined as mesh edges",k)); 4185 4182 } 4186 4183 … … 4209 4206 for (i=2;det(ordre[0]->i,ordre[1]->i,ordre[i]->i)==0;) 4210 4207 if (++i>=nbvb) { 4211 throw ErrorException(__FUNCT__,exprintf("ReconstructExistingMesh: All the vertices are aligned"));4208 ISSMERROR(exprintf("ReconstructExistingMesh: All the vertices are aligned")); 4212 4209 } 4213 4210 //Move this vertex (i) to the 2d position in ordre … … 4269 4266 } 4270 4267 if(nbloss) { 4271 throw ErrorException(__FUNCT__,exprintf("we lost %i existing edges other %i",nbloss,knbe));4268 ISSMERROR(exprintf("we lost %i existing edges other %i",nbloss,knbe)); 4272 4269 } 4273 4270 … … 4344 4341 subdomains = savesubdomains; 4345 4342 if (k) { 4346 throw ErrorException(__FUNCT__,exprintf("number of triangles edges alone = %i",k));4343 ISSMERROR(exprintf("number of triangles edges alone = %i",k)); 4347 4344 } 4348 4345 FindSubDomain(); … … 4374 4371 4375 4372 printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n"); 4376 throw ErrorException(__FUNCT__,exprintf("See above (might be cryptic...)"));4373 ISSMERROR(exprintf("See above (might be cryptic...)")); 4377 4374 } 4378 4375 } … … 4397 4394 t=t0=subdomains[i].head; 4398 4395 if (!t0){ // not empty sub domain 4399 throw ErrorException(__FUNCT__,exprintf("!t0"));4396 ISSMERROR(exprintf("!t0")); 4400 4397 } 4401 4398 do { 4402 4399 long kt = Number(t); 4403 4400 if (kt<0 || kt >= nbt ){ 4404 throw ErrorException(__FUNCT__,exprintf("kt<0 || kt >= nbt"));4401 ISSMERROR(exprintf("kt<0 || kt >= nbt")); 4405 4402 } 4406 4403 if (renu[kt]!=-1){ 4407 throw ErrorException(__FUNCT__,exprintf("renu[kt]!=-1"));4404 ISSMERROR(exprintf("renu[kt]!=-1")); 4408 4405 } 4409 4406 renu[kt]=k++; … … 4422 4419 } 4423 4420 if (k != nbt){ 4424 throw ErrorException(__FUNCT__,exprintf("k != nbt"));4421 ISSMERROR(exprintf("k != nbt")); 4425 4422 } 4426 4423 // do the change on all the pointeur … … 4549 4546 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 4550 4547 if (coefIcoor<=0){ 4551 throw ErrorException(__FUNCT__,exprintf("coefIcoor should be positive, a problem in the geometry is likely"));4548 ISSMERROR(exprintf("coefIcoor should be positive, a problem in the geometry is likely")); 4552 4549 } 4553 4550 … … 4570 4567 if(Nberr==1) 4571 4568 if (strfrom){ 4572 throw ErrorException(__FUNCT__,exprintf("Fatal error %s (SetInCoor) : area of Triangle %i < 0",strfrom,i));4569 ISSMERROR(exprintf("Fatal error %s (SetInCoor) : area of Triangle %i < 0",strfrom,i)); 4573 4570 } 4574 4571 else{ 4575 throw ErrorException(__FUNCT__,exprintf("Fatal error (SetInCoor) : area of Triangle %i < 0",i));4572 ISSMERROR(exprintf("Fatal error (SetInCoor) : area of Triangle %i < 0",i)); 4576 4573 } 4577 4574 } … … 4763 4760 register Triangle* t= vertices[i].t; 4764 4761 if (!t){ 4765 throw ErrorException(__FUNCT__,exprintf("!t"));4762 ISSMERROR(exprintf("!t")); 4766 4763 } 4767 4764 Vertex & vi = vertices[i]; … … 4771 4768 ta=Previous(Adj(ta)); 4772 4769 if (vertices+i != ta.EdgeVertex(1)){ 4773 throw ErrorException(__FUNCT__,exprintf("vertices+i != ta.EdgeVertex(1)"));4770 ISSMERROR(exprintf("vertices+i != ta.EdgeVertex(1)")); 4774 4771 } 4775 4772 Vertex & vj = *(ta.EdgeVertex(0)); … … 4777 4774 j= &vj-vertices; 4778 4775 if (j<0 || j >= nbv){ 4779 throw ErrorException(__FUNCT__,exprintf("j<0 || j >= nbv"));4776 ISSMERROR(exprintf("j<0 || j >= nbv")); 4780 4777 } 4781 4778 R2 Aij = (R2) vj - (R2) vi; … … 4901 4898 // the first PB is to now a background edge between the 2 vertices 4902 4899 if (!edgesGtoB){ 4903 throw ErrorException(__FUNCT__,exprintf("!edgesGtoB"));4900 ISSMERROR(exprintf("!edgesGtoB")); 4904 4901 } 4905 4902 ong= ProjectOnCurve(*edgesGtoB[Gh.Number(edges[i].onGeometry)], … … 4973 4970 Triangle & t = triangles[i]; 4974 4971 if (!t.link){ 4975 throw ErrorException(__FUNCT__,exprintf("!t.link"));4972 ISSMERROR(exprintf("!t.link")); 4976 4973 } 4977 4974 for(int j=0;j<3;j++) … … 5000 4997 || (cc=Area2( t[0].r , t[1].r , A.r )) < 0.0)){ 5001 4998 printf("%i not in triangle %i In= %i %i %i %i %i\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd); 5002 throw ErrorException(__FUNCT__,exprintf("Number of triangles with P2 interpolation Problem"));4999 ISSMERROR(exprintf("Number of triangles with P2 interpolation Problem")); 5003 5000 } 5004 5001 } … … 5008 5005 || (cc=Area2( tt[0].r , tt[1].r , A.r )) < 0)){ 5009 5006 printf("%i not in triangle %i In= %i %i %i %i %i\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd); 5010 throw ErrorException(__FUNCT__,exprintf("Number of triangles with P2 interpolation Problem"));5007 ISSMERROR(exprintf("Number of triangles with P2 interpolation Problem")); 5011 5008 } 5012 5009 } … … 5056 5053 } // tt 5057 5054 else 5058 throw ErrorException(__FUNCT__,exprintf("Bug..."));5055 ISSMERROR(exprintf("Bug...")); 5059 5056 } // ke<0 5060 5057 else … … 5069 5066 } 5070 5067 if (nbinvisible>=2){ 5071 throw ErrorException(__FUNCT__,exprintf("nbinvisible>=2"));5068 ISSMERROR(exprintf("nbinvisible>=2")); 5072 5069 } 5073 5070 switch (nbsplitedge) { … … 5081 5078 } 5082 5079 if (ksplit[i]<40){ 5083 throw ErrorException(__FUNCT__,exprintf("ksplit[i]<40"));5080 ISSMERROR(exprintf("ksplit[i]<40")); 5084 5081 } 5085 5082 } … … 5098 5095 int ke=(int) (ksplit[i]%10); 5099 5096 if (kk>=7 || kk<=0){ 5100 throw ErrorException(__FUNCT__,exprintf("kk>=7 || kk<=0"));5097 ISSMERROR(exprintf("kk>=7 || kk<=0")); 5101 5098 } 5102 5099 … … 5115 5112 5116 5113 if (nbmkadj>=10){ 5117 throw ErrorException(__FUNCT__,exprintf("nbmkadj>=10"));5114 ISSMERROR(exprintf("nbmkadj>=10")); 5118 5115 } 5119 5116 // -------------------------- … … 5133 5130 t1=t0; 5134 5131 if (kedge[3*i+i0]<0){ 5135 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+i0]<0"));5132 ISSMERROR(exprintf("kedge[3*i+i0]<0")); 5136 5133 } 5137 5134 Vertex * v3 = vertices + kedge[3*i+k0]; … … 5149 5146 t2=t1=t0; 5150 5147 if (kedge[3*i+k1]<0){ 5151 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+k1]<0"));5148 ISSMERROR(exprintf("kedge[3*i+k1]<0")); 5152 5149 } 5153 5150 if (kedge[3*i+k2]<0){ 5154 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+k2]<0"));5151 ISSMERROR(exprintf("kedge[3*i+k2]<0")); 5155 5152 } 5156 5153 … … 5176 5173 t3=t2=t1=t0; 5177 5174 if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){ 5178 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0"));5175 ISSMERROR(exprintf("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0")); 5179 5176 } 5180 5177 Vertex * v12 = vertices + kedge[3*i+k0]; … … 5250 5247 } 5251 5248 if (nbmkadj>13){// 13 = 6 + 4 + 5252 throw ErrorException(__FUNCT__,exprintf("nbmkadj>13"));5249 ISSMERROR(exprintf("nbmkadj>13")); 5253 5250 } 5254 5251 … … 5376 5373 quadtree->Add(vi); 5377 5374 if (!tcvi || tcvi->det<0){// internal 5378 throw ErrorException(__FUNCT__,exprintf("!tcvi || tcvi->det < 0"));5375 ISSMERROR(exprintf("!tcvi || tcvi->det < 0")); 5379 5376 } 5380 5377 AddVertex(vi,tcvi,dete); … … 5413 5410 5414 5411 //check that the subdomain is not empty 5415 if (!t0){ throw ErrorException(__FUNCT__,exprintf("At least one subdomain is empty"));}5412 if (!t0){ ISSMERROR(exprintf("At least one subdomain is empty"));} 5416 5413 5417 5414 //loop … … 5423 5420 5424 5421 //check that num is in [0 nbt[ 5425 if (num<0 || num>=nbt){ throw ErrorException(__FUNCT__,exprintf("num<0 || num>=nbt"));}5422 if (num<0 || num>=nbt){ ISSMERROR(exprintf("num<0 || num>=nbt"));} 5426 5423 5427 5424 //reft of this triangle is the subdomain number … … 5455 5452 int dir=0; 5456 5453 if (k<0){ 5457 throw ErrorException(__FUNCT__,exprintf("k<0"));5454 ISSMERROR(exprintf("k<0")); 5458 5455 } 5459 5456 int kkk=0; … … 5463 5460 kkk++; 5464 5461 if (kkk>=1000){ 5465 throw ErrorException(__FUNCT__,exprintf("kkk>=1000"));5462 ISSMERROR(exprintf("kkk>=1000")); 5466 5463 } 5467 5464 Vertex &vI = *edge.EdgeVertex(0); … … 5480 5477 double IJ2 = IJ_IA + IJ_AJ; 5481 5478 if (IJ2==0){ 5482 throw ErrorException(__FUNCT__,exprintf("IJ2==0"));5479 ISSMERROR(exprintf("IJ2==0")); 5483 5480 } 5484 5481 a= IJ_AJ/IJ2; … … 5498 5495 // int dir=0; 5499 5496 if (t->link != 0){ 5500 throw ErrorException(__FUNCT__,exprintf("t->link != 0"));5497 ISSMERROR(exprintf("t->link != 0")); 5501 5498 } 5502 5499 // to have a starting edges … … 5570 5567 } 5571 5568 if (cas ==-2){ 5572 throw ErrorException(__FUNCT__,exprintf("cas==-2"));5569 ISSMERROR(exprintf("cas==-2")); 5573 5570 } 5574 5571 // l1 = ||C s1|| , l0 = ||C s0|| … … 5587 5584 kkk++; 5588 5585 if (edge.EdgeVertex(0)!=s && kkk>=10000){ 5589 throw ErrorException(__FUNCT__,exprintf("edge.EdgeVertex(0)!=s && kkk>=10000"));5586 ISSMERROR(exprintf("edge.EdgeVertex(0)!=s && kkk>=10000")); 5590 5587 } 5591 5588 … … 5619 5616 5620 5617 if (!(Triangle *) er){ 5621 throw ErrorException(__FUNCT__,exprintf("!(Triangle *) er"));5618 ISSMERROR(exprintf("!(Triangle *) er")); 5622 5619 } 5623 5620 I2 A((I2)*er.EdgeVertex(0)); … … 5643 5640 int NbSwap =0; 5644 5641 if (!a.t || !b.t){ // the 2 vertex is in a mesh 5645 throw ErrorException(__FUNCT__,exprintf("!a.t || !b.t"));5642 ISSMERROR(exprintf("!a.t || !b.t")); 5646 5643 } 5647 5644 int k=0; … … 5660 5657 vbegin =v2; 5661 5658 if (!v2){ 5662 throw ErrorException(__FUNCT__,exprintf("!v2"));5659 ISSMERROR(exprintf("!v2")); 5663 5660 } 5664 5661 det2 = det(*v2,a,b); … … 5677 5674 tc = Previous(tc); 5678 5675 if (!v1 || !v2){ 5679 throw ErrorException(__FUNCT__,exprintf("!v1 || !v2"));5676 ISSMERROR(exprintf("!v1 || !v2")); 5680 5677 } 5681 5678 Icoor2 detss = 0,l=0,ks; 5682 5679 while ((ks=SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 5683 5680 if(l++ > 10000000) { 5684 throw ErrorException(__FUNCT__,exprintf("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l));5681 ISSMERROR(exprintf("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l)); 5685 5682 } 5686 5683 Vertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); … … 5701 5698 k++; 5702 5699 if (k>=2000){ 5703 throw ErrorException(__FUNCT__,exprintf("k>=2000"));5700 ISSMERROR(exprintf("k>=2000")); 5704 5701 } 5705 5702 if ( vbegin == v2 ) return -1;// error … … 5773 5770 short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles 5774 5771 if ( a1<0 || a1>=3 ){ 5775 throw ErrorException(__FUNCT__,exprintf("a1<0 || a1>=3"));5772 ISSMERROR(exprintf("a1<0 || a1>=3")); 5776 5773 } 5777 5774 … … 5785 5782 Icoor2 detT = det1+det2; 5786 5783 if ((det1<=0 ) || (det2<=0)){ 5787 throw ErrorException(__FUNCT__,exprintf("(det1<=0 ) || (det2<=0)"));5784 ISSMERROR(exprintf("(det1<=0 ) || (det2<=0)")); 5788 5785 } 5789 5786 if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb 5790 throw ErrorException(__FUNCT__,exprintf("(detsa>=0) || (detsb<=0)"));5787 ISSMERROR(exprintf("(detsa>=0) || (detsb<=0)")); 5791 5788 } 5792 5789 Icoor2 ndet1 = bamg::det(s1,sa,s2); -
issm/trunk/src/c/Bamgx/objects/Vertex.cpp
r3263 r3332 6 6 #include "BamgObjects.h" 7 7 #include "../shared/shared.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "Vertex"11 8 12 9 namespace bamg { … … 40 37 j = NextEdge[jc]; 41 38 if (k>=2000){ 42 throw ErrorException(__FUNCT__,exprintf("k>=2000 (Maximum number of iterations reached)"));39 ISSMERROR(exprintf("k>=2000 (Maximum number of iterations reached)")); 43 40 } 44 41 } while ( tbegin != tria); … … 107 104 j = NextEdge[jc]; 108 105 if (k>=2000){ 109 throw ErrorException(__FUNCT__,exprintf("k>=2000"));106 ISSMERROR(exprintf("k>=2000")); 110 107 } 111 108 }while ( tbegin != tria); … … 166 163 } 167 164 else{ 168 throw ErrorException(__FUNCT__,exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype));165 ISSMERROR(exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype)); 169 166 } 170 167 -
issm/trunk/src/c/Bamgx/objects/VertexOnEdge.cpp
r3263 r3332 6 6 #include "VertexOnEdge.h" 7 7 #include "Triangles.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "VertexOnEdge"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/VertexOnGeom.cpp
r3263 r3332 7 7 #include "Triangles.h" 8 8 #include "Geometry.h" 9 10 #undef __FUNCT__11 #define __FUNCT__ "VertexOnGeom"12 9 13 10 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/VertexOnVertex.cpp
r3263 r3332 6 6 #include "VertexOnVertex.h" 7 7 #include "Triangles.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "VertexOnVertex"11 8 12 9 namespace bamg { -
issm/trunk/src/c/Bamgx/shared/BigPrimeNumber.cpp
r3280 r3332 1 #undef __FUNCT__2 #define __FUNCT__ "BigPrimeNumber"3 4 1 #include "./BigPrimeNumber.h" 5 2 -
issm/trunk/src/c/BuildNodeSetsx/BuildNodeSetsx.cpp
r832 r3332 4 4 5 5 #include "./BuildNodeSetsx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "NodeSetsx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp
r1973 r3332 5 5 #include "stdio.h" 6 6 #include "../shared/shared.h" 7 8 #undef __FUNCT__ 9 #define __FUNCT__ "PartitionSets" 7 #include "../include/macros.h" 10 8 11 9 void PartitionSets(Vec* ppartitionb, Vec* ppartitionc,Vec flags_a,Vec flags_b,Vec flags_c,int gsize){ … … 79 77 ccount++; 80 78 } 81 if (flags_b_local[i] && flags_c_local[i]) throw ErrorException(__FUNCT__,exprintf("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets"));79 if (flags_b_local[i] && flags_c_local[i]) ISSMERROR(exprintf("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets")); 82 80 83 81 acount++; -
issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp
r2333 r3332 4 4 5 5 #include "./ComputePressurex.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "ComputePressurex"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp
r2333 r3332 4 4 5 5 #include "./ConfigureObjectsx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "ConfigureObjectsx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/ContourToMeshx/ContourToMeshx.cpp
r2591 r3332 10 10 11 11 #include "./ContourToMeshx.h" 12 13 #undef __FUNCT__14 #define __FUNCT__ "ContourToMeshx"15 12 16 13 int ContourToMeshx( Vec* pin_nod,Vec* pin_elem, double* index, double* x, double* y,Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue) { -
issm/trunk/src/c/ContourToMeshx/ContourToMeshxt.cpp
r2591 r3332 10 10 11 11 #include "./ContourToMeshx.h" 12 13 #undef __FUNCT__14 #define __FUNCT__ "ContourToMeshxt"15 12 16 13 void* ContourToMeshxt(void* vpthread_handle){ -
issm/trunk/src/c/ContourToNodesx/ContourToNodesx.cpp
r2591 r3332 3 3 4 4 #include "./ContourToNodesx.h" 5 6 #undef __FUNCT__7 #define __FUNCT__ "ContourToNodesx"8 5 9 6 int ContourToNodesx( Vec* pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){ -
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp
r2583 r3332 4 4 5 5 #include "./ControlConstrainx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "ControlConstrainx"9 6 10 7 #include "../shared/shared.h" … … 23 20 for(i=0;i<numdofnodes;i++){ 24 21 if(isnan(p_g[i])){ 25 throw ErrorException(__FUNCT__,exprintf("NaN found in parameter p_g[%i]",i));22 ISSMERROR(exprintf("NaN found in parameter p_g[%i]",i)); 26 23 } 27 24 if(!isnan(cm_min)){ -
issm/trunk/src/c/CostFunctionx/CostFunctionx.cpp
r3180 r3332 4 4 5 5 #include "./CostFunctionx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "CostFunctionx"9 6 10 7 #include "../shared/shared.h" … … 30 27 31 28 /*If fit=3, compute Surface Area*/ 32 if(!inputs->Recover("fit",&fit)) throw ErrorException(__FUNCT__," missing fit input parameter");29 if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter"); 33 30 if (fit==3 && !inputs->IsPresent("surfacearea")){ 34 31 -
issm/trunk/src/c/DataSet/DataSet.cpp
r3180 r3332 3 3 * \brief: implementation of the DataSet class 4 4 */ 5 6 5 7 6 #ifdef HAVE_CONFIG_H … … 50 49 } 51 50 52 #undef __FUNCT__53 #define __FUNCT__ "DataSet::Echo"54 55 51 void DataSet::Echo(){ 56 52 … … 58 54 vector<Object*>::iterator object; 59 55 60 if(this==NULL) throw ErrorException(__FUNCT__," trying to echo a NULL dataset");56 if(this==NULL)ISSMERROR(" trying to echo a NULL dataset"); 61 57 62 58 _printf_("DataSet echo: %i objects\n",objects.size()); … … 71 67 } 72 68 73 #undef __FUNCT__74 #define __FUNCT__ "DataSet::DeepEcho"75 76 69 void DataSet::DeepEcho(){ 77 70 … … 79 72 vector<Object*>::iterator object; 80 73 81 if(this==NULL) throw ErrorException(__FUNCT__," trying to echo a NULL dataset");74 if(this==NULL)ISSMERROR(" trying to echo a NULL dataset"); 82 75 83 76 _printf_("DataSet echo: %i objects\n",objects.size()); … … 111 104 return marshalled_dataset_size; 112 105 } 113 #undef __FUNCT__114 #define __FUNCT__ "DataSet::Marshall"115 106 116 107 char* DataSet::Marshall(){ … … 152 143 * because this is a nasty error: */ 153 144 if (marshalled_dataset!=old_marshalled_dataset){ 154 _printf_("%s%s\n",__FUNCT__," error message: final marshalled dataset is different from initial one!");145 ISSMERROR("final marshalled dataset is different from initial one!"); 155 146 abort(); 156 147 } … … 184 175 } 185 176 186 #undef __FUNCT__187 #define __FUNCT__ "DataSetDemarshall"188 177 DataSet* DataSetDemarshall(char* marshalled_dataset){ 189 178 … … 314 303 } 315 304 else{ 316 throw ErrorException(__FUNCT__,exprintf("%s%i"," could not recognize enum type: ",enum_type));305 ISSMERROR(exprintf("%s%i"," could not recognize enum type: ",enum_type)); 317 306 } 318 307 … … 322 311 } 323 312 324 #undef __FUNCT__325 #define __FUNCT__ "DataSet::FindParam"326 313 int DataSet::FindParam(double* pscalar, char* name){ 327 314 … … 353 340 } 354 341 355 #undef __FUNCT__356 #define __FUNCT__ "DataSet::FindParam"357 342 int DataSet::FindParam(int* pinteger,char* name){ 358 343 … … 385 370 } 386 371 387 #undef __FUNCT__388 #define __FUNCT__ "DataSet::FindParam"389 372 int DataSet::FindParam(char** pstring,char* name){ 390 373 … … 416 399 417 400 } 418 #undef __FUNCT__419 #define __FUNCT__ "DataSet::FindParam"420 401 int DataSet::FindParam(char*** pstringarray,int* pM,char* name){ 421 402 … … 448 429 449 430 } 450 #undef __FUNCT__451 #define __FUNCT__ "DataSet::FindParam"452 431 int DataSet::FindParam(double** pdoublearray,int* pM, int* pN,char* name){ 453 432 … … 481 460 482 461 } 483 #undef __FUNCT__484 #define __FUNCT__ "DataSet::FindParam"485 462 int DataSet::FindParam(Vec* pvec,char* name){ 486 463 … … 512 489 513 490 } 514 #undef __FUNCT__515 #define __FUNCT__ "DataSet::FindParam"516 491 int DataSet::FindParam(Mat* pmat,char* name){ 517 492 … … 544 519 } 545 520 546 #undef __FUNCT__547 #define __FUNCT__ "DataSet::FindResult"548 521 int DataSet::FindResult(Vec* presult,char* name){ 549 522 … … 912 885 } 913 886 914 #undef __FUNCT__915 #define __FUNCT__ "DataSet::SetupSpcs"916 917 887 void DataSet::SetupSpcs(DataSet* nodes,Vec yg){ 918 888 … … 974 944 } 975 945 976 #undef __FUNCT__977 #define __FUNCT__ "DataSet::SetupMpcs"978 946 void DataSet::SetupMpcs(Mat Rmg,DataSet* nodes){ 979 947 … … 1013 981 if ((node1 && !node2) || (!node1 && node2)){ 1014 982 /*we are missing one node, not good!*/ 1015 throw ErrorException(__FUNCT__,exprintf("%s%p%s%p"," in Rgb, missing one node. node1: ",node1," node2: ",node2));983 ISSMERROR(exprintf("%s%p%s%p"," in Rgb, missing one node. node1: ",node1," node2: ",node2)); 1016 984 } 1017 985 … … 1144 1112 } 1145 1113 1146 #undef __FUNCT__1147 #define __FUNCT__ "DataSet::Sort"1148 1114 void DataSet::Sort(){ 1149 1115 1150 1116 /*Only sort if we are not already sorted: */ 1151 1117 if(!sorted){ 1152 throw ErrorException(__FUNCT__," not implemented yet!");1118 ISSMERROR(" not implemented yet!"); 1153 1119 } 1154 1120 } … … 1161 1127 } 1162 1128 1163 1164 1165 #undef __FUNCT__1166 #define __FUNCT__ "GetObjectById"1167 1129 Object* DataSet::GetObjectById(int* poffset,int eid){ 1168 1130 … … 1171 1133 int i; 1172 1134 1173 if(!sorted) throw ErrorException(__FUNCT__," trying to binary search on a non-sorted dataset!");1135 if(!sorted)ISSMERROR(" trying to binary search on a non-sorted dataset!"); 1174 1136 1175 1137 /*Carry out a binary search on the sorted_ids: */ 1176 1138 if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){ 1177 throw ErrorException(__FUNCT__,exprintf("%s%i"," could not find object with id ",eid));1139 ISSMERROR(exprintf("%s%i"," could not find object with id ",eid)); 1178 1140 } 1179 1141 … … 1187 1149 return objects[offset]; 1188 1150 } 1189 1190 1191 #undef __FUNCT__1192 #define __FUNCT__ "DataSet::SetSorting"1193 1151 1194 1152 void DataSet::SetSorting(int* in_sorted_ids,int* in_id_offsets){ … … 1199 1157 } 1200 1158 1201 #undef __FUNCT__1202 #define __FUNCT__ "DataSet::CreateKMatrix"1203 1159 void DataSet::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ 1204 1160 … … 1223 1179 } 1224 1180 1225 #undef __FUNCT__1226 #define __FUNCT__ "DataSet::CreatePVector"1227 1181 void DataSet::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){ 1228 1182 … … 1247 1201 } 1248 1202 1249 #undef __FUNCT__1250 #define __FUNCT__ "UpdateFromInputs"1251 1203 void DataSet::UpdateFromInputs(void* inputs){ 1252 1204 … … 1282 1234 } 1283 1235 1284 1285 #undef __FUNCT__1286 #define __FUNCT__ "DataSet::PenaltyCreateKMatrix"1287 1236 void DataSet::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 1288 1237 … … 1301 1250 } 1302 1251 1303 #undef __FUNCT__1304 #define __FUNCT__ "DataSet::PenaltyCreatePVector"1305 1252 void DataSet::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 1306 1253 … … 1319 1266 } 1320 1267 1321 #undef __FUNCT__1322 #define __FUNCT__ "RiftIsPresent"1323 1268 int DataSet::RiftIsPresent(){ 1324 1269 … … 1348 1293 } 1349 1294 1350 #undef __FUNCT__1351 #define __FUNCT__ "MeltingIsPresent"1352 1295 int DataSet::MeltingIsPresent(){ 1353 1296 … … 1374 1317 } 1375 1318 1376 #undef __FUNCT__1377 #define __FUNCT__ "MeltingConstraints"1378 1319 void DataSet::MeltingConstraints(int* pconverged, int* pnum_unstable_constraints,void* inputs,int analysis_type,int sub_analysis_type){ 1379 1320 … … 1417 1358 } 1418 1359 1419 #undef __FUNCT__1420 #define __FUNCT__ "DataSet::Copy"1421 1360 DataSet* DataSet::Copy(void){ 1422 1361 -
issm/trunk/src/c/Dofx/Dofx.cpp
r2333 r3332 4 4 5 5 #include "./Dofx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Dofx"9 6 10 7 #include "../shared/shared.h" … … 36 33 /*First, recover number of grids from parameters: */ 37 34 found=params->FindParam(&numberofnodes,"numberofnodes"); 38 if(!found) throw ErrorException(__FUNCT__," could not find numberofnodes in parameters");35 if(!found)ISSMERROR(" could not find numberofnodes in parameters"); 39 36 40 37 /*Recover number of dofs per node: */ 41 38 found=params->FindParam(&numberofdofspernode,"numberofdofspernode"); 42 if(!found) throw ErrorException(__FUNCT__," could not find numberofdofspernode in parameters");39 if(!found)ISSMERROR(" could not find numberofdofspernode in parameters"); 43 40 44 41 /*Ensure that only for each cpu, the partition border nodes only will be taken into account once -
issm/trunk/src/c/Dux/Dux.cpp
r3180 r3332 4 4 5 5 #include "./Dux.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Dux"9 6 10 7 #include "../shared/shared.h" … … 32 29 33 30 /*If fit=3, compute Surface Area*/ 34 if(!inputs->Recover("fit",&fit)) throw ErrorException(__FUNCT__," missing fit input parameter");31 if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter"); 35 32 if (fit==3 && !inputs->IsPresent("surfacearea")){ 36 33 -
issm/trunk/src/c/ElementConnectivityx/ElementConnectivityx.cpp
r1105 r3332 9 9 10 10 #include "./ElementConnectivityx.h" 11 12 #undef __FUNCT__13 #define __FUNCT__ "ElementConnectivityx"14 11 15 12 #include "../shared/shared.h" -
issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.cpp
r2333 r3332 4 4 5 5 #include "./FieldDepthAveragex.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "FieldDepthAveragex"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/FieldExtrudex/FieldExtrudex.cpp
r2333 r3332 4 4 5 5 #include "./FieldExtrudex.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "FieldExtrudex"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/Gradjx/Gradjx.cpp
r2333 r3332 4 4 5 5 #include "./Gradjx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Gradjx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/HoleFillerx/HoleFillerx.cpp
r3110 r3332 4 4 * for more details. 5 5 */ 6 7 #undef __FUNCT__8 #define __FUNCT__ "HoleFillerx"9 6 10 7 #include <stdio.h> -
issm/trunk/src/c/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
r2578 r3332 9 9 #endif 10 10 11 12 11 #include "./InterpFromGridToMeshx.h" 13 12 #include "../shared/shared.h" 14 15 #undef __FUNCT__ 16 #define __FUNCT__ "InterpFromGridToMeshx" 17 13 #include "../include/macros.h" 18 14 19 15 int InterpFromGridToMeshx( Vec* pdata_mesh,double* x_in, int x_rows, double* y_in, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods,double default_value) { … … 39 35 /*Some checks on arguments: */ 40 36 if ((M<=2) || (N<=2) || (nods<=0)){ 41 throw ErrorException(__FUNCT__,"nothing to be done according to the dimensions of input matrices and vectors.");37 ISSMERROR("nothing to be done according to the dimensions of input matrices and vectors."); 42 38 } 43 39 if (x_in[1]-x_in[0]<0){ 44 throw ErrorException(__FUNCT__,"x coordinate vectore should be increasing.\n use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");40 ISSMERROR("x coordinate vectore should be increasing.\n use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)"); 45 41 } 46 42 if (y_in[1]-y_in[0]<0){ 47 throw ErrorException(__FUNCT__,"y coordinate vectore should be increasing.\n use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");43 ISSMERROR("y coordinate vectore should be increasing.\n use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)"); 48 44 } 49 45 … … 71 67 } 72 68 else{ 73 throw ErrorException(__FUNCT__,"x and y vectors length should be 1 or 0 more than data number of rows.");69 ISSMERROR("x and y vectors length should be 1 or 0 more than data number of rows."); 74 70 } 75 71 -
issm/trunk/src/c/InterpFromGridToMeshx/InterpFromGridToMeshxt.cpp
r2550 r3332 5 5 #include "./InterpFromGridToMeshx.h" 6 6 #include "../shared/shared.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "InterpFromGridToMeshxt"10 7 11 8 void* InterpFromGridToMeshxt(void* vpthread_handle){ -
issm/trunk/src/c/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
r2333 r3332 5 5 #include "./InterpFromMeshToGridx.h" 6 6 #include "../shared/shared.h" 7 8 #undef __FUNCT__ 9 #define __FUNCT__ "InterpFromMeshToGridx" 7 #include "../include/macros.h" 10 8 11 9 void InterpFromMeshToGridx(double** px_m,double** py_m,double** pgriddata,double* index_mesh, double* x_mesh, double* y_mesh, int nods,int nels, double* data_mesh, int data_length, double cornereast,double cornernorth,double xposting,double yposting,int nlines,int ncols,double default_value) { … … 35 33 /*some checks*/ 36 34 if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){ 37 throw ErrorException(__FUNCT__,"nothing to be done according to the mesh given in input");35 ISSMERROR("nothing to be done according to the mesh given in input"); 38 36 } 39 37 … … 46 44 } 47 45 else{ 48 throw ErrorException(__FUNCT__,"length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");46 ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!"); 49 47 } 50 48 -
issm/trunk/src/c/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
r3301 r3332 3 3 4 4 #include "./InterpFromMeshToMesh2dx.h" 5 6 #undef __FUNCT__7 #define __FUNCT__ "InterpFromMeshToMesh2dx"8 5 9 6 #include "../shared/shared.h" … … 37 34 /*Checks*/ 38 35 if (data_cols<=0){ 39 throw ErrorException(__FUNCT__,exprintf("data provided has a negative number of columns"));36 ISSMERROR(exprintf("data provided has a negative number of columns")); 40 37 } 41 38 if (data_rows!=nods_data && data_rows!=nels_data){ 42 throw ErrorException(__FUNCT__,exprintf("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows));39 ISSMERROR(exprintf("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows)); 43 40 } 44 41 … … 104 101 for (j=0;j<data_cols;j++){ 105 102 if (it<0 || it>=nels_data){ 106 throw ErrorException(__FUNCT__,exprintf("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",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)); 107 104 } 108 105 data_interp[i*data_cols+j]=data[data_cols*it+j]; -
issm/trunk/src/c/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
r2362 r3332 5 5 #include "./InterpFromMeshToMesh3dx.h" 6 6 #include "../shared/shared.h" 7 8 #undef __FUNCT__ 9 #define __FUNCT__ "InterpFromMeshToMesh3dx" 7 #include "../include/macros.h" 10 8 11 9 int InterpFromMeshToMesh3dx( Vec* pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value) { … … 29 27 /*some checks*/ 30 28 if (nels_data<1 || nods_data<6 || nods_prime==0){ 31 throw ErrorException(__FUNCT__,"nothing to be done according to the mesh given in input");29 ISSMERROR("nothing to be done according to the mesh given in input"); 32 30 } 33 31 … … 43 41 } 44 42 else{ 45 throw ErrorException(__FUNCT__,"length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");43 ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!"); 46 44 } 47 45 -
issm/trunk/src/c/MassFluxx/MassFluxx.cpp
r2333 r3332 4 4 5 5 #include "./MassFluxx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "MassFluxx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
r1 r3332 4 4 5 5 #include "./Mergesolutionfromftogx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Mergesolutionfromftogx"9 6 10 7 void Mergesolutionfromftogx( Vec* pug, Vec uf, Mat Gmn, Vec ys, NodeSets* nodesets){ -
issm/trunk/src/c/MeshPartitionx/MeshPartitionx.cpp
r3067 r3332 2 2 * \brief partition elements and grids across a cluster of size numprocs. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "MeshPartitionx"7 4 8 5 #include "./MeshPartitionx.h" … … 11 8 #include "../toolkits/toolkits.h" 12 9 #include "../EnumDefinitions/EnumDefinitions.h" 13 14 10 15 11 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofgrids,double* elements, -
issm/trunk/src/c/Misfitx/Misfitx.cpp
r3180 r3332 4 4 5 5 #include "./Misfitx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Misfitx"9 6 10 7 #include "../shared/shared.h" … … 30 27 31 28 /*If fit=3, compute Surface Area*/ 32 if(!inputs->Recover("fit",&fit)) throw ErrorException(__FUNCT__," missing fit input parameter");29 if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter"); 33 30 if (fit==3 && !inputs->IsPresent("surfacearea")){ 34 31 -
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp
r2715 r3332 2 2 * CreateConstraintsBalancedthickness.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsBalancedthickness"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateElementsNodesAndMaterialsBalancedthickness.cpp
r2715 r3332 2 2 * CreateElementsNodesAndMaterialsBalancedthickness.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsBalancedthickness"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateLoadsBalancedthickness.cpp
r2715 r3332 1 1 /*! \file CreateLoadsBalancedthickness.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsBalancedthickness"6 3 7 4 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateParametersBalancedthickness.cpp
r2715 r3332 2 2 * \brief driver for creating parameters dataset, for prognostic analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersBalancedthickness"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateConstraintsBalancedvelocities.cpp
r2722 r3332 2 2 * CreateConstraintsBalancedvelocities.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsBalancedvelocities"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateElementsNodesAndMaterialsBalancedvelocities.cpp
r2722 r3332 2 2 * CreateElementsNodesAndMaterialsBalancedvelocities.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsBalancedvelocities"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateLoadsBalancedvelocities.cpp
r2722 r3332 1 1 /*! \file CreateLoadsBalancedvelocities.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsBalancedvelocities"6 3 7 4 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateParametersBalancedvelocities.cpp
r2722 r3332 2 2 * \brief driver for creating parameters dataset, for prognostic analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersBalancedvelocities"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp
r3203 r3332 2 2 * \brief driver for creating parameters dataset, for control analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParameters"7 4 8 5 #include "../../DataSet/DataSet.h" … … 11 8 #include "../../objects/objects.h" 12 9 #include "../../shared/shared.h" 10 #include "../../include/macros.h" 13 11 #include "../IoModel.h" 14 12 … … 60 58 if (strcmp(iomodel->control_type,"drag")==0) param->SetDouble(0); 61 59 else if (strcmp(iomodel->control_type,"B")==0) param->SetDouble(1); 62 else throw ErrorException(__FUNCT__,exprintf("control_type %s not supported yet!",iomodel->control_type));60 else ISSMERROR(exprintf("control_type %s not supported yet!",iomodel->control_type)); 63 61 parameters->AddObject(param); 64 62 -
issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp
r3086 r3332 9 9 #endif 10 10 11 #undef __FUNCT__12 #define __FUNCT__ "CreateElementsNodesAndMaterials"13 14 11 #include "./IoModel.h" 15 12 #include "../shared/shared.h" 13 #include "../include/macros.h" 16 14 #include "../EnumDefinitions/EnumDefinitions.h" 17 15 … … 104 102 else{ 105 103 106 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s"," analysis_type: ",iomodel->analysis_type," sub_analysis_type: ",iomodel->sub_analysis_type," not supported yet!"));104 ISSMERROR(exprintf("%s%i%s%i%s"," analysis_type: ",iomodel->analysis_type," sub_analysis_type: ",iomodel->sub_analysis_type," not supported yet!")); 107 105 108 106 } -
issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp
r3201 r3332 2 2 * \brief general driver for creating parameters dataset 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParameters"7 4 8 5 #include "../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r2333 r3332 2 2 * CreateConstraintsDiagnosticHoriz.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsDiagnosticHoriz"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
r2333 r3332 2 2 * CreateElementsNodesAndMaterialsDiagnosticHoriz.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticHoriz"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r3201 r3332 1 1 /*! \file CreateLoadsDiagnosticHoriz.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsDiagnosticHoriz"6 3 7 4 #include "../../DataSet/DataSet.h" … … 150 147 } 151 148 else{ 152 throw ErrorException(__FUNCT__,exprintf(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)));149 ISSMERROR(exprintf(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0))); 153 150 } 154 151 -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateParametersDiagnosticHoriz.cpp
r2333 r3332 2 2 * \brief driver for creating parameters dataset, for diagnostic horiz analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersDiagnosticHoriz"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
r2333 r3332 2 2 * CreateConstraintsDiagnosticHutter.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsDiagnosticHutter"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticHutter"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
r1835 r3332 2 2 */ 3 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsDiagnosticHutter"6 4 7 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateConstraintsDiagnosticStokes.cpp
r2333 r3332 2 2 * CreateConstraintsDiagnosticStokes.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsDiagnosticStokes"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp
r2333 r3332 2 2 * CreateElementsNodesAndMaterialsDiagnosticStokes.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticStokes"7 4 8 5 #include "../../DataSet/DataSet.h" … … 11 8 #include "../../objects/objects.h" 12 9 #include "../../shared/shared.h" 10 #include "../../include/macros.h" 13 11 #include "../../MeshPartitionx/MeshPartitionx.h" 14 12 #include "../IoModel.h" 15 13 16 17 14 void CreateElementsNodesAndMaterialsDiagnosticStokes(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){ 18 19 15 20 16 … … 158 154 /*2d mesh: */ 159 155 if (strcmp(iomodel->meshtype,"2d")==0){ 160 161 throw ErrorException(__FUNCT__," stokes elements only supported in 3d!"); 162 156 ISSMERROR(" stokes elements only supported in 3d!"); 163 157 } 164 158 else{ // if (strcmp(meshtype,"2d")==0) -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
r3105 r3332 1 1 /*! \file CreateLoadsDiagnosticStokes.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsDiagnosticStokes"6 3 7 4 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsDiagnosticHoriz"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticVert"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp
r1834 r3332 2 2 */ 3 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsDiagnosticVert"6 4 7 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/IoModel.cpp
r3203 r3332 287 287 --------------------------------------------------*/ 288 288 289 #undef __FUNCT__290 #define __FUNCT__ "IoModelInit"291 292 289 int IoModelInit(IoModel** piomodel,ConstDataHandle iomodel_handle){ 293 290 -
issm/trunk/src/c/ModelProcessorx/Melting/CreateConstraintsMelting.cpp
r1834 r3332 2 2 * CreateConstraintsMelting.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsMelting"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp
r2333 r3332 2 2 * CreateElementsNodesAndMaterialsMelting.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsMelting"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r2333 r3332 1 1 /*! \file CreateLoadsMelting.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsMelting"6 3 7 4 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp
r2333 r3332 2 2 * \brief driver for creating parameters dataset, for diagnostic horiz analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersMelting"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsPrognostic"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateElementsNodesAndMaterialsPrognostic.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsPrognostic"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r1834 r3332 2 2 */ 3 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsPrognostic"6 4 7 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersPrognostic"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp
r3043 r3332 2 2 * \brief general driver for creating parameters dataset 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersQmu"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateConstraintsSlopeCompute.cpp
r1833 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsSlopeCompute"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateElementsNodesAndMaterialsSlopeCompute.cpp
r2333 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsSlopeCompute"7 5 8 6 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateLoadsSlopeCompute.cpp
r1833 r3332 2 2 */ 3 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsSlopeCompute"6 4 7 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r2333 r3332 2 2 * CreateConstraintsThermal.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateConstraintsThermal"7 4 8 5 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp
r2333 r3332 2 2 * CreateElementsNodesAndMaterialsThermal.c: 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateElementsNodesAndMaterialsThermal"7 4 8 5 #include "../../DataSet/DataSet.h" … … 14 11 #include "../IoModel.h" 15 12 16 #undef __FUNCT__17 #define __FUNCT__ "CreateElementsNodesAndMaterialsThermal"18 13 void CreateElementsNodesAndMaterialsThermal(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){ 19 14 -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r2333 r3332 1 1 /*! \file CreateLoadsThermal.c: 2 2 */ 3 4 #undef __FUNCT__5 #define __FUNCT__ "CreateLoadsThermal"6 3 7 4 #include "../../DataSet/DataSet.h" -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp
r2358 r3332 2 2 * \brief driver for creating parameters dataset, for diagnostic horiz analysis. 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "CreateParametersThermal"7 4 8 5 #include "../../DataSet/DataSet.h" … … 11 8 #include "../../objects/objects.h" 12 9 #include "../../shared/shared.h" 10 #include "../../include/macros.h" 13 11 #include "../IoModel.h" 14 12 … … 83 81 param= new Param(count,"t_g",DOUBLEVEC); 84 82 if(temperature) param->SetDoubleVec(temperature,iomodel->numberofnodes,1); 85 else throw ErrorException(__FUNCT__,exprintf("Missing initial temperature"));83 else ISSMERROR(exprintf("Missing initial temperature")); 86 84 parameters->AddObject(param); 87 85 -
issm/trunk/src/c/MpcNodesx/MpcNodesx.cpp
r1 r3332 4 4 5 5 #include "./MpcNodesx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "MpcNodesx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/NodeConnectivityx/NodeConnectivityx.cpp
r2263 r3332 12 12 13 13 #include "./NodeConnectivityx.h" 14 15 #undef __FUNCT__16 #define __FUNCT__ "NodeConnectivityx"17 14 18 15 #include "../shared/shared.h" … … 74 71 * warn the user to increase the connectivity width: */ 75 72 for(i=0;i<nods;i++){ 76 if (*(connectivity+width*i+maxels)>maxels) throw ErrorException(__FUNCT__,exprintf("%s%g%s"," max connectivity width reached (",73 if (*(connectivity+width*i+maxels)>maxels)ISSMERROR(exprintf("%s%g%s"," max connectivity width reached (", 77 74 *(connectivity+width*i+maxels),")! increase width of connectivity table")); 78 75 } -
issm/trunk/src/c/NormalizeConstraintsx/NormalizeConstraintsx.cpp
r832 r3332 6 6 7 7 #include "../shared/shared.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "NormalizeConstraintsx"11 8 12 9 void NormalizeConstraintsx( Mat* pGmn, Mat Rmg, NodeSets* nodesets){ -
issm/trunk/src/c/Orthx/Orthx.cpp
r236 r3332 4 4 5 5 #include "./Orthx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Orthx"9 6 10 7 void Orthx( Vec* pnewgradj, Vec gradj, Vec oldgradj){ -
issm/trunk/src/c/OutputRiftsx/OutputRiftsx.cpp
r1805 r3332 5 5 6 6 #include "./OutputRiftsx.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "OutputRiftsx"10 7 11 8 #include "../shared/shared.h" -
issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp
r3201 r3332 5 5 #include "./PenaltyConstraintsx.h" 6 6 #include "./RiftConstraints.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "PenaltyConstraintsx"10 7 11 8 #include "../shared/shared.h" -
issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp
r3201 r3332 10 10 #define _ZIGZAGCOUNTER_ 11 11 12 #undef __FUNCT__13 #define __FUNCT__ "RiftConstrain"14 12 int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int min_mechanical_constraints,int analysis_type,int sub_analysis_type){ 15 13 … … 37 35 } 38 36 39 #undef __FUNCT__40 #define __FUNCT__ "IsMaterialStable"41 37 int IsMaterialStable(DataSet* loads,ParameterInputs* inputs,int analysis_type){ 42 38 … … 70 66 } 71 67 72 #undef __FUNCT__73 #define __FUNCT__ "RiftIsPresent"74 75 68 int RiftIsPresent(DataSet* loads){ 76 69 … … 98 91 return found; 99 92 } 100 101 #undef __FUNCT__102 #define __FUNCT__ "IsPreStable"103 93 104 94 int IsPreStable(DataSet* loads){ … … 140 130 } 141 131 142 #undef __FUNCT__143 #define __FUNCT__ "SetPreStable"144 145 132 int SetPreStable(DataSet* loads){ 146 133 … … 162 149 } 163 150 } 164 165 #undef __FUNCT__166 #define __FUNCT__ "PreConstrain"167 151 168 152 int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){ … … 201 185 } 202 186 203 #undef __FUNCT__204 #define __FUNCT__ "Constrain"205 206 187 int Constrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){ 207 188 … … 239 220 } 240 221 241 #undef __FUNCT__242 #define __FUNCT__ "FreezeConstraints"243 244 222 void FreezeConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){ 245 223 … … 263 241 } 264 242 265 #undef __FUNCT__266 #define __FUNCT__ "IsFrozen"267 243 int IsFrozen(DataSet* loads){ 268 244 … … 297 273 } 298 274 299 #undef __FUNCT__300 #define __FUNCT__ "MaxPenetrationInInputs"301 302 275 int MaxPenetrationInInputs(DataSet* loads,ParameterInputs* inputs,int analysis_type){ 303 276 … … 341 314 inputs->Add("max_penetration",max_penetration); 342 315 } 343 344 345 #undef __FUNCT__346 #define __FUNCT__ "PotentialUnstableConstraints"347 316 348 317 int PotentialUnstableConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){ -
issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp
r2333 r3332 4 4 5 5 #include "./PenaltySystemMatricesx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "PenaltySystemMatricesx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/ProcessParamsx/ProcessParamsx.cpp
r2496 r3332 8 8 9 9 #include "./ProcessParamsx.h" 10 11 #undef __FUNCT__12 #define __FUNCT__ "ProcessParamsx"13 10 14 11 #include "../shared/shared.h" -
issm/trunk/src/c/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp
r2888 r3332 3 3 4 4 #include "./PropagateFlagsFromConnectivityx.h" 5 6 #undef __FUNCT__7 #define __FUNCT__ "PropagateFlagsFromConnectivityx"8 5 9 6 #include "../shared/shared.h" -
issm/trunk/src/c/Qmux/DakotaResponses.cpp
r3169 r3332 11 11 #include "../DataSet/DataSet.h" 12 12 #include "../shared/shared.h" 13 #include "../include/macros.h" 13 14 #include "../EnumDefinitions/EnumDefinitions.h" 14 15 #include "../MassFluxx/MassFluxx.h" 15 16 #include "../Misfitx/Misfitx.h" 16 17 17 #undef __FUNCT__18 #define __FUNCT__ "DakotaResponses"19 18 void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,Model* model,DataSet* results,DataSet* processed_results,ParameterInputs* inputs,int analysis_type,int sub_analysis_type){ 20 19 … … 40 39 41 40 found=processed_results->FindResult((void*)&vel,"vel"); 42 if(!found) throw ErrorException(__FUNCT__," could not find vel to compute min_vel");41 if(!found)ISSMERROR(" could not find vel to compute min_vel"); 43 42 44 43 min_vel=vel[0]; … … 59 58 60 59 found=processed_results->FindResult((void*)&vel,"vel"); 61 if(!found) throw ErrorException(__FUNCT__," could not find vel to compute max_vel");60 if(!found)ISSMERROR(" could not find vel to compute max_vel"); 62 61 63 62 max_vel=vel[0]; … … 76 75 77 76 found=processed_results->FindResult((void*)&vx,"vx"); 78 if(!found) throw ErrorException(__FUNCT__," could not find vx to compute min_vx");77 if(!found)ISSMERROR(" could not find vx to compute min_vx"); 79 78 80 79 min_vx=vx[0]; … … 93 92 94 93 found=processed_results->FindResult((void*)&vx,"vx"); 95 if(!found) throw ErrorException(__FUNCT__," could not find vx to compute max_vx");94 if(!found)ISSMERROR(" could not find vx to compute max_vx"); 96 95 97 96 max_vx=vx[0]; … … 110 109 111 110 found=processed_results->FindResult((void*)&vx,"vx"); 112 if(!found) throw ErrorException(__FUNCT__," could not find vx to compute max_abs_vx");111 if(!found)ISSMERROR(" could not find vx to compute max_abs_vx"); 113 112 114 113 max_abs_vx=fabs(vx[0]); … … 127 126 128 127 found=processed_results->FindResult((void*)&vy,"vy"); 129 if(!found) throw ErrorException(__FUNCT__," could not find vy to compute min_vy");128 if(!found)ISSMERROR(" could not find vy to compute min_vy"); 130 129 131 130 min_vy=vy[0]; … … 144 143 145 144 found=processed_results->FindResult((void*)&vy,"vy"); 146 if(!found) throw ErrorException(__FUNCT__," could not find vy to compute max_vy");145 if(!found)ISSMERROR(" could not find vy to compute max_vy"); 147 146 148 147 max_vy=vy[0]; … … 161 160 162 161 found=processed_results->FindResult((void*)&vy,"vy"); 163 if(!found) throw ErrorException(__FUNCT__," could not find vy to compute max_abs_vy");162 if(!found)ISSMERROR(" could not find vy to compute max_abs_vy"); 164 163 165 164 max_abs_vy=fabs(vy[0]); … … 178 177 179 178 found=processed_results->FindResult((void*)&vz,"vz"); 180 if(!found) throw ErrorException(__FUNCT__," could not find vz to compute min_vz");179 if(!found)ISSMERROR(" could not find vz to compute min_vz"); 181 180 182 181 min_vz=vz[0]; … … 195 194 196 195 found=processed_results->FindResult((void*)&vz,"vz"); 197 if(!found) throw ErrorException(__FUNCT__," could not find vz to compute max_vz");196 if(!found)ISSMERROR(" could not find vz to compute max_vz"); 198 197 199 198 max_vz=vz[0]; … … 212 211 213 212 found=processed_results->FindResult((void*)&vz,"vz"); 214 if(!found) throw ErrorException(__FUNCT__," could not find vz to compute max_abs_vz");213 if(!found)ISSMERROR(" could not find vz to compute max_abs_vz"); 215 214 216 215 max_abs_vz=fabs(vz[0]); … … 257 256 found=results->FindResult(&u_g,"u_g"); 258 257 VecToMPISerial(&u_g_double,u_g); 259 if(!found) throw ErrorException(__FUNCT__," could not find velocity to compute misfit");258 if(!found)ISSMERROR(" could not find velocity to compute misfit"); 260 259 261 260 /*Add to inputs: */ … … 292 291 /*retrieve velocities: */ 293 292 found=results->FindResult(&ug,"u_g"); 294 if(!found) throw ErrorException(__FUNCT__," could not find velocity to compute mass_flux");293 if(!found)ISSMERROR(" could not find velocity to compute mass_flux"); 295 294 VecToMPISerial(&ug_serial,ug); 296 295 … … 312 311 /*retrieve qmu_mass_flux_segments: */ 313 312 param=(Param*)femmodel->parameters->FindParamObject("qmu_mass_flux_segments"); 314 if(!param) throw ErrorException(__FUNCT__," could not find qmu_mass_flux_segments to compute mass_flux");313 if(!param)ISSMERROR(" could not find qmu_mass_flux_segments to compute mass_flux"); 315 314 316 315 param->GetParameterValue(&segments); … … 329 328 else{ 330 329 if(my_rank==0)printf("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"); 331 throw ErrorException(__FUNCT__,exprintf("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"));330 ISSMERROR(exprintf("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!")); 332 331 } 333 332 } -
issm/trunk/src/c/Qmux/Qmux.cpp
r2048 r3332 27 27 */ 28 28 29 30 31 29 #ifdef HAVE_CONFIG_H 32 30 #include "config.h" … … 34 32 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 35 33 #endif 36 37 38 #undef __FUNCT__39 #define __FUNCT__ "Qmux"40 34 41 35 #include "./Qmux.h" -
issm/trunk/src/c/Qmux/SpawnCore.cpp
r2048 r3332 9 9 #endif 10 10 11 #undef __FUNCT__12 #define __FUNCT__ "SpawnCore"13 11 14 12 #include "../objects/objects.h" -
issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
r3056 r3332 25 25 #endif 26 26 27 #undef __FUNCT__28 #define __FUNCT__ "SpawnCoreParallel"29 27 30 28 #include "../objects/objects.h" … … 63 61 /*First off, recover the response descriptors for the response functions: */ 64 62 param=(Param*)model->GetFormulation(DiagnosticAnalysisEnum(),HorizAnalysisEnum())->parameters->FindParamObject("responsedescriptors"); 65 if(!param) throw ErrorException(__FUNCT__," could not find response descriptors!");63 if(!param)ISSMERROR(" could not find response descriptors!"); 66 64 67 65 param->GetParameterValue(&responses_descriptors); … … 156 154 157 155 } 158 else throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s"," analysis_type ",analysis_type," and sub_analysis_type ",sub_analysis_type," not supported yet!"));156 else ISSMERROR(exprintf("%s%i%s%i%s"," analysis_type ",analysis_type," and sub_analysis_type ",sub_analysis_type," not supported yet!")); 159 157 160 158 -
issm/trunk/src/c/Qmux/SpawnCoreSerial.cpp
r1842 r3332 11 11 #endif 12 12 13 #undef __FUNCT__14 #define __FUNCT__ "SpawnCoreSerial"15 13 16 14 #include "../objects/objects.h" -
issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp
r3223 r3332 9 9 #endif 10 10 11 12 11 #include "./Reduceloadfromgtofx.h" 13 14 #undef __FUNCT__15 #define __FUNCT__ "Reduceloadfromgtofx"16 12 17 13 void Reduceloadfromgtofx( Vec* ppf, Vec pg, Mat G_mn, Mat Kfs, Vec y_s, NodeSets* nodesets){ -
issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp
r1 r3332 4 4 5 5 #include "./Reducematrixfromgtofx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "Reducematrixfromgtofx"9 6 10 7 void Reducematrixfromgtofx( Mat* pKff, Mat* pKfs,Mat Kgg,Mat Gmn,NodeSets* nodesets){ -
issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp
r3223 r3332 9 9 #endif 10 10 11 #undef __FUNCT__12 #define __FUNCT__ "Reducematrixfromgton"13 14 11 #include "../toolkits/toolkits.h" 15 16 12 17 13 void Reducematrixfromgton(Mat* pKnn,Mat Kgg,Mat Gmn,double* pv_m,int msize, double* pv_n,int nsize,int flag){ -
issm/trunk/src/c/Reducevectorgtofx/Reducevectorgtofx.cpp
r1665 r3332 5 5 6 6 #include "./Reducevectorgtofx.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "Reducevectorgtofx"10 7 11 8 void Reducevectorgtofx(Vec* puf, Vec ug, NodeSets* nodesets){ -
issm/trunk/src/c/Reducevectorgtosx/Reducevectorgtosx.cpp
r304 r3332 5 5 6 6 #include "./Reducevectorgtosx.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "Reducevectorgtosx"10 7 11 8 void Reducevectorgtosx( Vec* pys, Vec* pys0, Vec yg, NodeSets* nodesets){ -
issm/trunk/src/c/Solverx/Solverx.cpp
r3226 r3332 5 5 #include "./Solverx.h" 6 6 7 #undef __FUNCT__8 #define __FUNCT__ "Solverx"9 10 7 #include "../shared/shared.h" 8 #include "../include/macros.h" 11 9 12 10 #ifdef HAVE_CONFIG_H … … 104 102 KSPGetIterationNumber(ksp,&iteration_number); 105 103 if (iteration_number<0){ 106 throw ErrorException(__FUNCT__,exprintf("%s%i"," Solver diverged at iteration number: ",-iteration_number));104 ISSMERROR(exprintf("%s%i"," Solver diverged at iteration number: ",-iteration_number)); 107 105 } 108 106 else{ -
issm/trunk/src/c/SpcNodesx/SpcNodesx.cpp
r2316 r3332 4 4 5 5 #include "./SpcNodesx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "SpcNodesx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/SurfaceAreax/SurfaceAreax.cpp
r3180 r3332 4 4 5 5 #include "./SurfaceAreax.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "SurfaceAreax"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp
r2333 r3332 4 4 5 5 #include "./SystemMatricesx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "SystemMatricesx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/UpdateFromInputsx/UpdateFromInputsx.cpp
r2333 r3332 4 4 5 5 #include "./UpdateFromInputsx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "UpdateFromInputsx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.cpp
r2333 r3332 4 4 5 5 #include "./UpdateGeometryx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "UpdateGeometryx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/UpdateNodePositionsx/UpdateNodePositionsx.cpp
r2333 r3332 4 4 5 5 #include "./UpdateNodePositionsx.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "UpdateNodePositionsx"9 6 10 7 #include "../shared/shared.h" -
issm/trunk/src/c/io/FetchData.cpp
r2333 r3332 11 11 #include "./io.h" 12 12 #include "../shared/shared.h" 13 14 #undef __FUNCT__ 15 #define __FUNCT__ "FetchData" 16 17 13 #include "../include/macros.h" 18 14 19 15 /***************** **************** **************** **************** **************** **************** **************** **************** **************** **************** … … 50 46 else{ 51 47 /*This is an error: we don't have the correct input!: */ 52 throw ErrorException(__FUNCT__," wrong input parameter!");48 ISSMERROR(" wrong input parameter!"); 53 49 } 54 50 } … … 85 81 else{ 86 82 /*This is an error: we don't have the correct input!: */ 87 throw ErrorException(__FUNCT__,"wrong input parameter");83 ISSMERROR("wrong input parameter"); 88 84 } 89 85 … … 120 116 else{ 121 117 /*This is an error: we don't have the correct input!: */ 122 throw ErrorException(__FUNCT__,"wrong input parameter");118 ISSMERROR("wrong input parameter"); 123 119 } 124 120 … … 145 141 else{ 146 142 /*This is an error: we don't have the correct input!: */ 147 throw ErrorException(__FUNCT__,"wrong input parameter");143 ISSMERROR("wrong input parameter"); 148 144 } 149 145 … … 169 165 else{ 170 166 /*This is an error: we don't have the correct input!: */ 171 throw ErrorException(__FUNCT__,"wrong input parameter");167 ISSMERROR("wrong input parameter"); 172 168 } 173 169 … … 183 179 /*Ok, the string should be coming directly from the matlab workspace: */ 184 180 if (!mxIsChar(dataref)){ 185 throw ErrorException(__FUNCT__,"input data_type is not a string!");181 ISSMERROR("input data_type is not a string!"); 186 182 } 187 183 else{ … … 203 199 204 200 if (!mxIsDouble(dataref)){ 205 throw ErrorException(__FUNCT__,"input data_type is not a scalar!");201 ISSMERROR("input data_type is not a scalar!"); 206 202 } 207 203 else{ … … 219 215 220 216 if (!mxIsDouble(dataref)){ 221 throw ErrorException(__FUNCT__,"input data_type is not a scalar!");217 ISSMERROR("input data_type is not a scalar!"); 222 218 } 223 219 else{ … … 251 247 /*numberofelements: */ 252 248 if(my_rank==0){ 253 if(fread(&M,sizeof(int),1,fid)!=1) throw ErrorException(__FUNCT__,"could not read number of rows for matrix ");249 if(fread(&M,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of rows for matrix "); 254 250 } 255 251 … … 257 253 258 254 if(my_rank==0){ 259 if(fread(&N,sizeof(int),1,fid)!=1) throw ErrorException(__FUNCT__,"could not read number of columns for matrix ");255 if(fread(&N,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of columns for matrix "); 260 256 } 261 257 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); … … 267 263 /*Read matrix on node 0, then broadcast: */ 268 264 if(my_rank==0){ 269 if(fread(matrix,M*N*sizeof(double),1,fid)!=1) throw ErrorException(__FUNCT__,"could not read matrix ");265 if(fread(matrix,M*N*sizeof(double),1,fid)!=1) ISSMERROR("could not read matrix "); 270 266 } 271 267 … … 292 288 /*We have to read a string from disk. First read the dimensions of the string, then the string: */ 293 289 if(my_rank==0){ 294 if(fread(&string_size,sizeof(int),1,fid)!=1) throw ErrorException(__FUNCT__," could not read length of string ");290 if(fread(&string_size,sizeof(int),1,fid)!=1) ISSMERROR(" could not read length of string "); 295 291 } 296 292 … … 304 300 /*Read string on node 0, then broadcast: */ 305 301 if(my_rank==0){ 306 if(fread(string,string_size*sizeof(char),1,fid)!=1) throw ErrorException(__FUNCT__," could not read string ");302 if(fread(string,string_size*sizeof(char),1,fid)!=1)ISSMERROR(" could not read string "); 307 303 } 308 304 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); … … 329 325 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ 330 326 if(my_rank==0){ 331 if(fread(&scalar,sizeof(double),1,fid)!=1) throw ErrorException(__FUNCT__," could not read scalar ");327 if(fread(&scalar,sizeof(double),1,fid)!=1)ISSMERROR(" could not read scalar "); 332 328 } 333 329 MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); … … 348 344 /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */ 349 345 if(my_rank==0){ 350 if(fread(&integer,sizeof(int),1,fid)!=1) throw ErrorException(__FUNCT__," could not read integer ");346 if(fread(&integer,sizeof(int),1,fid)!=1) ISSMERROR(" could not read integer "); 351 347 } 352 348 -
issm/trunk/src/c/io/FetchNodeSets.cpp
r2333 r3332 8 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 9 9 #endif 10 11 #undef __FUNCT__12 #define __FUNCT__ "FetchNodeSets"13 10 14 11 #ifdef _SERIAL_ -
issm/trunk/src/c/io/FetchParams.cpp
r2714 r3332 9 9 #endif 10 10 11 12 11 #ifdef _SERIAL_ 13 12 … … 17 16 #include "./io.h" 18 17 #include "../shared/shared.h" 19 20 #undef __FUNCT__ 21 #define __FUNCT__ "FetchParams" 18 #include "../include/macros.h" 22 19 23 20 void FetchParams(DataSet** pparameters, DataHandle dataref){ … … 66 63 67 64 if (M==0 | N==0){ 68 throw ErrorException(__FUNCT__,exprintf("%s%s%i (%s) %s%i%s%i%s",__FUNCT__," error message:array in parameters structure field ",count,name," is of size (",M,",",N,")"));65 ISSMERROR(exprintf("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")")); 69 66 } 70 67 … … 150 147 151 148 } 152 else throw ErrorException(__FUNCT__,exprintf("%s%s%i",__FUNCT__," error message:unknow type in parameters structure field ",i));149 else ISSMERROR(exprintf("%s%i","unknow type in parameters structure field ",i)); 153 150 } 154 151 -
issm/trunk/src/c/io/IoModelFetchData.cpp
r2333 r3332 12 12 #include "../ModelProcessorx/IoModel.h" 13 13 #include "../shared/shared.h" 14 15 14 #include "../include/macros.h" 16 15 17 16 #ifdef _SERIAL_ … … 125 124 MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 126 125 127 if(!found) throw ErrorException(__FUNCT__,exprintf("%s %s ","could not find data with name",data_name));126 if(!found)ISSMERROR(exprintf("%s %s ","could not find data with name",data_name)); 128 127 129 128 return fid; -
issm/trunk/src/c/io/ParameterInputsInit.cpp
r246 r3332 14 14 #include "../include/macros.h" 15 15 #include "./io.h" 16 17 #undef __FUNCT__18 #define __FUNCT__ "ParameterInputsInit"19 16 20 17 #ifdef _SERIAL_ … … 85 82 break; 86 83 default: 87 throw ErrorException(__FUNCT__,exprintf("%s%i"," unknow parameter input type ",type));84 ISSMERROR(exprintf("%s%i"," unknow parameter input type ",type)); 88 85 } 89 86 -
issm/trunk/src/c/io/WriteData.cpp
r3324 r3332 12 12 #include "./shared/shared.h" 13 13 #include "./io.h" 14 15 #undef __FUNCT__16 #define __FUNCT__ "WriteData"17 14 18 15 #ifdef _SERIAL_ -
issm/trunk/src/c/io/WriteDataToDisk.cpp
r1 r3332 2 2 * \brief 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "WriteDataToDisk"7 4 8 5 #include "stdio.h" … … 68 65 } 69 66 else{ 70 _printf_("%s%s\n",__FUNCT__," error message:data type not supported yet!");67 ISSMERROR("data type not supported yet!"); 71 68 } 72 69 } -
issm/trunk/src/c/io/WriteNodeSets.cpp
r1439 r3332 8 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 9 9 #endif 10 11 #undef __FUNCT__12 #define __FUNCT__ "WriteNodeSets"13 10 14 11 #ifdef _SERIAL_ -
issm/trunk/src/c/io/WriteParams.cpp
r2333 r3332 16 16 #include "./io.h" 17 17 #include "../shared/shared.h" 18 #include "../include/macros.h" 18 19 19 #undef __FUNCT__20 #define __FUNCT__ "WriteParams"21 20 void WriteParams(DataHandle* pdataref,DataSet* parameters){ 22 21 … … 143 142 break; 144 143 default: 145 throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type: ",param->GetType()));144 ISSMERROR(exprintf("%s%i","unknown parameter type: ",param->GetType())); 146 145 break; 147 146 } -
issm/trunk/src/c/io/pfclose.cpp
r3143 r3332 11 11 #include "stdio.h" 12 12 #include "../shared/shared.h" 13 14 #undef __FUNCT__ 15 #define __FUNCT__ "pfclose" 13 #include "../include/macros.h" 16 14 17 15 void pfclose(FILE* fid,char* filename){ … … 20 18 extern int my_rank; 21 19 if(my_rank==0){ 22 if(fclose(fid)!=0) throw ErrorException(__FUNCT__,exprintf("%s%s","could not close file ",filename));20 if(fclose(fid)!=0)ISSMERROR(exprintf("%s%s","could not close file ",filename)); 23 21 } 24 22 } -
issm/trunk/src/c/io/pfopen.cpp
r3142 r3332 11 11 #include "stdio.h" 12 12 #include "../shared/shared.h" 13 14 #undef __FUNCT__ 15 #define __FUNCT__ "pfopen" 13 #include "../include/macros.h" 16 14 17 15 FILE* pfopen(char* filename,char* format){ … … 23 21 if(my_rank==0){ 24 22 fid=fopen(filename,format); 25 if(fid==NULL) throw ErrorException(__FUNCT__,exprintf("%s%s%s","could not open file ",filename," for binary reading or writing"));23 if(fid==NULL) ISSMERROR(exprintf("%s%s%s","could not open file ",filename," for binary reading or writing")); 26 24 } 27 25 -
issm/trunk/src/c/objects/BamgOpts.cpp
r3329 r3332 1 1 #include "stdio.h" 2 2 #include "../shared/shared.h" 3 #include "../include/macros.h" 3 4 #include "./BamgOpts.h" 4 5 … … 40 41 int i; 41 42 42 if (bamgopts->coef==0) throw ErrorException(__FUNCT__,exprintf("'coef' should be positive"));43 if (bamgopts->maxsubdiv<=1) throw ErrorException(__FUNCT__,exprintf("'maxsubdiv' should be >1"));44 if (bamgopts->Crack!=0 && bamgopts->Crack!=1) throw ErrorException(__FUNCT__,exprintf("'Crack' supported options are 0 and 1"));45 if (bamgopts->Hessiantype!=0 && bamgopts->Hessiantype!=1) throw ErrorException(__FUNCT__,exprintf("'Hessiantype' supported options are 0 and 1"));46 if (bamgopts->Metrictype!=0 && bamgopts->Metrictype!=1 && bamgopts->Metrictype!=2) throw ErrorException(__FUNCT__,exprintf("'Metrictype' supported options are 0, 1 and 2"));47 if (bamgopts->KeepVertices!=0 && bamgopts->KeepVertices!=1) throw ErrorException(__FUNCT__,exprintf("'KeepVertices' supported options are 0 and 1"));48 if (bamgopts->errg<0) throw ErrorException(__FUNCT__,exprintf("'errg' option should be >0"));49 if (bamgopts->nbjacobi<=0) throw ErrorException(__FUNCT__,exprintf("'nbjacobi' option should be >0"));50 if (bamgopts->geometricalmetric!=0 && bamgopts->geometricalmetric!=1) throw ErrorException(__FUNCT__,exprintf("'geometricalmetric' supported options are 0 and 1"));51 if (bamgopts->NbSmooth<=0) throw ErrorException(__FUNCT__,exprintf("'NbSmooth' option should be >0"));52 if (bamgopts->maxnbv<3) throw ErrorException(__FUNCT__,exprintf("'maxnbv' option should be >3"));53 if (bamgopts->hmin<=0) throw ErrorException(__FUNCT__,exprintf("'hmin' option should be >0"));54 if (bamgopts->hmax<=0 || bamgopts->hmax<bamgopts->hmin) throw ErrorException(__FUNCT__,exprintf("'hmax' option should be between 0 and hmin=%g",bamgopts->hmin));55 if (bamgopts->anisomax<1) throw ErrorException(__FUNCT__,exprintf("'anisomax' option should be >=1"));56 if (bamgopts->gradation<1) throw ErrorException(__FUNCT__,exprintf("'gradation' option should be >=1"));57 for (i=0;i<bamgopts->numfields;i++) {if (bamgopts->err[i]<=0) throw ErrorException(__FUNCT__,exprintf("'err' option should be >0"));};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"));}; 58 59 59 60 } -
issm/trunk/src/c/objects/Beam.cpp
r3180 r3332 16 16 #include "../DataSet/DataSet.h" 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 19 20 20 /*Object constructors and destructor*/ … … 167 167 /*Object functions*/ 168 168 /*FUNCTION Beam ComputePressure{{{1*/ 169 #undef __FUNCT__170 #define __FUNCT__ "Beam::ComputePressure"171 169 void Beam::ComputePressure(Vec p_g){ 172 170 … … 197 195 /*}}}*/ 198 196 /*FUNCTION Beam Configure{{{1*/ 199 #undef __FUNCT__200 #define __FUNCT__ "Beam::Configure"201 197 void Beam::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){ 202 198 … … 234 230 /*}}}*/ 235 231 /*FUNCTION Beam CostFunction{{{1*/ 236 #undef __FUNCT__237 #define __FUNCT__ "Beam::CostFunction"238 232 double Beam::CostFunction(void*,int,int){ 239 throw ErrorException(__FUNCT__," not supported yet!");233 ISSMERROR(" not supported yet!"); 240 234 } 241 235 /*}}}*/ 242 236 /*FUNCTION Beam CreateKMatrix{{{1*/ 243 #undef __FUNCT__244 #define __FUNCT__ "Beam::CreateKMatrix"245 237 246 238 void Beam::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 254 246 } 255 247 else 256 throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis_type: ",sub_analysis_type," not supported yet"));248 ISSMERROR(exprintf("%s%i%s\n","sub_analysis_type: ",sub_analysis_type," not supported yet")); 257 249 } 258 250 else{ 259 throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));251 ISSMERROR(exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet")); 260 252 } 261 253 … … 263 255 /*}}}*/ 264 256 /*FUNCTION Beam CreateKMatrixDiagnosticHutter{{{1*/ 265 #undef __FUNCT__266 #define __FUNCT__ "Beam::CreateKMatrixDiagnosticHutter"267 257 268 258 void Beam::CreateKMatrixDiagnosticHutter(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ … … 299 289 /*}}}*/ 300 290 /*FUNCTION Beam CreatePVector{{{1*/ 301 #undef __FUNCT__302 #define __FUNCT__ "Beam::CreatePVector"303 291 void Beam::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){ 304 292 … … 309 297 } 310 298 else 311 throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));299 ISSMERROR(exprintf("%s%i%s"," analysis ",analysis_type," not supported yet")); 312 300 } 313 301 else{ 314 throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));302 ISSMERROR(exprintf("%s%i%s"," analysis ",analysis_type," not supported yet")); 315 303 } 316 304 … … 318 306 /*}}}*/ 319 307 /*FUNCTION Beam CreatePVectorDiagnosticHutter{{{1*/ 320 #undef __FUNCT__321 #define __FUNCT__ "Beam::CreatePVectorDiagnosticHutter"322 308 323 309 void Beam::CreatePVectorDiagnosticHutter( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ … … 370 356 //recover extra inputs 371 357 found=inputs->Recover("surfaceslopex",&slope[0],1,dofs,1,(void**)&nodes[0]); //only recover from fist node, second node will have the same slope 372 if(!found) throw ErrorException(__FUNCT__," surfaceslopex missing from inputs!");358 if(!found)ISSMERROR(" surfaceslopex missing from inputs!"); 373 359 374 360 found=inputs->Recover("surfaceslopey",&slope[1],1,dofs,1,(void**)&nodes[0]);//only recover from fist node, second node will have the same slope 375 if(!found) throw ErrorException(__FUNCT__," surfaceslopey missing from inputs!");361 if(!found)ISSMERROR(" surfaceslopey missing from inputs!"); 376 362 377 363 //Get all element grid data: … … 434 420 /*}}}*/ 435 421 /*FUNCTION Beam DeepEcho{{{1*/ 436 #undef __FUNCT__437 #define __FUNCT__ "Beam::DeepEcho"438 422 void Beam::DeepEcho(void){ 439 423 … … 461 445 /*}}}*/ 462 446 /*FUNCTION Beam Du{{{1*/ 463 #undef __FUNCT__464 #define __FUNCT__ "Beam::Du"465 447 void Beam::Du(_p_Vec*,void*,int,int){ 466 throw ErrorException(__FUNCT__," not supported yet!");448 ISSMERROR(" not supported yet!"); 467 449 } 468 450 /*}}}*/ 469 451 /*FUNCTION Beam Echo {{{1*/ 470 #undef __FUNCT__471 #define __FUNCT__ "Beam::Echo"472 452 void Beam::Echo(void){ 473 453 … … 502 482 /*}}}*/ 503 483 /*FUNCTION Beam GetBedList{{{1*/ 504 #undef __FUNCT__505 #define __FUNCT__ "Beam::GetBedList"506 484 void Beam::GetBedList(double*){ 507 throw ErrorException(__FUNCT__," not supported yet!");485 ISSMERROR(" not supported yet!"); 508 486 } 509 487 /*}}}*/ … … 541 519 /*}}}*/ 542 520 /*FUNCTION Beam GetJacobianDeterminant{{{1*/ 543 #undef __FUNCT__544 #define __FUNCT__ "Beam::GetJacobianDeterminant"545 521 void Beam::GetJacobianDeterminant(double* pJdet,double* z_list, double gauss_coord){ 546 522 … … 551 527 552 528 if(Jdet<0){ 553 throw ErrorException(__FUNCT__," negative jacobian determinant!");529 ISSMERROR(" negative jacobian determinant!"); 554 530 } 555 531 … … 568 544 /*}}}*/ 569 545 /*FUNCTION Beam GetNodalFunctions{{{1*/ 570 #undef __FUNCT__571 #define __FUNCT__ "Beam::GetNodalFunctions"572 546 void Beam::GetNodalFunctions(double* l1l2, double gauss_coord){ 573 547 … … 592 566 /*}}}*/ 593 567 /*FUNCTION Beam GetOnBed{{{1*/ 594 #undef __FUNCT__595 #define __FUNCT__ "Beam::GetOnBed"596 568 int Beam::GetOnBed(){ 597 throw ErrorException(__FUNCT__," not supported yet!");569 ISSMERROR(" not supported yet!"); 598 570 } 599 571 /*}}}*/ 600 572 /*FUNCTION Beam GetParameterValue{{{1*/ 601 #undef __FUNCT__602 #define __FUNCT__ "Beam::GetParameterValue"603 573 void Beam::GetParameterValue(double* pvalue, double* value_list,double gauss_coord){ 604 574 … … 611 581 /*}}}*/ 612 582 /*FUNCTION Beam GetShelf{{{1*/ 613 #undef __FUNCT__614 #define __FUNCT__ "Beam::GetShelf"615 583 int Beam::GetShelf(){ 616 throw ErrorException(__FUNCT__," not supported yet!");584 ISSMERROR(" not supported yet!"); 617 585 } 618 586 /*}}}*/ 619 587 /*FUNCTION Beam GetThicknessList{{{1*/ 620 #undef __FUNCT__621 #define __FUNCT__ "Beam::GetThicknessList"622 588 void Beam::GetThicknessList(double* thickness_list){ 623 throw ErrorException(__FUNCT__," not supported yet!");589 ISSMERROR(" not supported yet!"); 624 590 } 625 591 /*}}}*/ 626 592 /*FUNCTION Beam Gradj{{{1*/ 627 #undef __FUNCT__628 #define __FUNCT__ "Beam::Gradj"629 593 void Beam::Gradj(_p_Vec*, void*, int, int,char*){ 630 throw ErrorException(__FUNCT__," not supported yet!");594 ISSMERROR(" not supported yet!"); 631 595 } 632 596 /*}}}*/ 633 597 /*FUNCTION Beam GradjB{{{1*/ 634 #undef __FUNCT__635 #define __FUNCT__ "Beam::GradjB"636 598 void Beam::GradjB(_p_Vec*, void*, int, int){ 637 throw ErrorException(__FUNCT__," not supported yet!");599 ISSMERROR(" not supported yet!"); 638 600 } 639 601 /*}}}*/ 640 602 /*FUNCTION Beam GradjDrag{{{1*/ 641 #undef __FUNCT__642 #define __FUNCT__ "Beam::GradjDrag"643 603 void Beam::GradjDrag(_p_Vec*, void*, int,int ){ 644 throw ErrorException(__FUNCT__," not supported yet!");604 ISSMERROR(" not supported yet!"); 645 605 } 646 606 /*}}}*/ 647 607 /*FUNCTION Beam MassFlux{{{1*/ 648 #undef __FUNCT__649 #define __FUNCT__ "Beam::MassFlux"650 608 double Beam::MassFlux( double* segment,double* ug){ 651 throw ErrorException(__FUNCT__," not supported yet!");609 ISSMERROR(" not supported yet!"); 652 610 } 653 611 /*}}}*/ 654 612 /*FUNCTION Beam MaticeConfiguration{{{1*/ 655 #undef __FUNCT__656 #define __FUNCT__ "Beam::MaticeConfiguration"657 613 void Beam::MaticeConfiguration(Matice* beam_matice,int beam_matice_offset){ 658 614 matice=beam_matice; … … 661 617 /*}}}*/ 662 618 /*FUNCTION Beam MatparConfiguration{{{1*/ 663 #undef __FUNCT__664 #define __FUNCT__ "Beam::MatparConfiguration"665 619 void Beam::MatparConfiguration(Matpar* beam_matpar,int beam_matpar_offset){ 666 620 … … 671 625 /*}}}*/ 672 626 /*FUNCTION Beam Misfit{{{1*/ 673 #undef __FUNCT__674 #define __FUNCT__ "Beam::Misfit"675 627 double Beam::Misfit(void*,int,int){ 676 throw ErrorException(__FUNCT__," not supported yet!");628 ISSMERROR(" not supported yet!"); 677 629 } 678 630 /*}}}*/ … … 684 636 /*}}}*/ 685 637 /*FUNCTION Beam NodeConfiguration{{{1*/ 686 #undef __FUNCT__687 #define __FUNCT__ "Beam::NodeConfiguration"688 638 void Beam::NodeConfiguration(int* beam_node_ids,Node* beam_nodes[2],int* beam_node_offsets){ 689 639 … … 698 648 /*}}}*/ 699 649 /*FUNCTION Beam SurfaceArea{{{1*/ 700 #undef __FUNCT__701 #define __FUNCT__ "Beam::SurfaceArea"702 650 double Beam::SurfaceArea(void*,int,int){ 703 throw ErrorException(__FUNCT__," not supported yet!");651 ISSMERROR(" not supported yet!"); 704 652 } 705 653 /*}}}*/ 706 654 /*FUNCTION Beam UpdateFromInputs{{{1*/ 707 #undef __FUNCT__708 #define __FUNCT__ "Beam::UpdateFromInputs"709 655 void Beam::UpdateFromInputs(void* vinputs){ 710 656 -
issm/trunk/src/c/objects/DofVec.cpp
r2316 r3332 11 11 #include "./DofVec.h" 12 12 #include "../shared/shared.h" 13 #include "../include/macros.h" 13 14 #include "../EnumDefinitions/EnumDefinitions.h" 14 15 … … 98 99 } 99 100 100 #undef __FUNCT__101 #define __FUNCT__ "DofVec::Echo"102 101 void DofVec::Echo(void){ 103 102 … … 111 110 } 112 111 113 #undef __FUNCT__114 #define __FUNCT__ "DofVec::DeepEcho"115 112 void DofVec::DeepEcho(void){ 116 113 … … 206 203 } 207 204 208 #undef __FUNCT__209 #define __FUNCT__ "DofVec::GetId"210 205 int DofVec::GetId(void){ 211 throw ErrorException(__FUNCT__," no id function for DofVec class");206 ISSMERROR(" no id function for DofVec class"); 212 207 } 213 208 … … 231 226 } 232 227 233 #undef __FUNCT__234 #define __FUNCT__ "DofVec::GetVecFromDof"235 228 void DofVec::GetVecFromDof(double** pvector,int dof){ 236 229 … … 242 235 /*check we are not out of bounds: */ 243 236 if (dof>=numdofs){ 244 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs));237 ISSMERROR(exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs)); 245 238 } 246 239 … … 259 252 260 253 261 #undef __FUNCT__262 #define __FUNCT__ "DofVec::GetVecFromDof"263 254 void DofVec::GetVecFromDof(Vec* pvector, int dof){ 264 255 … … 269 260 /*check we are not out of bounds: */ 270 261 if (dof>=numdofs){ 271 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs));262 ISSMERROR(exprintf("%s%i%s%i\n"," error message: dof ",dof," requested is out of bounds for vector with number of dofs",this->numdofs)); 272 263 } 273 264 … … 282 273 } 283 274 284 #undef __FUNCT__285 #define __FUNCT__ "DofVec::GetVecFromDofList"286 275 void DofVec::GetVecFromDofList(double** pvector, int requested_numdofs,int* requested_doflist){ 287 276 … … 292 281 293 282 /*check we are not out of bounds: */ 294 if (requested_numdofs>=this->numdofs) throw ErrorException(__FUNCT__,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));283 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)); 295 284 296 285 for(i=0;i<requested_numdofs;i++){ 297 if (requested_doflist[i]>=this->numdofs) throw ErrorException(__FUNCT__,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));286 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)); 298 287 } 299 288 … … 314 303 315 304 316 #undef __FUNCT__317 #define __FUNCT__ "DofVec::GetVecFromDofList"318 305 void DofVec::GetVecFromDofList(Vec* pvector, int requested_numdofs,int* requested_doflist){ 319 306 … … 323 310 324 311 /*check we are not out of bounds: */ 325 if (requested_numdofs>=this->numdofs) throw ErrorException(__FUNCT__,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));312 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)); 326 313 327 314 for(i=0;i<requested_numdofs;i++){ 328 if (requested_doflist[i]>=this->numdofs) throw ErrorException(__FUNCT__,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));315 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)); 329 316 } 330 317 … … 341 328 } 342 329 343 #undef __FUNCT__344 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"345 330 void DofVec::SetValuesFromVecAndDofList(double* serial_vector,int vector_size,int requested_numdofs,int* requested_doflist){ 346 331 … … 349 334 350 335 /*First thing, is the vector of the right size? :*/ 351 if (vector_size!=requested_numdofs*this->numentries) throw ErrorException(__FUNCT__,exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));336 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)); 352 337 353 338 /*Create dofset: */ … … 365 350 } 366 351 367 #undef __FUNCT__368 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"369 352 void DofVec::SetValuesFromVecAndDofList(Vec vector,int requested_numdofs,int* requested_doflist){ 370 353 … … 375 358 376 359 /*First thing, is the vector of the right size? :*/ 377 if (vector_size!=requested_numdofs*this->numentries) throw ErrorException(__FUNCT__,exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));360 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)); 378 361 379 362 /*Create dofset: */ … … 387 370 } 388 371 389 #undef __FUNCT__390 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"391 372 void DofVec::SetValuesFromVecAndDofList(DofVec* vector,int requested_numdofs,int* requested_doflist){ 392 373 … … 397 378 398 379 /*First thing, is the vector of the right size? :*/ 399 if (vector_size!=requested_numdofs*this->numentries) throw ErrorException(__FUNCT__,exprintf("%s%i%s%i"," error message: input vector size ",vector_size," is not equal to the expected numdofs*numentries",requested_numdofs*this->numentries));380 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)); 400 381 401 382 /*Create dofset: */ -
issm/trunk/src/c/objects/FemModel.cpp
r2333 r3332 12 12 #include "stdio.h" 13 13 #include "../shared/shared.h" 14 #include "../include/macros.h" 14 15 15 16 FemModel::FemModel(){ … … 76 77 } 77 78 78 #undef __FUNCT__79 #define __FUNCT__ "FemModel::Echo"80 79 81 80 void FemModel::Echo(void){ … … 98 97 99 98 } 100 #undef __FUNCT__101 #define __FUNCT__ "FemModel::DeepEcho"102 99 103 100 void FemModel::DeepEcho(void){ … … 133 130 134 131 } 135 #undef __FUNCT__136 #define __FUNCT__ "FemModel::GetId"137 132 int FemModel::GetId(void){ 138 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 139 } 140 141 #undef __FUNCT__ 142 #define __FUNCT__ "FemModel::MyRank" 133 ISSMERROR("not implemented yet!"); 134 } 135 143 136 int FemModel::MyRank(void){ 144 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 145 } 146 147 #undef __FUNCT__ 148 #define __FUNCT__ "FemModel::Marshall" 137 ISSMERROR("not implemented yet!"); 138 } 139 149 140 void FemModel::Marshall(char** pmarshalled_dataset){ 150 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 151 } 152 153 #undef __FUNCT__ 154 #define __FUNCT__ "FemModel::MarshallSize" 141 ISSMERROR("not implemented yet!"); 142 } 143 155 144 int FemModel::MarshallSize(void){ 156 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 157 } 158 #undef __FUNCT__ 159 #define __FUNCT__ "FemModel::GetName" 145 ISSMERROR("not implemented yet!"); 146 } 160 147 char* FemModel::GetName(void){ 161 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 162 } 163 #undef __FUNCT__ 164 #define __FUNCT__ "FemModel::Demarshall" 148 ISSMERROR("not implemented yet!"); 149 } 165 150 void FemModel::Demarshall(char** pmarshalled_dataset){ 166 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 167 } 168 #undef __FUNCT__ 169 #define __FUNCT__ "FemModel::Enum" 151 ISSMERROR("not implemented yet!"); 152 } 170 153 int FemModel::Enum(void){ 171 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 172 } 173 #undef __FUNCT__ 174 #define __FUNCT__ "FemModel::copy" 154 ISSMERROR("not implemented yet!"); 155 } 175 156 Object* FemModel::copy(void){ 176 throw ErrorException(__FUNCT__,exprintf("%s%s",__FUNCT__," error message: not implemented yet!")); 177 } 178 179 180 #undef __FUNCT__ 181 #define __FUNCT__ "FemModel::FindParam" 157 ISSMERROR("not implemented yet!"); 158 } 159 160 182 161 int FemModel::FindParam(double* pscalar,char* name){ 183 162 … … 185 164 186 165 } 187 #undef __FUNCT__188 #define __FUNCT__ "FemModel::FindParam"189 166 int FemModel::FindParam(int* pinteger,char* name){ 190 167 … … 193 170 } 194 171 195 #undef __FUNCT__196 #define __FUNCT__ "FemModel::FindParam"197 172 int FemModel::FindParam(char** pstring,char* name){ 198 173 … … 201 176 } 202 177 203 #undef __FUNCT__204 #define __FUNCT__ "FemModel::FindParam"205 178 int FemModel::FindParam(char*** pstringarray,int* pM,char* name){ 206 179 … … 209 182 } 210 183 211 #undef __FUNCT__212 #define __FUNCT__ "FemModel::FindParam"213 184 int FemModel::FindParam(double** pdoublearray,int* pM,int* pN,char* name){ 214 185 … … 217 188 } 218 189 219 #undef __FUNCT__220 #define __FUNCT__ "FemModel::FindParam"221 190 int FemModel::FindParam(Vec* pvec,char* name){ 222 191 … … 225 194 } 226 195 227 #undef __FUNCT__228 #define __FUNCT__ "FemModel::FindParam"229 196 int FemModel::FindParam(Mat* pmat,char* name){ 230 197 -
issm/trunk/src/c/objects/Icefront.cpp
r3159 r3332 159 159 /*Object functions*/ 160 160 /*FUNCTION Icefront Configure {{{1*/ 161 #undef __FUNCT__162 #define __FUNCT__ "Icefront::Configure"163 161 164 162 void Icefront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){ … … 199 197 /*}}}*/ 200 198 /*FUNCTION Icefront CreateKMatrix {{{1*/ 201 #undef __FUNCT__202 #define __FUNCT__ "Icefront::CreateKMatrix"203 199 204 200 void Icefront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 211 207 /*}}}*/ 212 208 /*FUNCTION Icefront CreatePVector {{{1*/ 213 #undef __FUNCT__214 #define __FUNCT__ "Icefront::CreatePVector"215 209 void Icefront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 216 210 … … 233 227 234 228 } 235 else throw ErrorException(__FUNCT__,exprintf("%s%i%s"," sub_analysis_type: ",sub_analysis_type," not supported yet"));229 else ISSMERROR(exprintf("%s%i%s"," sub_analysis_type: ",sub_analysis_type," not supported yet")); 236 230 237 231 } 238 232 else{ 239 throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));233 ISSMERROR(exprintf("%s%i%s"," analysis ",analysis_type," not supported yet")); 240 234 } 241 235 } 242 236 /*}}}*/ 243 237 /*FUNCTION Icefront CreatePVectorDiagnosticHoriz {{{1*/ 244 #undef __FUNCT__245 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHoriz"246 238 void Icefront::CreatePVectorDiagnosticHoriz( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 247 239 … … 256 248 /*}}}*/ 257 249 /*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/ 258 #undef __FUNCT__259 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHorizSegment"260 250 261 251 void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){ … … 368 358 /*}}}*/ 369 359 /*FUNCTION Icefront CreatePVectorDiagnosticHorizQuad {{{1*/ 370 #undef __FUNCT__371 #define __FUNCT__ "Icefont::CreatePVectorDiagnosticHorizQuad"372 360 void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){ 373 361 … … 413 401 /*check icefront is associated to a pentaelem: */ 414 402 if(element_type!=PentaEnum()){ 415 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");403 ISSMERROR(" quad icefront is associated to a TriaElem!"); 416 404 } 417 405 /*Recover material*/ … … 438 426 439 427 if((grid1==-1) || (grid2==-1)|| (grid3==-1)||(grid4==-1)){ 440 throw ErrorException(__FUNCT__,"could not find element grids corresponding to quad icefront!");428 ISSMERROR("could not find element grids corresponding to quad icefront!"); 441 429 } 442 430 … … 527 515 /*}}}*/ 528 516 /*FUNCTION Icefront CreatePVectorDiagnosticStokes {{{1*/ 529 #undef __FUNCT__530 #define __FUNCT__ "Icefont::CreatePVectorDiagnosticStokes"531 517 void Icefront::CreatePVectorDiagnosticStokes( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){ 532 518 … … 572 558 /*check icefront is associated to a pentaelem: */ 573 559 if(element_type!=PentaEnum()){ 574 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");560 ISSMERROR(" quad icefront is associated to a TriaElem!"); 575 561 } 576 562 /*Recover material*/ … … 597 583 598 584 if((grid1==-1) || (grid2==-1)|| (grid3==-1)||(grid4==-1)){ 599 throw ErrorException(__FUNCT__,"could not find element grids corresponding to quad icefront!");585 ISSMERROR("could not find element grids corresponding to quad icefront!"); 600 586 } 601 587 … … 778 764 /*}}}*/ 779 765 /*FUNCTION Icefront GetDofList{{{1*/ 780 #undef __FUNCT__781 #define __FUNCT__ "Icefront::GetDofList"782 766 783 767 void Icefront::GetDofList(int* doflist,int* pnumberofdofspernode){ … … 825 809 /*}}}*/ 826 810 /*FUNCTION Icefront PenaltyCreateKMatrix {{{1*/ 827 #undef __FUNCT__828 #define __FUNCT__ "Icefront::PenaltyCreateKMatrix"829 811 void Icefront::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 830 812 /*do nothing: */ … … 832 814 /*}}}*/ 833 815 /*FUNCTION Icefront PenaltyCreatePVector{{{1*/ 834 #undef __FUNCT__835 #define __FUNCT__ "Icefront::PenaltyCreatePVector"836 816 void Icefront::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 837 817 /*do nothing: */ … … 839 819 /*}}}*/ 840 820 /*FUNCTION Icefront QuadPressureLoad {{{1*/ 841 #undef __FUNCT__842 #define __FUNCT__ "Icefront::QuadPressureLoad"843 821 void Icefront::QuadPressureLoad(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list, 844 822 double* normal1,double* normal2,double* normal3,double* normal4,double* xyz_list){ … … 1062 1040 } 1063 1041 else{ 1064 throw ErrorException(__FUNCT__,"QuadPressureLoad error message: unknow fill type for icefront boundary condition");1042 ISSMERROR("QuadPressureLoad error message: unknow fill type for icefront boundary condition"); 1065 1043 } 1066 1044 … … 1097 1075 /*}}}*/ 1098 1076 /*FUNCTION Icefront QuadPressureLoadStokes {{{1*/ 1099 #undef __FUNCT__1100 #define __FUNCT__ "Icefront::QuadPressureLoadStokes"1101 1077 void Icefront::QuadPressureLoadStokes(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list, 1102 1078 double* normal1,double* normal2,double* normal3,double* normal4,double* xyz_list){ … … 1318 1294 } 1319 1295 else{ 1320 throw ErrorException(__FUNCT__,"QuadPressureLoadStokes error message: unknow fill type for icefront boundary condition");1296 ISSMERROR("QuadPressureLoadStokes error message: unknow fill type for icefront boundary condition"); 1321 1297 } 1322 1298 … … 1355 1331 /*}}}*/ 1356 1332 /*FUNCTION Icefront SegmentPressureLoad {{{1*/ 1357 #undef __FUNCT__1358 #define __FUNCT__ "Icefront::SegmentPressureLoad"1359 1333 1360 1334 void Icefront::SegmentPressureLoad(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list, double* normal,double length){ … … 1409 1383 } 1410 1384 else{ 1411 throw ErrorException(__FUNCT__,exprintf("fill type %i not supported yet",fill));1385 ISSMERROR(exprintf("fill type %i not supported yet",fill)); 1412 1386 } 1413 1387 … … 1426 1400 /*}}}*/ 1427 1401 /*FUNCTION Icefront UpdateFromInputs {{{1*/ 1428 #undef __FUNCT__1429 #define __FUNCT__ "Icefront::UpdateFromInputs"1430 1402 void Icefront::UpdateFromInputs(void* vinputs){ 1431 1403 -
issm/trunk/src/c/objects/Input.cpp
r3180 r3332 94 94 /*Object marshall*/ 95 95 /*FUNCTION Input::Demarshall {{{1*/ 96 #undef __FUNCT__97 #define __FUNCT__ "Input::Demarshall"98 96 void Input::Demarshall(char** pmarshalled_dataset){ 99 throw ErrorException(__FUNCT__,"not supported yet!");97 ISSMERROR("not supported yet!"); 100 98 } 101 99 /*}}}*/ 102 100 /*FUNCTION Input::Marshall {{{1*/ 103 #undef __FUNCT__104 #define __FUNCT__ "Input::Marshall"105 101 void Input::Marshall(char** pmarshalled_dataset){ 106 throw ErrorException(__FUNCT__,"not supported yet!");102 ISSMERROR("not supported yet!"); 107 103 } 108 104 /*}}}*/ 109 105 /*FUNCTION Input::MarshallSize {{{1*/ 110 #undef __FUNCT__111 #define __FUNCT__ "Input::MarshallSize"112 106 int Input::MarshallSize(){ 113 throw ErrorException(__FUNCT__,"not supported yet!");107 ISSMERROR("not supported yet!"); 114 108 } 115 109 /*}}}*/ … … 164 158 /*}}}*/ 165 159 /*FUNCTION Input::Get {{{1*/ 166 #undef __FUNCT__167 #define __FUNCT__ "Input::Get"168 160 Vec Input::Get(int* in_dofs, int in_numdofs){ 169 161 … … 179 171 int totaldofs=0; 180 172 181 if (type!=DOUBLEVEC) throw ErrorException(__FUNCT__," trying to recover Petsc vector on non DOUBLEVEC entity!");173 if (type!=DOUBLEVEC)ISSMERROR(" trying to recover Petsc vector on non DOUBLEVEC entity!"); 182 174 183 175 /*figure out how many dofs are requested: */ … … 212 204 /*}}}*/ 213 205 /*FUNCTION Input::GetId {{{1*/ 214 #undef __FUNCT__215 #define __FUNCT__ "Input::GetId"216 206 int Input::GetId(){ 217 throw ErrorException(__FUNCT__,"not supported yet!");207 ISSMERROR("not supported yet!"); 218 208 } 219 209 /*}}}*/ 220 210 /*FUNCTION Input::GetName {{{1*/ 221 #undef __FUNCT__222 #define __FUNCT__ "Input::GetName"223 211 char* Input::GetName(){ 224 throw ErrorException(__FUNCT__,"not supported yet!");212 ISSMERROR("not supported yet!"); 225 213 } 226 214 /*}}}*/ … … 264 252 nodes=(Node**)vpnodesin; 265 253 266 if (type!=DOUBLEVEC) throw ErrorException(__FUNCT__,exprintf("%s%i%s"," cannot recover values from a ",type," input type"));254 if (type!=DOUBLEVEC) ISSMERROR(exprintf("%s%i%s"," cannot recover values from a ",type," input type")); 267 255 268 256 /*Ok, we are trying to fill values. values is of size ndof*numnodes. The dofs -
issm/trunk/src/c/objects/Matice.cpp
r2907 r3332 2 2 * \brief: implementation of the Matice object 3 3 */ 4 5 4 6 5 #ifdef HAVE_CONFIG_H … … 144 143 /*}}}*/ 145 144 /*FUNCTION Matice::GetViscosity2d {{{1*/ 146 #undef __FUNCT__147 #define __FUNCT__ "MatIce::GetViscosity2d"148 145 void Matice::GetViscosity2d(double* pviscosity, double* epsilon){ 149 146 … … 207 204 /*}}}*/ 208 205 /*FUNCTION Matice::GetViscosity3d {{{1*/ 209 #undef __FUNCT__210 #define __FUNCT__ "MatIce::GetViscosity3d"211 206 void Matice::GetViscosity3d(double* pviscosity3d, double* epsilon){ 212 207 … … 273 268 /*}}}*/ 274 269 /*FUNCTION Matice::GetViscosity3dStokes {{{1*/ 275 #undef __FUNCT__276 #define __FUNCT__ "MatIce::GetViscosity3dStokes"277 270 void Matice::GetViscosity3dStokes(double* pviscosity3d, double* epsilon){ 278 271 … … 343 336 /*}}}*/ 344 337 /*FUNCTION Matice::GetViscosityComplement {{{1*/ 345 #undef __FUNCT__346 #define __FUNCT__ "MatIce::GetViscosityComplement"347 338 void Matice::GetViscosityComplement(double* pviscosity_complement, double* epsilon){ 348 339 … … 405 396 /*}}}*/ 406 397 /*FUNCTION Matice::SetB {{{1*/ 407 #undef __FUNCT__408 #define __FUNCT__ "Matice::SetB"409 398 void Matice::SetB(double B_param){ 410 399 B=B_param; … … 412 401 /*}}}*/ 413 402 /*FUNCTION Matice::UpdateFromInputs {{{1*/ 414 #undef __FUNCT__415 #define __FUNCT__ "Matice::UpdateFromInputs"416 403 void Matice::UpdateFromInputs(void* inputs){ 417 404 418 // throw ErrorException(__FUNCT__," not supported yet!");419 420 } 421 /*}}}*/ 405 //ISSMERROR(" not supported yet!"); 406 407 } 408 /*}}}*/ -
issm/trunk/src/c/objects/Matpar.cpp
r2907 r3332 245 245 /*}}}1*/ 246 246 /*FUNCTION Matpar::UpdateFromInputs {{{1*/ 247 #undef __FUNCT__248 #define __FUNCT__ "Matpar::UpdateFromInputs"249 247 void Matpar::UpdateFromInputs(void* inputs){ 250 248 251 // throw ErrorException(__FUNCT__," not supported yet!");252 253 } 254 /*}}}1*/ 249 //ISSMERROR(" not supported yet!"); 250 251 } 252 /*}}}1*/ -
issm/trunk/src/c/objects/Model.cpp
r2907 r3332 37 37 /*Object functions*/ 38 38 /*FUNCTION Model::AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type){{{1*/ 39 #undef __FUNCT__40 #define __FUNCT__ "Model::AddFormulation"41 39 void Model::AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type){ 42 40 … … 112 110 /*}}}1*/ 113 111 /*FUNCTION Model::AddFormulation(ConstDataHandle MODEL, int analysis_type) {{{1*/ 114 #undef __FUNCT__115 #define __FUNCT__ "Model::AddFormulation"116 112 void Model::AddFormulation(ConstDataHandle MODEL, int analysis_type){ 117 113 … … 191 187 /*}}}1*/ 192 188 /*FUNCTION Model::DeepEcho {{{1*/ 193 #undef __FUNCT__194 #define __FUNCT__ "Model::DeepEcho"195 189 196 190 void Model::DeepEcho(void){ … … 201 195 /*}}}1*/ 202 196 /*FUNCTION Model::Echo {{{1*/ 203 #undef __FUNCT__204 #define __FUNCT__ "Model::Echo"205 197 206 198 void Model::Echo(void){ … … 212 204 /*}}}1*/ 213 205 /*FUNCTION Model::FindParam(int* pparameter,char* parametername {{{1*/ 214 #undef __FUNCT__215 #define __FUNCT__ "Model::FindParam"216 206 217 207 int Model::FindParam(int* pparameter,char* parametername){ … … 220 210 221 211 /*no analysis_type or sub_analysis_type, find the parameter in the first dataset we find: */ 222 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");212 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 223 213 224 214 /*recover first femmodel: */ … … 237 227 238 228 /*no analysis_type or sub_analysis_type, find the parameter in the first dataset we find: */ 239 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");229 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 240 230 241 231 /*recover first femmodel: */ … … 255 245 256 246 /*no analysis_type or sub_analysis_type, find the parameter in the first dataset we find: */ 257 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");247 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 258 248 259 249 /*recover first femmodel: */ … … 273 263 274 264 /*no analysis_type or sub_analysis_type, find the parameter in the first dataset we find: */ 275 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");265 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 276 266 277 267 /*recover first femmodel: */ … … 400 390 /*}}}1*/ 401 391 /*FUNCTION Model::GetFormulation(int analysis_type,int sub_analysis_type) {{{1*/ 402 #undef __FUNCT__403 #define __FUNCT__ "Model::GetFormulation"404 392 405 393 FemModel* Model::GetFormulation(int analysis_type,int sub_analysis_type){ … … 411 399 int found=0; 412 400 413 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");401 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 414 402 415 403 /*find femmodel with correct analysis_type and sub_analysis_type: */ … … 431 419 /*}}}1*/ 432 420 /*FUNCTION Model::GetFormulation(int analysis_type) {{{1*/ 433 #undef __FUNCT__434 #define __FUNCT__ "Model::GetFormulation"435 421 436 422 FemModel* Model::GetFormulation(int analysis_type){ … … 442 428 int found=0; 443 429 444 if (!femmodels->Size()) throw ErrorException(__FUNCT__," no fem models were found!");430 if (!femmodels->Size())ISSMERROR(" no fem models were found!"); 445 431 446 432 /*find femmodel with correct analysis_type and sub_analysis_type: */ -
issm/trunk/src/c/objects/Node.cpp
r2907 r3332 17 17 #include "../shared/shared.h" 18 18 #include "../include/typedefs.h" 19 #include "../include/macros.h" 19 20 20 21 /*Object constructors and destructor*/ … … 194 195 /*}}}*/ 195 196 /*FUNCTION Node Configure {{{1*/ 196 #undef __FUNCT__197 #define __FUNCT__ "Node::Configure"198 197 void Node::Configure(void* pnodes){ 199 198 … … 408 407 /*}}}*/ 409 408 /*FUNCTION Node FieldDepthAverageAtBase{{{1*/ 410 #undef __FUNCT__411 #define __FUNCT__ "Node::FieldDepthAverageAtBase"412 409 void Node::FieldDepthAverageAtBase(Vec field,double* field_serial,char* fieldname){ 413 410 … … 532 529 /*}}}*/ 533 530 /*FUNCTION Node FieldExtrude {{{1*/ 534 #undef __FUNCT__535 #define __FUNCT__ "Node::FieldExtrude"536 531 void Node::FieldExtrude(Vec field,double* field_serial,char* field_name){ 537 532 … … 638 633 } 639 634 } 640 else throw ErrorException(__FUNCT__,exprintf("%s%s%s"," field ",field_name," not supported yet!"));635 else ISSMERROR(exprintf("%s%s%s"," field ",field_name," not supported yet!")); 641 636 642 637 } //if (extrude) … … 692 687 /*}}}*/ 693 688 /*FUNCTION Node GetUpperNode {{{1*/ 694 #undef __FUNCT__695 #define __FUNCT__ "Node::GetUpperNode"696 689 Node* Node::GetUpperNode(){ 697 690 return upper_node; … … 822 815 /*}}}*/ 823 816 /*FUNCTION Node UpdateFromInputs {{{1*/ 824 #undef __FUNCT__825 #define __FUNCT__ "Node::UpdateFromInputs"826 817 void Node::UpdateFromInputs(void* vinputs){ 827 818 -
issm/trunk/src/c/objects/Numpar.cpp
r3053 r3332 16 16 #include "../DataSet/DataSet.h" 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 19 20 20 /*Object constructors and destructor*/ … … 133 133 /*Object functions*/ 134 134 /*FUNCTION Numpar::Configure {{{1*/ 135 #undef __FUNCT__136 #define __FUNCT__ "Numpar::Configure"137 135 void Numpar::Configure(void* pparametersin){ 138 136 … … 146 144 parameters->FindParam(&meanvel,"meanvel"); 147 145 parameters->FindParam(&epsvel,"epsvel"); 148 if(!parameters->FindParam(&artdiff,"artdiff")) throw ErrorException(__FUNCT__," error message: could not update artdiff field");149 if(!parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot")) throw ErrorException(__FUNCT__," error message: could not update viscosity_overshoot field");150 if(!parameters->FindParam(&stokesreconditioning,"stokesreconditioning")) throw ErrorException(__FUNCT__," error message: could not update stokesreconditioning field");146 if(!parameters->FindParam(&artdiff,"artdiff"))ISSMERROR(" error message: could not update artdiff field"); 147 if(!parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot"))ISSMERROR(" error message: could not update viscosity_overshoot field"); 148 if(!parameters->FindParam(&stokesreconditioning,"stokesreconditioning"))ISSMERROR(" error message: could not update stokesreconditioning field"); 151 149 xfree((void**)&control_type); 152 150 parameters->FindParam(&control_type,"control_type"); … … 168 166 /*}}}*/ 169 167 /*FUNCTION Numpar::DeepEcho {{{1*/ 170 #undef __FUNCT__171 #define __FUNCT__ "Numpar::DeepEcho"172 168 void Numpar::DeepEcho(void){ 173 169 … … 188 184 /*}}}*/ 189 185 /*FUNCTION Numpar::Echo{{{1*/ 190 #undef __FUNCT__191 #define __FUNCT__ "Numpar::Echo"192 186 void Numpar::Echo(void){ 193 187 … … 229 223 /*}}}*/ 230 224 /*FUNCTION Numpar::UpdateFromInputs {{{1*/ 231 #undef __FUNCT__232 #define __FUNCT__ "Numpar::UpdateFromInputs"233 225 void Numpar::UpdateFromInputs(void* vinputs){ 234 226 -
issm/trunk/src/c/objects/Param.cpp
r2913 r3332 20 20 /*Object constructors and destructor*/ 21 21 /*FUNCTION Param::constructor {{{1*/ 22 #undef __FUNCT__23 #define __FUNCT__ "Param constructor"24 22 Param::Param(int param_id, char* param_name, int param_type){ 25 23 … … 30 28 (param_type!=DOUBLEVEC) & (param_type!=DOUBLEMAT) & (param_type!=PETSCVEC) & (param_type!=PETSCMAT) 31 29 ){ 32 throw ErrorException(__FUNCT__,exprintf("%s%i"," unknow parameter type ",param_type));30 ISSMERROR(exprintf("%s%i"," unknow parameter type ",param_type)); 33 31 } 34 32 stringarray=NULL; … … 94 92 95 93 default: 96 throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));94 ISSMERROR(exprintf("%s%i","unknow parameter type ",type)); 97 95 } 98 96 } … … 212 210 213 211 default: 214 throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));212 ISSMERROR(exprintf("%s%i","unknown parameter type",type)); 215 213 } 216 214 … … 221 219 /*}}}*/ 222 220 /*FUNCTION Param::Marshall {{{1*/ 223 #undef __FUNCT__224 #define __FUNCT__ "Marshall"225 221 226 222 void Param::Marshall(char** pmarshalled_dataset){ … … 315 311 316 312 default: 317 throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));313 ISSMERROR(exprintf("%s%i","unknown parameter type",type)); 318 314 break; 319 315 } … … 370 366 371 367 default: 372 throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));368 ISSMERROR(exprintf("%s%i","unknown parameter type",type)); 373 369 } 374 370 … … 384 380 /*}}}*/ 385 381 /*FUNCTION Param::Echo {{{1*/ 386 #undef __FUNCT__387 #define __FUNCT__ "Param echo"388 382 void Param::Echo(void){ 389 383 … … 436 430 437 431 default: 438 throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));432 ISSMERROR(exprintf("%s%i","unknow parameter type ",type)); 439 433 } 440 434 } … … 447 441 /*}}}*/ 448 442 /*FUNCTION Param::DeepEcho {{{1*/ 449 #undef __FUNCT__450 #define __FUNCT__ "Param Deep Echo"451 443 void Param::DeepEcho(void){ 452 444 … … 498 490 499 491 default: 500 throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));492 ISSMERROR(exprintf("%s%i","unknow parameter type ",type)); 501 493 } 502 494 } … … 521 513 /*}}}*/ 522 514 /*FUNCTION Param::GetParameterValue(Mat* pmat) {{{1*/ 523 #undef __FUNCT__524 #define __FUNCT__ "GetParameterValue"525 515 526 516 void Param::GetParameterValue(Mat* pmat){ … … 528 518 Mat outmat=NULL; 529 519 530 if(type!=PETSCMAT) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a Petsc mat from a param with type",type));520 if(type!=PETSCMAT) ISSMERROR(exprintf("%s%i"," error message: trying to recover a Petsc mat from a param with type",type)); 531 521 532 522 if(mat){ … … 547 537 /*}}}*/ 548 538 /*FUNCTION Param::GetParameterValue(double* pdouble) {{{1*/ 549 #undef __FUNCT__550 #define __FUNCT__ "GetParameterValue"551 539 void Param::GetParameterValue(double* pdouble){ 552 540 553 if(type!=DOUBLE) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a double from a param with type",type));541 if(type!=DOUBLE)ISSMERROR(exprintf("%s%i"," error message: trying to recover a double from a param with type",type)); 554 542 *pdouble=ddouble; 555 543 } 556 544 /*}}}*/ 557 545 /*FUNCTION Param::GetParameterValue(int* pinteger) {{{1*/ 558 #undef __FUNCT__559 #define __FUNCT__ "GetParameterValue"560 546 void Param::GetParameterValue(int* pinteger){ 561 547 562 if(type!=DOUBLE) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover an integer from a param with type",type));548 if(type!=DOUBLE)ISSMERROR(exprintf("%s%i"," error message: trying to recover an integer from a param with type",type)); 563 549 *pinteger=(int)ddouble; 564 550 } 565 551 /*}}}*/ 566 552 /*FUNCTION Param::GetParameterValue(char** pstring) {{{1*/ 567 #undef __FUNCT__568 #define __FUNCT__ "GetParameterValue"569 553 void Param::GetParameterValue(char** pstring){ 570 554 571 555 char* outstring=NULL; 572 556 573 if(type!=STRING) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a string from a param with type",type));557 if(type!=STRING)ISSMERROR(exprintf("%s%i"," error message: trying to recover a string from a param with type",type)); 574 558 outstring=(char*)xmalloc((strlen(string)+1)*sizeof(char)); 575 559 strcpy(outstring,string); … … 579 563 /*}}}*/ 580 564 /*FUNCTION Param::GetParameterValue(char*** pstringarray) {{{1*/ 581 #undef __FUNCT__582 #define __FUNCT__ "GetParameterValue"583 565 void Param::GetParameterValue(char*** pstringarray){ 584 566 585 567 int i; 586 if(type!=STRINGARRAY) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a string array from a param with type",type));568 if(type!=STRINGARRAY)ISSMERROR(exprintf("%s%i"," error message: trying to recover a string array from a param with type",type)); 587 569 588 570 char** outstringarray=NULL; … … 597 579 /*}}}*/ 598 580 /*FUNCTION Param::GetParameterValue(double** pdoublearray) {{{1*/ 599 #undef __FUNCT__600 #define __FUNCT__ "GetParameterValue"601 581 602 582 void Param::GetParameterValue(double** pdoublearray){ … … 605 585 double* outdoublearray=NULL; 606 586 607 if((type!=DOUBLEVEC) & (type!=DOUBLEMAT)) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a double array from a param with type",type));587 if((type!=DOUBLEVEC) & (type!=DOUBLEMAT)) ISSMERROR(exprintf("%s%i"," error message: trying to recover a double array from a param with type",type)); 608 588 609 589 if(type==DOUBLEVEC){ … … 627 607 /*}}}*/ 628 608 /*FUNCTION Param::GetParameterValue(Vec* pvec) {{{1*/ 629 #undef __FUNCT__630 #define __FUNCT__ "GetParameterValue"631 609 void Param::GetParameterValue(Vec* pvec){ 632 610 633 611 Vec outvec=NULL; 634 612 635 if(type!=PETSCVEC) throw ErrorException(__FUNCT__,exprintf("%s%i"," error message: trying to recover a Petsc vec from a param with type",type));613 if(type!=PETSCVEC) ISSMERROR(exprintf("%s%i"," error message: trying to recover a Petsc vec from a param with type",type)); 636 614 637 615 if(vec){ … … 657 635 /*}}}*/ 658 636 /*FUNCTION Param::SetDouble(double value) {{{1*/ 659 #undef __FUNCT__660 #define __FUNCT__ "SetDouble"661 637 void Param::SetDouble(double value){ 662 if (type!=DOUBLE) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set double for type",type));638 if (type!=DOUBLE) ISSMERROR(exprintf("%s%i"," trying to set double for type",type)); 663 639 ddouble=value; 664 640 } 665 641 /*}}}*/ 666 642 /*FUNCTION Param::SetDouble(int value) {{{1*/ 667 #undef __FUNCT__668 #define __FUNCT__ "SetDouble"669 643 void Param::SetDouble(int value){ 670 if (type!=DOUBLE) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set double for type",type));644 if (type!=DOUBLE) ISSMERROR(exprintf("%s%i"," trying to set double for type",type)); 671 645 ddouble=(double)value; 672 646 } 673 647 /*}}}*/ 674 648 /*FUNCTION Param::SetDoubleMat {{{1*/ 675 #undef __FUNCT__676 #define __FUNCT__ "SetDoubleMat"677 649 void Param::SetDoubleMat(double* value,int pM,int pN){ 678 650 679 if (type!=DOUBLEMAT) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set doublematrix type",type));651 if (type!=DOUBLEMAT) ISSMERROR(exprintf("%s%i"," trying to set doublematrix type",type)); 680 652 681 653 this->M=pM; … … 688 660 /*}}}*/ 689 661 /*FUNCTION Param::SetDoubleVec(double* value,int size) {{{1*/ 690 #undef __FUNCT__691 #define __FUNCT__ "SetDoubleVec"692 662 void Param::SetDoubleVec(double* value,int size){ 693 if (type!=DOUBLEVEC) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set doublevecfor type",type));663 if (type!=DOUBLEVEC) ISSMERROR(exprintf("%s%i"," trying to set doublevecfor type",type)); 694 664 695 665 M=size; … … 706 676 /*}}}*/ 707 677 /*FUNCTION Param::SetDoubleVec(double* value,int size, int numberofdofs) {{{1*/ 708 #undef __FUNCT__709 #define __FUNCT__ "SetDoubleVec"710 678 void Param::SetDoubleVec(double* value,int size, int numberofdofs){ 711 if (type!=DOUBLEVEC) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set doublevecfor type",type));679 if (type!=DOUBLEVEC) ISSMERROR(exprintf("%s%i"," trying to set doublevecfor type",type)); 712 680 713 681 M=size; … … 720 688 /*}}}*/ 721 689 /*FUNCTION Param::SetString {{{1*/ 722 #undef __FUNCT__723 #define __FUNCT__ "SetString"724 690 void Param::SetString(char* value){ 725 if (type!=STRING) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set string for type",type));691 if (type!=STRING) ISSMERROR(exprintf("%s%i"," trying to set string for type",type)); 726 692 strcpy(string,value); 727 693 } 728 694 /*}}}*/ 729 695 /*FUNCTION Param::SetStringArray {{{1*/ 730 #undef __FUNCT__731 #define __FUNCT__ "SetStringArray"732 696 void Param::SetStringArray(char** value,int size){ 733 697 734 698 int i; 735 if (type!=STRINGARRAY) throw ErrorException(__FUNCT__,exprintf("%s%i"," trying to set string for type",type));699 if (type!=STRINGARRAY) ISSMERROR(exprintf("%s%i"," trying to set string for type",type)); 736 700 M=size; 737 701 stringarray=(char**)xmalloc(M*sizeof(char*)); … … 744 708 /*}}}*/ 745 709 /*FUNCTION Param::SetVec {{{1*/ 746 #undef __FUNCT__747 #define __FUNCT__ "SetVec"748 710 void Param::SetVec(Vec value){ 749 711 -
issm/trunk/src/c/objects/ParameterInputs.cpp
r3180 r3332 155 155 /*}}}*/ 156 156 /*FUNCTION ParameterInputs::Get {{{1*/ 157 #undef __FUNCT__158 #define __FUNCT__ "ParameterInputs::Get"159 157 Vec ParameterInputs::Get(char* name,int* dofs, int numdofs){ 160 158 … … 284 282 /*}}}*/ 285 283 /*FUNCTION ParameterInputs::Recover(char* name,double* values, int ndof, int* dofs,int numnodes,void** pnodes) {{{1*/ 286 #undef __FUNCT__287 #define __FUNCT__ "ParameterInputs::Recover"288 284 int ParameterInputs::Recover(char* name,double* values, int ndof, int* dofs,int numnodes,void** pnodes){ 289 285 … … 315 311 /*}}}*/ 316 312 /*FUNCTION ParameterInputs::UpdateFromDakota {{{1*/ 317 #undef __FUNCT__318 #define __FUNCT__ "ParameterInputs::UpdateFromDakota"319 313 void ParameterInputs::UpdateFromDakota(double* variables,char** variables_descriptors,int numvariables,DataSet* parameters,double* qmu_part,int qmu_npart){ 320 314 … … 334 328 /*retrive some necessary parameters first: */ 335 329 found=parameters->FindParam(&numberofnodes,"numberofnodes"); 336 if(!found) throw ErrorException(__FUNCT__,"coud not find numberofnodes in parameters dataset!");330 if(!found)ISSMERROR("coud not find numberofnodes in parameters dataset!"); 337 331 338 332 for(i=0;i<numvariables;i++){ … … 360 354 /*Now, pick up the parameter corresponding to root: */ 361 355 found=parameters->FindParam(¶meter,NULL,NULL,root); 362 if(!found) throw ErrorException(__FUNCT__,exprintf("%s%s%s"," could not find parameter ",root," for Dakota input update"));356 if(!found)ISSMERROR(exprintf("%s%s%s"," could not find parameter ",root," for Dakota input update")); 363 357 364 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
r2907 r3332 16 16 #include "../shared/shared.h" 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 19 20 20 /*Object constructors and destructor*/ … … 144 144 /*}}}1*/ 145 145 /*FUNCTION Pengrid::Configure {{{1*/ 146 #undef __FUNCT__147 #define __FUNCT__ "Pengrid::Configure"148 146 149 147 void Pengrid::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){ … … 162 160 /*}}}1*/ 163 161 /*FUNCTION Pengrid::CreateKMatrix {{{1*/ 164 #undef __FUNCT__165 #define __FUNCT__ "Pengrid::CreateKMatrix"166 162 167 163 void Pengrid::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 173 169 /*}}}1*/ 174 170 /*FUNCTION Pengrid::CreatePVector {{{1*/ 175 #undef __FUNCT__176 #define __FUNCT__ "Pengrid::CreatePVector"177 171 void Pengrid::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 178 172 … … 258 252 /*}}}1*/ 259 253 /*FUNCTION Pengrid::PenaltyConstrain {{{1*/ 260 #undef __FUNCT__261 #define __FUNCT__ "Pengrid::PenaltyConstrain"262 254 void Pengrid::PenaltyConstrain(int* punstable,void* vinputs,int analysis_type,int sub_analysis_type){ 263 255 … … 280 272 } 281 273 else{ 282 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));274 ISSMERROR(exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet")); 283 275 } 284 276 … … 286 278 /*}}}1*/ 287 279 /*FUNCTION Pengrid::PenaltyConstrainThermal {{{1*/ 288 #undef __FUNCT__289 #define __FUNCT__ "Pengrid::PenaltyConstrainThermal"290 280 void Pengrid::PenaltyConstrainThermal(int* punstable,void* vinputs,int analysis_type,int sub_analysis_type){ 291 281 … … 319 309 //First recover beta, pressure and temperature vectors; 320 310 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); 321 if(!found) throw ErrorException(__FUNCT__," could not find pressure in inputs!");311 if(!found)ISSMERROR(" could not find pressure in inputs!"); 322 312 323 313 found=inputs->Recover("temperature",&temperature,1,dofs1,numgrids,(void**)&node); 324 if(!found) throw ErrorException(__FUNCT__," could not find temperature in inputs!");314 if(!found)ISSMERROR(" could not find temperature in inputs!"); 325 315 326 316 found=inputs->Recover("reset_penalties",&reset_penalties); … … 369 359 /*}}}1*/ 370 360 /*FUNCTION Pengrid::PenaltyCreateMatrix {{{1*/ 371 #undef __FUNCT__372 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrix"373 361 void Pengrid::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 374 362 … … 388 376 } 389 377 else{ 390 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));378 ISSMERROR(exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet")); 391 379 } 392 380 … … 394 382 /*}}}1*/ 395 383 /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{1*/ 396 #undef __FUNCT__397 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixDiagnosticStokes"398 384 void Pengrid::PenaltyCreateKMatrixDiagnosticStokes(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 399 385 … … 420 406 /*recover slope: */ 421 407 found=inputs->Recover("bedslopex",&slope[0],1,dofs1,numgrids,(void**)&node); 422 if(!found) throw ErrorException(__FUNCT__," bedslopex needed in inputs!");408 if(!found)ISSMERROR(" bedslopex needed in inputs!"); 423 409 found=inputs->Recover("bedslopey",&slope[1],1,dofs2,numgrids,(void**)&node); 424 if(!found) throw ErrorException(__FUNCT__," bedslopey needed in inputs!");410 if(!found)ISSMERROR(" bedslopey needed in inputs!"); 425 411 426 412 //Create elementary matrix: add penalty to contrain wb (wb=ub*db/dx+vb*db/dy) … … 434 420 /*}}}1*/ 435 421 /*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{1*/ 436 #undef __FUNCT__437 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixMelting"438 422 void Pengrid::PenaltyCreateKMatrixMelting(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 439 423 … … 462 446 463 447 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); 464 if(!found) throw ErrorException(__FUNCT__," could not find pressure in inputs!");448 if(!found)ISSMERROR(" could not find pressure in inputs!"); 465 449 466 450 found=inputs->Recover("temperature",&temperature,1,dofs1,numgrids,(void**)&node); 467 if(!found) throw ErrorException(__FUNCT__," could not find temperature in inputs!");451 if(!found)ISSMERROR(" could not find temperature in inputs!"); 468 452 469 453 /*Get dof list: */ … … 484 468 /*}}}1*/ 485 469 /*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{1*/ 486 #undef __FUNCT__487 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixThermal"488 470 void Pengrid::PenaltyCreateKMatrixThermal(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 489 471 … … 515 497 /*}}}1*/ 516 498 /*FUNCTION Pengrid::PenaltyCreatePVector {{{1*/ 517 #undef __FUNCT__518 #define __FUNCT__ "Pengrid::PenaltyCreatePVector"519 499 void Pengrid::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 520 500 … … 536 516 } 537 517 else{ 538 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));518 ISSMERROR(exprintf("%s%i%s%i%s","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet")); 539 519 } 540 520 … … 574 554 //First recover pressure,melting offset and temperature vectors 575 555 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); 576 if(!found) throw ErrorException(__FUNCT__," could not find pressure in inputs!");556 if(!found)ISSMERROR(" could not find pressure in inputs!"); 577 557 578 558 found=inputs->Recover("temperature",&temperature,1,dofs1,numgrids,(void**)&node); 579 if(!found) throw ErrorException(__FUNCT__," could not find temperature in inputs!");559 if(!found)ISSMERROR(" could not find temperature in inputs!"); 580 560 581 561 found=inputs->Recover("melting_offset",&melting_offset); 582 if(!found) throw ErrorException(__FUNCT__," could not find melting_offset in inputs!");562 if(!found)ISSMERROR(" could not find melting_offset in inputs!"); 583 563 584 564 found=inputs->Recover("dt",&dt); 585 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");565 if(!found)ISSMERROR(" could not find dt in inputs!"); 586 566 587 567 meltingpoint=matpar->GetMeltingPoint(); … … 641 621 //First recover pressure 642 622 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); 643 if(!found) throw ErrorException(__FUNCT__," could not find pressure in inputs!");623 if(!found)ISSMERROR(" could not find pressure in inputs!"); 644 624 645 625 //Compute pressure melting point … … 656 636 /*}}}1*/ 657 637 /*FUNCTION Pengrid::UpdateFromInputs {{{1*/ 658 #undef __FUNCT__659 #define __FUNCT__ "Pengrid::UpdateFromInputs"660 638 void Pengrid::UpdateFromInputs(void* inputs){ 661 639 -
issm/trunk/src/c/objects/Penpair.cpp
r2907 r3332 120 120 /*Object functions*/ 121 121 /*FUNCTION Penpair::Configure {{{1*/ 122 #undef __FUNCT__123 #define __FUNCT__ "Penpair::Configure"124 122 125 123 void Penpair::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){ … … 142 140 /*}}}1*/ 143 141 /*FUNCTION Penpair::CreateKMatrix {{{1*/ 144 #undef __FUNCT__145 #define __FUNCT__ "Penpair::CreateKMatrix"146 142 147 143 void Penpair::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 153 149 /*}}}1*/ 154 150 /*FUNCTION Penpair::CreatePVector {{{1*/ 155 #undef __FUNCT__156 #define __FUNCT__ "Penpair::CreatePVector"157 151 void Penpair::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 158 152 … … 221 215 /*}}}1*/ 222 216 /*FUNCTION Penpair::PenaltyCreateKMatrix {{{1*/ 223 #undef __FUNCT__224 #define __FUNCT__ "Penpair::PenaltyCreateKMatrix"225 217 void Penpair::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 226 218 … … 230 222 /*}}}1*/ 231 223 /*FUNCTION Penpair::PenaltyCreatePVector {{{1*/ 232 #undef __FUNCT__233 #define __FUNCT__ "Penpair::PenaltyCreatePVector"234 224 void Penpair::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){ 235 225 /*No loads applied, do nothing: */ … … 238 228 /*}}}1*/ 239 229 /*FUNCTION Penpair::UpdateFromInputs {{{1*/ 240 #undef __FUNCT__241 #define __FUNCT__ "Penpair::UpdateFromInputs"242 230 void Penpair::UpdateFromInputs(void* inputs){ 243 231 -
issm/trunk/src/c/objects/Penta.cpp
r3180 r3332 15 15 #include "../shared/shared.h" 16 16 #include "../include/typedefs.h" 17 #include "../include/macros.h" 17 18 18 19 /*Object constructors and destructor*/ … … 214 215 /*Object functions*/ 215 216 /*FUNCTION ComputePressure {{{1*/ 216 #undef __FUNCT__217 #define __FUNCT__ "Penta::ComputePressure"218 217 void Penta::ComputePressure(Vec pg){ 219 218 … … 250 249 /*}}}*/ 251 250 /*FUNCTION Configure {{{1*/ 252 #undef __FUNCT__253 #define __FUNCT__ "Penta::Configure"254 251 void Penta::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){ 255 252 … … 285 282 /*}}}*/ 286 283 /*FUNCTION CostFunction {{{1*/ 287 #undef __FUNCT__288 #define __FUNCT__ "Penta::CostFunction"289 284 double Penta::CostFunction(void* inputs,int analysis_type,int sub_analysis_type){ 290 285 … … 320 315 /*}}}*/ 321 316 /*FUNCTION CreateKMatrix {{{1*/ 322 #undef __FUNCT__323 #define __FUNCT__ "Penta::CreateKMatrix"324 317 325 318 void Penta::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 346 339 347 340 } 348 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));341 else ISSMERROR(exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet")); 349 342 } 350 343 else if (analysis_type==SlopecomputeAnalysisEnum()){ … … 373 366 } 374 367 else{ 375 throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));368 ISSMERROR(exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet")); 376 369 } 377 370 … … 379 372 /*}}}*/ 380 373 /*FUNCTION CreateKMatrixBalancedthickness {{{1*/ 381 #undef __FUNCT__382 #define __FUNCT__ "Penta::CreateKMatrixBalancedthickness"383 374 384 375 void Penta::CreateKMatrixBalancedthickness(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 402 393 /*}}}*/ 403 394 /*FUNCTION CreateKMatrixBalancedvelocities {{{1*/ 404 #undef __FUNCT__405 #define __FUNCT__ "Penta::CreateKMatrixBalancedvelocities"406 395 407 396 void Penta::CreateKMatrixBalancedvelocities(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 425 414 /*}}}*/ 426 415 /*FUNCTION CreateKMatrixDiagnosticHoriz {{{1*/ 427 #undef __FUNCT__428 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticHoriz"429 416 void Penta::CreateKMatrixDiagnosticHoriz( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){ 430 417 … … 683 670 /*}}}*/ 684 671 /*FUNCTION CreateKMatrixDiagnosticStokes {{{1*/ 685 #undef __FUNCT__686 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticStokes"687 672 void Penta::CreateKMatrixDiagnosticStokes( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){ 688 673 … … 968 953 /*}}}*/ 969 954 /*FUNCTION CreateKMatrixDiagnosticVert {{{1*/ 970 #undef __FUNCT__971 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticVert"972 955 void Penta::CreateKMatrixDiagnosticVert( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){ 973 956 … … 1108 1091 /*}}}*/ 1109 1092 /*FUNCTION CreateKMatrixMelting {{{1*/ 1110 #undef __FUNCT__1111 #define __FUNCT__ "Penta::CreateKMatrixMelting"1112 1093 void Penta::CreateKMatrixMelting(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ 1113 1094 … … 1130 1111 /*}}}*/ 1131 1112 /*FUNCTION CreateKMatrixPrognostic {{{1*/ 1132 #undef __FUNCT__1133 #define __FUNCT__ "Penta::CreateKMatrixPrognostic"1134 1113 1135 1114 void Penta::CreateKMatrixPrognostic(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 1153 1132 /*}}}*/ 1154 1133 /*FUNCTION CreateKMatrixSlopeCompute {{{1*/ 1155 #undef __FUNCT__1156 #define __FUNCT__ "Penta::CreateKMatrixSlopeCompute"1157 1134 1158 1135 void Penta::CreateKMatrixSlopeCompute(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 1176 1153 /*}}}*/ 1177 1154 /*FUNCTION CreateKMatrixThermal {{{1*/ 1178 #undef __FUNCT__1179 #define __FUNCT__ "Penta::CreateKMatrixThermal"1180 1155 void Penta::CreateKMatrixThermal(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1181 1156 … … 1275 1250 /*recover extra inputs from users, dt and velocity: */ 1276 1251 found=inputs->Recover("velocity",&vxvyvz_list[0][0],3,dofs,numgrids,(void**)nodes); 1277 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");1252 if(!found)ISSMERROR(" could not find velocity in inputs!"); 1278 1253 found=inputs->Recover("dt",&dt); 1279 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");1254 if(!found)ISSMERROR(" could not find dt in inputs!"); 1280 1255 1281 1256 for(i=0;i<numgrids;i++){ … … 1431 1406 /*}}}*/ 1432 1407 /*FUNCTION CreatePVector {{{1*/ 1433 #undef __FUNCT__1434 #define __FUNCT__ "Penta::CreatePVector"1435 1408 void Penta::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 1436 1409 … … 1454 1427 CreatePVectorDiagnosticStokes( pg,inputs,analysis_type,sub_analysis_type); 1455 1428 } 1456 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));1429 else ISSMERROR(exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet")); 1457 1430 } 1458 1431 else if (analysis_type==SlopecomputeAnalysisEnum()){ … … 1481 1454 } 1482 1455 else{ 1483 throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));1456 ISSMERROR(exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet")); 1484 1457 } 1485 1458 … … 1487 1460 /*}}}*/ 1488 1461 /*FUNCTION CreatePVectorBalancedthickness {{{1*/ 1489 #undef __FUNCT__1490 #define __FUNCT__ "Penta::CreatePVectorBalancedthickness"1491 1462 1492 1463 void Penta::CreatePVectorBalancedthickness( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ … … 1509 1480 /*}}}*/ 1510 1481 /*FUNCTION CreatePVectorBalancedvelocities {{{1*/ 1511 #undef __FUNCT__1512 #define __FUNCT__ "Penta::CreatePVectorBalancedvelocities"1513 1482 1514 1483 void Penta::CreatePVectorBalancedvelocities( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ … … 1531 1500 /*}}}*/ 1532 1501 /*FUNCTION CreatePVectorDiagnosticHoriz {{{1*/ 1533 #undef __FUNCT__1534 #define __FUNCT__ "Penta::CreatePVectorDiagnosticHoriz"1535 1502 void Penta::CreatePVectorDiagnosticHoriz( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){ 1536 1503 … … 1688 1655 /*}}}*/ 1689 1656 /*FUNCTION CreatePVectorDiagnosticStokes {{{1*/ 1690 #undef __FUNCT__1691 #define __FUNCT__ "Penta::CreatePVectorDiagnosticStokes"1692 1657 void Penta::CreatePVectorDiagnosticStokes( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){ 1693 1658 … … 1928 1893 /*}}}*/ 1929 1894 /*FUNCTION CreatePVectorDiagnosticVert {{{1*/ 1930 #undef __FUNCT__1931 #define __FUNCT__ "Penta:CreatePVectorDiagnosticVert"1932 1895 void Penta::CreatePVectorDiagnosticVert( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){ 1933 1896 … … 2004 1967 2005 1968 /* recover input parameters: */ 2006 if(!inputs->Recover("velocity",&vx_list[0],1,dofs1,numgrids,(void**)nodes)) throw ErrorException(__FUNCT__," cannot compute vertical velocity without horizontal velocity!");1969 if(!inputs->Recover("velocity",&vx_list[0],1,dofs1,numgrids,(void**)nodes))ISSMERROR(" cannot compute vertical velocity without horizontal velocity!"); 2007 1970 inputs->Recover("velocity",&vy_list[0],1,dofs2,numgrids,(void**)nodes); 2008 1971 … … 2074 2037 /*}}}*/ 2075 2038 /*FUNCTION CreatePVectorMelting {{{1*/ 2076 #undef __FUNCT__2077 #define __FUNCT__ "Penta::CreatePVectorMelting"2078 2039 void Penta::CreatePVectorMelting( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){ 2079 2040 return; … … 2081 2042 /*}}}*/ 2082 2043 /*FUNCTION CreatePVectorPrognostic {{{1*/ 2083 #undef __FUNCT__2084 #define __FUNCT__ "Penta::CreatePVectorPrognostic"2085 2044 2086 2045 void Penta::CreatePVectorPrognostic( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ … … 2103 2062 /*}}}*/ 2104 2063 /*FUNCTION CreatePVectorSlopeCompute {{{1*/ 2105 #undef __FUNCT__2106 #define __FUNCT__ "Penta::CreatePVectorSlopeCompute"2107 2064 2108 2065 void Penta::CreatePVectorSlopeCompute( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ … … 2125 2082 /*}}}*/ 2126 2083 /*FUNCTION CreatePVectorThermal {{{1*/ 2127 #undef __FUNCT__2128 #define __FUNCT__ "Penta::CreatePVectorThermal"2129 2084 void Penta::CreatePVectorThermal( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){ 2130 2085 … … 2220 2175 /*recover extra inputs from users, dt and velocity: */ 2221 2176 found=inputs->Recover("velocity",&vxvyvz_list[0][0],3,dofs,numgrids,(void**)nodes); 2222 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");2177 if(!found)ISSMERROR(" could not find velocity in inputs!"); 2223 2178 found=inputs->Recover("dt",&dt); 2224 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");2179 if(!found)ISSMERROR(" could not find dt in inputs!"); 2225 2180 2226 2181 if(dt){ 2227 2182 found=inputs->Recover("temperature",&temperature_list[0],1,dofs1,numgrids,(void**)nodes); 2228 if(!found) throw ErrorException(__FUNCT__," could not find temperature in inputs!");2183 if(!found)ISSMERROR(" could not find temperature in inputs!"); 2229 2184 } 2230 2185 … … 2355 2310 /*}}}*/ 2356 2311 /*FUNCTION Du {{{1*/ 2357 #undef __FUNCT__2358 #define __FUNCT__ "Penta::Du"2359 2312 void Penta::Du(Vec du_g,void* inputs,int analysis_type,int sub_analysis_type){ 2360 2313 … … 2432 2385 /*}}}*/ 2433 2386 /*FUNCTION FieldExtrude {{{1*/ 2434 #undef __FUNCT__2435 #define __FUNCT__ "Penta::FieldExtrude"2436 2387 void Penta::FieldExtrude(Vec field,double* field_serial,char* field_name, int iscollapsed){ 2437 2388 … … 2567 2518 2568 2519 } 2569 else throw ErrorException(__FUNCT__,exprintf("%s%s%s"," field ",field_name," not supported yet!"));2520 else ISSMERROR(exprintf("%s%s%s"," field ",field_name," not supported yet!")); 2570 2521 2571 2522 } //if (extrude) … … 2573 2524 /*}}}*/ 2574 2525 /*FUNCTION GetB {{{1*/ 2575 #undef __FUNCT__2576 #define __FUNCT__ "Penta::GetB"2577 2526 void Penta::GetB(double* B, double* xyz_list, double* gauss_coord){ 2578 2527 … … 2627 2576 /*}}}*/ 2628 2577 /*FUNCTION GetB_artdiff {{{1*/ 2629 #undef __FUNCT__2630 #define __FUNCT__ "Penta::GetB_artdiff"2631 2578 void Penta::GetB_artdiff(double* B_artdiff, double* xyz_list, double* gauss_coord){ 2632 2579 … … 2660 2607 /*}}}*/ 2661 2608 /*FUNCTION GetB_advec {{{1*/ 2662 #undef __FUNCT__2663 #define __FUNCT__ "Penta::GetB_advec"2664 2609 void Penta::GetB_advec(double* B_advec, double* xyz_list, double* gauss_coord){ 2665 2610 … … 2695 2640 /*}}}*/ 2696 2641 /*FUNCTION GetB_conduct {{{1*/ 2697 #undef __FUNCT__2698 #define __FUNCT__ "Penta::GetB_conduct"2699 2642 void Penta::GetB_conduct(double* B_conduct, double* xyz_list, double* gauss_coord){ 2700 2643 … … 2730 2673 /*}}}*/ 2731 2674 /*FUNCTION GetB_vert {{{1*/ 2732 #undef __FUNCT__2733 #define __FUNCT__ "Penta:GetB_vert"2734 2675 void Penta::GetB_vert(double* B, double* xyz_list, double* gauss_coord){ 2735 2676 … … 2768 2709 /*}}}*/ 2769 2710 /*FUNCTION GetBPrime {{{1*/ 2770 #undef __FUNCT__2771 #define __FUNCT__ "Penta::GetBPrime"2772 2711 void Penta::GetBPrime(double* B, double* xyz_list, double* gauss_coord){ 2773 2712 … … 2821 2760 /*}}}*/ 2822 2761 /*FUNCTION GetBprime_advec {{{1*/ 2823 #undef __FUNCT__2824 #define __FUNCT__ "Penta::GetBprime_advec"2825 2762 void Penta::GetBprime_advec(double* Bprime_advec, double* xyz_list, double* gauss_coord){ 2826 2763 … … 2857 2794 /*}}}*/ 2858 2795 /*FUNCTION GetBPrime_vert {{{1*/ 2859 #undef __FUNCT__2860 #define __FUNCT__ "Penta:GetBPrime_vert"2861 2796 void Penta::GetBPrime_vert(double* B, double* xyz_list, double* gauss_coord){ 2862 2797 … … 2870 2805 /*}}}*/ 2871 2806 /*FUNCTION GetBprimeStokes {{{1*/ 2872 #undef __FUNCT__2873 #define __FUNCT__ "Penta::GetBprimeStokes"2874 2807 void Penta::GetBprimeStokes(double* B_prime, double* xyz_list, double* gauss_coord){ 2875 2808 … … 2952 2885 /*}}}*/ 2953 2886 /*FUNCTION GetBStokes {{{1*/ 2954 #undef __FUNCT__2955 #define __FUNCT__ "Penta::GetBStokes"2956 2887 void Penta::GetBStokes(double* B, double* xyz_list, double* gauss_coord){ 2957 2888 … … 3067 2998 /*}}}*/ 3068 2999 /*FUNCTION GetJacobian {{{1*/ 3069 #undef __FUNCT__3070 #define __FUNCT__ "Penta::GetJacobian"3071 3000 void Penta::GetJacobian(double* J, double* xyz_list,double* gauss_coord){ 3072 3001 … … 3138 3067 /*}}}*/ 3139 3068 /*FUNCTION GetJacobianDeterminant {{{1*/ 3140 #undef __FUNCT__3141 #define __FUNCT__ "Penta::GetJacobianDeterminant"3142 3069 void Penta::GetJacobianDeterminant(double* Jdet, double* xyz_list,double* gauss_coord){ 3143 3070 … … 3151 3078 3152 3079 *Jdet= J[0][0]*J[1][1]*J[2][2]-J[0][0]*J[1][2]*J[2][1]-J[1][0]*J[0][1]*J[2][2]+J[1][0]*J[0][2]*J[2][1]+J[2][0]*J[0][1]*J[1][2]-J[2][0]*J[0][2]*J[1][1]; 3080 3153 3081 if(*Jdet<0){ 3154 printf("%s%s%i\n",__FUNCT__," error message: negative jacobian determinant on element ",id);3082 ISSMERROR(exprintf("%s%i","negative jacobian determinant on element ",id)); 3155 3083 } 3156 3084 } 3157 3085 /*}}}*/ 3158 3086 /*FUNCTION GetJacobianInvert {{{1*/ 3159 #undef __FUNCT__3160 #define __FUNCT__ "Penta::GetJacobianInvert"3161 3087 void Penta::GetJacobianInvert(double* Jinv, double* xyz_list,double* gauss_coord){ 3162 3088 … … 3172 3098 /*}}}*/ 3173 3099 /*FUNCTION GetLStokes {{{1*/ 3174 #undef __FUNCT__3175 #define __FUNCT__ "Penta::GetLStokes"3176 3100 void Penta::GetLStokes(double* LStokes, double* gauss_coord_tria){ 3177 3101 … … 3279 3203 /*}}}*/ 3280 3204 /*FUNCTION GetLprimeStokes {{{1*/ 3281 #undef __FUNCT__3282 #define __FUNCT__ "Penta::GetLprimeStokes"3283 3205 void Penta::GetLprimeStokes(double* LprimeStokes, double* xyz_list, double* gauss_coord_tria, double* gauss_coord){ 3284 3206 … … 3393 3315 /*}}}*/ 3394 3316 /*FUNCTION GetMatrixInvert {{{1*/ 3395 #undef __FUNCT__3396 #define __FUNCT__ "GetMatrixInvert"3397 3317 void Penta::GetMatrixInvert(double* Ke_invert, double* Ke){ 3398 3318 /*Inverse a 3 by 3 matrix only */ … … 3433 3353 /*}}}*/ 3434 3354 /*FUNCTION GetNodalFunctions {{{1*/ 3435 #undef __FUNCT__3436 #define __FUNCT__ "Penta::GetNodalFunctions"3437 3355 void Penta::GetNodalFunctions(double* l1l6, double* gauss_coord){ 3438 3356 … … 3454 3372 /*}}}*/ 3455 3373 /*FUNCTION GetNodalFunctionsDerivatives {{{1*/ 3456 #undef __FUNCT__3457 #define __FUNCT__ "Penta::GetNodalFunctionsDerivatives"3458 3374 void Penta::GetNodalFunctionsDerivatives(double* dh1dh6,double* xyz_list, double* gauss_coord){ 3459 3375 … … 3490 3406 /*}}}*/ 3491 3407 /*FUNCTION GetNodalFunctionsDerivativesStokes {{{1*/ 3492 #undef __FUNCT__3493 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesStokes"3494 3408 void Penta::GetNodalFunctionsDerivativesStokes(double* dh1dh7,double* xyz_list, double* gauss_coord){ 3495 3409 … … 3526 3440 /*}}}*/ 3527 3441 /*FUNCTION GetNodalFunctionsDerivativesReference {{{1*/ 3528 #undef __FUNCT__3529 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesReference"3530 3442 void Penta::GetNodalFunctionsDerivativesReference(double* dl1dl6,double* gauss_coord){ 3531 3443 … … 3574 3486 /*}}}*/ 3575 3487 /*FUNCTION GetNodalFunctionsDerivativesReferenceStokes {{{1*/ 3576 #undef __FUNCT__3577 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesReferenceStokes"3578 3488 void Penta::GetNodalFunctionsDerivativesReferenceStokes(double* dl1dl7,double* gauss_coord){ 3579 3489 … … 3625 3535 /*}}}*/ 3626 3536 /*FUNCTION GetNodalFunctionsStokes {{{1*/ 3627 #undef __FUNCT__3628 #define __FUNCT__ "Penta::GetNodalFunctionsStokes"3629 3537 void Penta::GetNodalFunctionsStokes(double* l1l7, double* gauss_coord){ 3630 3538 … … 3670 3578 /*}}}*/ 3671 3579 /*FUNCTION GetParameterDerivativeValue {{{1*/ 3672 #undef __FUNCT__3673 #define __FUNCT__ "Penta::GetParameterDerivativeValue"3674 3580 void Penta::GetParameterDerivativeValue(double* p, double* p_list,double* xyz_list, double* gauss_coord){ 3675 3581 … … 3698 3604 /*}}}*/ 3699 3605 /*FUNCTION GetParameterValue {{{1*/ 3700 #undef __FUNCT__3701 #define __FUNCT__ "Penta::GetParameterValue"3702 3606 void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){ 3703 3607 … … 3711 3615 /*}}}*/ 3712 3616 /*FUNCTION GetPhi {{{1*/ 3713 #undef __FUNCT__3714 #define __FUNCT__ "Penta::GetPhi"3715 3617 void Penta::GetPhi(double* phi, double* epsilon, double viscosity){ 3716 3618 /*Compute deformational heating from epsilon and viscosity */ … … 3752 3654 /*}}}*/ 3753 3655 /*FUNCTION GetStrainRate {{{1*/ 3754 #undef __FUNCT__3755 #define __FUNCT__ "Penta::GetStrainRate"3756 3656 void Penta::GetStrainRate(double* epsilon, double* velocity, double* xyz_list, double* gauss_coord){ 3757 3657 … … 3812 3712 /*}}}*/ 3813 3713 /*FUNCTION GetStrainRateStokes {{{1*/ 3814 #undef __FUNCT__3815 #define __FUNCT__ "Penta::GetStrainRateStokes"3816 3714 void Penta::GetStrainRateStokes(double* epsilon, double* velocity, double* xyz_list, double* gauss_coord){ 3817 3715 … … 3859 3757 /*}}}*/ 3860 3758 /*FUNCTION Gradj {{{1*/ 3861 #undef __FUNCT__3862 #define __FUNCT__ "Penta::Gradj"3863 3759 void Penta::Gradj(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type,char* control_type){ 3864 3760 … … 3872 3768 GradjB( grad_g, inputs,analysis_type,sub_analysis_type); 3873 3769 } 3874 else throw ErrorException(__FUNCT__,exprintf("%s%s","control type not supported yet: ",control_type));3770 else ISSMERROR(exprintf("%s%s","control type not supported yet: ",control_type)); 3875 3771 } 3876 3772 /*}}}*/ 3877 3773 /*FUNCTION GradjDrag {{{1*/ 3878 #undef __FUNCT__3879 #define __FUNCT__ "Penta::GradjDrag"3880 3774 void Penta::GradjDrag(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){ 3881 3775 … … 3907 3801 return; 3908 3802 } 3909 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));3803 else ISSMERROR(exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet")); 3910 3804 } 3911 3805 /*}}}*/ 3912 3806 /*FUNCTION GradjB {{{1*/ 3913 #undef __FUNCT__3914 #define __FUNCT__ "Penta::GradjB"3915 3807 void Penta::GradjB(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){ 3916 3808 … … 3941 3833 /*}}}*/ 3942 3834 /*FUNCTION MassFlux {{{1*/ 3943 #undef __FUNCT__3944 #define __FUNCT__ "Penta::MassFlux"3945 3835 double Penta::MassFlux( double* segment,double* ug){ 3946 throw ErrorException(__FUNCT__," not supported yet!");3836 ISSMERROR(" not supported yet!"); 3947 3837 } 3948 3838 /*}}}*/ 3949 3839 /*FUNCTION Misfit {{{1*/ 3950 #undef __FUNCT__3951 #define __FUNCT__ "Penta::Misfit"3952 3840 double Penta::Misfit(void* inputs,int analysis_type,int sub_analysis_type){ 3953 3841 … … 3989 3877 /*}}}*/ 3990 3878 /*FUNCTION ReduceMatrixStokes {{{1*/ 3991 #undef __FUNCT__3992 #define __FUNCT__ "ReduceMatrixStokes"3993 3879 void Penta::ReduceMatrixStokes(double* Ke_reduced, double* Ke_temp){ 3994 3880 … … 4037 3923 /*}}}*/ 4038 3924 /*FUNCTION ReduceVectorStokes {{{1*/ 4039 #undef __FUNCT__4040 #define __FUNCT__ "Penta::ReduceVectorStokes"4041 3925 void Penta::ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp){ 4042 3926 … … 4081 3965 /*}}}*/ 4082 3966 /*FUNCTION SpawnTria {{{1*/ 4083 #undef __FUNCT__4084 #define __FUNCT__ "Penta::SpawnTria"4085 3967 void* Penta::SpawnTria(int g0, int g1, int g2){ 4086 3968 … … 4153 4035 /*}}}*/ 4154 4036 /*FUNCTION UpdateFromInputs {{{1*/ 4155 #undef __FUNCT__4156 #define __FUNCT__ "Penta::UpdateFromInputs"4157 4037 void Penta::UpdateFromInputs(void* vinputs){ 4158 4038 … … 4210 4090 /*}}}*/ 4211 4091 /*FUNCTION SurfaceArea {{{1*/ 4212 #undef __FUNCT__4213 #define __FUNCT__ "Penta::SurfaceArea"4214 4092 double Penta::SurfaceArea(void* inputs,int analysis_type,int sub_analysis_type){ 4215 4093 … … 4245 4123 /*}}}*/ 4246 4124 /*FUNCTION SurfaceNormal {{{1*/ 4247 #undef __FUNCT__4248 #define __FUNCT__ "Penta::SurfaceNormal"4249 4125 void Penta::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){ 4250 4126 -
issm/trunk/src/c/objects/Result.cpp
r2907 r3332 17 17 #include "../shared/shared.h" 18 18 #include "../include/typedefs.h" 19 #include "../include/macros.h" 19 20 20 21 /*Object constructors and destructor*/ … … 65 66 /*}}}1*/ 66 67 /*FUNCTION Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,Vec result_field) {{{1*/ 67 #undef __FUNCT__68 #define __FUNCT__ "Result::Result"69 68 Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,Vec result_field){ 70 69 … … 74 73 75 74 if(!result_fieldname){ 76 throw ErrorException(__FUNCT__,"NULL fieldname in constructor argument");75 ISSMERROR("NULL fieldname in constructor argument"); 77 76 } 78 77 else{ … … 87 86 /*}}}1*/ 88 87 /*FUNCTION Result::Result(int result_id,double result_time,int result_step,char* result_fldname,double* result_field,int result_size){{{1*/ 89 #undef __FUNCT__90 #define __FUNCT__ "Result::Result"91 88 Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,double* result_field,int result_size){ 92 89 … … 96 93 97 94 if(!result_fieldname){ 98 throw ErrorException(__FUNCT__," NULL fieldname in constructor argument");95 ISSMERROR(" NULL fieldname in constructor argument"); 99 96 } 100 97 else{ … … 111 108 /*}}}1*/ 112 109 /*FUNCTION Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,char* result_field) {{{1*/ 113 #undef __FUNCT__114 #define __FUNCT__ "Result::Result"115 110 Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,char* result_field){ 116 111 … … 120 115 121 116 if(!result_fieldname){ 122 throw ErrorException(__FUNCT__," NULL fieldname in constructor argument");117 ISSMERROR(" NULL fieldname in constructor argument"); 123 118 } 124 119 else{ … … 136 131 /*Object marshall*/ 137 132 /*FUNCTION Result::Marshall {{{1*/ 138 #undef __FUNCT__139 #define __FUNCT__ "Result::Marshall"140 133 void Result::Marshall(char** pmarshalled_dataset){ 141 134 142 throw ErrorException(__FUNCT__," not supported yet!");135 ISSMERROR(" not supported yet!"); 143 136 144 137 } 145 138 /*}}}1*/ 146 139 /*FUNCTION Result::MarshallSize {{{1*/ 147 #undef __FUNCT__148 #define __FUNCT__ "Result::MarshallSize"149 140 int Result::MarshallSize(){ 150 141 151 throw ErrorException(__FUNCT__," not supported yet!");142 ISSMERROR(" not supported yet!"); 152 143 } 153 144 /*}}}1*/ 154 145 /*FUNCTION Result::Demarshall {{{1*/ 155 #undef __FUNCT__156 #define __FUNCT__ "Result::Demarshall"157 146 void Result::Demarshall(char** pmarshalled_dataset){ 158 147 159 throw ErrorException(__FUNCT__," not supported yet!");148 ISSMERROR(" not supported yet!"); 160 149 } 161 150 /*}}}1*/ -
issm/trunk/src/c/objects/Riftfront.cpp
r3201 r3332 202 202 /*Object functions*/ 203 203 /*FUNCTION Riftfront::Configure {{{1*/ 204 #undef __FUNCT__205 #define __FUNCT__ "Riftfront::Configure"206 204 void Riftfront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){ 207 205 … … 224 222 #define _ZIGZAGCOUNTER_ 225 223 226 #undef __FUNCT__227 #define __FUNCT__ "Riftfront::Constrain"228 224 int Riftfront::Constrain(int* punstable, void* vinputs, int analysis_type){ 229 225 … … 249 245 /*First recover parameter inputs: */ 250 246 found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 251 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");247 if(!found)ISSMERROR(" could not find velocity in inputs!"); 252 248 253 249 … … 294 290 /*}}}1*/ 295 291 /*FUNCTION Riftfront::CreateKMatrix {{{1*/ 296 #undef __FUNCT__297 #define __FUNCT__ "Riftfront::CreateKMatrix"298 292 void Riftfront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ 299 293 /*do nothing: */ … … 301 295 /*}}}1*/ 302 296 /*FUNCTION Riftfront::CreatePVector {{{1*/ 303 #undef __FUNCT__304 #define __FUNCT__ "Riftfront::CreatePVector"305 297 void Riftfront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){ 306 298 /*do nothing: */ … … 373 365 /*}}}1*/ 374 366 /*FUNCTION Riftfront::GetDofList {{{1*/ 375 #undef __FUNCT__376 #define __FUNCT__ "Riftfront::GetDofList"377 367 378 368 void Riftfront::GetDofList(int* doflist,int* pnumberofdofspernode){ … … 402 392 /*}}}1*/ 403 393 /*FUNCTION Riftfront::IsMaterialStable {{{1*/ 404 #undef __FUNCT__405 #define __FUNCT__ "Riftfront::IsMaterialStable"406 394 int Riftfront::IsMaterialStable(void* vinputs, int analysis_type){ 407 395 … … 413 401 414 402 found=inputs->Recover("converged",&converged); 415 if(!found) throw ErrorException(__FUNCT__," could not find converged flag in inputs!");403 if(!found)ISSMERROR(" could not find converged flag in inputs!"); 416 404 417 405 if(converged){ … … 426 414 /*}}}1*/ 427 415 /*FUNCTION Riftfront::MaxPenetration {{{1*/ 428 #undef __FUNCT__429 #define __FUNCT__ "Riftfront::MaxPenetration"430 416 int Riftfront::MaxPenetration(double* ppenetration, void* vinputs, int analysis_type){ 431 417 … … 445 431 446 432 found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 447 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");433 if(!found)ISSMERROR(" could not find velocity in inputs!"); 448 434 449 435 /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 468 454 /*}}}1*/ 469 455 /*FUNCTION Riftfront::OutputProperties {{{1*/ 470 #undef __FUNCT__471 #define __FUNCT__ "Riftfront::OutputProperties"472 456 void Riftfront::OutputProperties(Vec riftproperties){ 473 457 … … 484 468 /*}}}1*/ 485 469 /*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/ 486 #undef __FUNCT__487 #define __FUNCT__ "Riftfront::PenaltyCreateKMatrix"488 470 void Riftfront::PenaltyCreateKMatrix(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 489 471 … … 519 501 /*Recover input parameters: */ 520 502 inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes); 521 if (h[0]!=h[1]) throw ErrorException(__FUNCT__," different thicknesses not supported for rift fronts");503 if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts"); 522 504 thickness=h[0]; 523 505 … … 583 565 /*}}}1*/ 584 566 /*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/ 585 #undef __FUNCT__586 #define __FUNCT__ "Riftfront::PenaltyCreatePVector"587 567 void Riftfront::PenaltyCreatePVector(Vec pg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 588 568 … … 632 612 /*get thickness: */ 633 613 inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes); 634 if (h[0]!=h[1]) throw ErrorException(__FUNCT__," different thicknesses not supported for rift fronts");614 if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts"); 635 615 thickness=h[0]; 636 616 637 617 inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes); 638 if (b[0]!=b[1]) throw ErrorException(__FUNCT__," different beds not supported for rift fronts");618 if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts"); 639 619 bed=b[0]; 640 620 … … 658 638 else if(fill==MelangeEnum()){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice) 659 639 660 if(!shelf) throw ErrorException(__FUNCT__,exprintf("%s%s%i%s",__FUNCT__," error message:fill type ",fill," not supported on ice sheets yet."));640 if(!shelf) ISSMERROR(exprintf("%s%i%s","fill type ",fill," not supported on ice sheets yet.")); 661 641 662 642 pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2; … … 668 648 } 669 649 else{ 670 throw ErrorException(__FUNCT__,exprintf("%s%s%i%s",__FUNCT__," error message:fill type ",fill," not supported yet."));650 ISSMERROR(exprintf("%s%i%s","fill type ",fill," not supported yet.")); 671 651 } 672 652 … … 690 670 /*}}}1*/ 691 671 /*FUNCTION Riftfront::Penetration {{{1*/ 692 #undef __FUNCT__693 #define __FUNCT__ "Riftfront::Penetration"694 672 int Riftfront::Penetration(double* ppenetration, void* vinputs, int analysis_type){ 695 673 … … 707 685 708 686 found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 709 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");687 if(!found)ISSMERROR(" could not find velocity in inputs!"); 710 688 711 689 /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 722 700 /*FUNCTION Riftfront::PotentialUnstableC 723 701 * nstraint {{{1*/ 724 #undef __FUNCT__725 #define __FUNCT__ "Riftfront::PotentialUnstableConstraint"726 702 int Riftfront::PotentialUnstableConstraint(int* punstable, void* vinputs, int analysis_type){ 727 703 … … 741 717 742 718 found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 743 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");719 if(!found)ISSMERROR(" could not find velocity in inputs!"); 744 720 745 721 /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 764 740 /*}}}1*/ 765 741 /*FUNCTION Riftfront::PreConstrain {{{1*/ 766 #undef __FUNCT__767 #define __FUNCT__ "Riftfront::PreConstrain"768 742 int Riftfront::PreConstrain(int* punstable, void* vinputs, int analysis_type){ 769 743 … … 780 754 /*First recover velocity: */ 781 755 found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 782 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");756 if(!found)ISSMERROR(" could not find velocity in inputs!"); 783 757 784 758 /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */ … … 828 802 /*}}}1*/ 829 803 /*FUNCTION Riftfront::UpdateFromInputs {{{1*/ 830 #undef __FUNCT__831 #define __FUNCT__ "Riftfront::UpdateFromInputs"832 804 void Riftfront::UpdateFromInputs(void* vinputs){ 833 805 … … 844 816 /*}}}1*/ 845 817 /*FUNCTION Riftfront::FreezeConstraints{{{1*/ 846 #undef __FUNCT__847 #define __FUNCT__ "Riftfront::FreezeConstraints"848 818 void Riftfront::FreezeConstraints(void* vinputs, int analysis_type){ 849 819 … … 854 824 /*}}}1*/ 855 825 /*FUNCTION Riftfront::IsFrozen{{{1*/ 856 #undef __FUNCT__857 #define __FUNCT__ "Riftfront::IsFrozen"858 826 bool Riftfront::IsFrozen(void){ 859 827 -
issm/trunk/src/c/objects/Sing.cpp
r3180 r3332 16 16 #include "../DataSet/DataSet.h" 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 19 20 20 /*Object constructors and destructor*/ … … 158 158 /*Object functions*/ 159 159 /*FUNCTION Sing::ComputePressure {{{1*/ 160 #undef __FUNCT__161 #define __FUNCT__ "Sing::ComputePressure"162 160 void Sing::ComputePressure(Vec p_g){ 163 161 … … 182 180 /*}}}*/ 183 181 /*FUNCTION Sing::Configure {{{1*/ 184 #undef __FUNCT__185 #define __FUNCT__ "Sing::Configure"186 182 void Sing::Configure(void* ploadsin, void* pnodesin,void* pmaterialsin,void* pparametersin){ 187 183 … … 217 213 /*}}}*/ 218 214 /*FUNCTION Sing::CostFunction {{{1*/ 219 #undef __FUNCT__220 #define __FUNCT__ "Sing::CostFunction"221 215 double Sing::CostFunction(void*, int,int){ 222 throw ErrorException(__FUNCT__," not supported yet!");216 ISSMERROR(" not supported yet!"); 223 217 } 224 218 /*}}}*/ 225 219 /*FUNCTION Sing::CreateKMatrix {{{1*/ 226 #undef __FUNCT__227 #define __FUNCT__ "Sing::CreateKMatrix"228 220 229 221 void Sing::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 236 228 } 237 229 else{ 238 throw ErrorException(__FUNCT__,exprintf("%s%i%s%i%s\n","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet"));230 ISSMERROR(exprintf("%s%i%s%i%s\n","analysis: ",analysis_type," and sub_analysis_type: ",sub_analysis_type," not supported yet")); 239 231 } 240 232 … … 242 234 /*}}}*/ 243 235 /*FUNCTION Sing::CreateKMatrixDiagnosticHutter {{{1*/ 244 #undef __FUNCT__245 #define __FUNCT__ "Sing::CreateKMatrixDiagnosticHutter"246 236 247 237 void Sing::CreateKMatrixDiagnosticHutter(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ … … 266 256 /*}}}*/ 267 257 /*FUNCTION Sing::CreatePVector {{{1*/ 268 #undef __FUNCT__269 #define __FUNCT__ "Sing::CreatePVector"270 258 void Sing::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){ 271 259 … … 277 265 } 278 266 else{ 279 throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));267 ISSMERROR(exprintf("%s%i%s"," analysis ",analysis_type," not supported yet")); 280 268 } 281 269 … … 283 271 /*}}}*/ 284 272 /*FUNCTION Sing::CreatePVectorDiagnosticHutter {{{1*/ 285 #undef __FUNCT__286 #define __FUNCT__ "Sing::CreatePVectorDiagnosticHutter"287 273 288 274 void Sing::CreatePVectorDiagnosticHutter( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ … … 309 295 310 296 found=inputs->Recover("surfaceslopex",&slope[0],1,dofs,numgrids,(void**)&node); 311 if(!found) throw ErrorException(__FUNCT__," surfaceslopex missing from inputs!");297 if(!found)ISSMERROR(" surfaceslopex missing from inputs!"); 312 298 found=inputs->Recover("surfaceslopey",&slope[1],1,dofs,numgrids,(void**)&node); 313 if(!found) throw ErrorException(__FUNCT__," surfaceslopey missing from inputs!");299 if(!found)ISSMERROR(" surfaceslopey missing from inputs!"); 314 300 315 301 GetDofList(&doflist[0],&numberofdofspernode); … … 339 325 /*}}}*/ 340 326 /*FUNCTION Sing::DeepEcho {{{1*/ 341 #undef __FUNCT__342 #define __FUNCT__ "Sing::DeepEcho"343 327 void Sing::DeepEcho(void){ 344 328 … … 362 346 /*}}}*/ 363 347 /*FUNCTION Sing::Du {{{1*/ 364 #undef __FUNCT__365 #define __FUNCT__ "Sing::Du"366 348 void Sing::Du(_p_Vec*,void*,int,int){ 367 throw ErrorException(__FUNCT__," not supported yet!");349 ISSMERROR(" not supported yet!"); 368 350 } 369 351 /*}}}*/ 370 352 /*FUNCTION Sing::Echo{{{1*/ 371 #undef __FUNCT__372 #define __FUNCT__ "Sing::Echo"373 353 374 354 void Sing::Echo(void){ … … 400 380 /*}}}*/ 401 381 /*FUNCTION Sing::GetBedList {{{1*/ 402 #undef __FUNCT__403 #define __FUNCT__ "Sing::GetBedList"404 382 void Sing::GetBedList(double*){ 405 throw ErrorException(__FUNCT__," not supported yet!");383 ISSMERROR(" not supported yet!"); 406 384 } 407 385 /*}}}*/ … … 453 431 /*}}}*/ 454 432 /*FUNCTION Sing::GetOnBed {{{1*/ 455 #undef __FUNCT__456 #define __FUNCT__ "Sing::GetOnBed"457 433 int Sing::GetOnBed(){ 458 throw ErrorException(__FUNCT__," not supported yet!");434 ISSMERROR(" not supported yet!"); 459 435 } 460 436 /*}}}*/ 461 437 /*FUNCTION Sing::GetShelf {{{1*/ 462 #undef __FUNCT__463 #define __FUNCT__ "Sing::GetShelf"464 438 int Sing::GetShelf(){ 465 throw ErrorException(__FUNCT__," not supported yet!");439 ISSMERROR(" not supported yet!"); 466 440 } 467 441 /*}}}*/ 468 442 /*FUNCTION Sing::GetThicknessList {{{1*/ 469 #undef __FUNCT__470 #define __FUNCT__ "Sing::GetThicknessList"471 443 void Sing::GetThicknessList(double* thickness_list){ 472 throw ErrorException(__FUNCT__," not supported yet!");444 ISSMERROR(" not supported yet!"); 473 445 } 474 446 /*}}}*/ 475 447 /*FUNCTION Sing::Gradj {{{1*/ 476 #undef __FUNCT__477 #define __FUNCT__ "Sing::Gradj"478 448 void Sing::Gradj(_p_Vec*, void*, int, int ,char*){ 479 throw ErrorException(__FUNCT__," not supported yet!");449 ISSMERROR(" not supported yet!"); 480 450 } 481 451 /*}}}*/ 482 452 /*FUNCTION Sing::GradB {{{1*/ 483 #undef __FUNCT__484 #define __FUNCT__ "Sing::GradjB"485 453 void Sing::GradjB(_p_Vec*, void*, int,int){ 486 throw ErrorException(__FUNCT__," not supported yet!");454 ISSMERROR(" not supported yet!"); 487 455 } 488 456 /*}}}*/ 489 457 /*FUNCTION Sing::GradjDrag {{{1*/ 490 #undef __FUNCT__491 #define __FUNCT__ "Sing::GradjDrag"492 458 void Sing::GradjDrag(_p_Vec*, void*, int,int){ 493 throw ErrorException(__FUNCT__," not supported yet!");459 ISSMERROR(" not supported yet!"); 494 460 } 495 461 /*}}}*/ 496 462 /*FUNCTION Sing::MassFlux {{{1*/ 497 #undef __FUNCT__498 #define __FUNCT__ "Sing::MassFlux"499 463 double Sing::MassFlux( double* segment,double* ug){ 500 throw ErrorException(__FUNCT__," not supported yet!");464 ISSMERROR(" not supported yet!"); 501 465 } 502 466 /*}}}*/ 503 467 /*FUNCTION Sing::MaticeConfiguration {{{1*/ 504 #undef __FUNCT__505 #define __FUNCT__ "Sing::MaticeConfiguration"506 468 void Sing::MaticeConfiguration(Matice* sing_matice,int sing_matice_offset){ 507 469 matice=sing_matice; … … 510 472 /*}}}*/ 511 473 /*FUNCTION Sing::MatparConfiguration {{{1*/ 512 #undef __FUNCT__513 #define __FUNCT__ "Sing::MatparConfiguration"514 474 void Sing::MatparConfiguration(Matpar* sing_matpar,int sing_matpar_offset){ 515 475 … … 520 480 /*}}}*/ 521 481 /*FUNCTION Sing::Misfit {{{1*/ 522 #undef __FUNCT__523 #define __FUNCT__ "Sing::Misfit"524 482 double Sing::Misfit(void*, int,int){ 525 throw ErrorException(__FUNCT__," not supported yet!");483 ISSMERROR(" not supported yet!"); 526 484 } 527 485 /*}}}*/ … … 533 491 /*}}}*/ 534 492 /*FUNCTION Sing::SurfaceArea {{{1*/ 535 #undef __FUNCT__536 #define __FUNCT__ "Sing::SurfaceArea"537 493 double Sing::SurfaceArea(void*, int,int){ 538 throw ErrorException(__FUNCT__," not supported yet!");494 ISSMERROR(" not supported yet!"); 539 495 } 540 496 /*}}}*/ 541 497 /*FUNCTION Sing::UpdateFromInputs {{{1*/ 542 #undef __FUNCT__543 #define __FUNCT__ "Sing::UpdateFromInputs"544 498 void Sing::UpdateFromInputs(void* vinputs){ 545 499 -
issm/trunk/src/c/objects/Tria.cpp
r3203 r3332 16 16 #include "../DataSet/DataSet.h" 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 19 20 20 /*For debugging purposes: */ … … 206 206 /*Object functions*/ 207 207 /*FUNCTION ComputePressure {{{1*/ 208 #undef __FUNCT__209 #define __FUNCT__ "Tria::ComputePressure"210 208 void Tria::ComputePressure(Vec pg){ 211 209 … … 232 230 /*}}}*/ 233 231 /*FUNCTION Configure {{{1*/ 234 #undef __FUNCT__235 #define __FUNCT__ "Tria::Configure"236 232 void Tria::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){ 237 233 … … 269 265 /*}}}*/ 270 266 /*FUNCTION CostFunction {{{1*/ 271 #undef __FUNCT__272 #define __FUNCT__ "Tria::CostFunction"273 267 double Tria::CostFunction(void* vinputs,int analysis_type,int sub_analysis_type){ 274 268 … … 353 347 354 348 if(!inputs->Recover("B",&B[0],1,dofs1,numgrids,(void**)nodes)){ 355 throw ErrorException(__FUNCT__,"parameter B not found in input");349 ISSMERROR("parameter B not found in input"); 356 350 } 357 351 GetParameterDerivativeValue(&dB[0], &B[0],&xyz_list[0][0], gauss_l1l2l3); … … 360 354 } 361 355 else{ 362 throw ErrorException(__FUNCT__,exprintf("%s%s","unsupported control type: ",numpar->control_type));356 ISSMERROR(exprintf("%s%s","unsupported control type: ",numpar->control_type)); 363 357 } 364 358 … … 375 369 /*}}}*/ 376 370 /*FUNCTION CreateKMatrix {{{1*/ 377 #undef __FUNCT__378 #define __FUNCT__ "Tria::CreateKMatrix"379 371 380 372 void Tria::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){ … … 391 383 CreateKMatrixDiagnosticHoriz( Kgg,inputs,analysis_type,sub_analysis_type); 392 384 } 393 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));385 else ISSMERROR(exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet")); 394 386 395 387 } … … 415 407 } 416 408 else{ 417 throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet"));409 ISSMERROR(exprintf("%s%i%s\n","analysis: ",analysis_type," not supported yet")); 418 410 } 419 411 … … 421 413 /*}}}*/ 422 414 /*FUNCTION CreateKMatrixBalancedthickness {{{1*/ 423 #undef __FUNCT__424 #define __FUNCT__ "Tria::CreateKMatrixBalancedthickness"425 415 void Tria::CreateKMatrixBalancedthickness(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 426 416 … … 480 470 /*recover extra inputs from users, at current convergence iteration: */ 481 471 found=inputs->Recover("velocity_average",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 482 if(!found) throw ErrorException(__FUNCT__," could not find velocity_average in inputs!");472 if(!found)ISSMERROR(" could not find velocity_average in inputs!"); 483 473 484 474 for(i=0;i<numgrids;i++){ … … 624 614 /*}}}*/ 625 615 /*FUNCTION CreateKMatrixBalancedvelocities {{{1*/ 626 #undef __FUNCT__627 #define __FUNCT__ "Tria::CreateKMatrixBalancedvelocities"628 616 void Tria::CreateKMatrixBalancedvelocities(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 629 617 … … 684 672 /*recover extra inputs from users, at current convergence iteration: */ 685 673 found=inputs->Recover("velocity_average",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 686 if(!found) throw ErrorException(__FUNCT__," could not find velocity_average in inputs!");674 if(!found)ISSMERROR(" could not find velocity_average in inputs!"); 687 675 688 676 for(i=0;i<numgrids;i++){ … … 836 824 /*}}}*/ 837 825 /*FUNCTION CreateKMatrixDiagnosticHoriz {{{1*/ 838 #undef __FUNCT__839 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticHoriz"840 826 841 827 void Tria::CreateKMatrixDiagnosticHoriz(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ … … 1055 1041 /*}}}*/ 1056 1042 /*FUNCTION CreateKMatrixDiagnosticHorizFriction {{{1*/ 1057 #undef __FUNCT__1058 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticHorizFriction"1059 1043 void Tria::CreateKMatrixDiagnosticHorizFriction(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1060 1044 … … 1122 1106 } 1123 1107 1124 if (friction_type!=2) throw ErrorException(__FUNCT__," non-viscous friction not supported yet!");1108 if (friction_type!=2)ISSMERROR(" non-viscous friction not supported yet!"); 1125 1109 1126 1110 /*recover extra inputs from users, at current convergence iteration: */ … … 1224 1208 /*}}}*/ 1225 1209 /*FUNCTION CreateKMatrixDiagnosticSurfaceVert {{{1*/ 1226 #undef __FUNCT__1227 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticSurfaceVert"1228 1210 void Tria::CreateKMatrixDiagnosticSurfaceVert(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1229 1211 … … 1352 1334 /*}}}*/ 1353 1335 /*FUNCTION CreateKMatrixMelting {{{1*/ 1354 #undef __FUNCT__1355 #define __FUNCT__ "Tria::CreateKMatrixMelting"1356 1336 void Tria::CreateKMatrixMelting(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1357 1337 … … 1438 1418 /*}}}*/ 1439 1419 /*FUNCTION CreateKMatrixPrognostic {{{1*/ 1440 #undef __FUNCT__1441 #define __FUNCT__ "Tria::CreateKMatrixPrognostic"1442 1420 void Tria::CreateKMatrixPrognostic(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1443 1421 … … 1497 1475 /*recover extra inputs from users, at current convergence iteration: */ 1498 1476 found=inputs->Recover("velocity_average",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes); 1499 if(!found) throw ErrorException(__FUNCT__," could not find velocity_average in inputs!");1477 if(!found)ISSMERROR(" could not find velocity_average in inputs!"); 1500 1478 1501 1479 for(i=0;i<numgrids;i++){ … … 1505 1483 1506 1484 found=inputs->Recover("dt",&dt); 1507 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");1485 if(!found)ISSMERROR(" could not find dt in inputs!"); 1508 1486 1509 1487 /* Get node coordinates and dof list: */ … … 1657 1635 /*}}}*/ 1658 1636 /*FUNCTION CreateKMatrixSlopeCompute {{{1*/ 1659 #undef __FUNCT__1660 #define __FUNCT__ "Tria::CreateKMatrixSlopeCompute"1661 1637 1662 1638 void Tria::CreateKMatrixSlopeCompute(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ … … 1740 1716 /*}}}*/ 1741 1717 /*FUNCTION CreateKMatrixThermal {{{1*/ 1742 #undef __FUNCT__1743 #define __FUNCT__ "Tria::CreateKMatrixThermal"1744 1718 void Tria::CreateKMatrixThermal(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 1745 1719 … … 1784 1758 /*recover extra inputs from users, dt: */ 1785 1759 found=inputs->Recover("dt",&dt); 1786 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");1760 if(!found)ISSMERROR(" could not find dt in inputs!"); 1787 1761 1788 1762 /* Get node coordinates and dof list: */ … … 1842 1816 /*}}}*/ 1843 1817 /*FUNCTION CreatePVector {{{1*/ 1844 #undef __FUNCT__1845 #define __FUNCT__ "Tria::CreatePVector"1846 1818 void Tria::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){ 1847 1819 … … 1858 1830 1859 1831 } 1860 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"));1832 else ISSMERROR(exprintf("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet")); 1861 1833 } 1862 1834 else if (analysis_type==SlopecomputeAnalysisEnum()){ … … 1877 1849 } 1878 1850 else{ 1879 throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis ",analysis_type," not supported yet"));1851 ISSMERROR(exprintf("%s%i%s"," analysis ",analysis_type," not supported yet")); 1880 1852 } 1881 1853 … … 1883 1855 /*}}}*/ 1884 1856 /*FUNCTION CreatePVectorBalancedthickness {{{1*/ 1885 #undef __FUNCT__1886 #define __FUNCT__ "Tria::CreatePVectorBalancedthickness"1887 1857 void Tria::CreatePVectorBalancedthickness(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){ 1888 1858 … … 1930 1900 /*recover extra inputs from users, at current convergence iteration: */ 1931 1901 found=inputs->Recover("accumulation",&accumulation_list[0],1,dofs,numgrids,(void**)nodes); 1932 if(!found) throw ErrorException(__FUNCT__," could not find accumulation in inputs!");1902 if(!found)ISSMERROR(" could not find accumulation in inputs!"); 1933 1903 found=inputs->Recover("melting",&melting_list[0],1,dofs,numgrids,(void**)nodes); 1934 if(!found) throw ErrorException(__FUNCT__," could not find melting in inputs!");1904 if(!found)ISSMERROR(" could not find melting in inputs!"); 1935 1905 1936 1906 /* Get node coordinates and dof list: */ … … 1976 1946 /*}}}*/ 1977 1947 /*FUNCTION CreatePVectorBalancedvelocities {{{1*/ 1978 #undef __FUNCT__1979 #define __FUNCT__ "Tria::CreatePVectorBalancedvelocities"1980 1948 void Tria::CreatePVectorBalancedvelocities(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){ 1981 1949 … … 2021 1989 /*recover extra inputs from users, at current convergence iteration: */ 2022 1990 found=inputs->Recover("accumulation",&accumulation_list[0],1,dofs,numgrids,(void**)nodes); 2023 if(!found) throw ErrorException(__FUNCT__," could not find accumulation in inputs!");1991 if(!found)ISSMERROR(" could not find accumulation in inputs!"); 2024 1992 found=inputs->Recover("melting",&melting_list[0],1,dofs,numgrids,(void**)nodes); 2025 if(!found) throw ErrorException(__FUNCT__," could not find melting in inputs!");1993 if(!found)ISSMERROR(" could not find melting in inputs!"); 2026 1994 2027 1995 /* Get node coordinates and dof list: */ … … 2067 2035 /*}}}*/ 2068 2036 /*FUNCTION CreatePVectorDiagnosticBaseVert {{{1*/ 2069 #undef __FUNCT__2070 #define __FUNCT__ "Tria::CreatePVectorDiagnosticBaseVert"2071 2037 void Tria::CreatePVectorDiagnosticBaseVert(Vec pg,void* vinputs,int analysis_type,int sub_analysis_type){ 2072 2038 … … 2120 2086 2121 2087 /* recover input parameters: */ 2122 if(!inputs->Recover("velocity",&vx_list[0],1,dofs1,numgrids,(void**)nodes)) throw ErrorException(__FUNCT__," cannot compute vertical velocity without horizontal velocity");2088 if(!inputs->Recover("velocity",&vx_list[0],1,dofs1,numgrids,(void**)nodes))ISSMERROR(" cannot compute vertical velocity without horizontal velocity"); 2123 2089 inputs->Recover("velocity",&vy_list[0],1,dofs2,numgrids,(void**)nodes); 2124 2090 … … 2184 2150 /*}}}*/ 2185 2151 /*FUNCTION CreatePVectorDiagnosticHoriz {{{1*/ 2186 #undef __FUNCT__2187 #define __FUNCT__ "Tria::CreatePVectorDiagnosticHoriz"2188 2152 void Tria::CreatePVectorDiagnosticHoriz( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ 2189 2153 … … 2355 2319 /*}}}*/ 2356 2320 /*FUNCTION CreatePVectorPrognostic {{{1*/ 2357 #undef __FUNCT__2358 #define __FUNCT__ "Tria::CreatePVectorPrognostic"2359 2321 void Tria::CreatePVectorPrognostic(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){ 2360 2322 … … 2403 2365 /*recover extra inputs from users, at current convergence iteration: */ 2404 2366 found=inputs->Recover("accumulation",&accumulation_list[0],1,dofs,numgrids,(void**)nodes); 2405 if(!found) throw ErrorException(__FUNCT__," could not find accumulation in inputs!");2367 if(!found)ISSMERROR(" could not find accumulation in inputs!"); 2406 2368 found=inputs->Recover("melting",&melting_list[0],1,dofs,numgrids,(void**)nodes); 2407 if(!found) throw ErrorException(__FUNCT__," could not find melting in inputs!");2369 if(!found)ISSMERROR(" could not find melting in inputs!"); 2408 2370 found=inputs->Recover("thickness",&thickness_list[0],1,dofs,numgrids,(void**)nodes); 2409 if(!found) throw ErrorException(__FUNCT__," could not find thickness in inputs!");2371 if(!found)ISSMERROR(" could not find thickness in inputs!"); 2410 2372 found=inputs->Recover("dt",&dt); 2411 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");2373 if(!found)ISSMERROR(" could not find dt in inputs!"); 2412 2374 2413 2375 /* Get node coordinates and dof list: */ … … 2454 2416 /*}}}*/ 2455 2417 /*FUNCTION CreatePVectorSlopeCompute {{{1*/ 2456 #undef __FUNCT__2457 #define __FUNCT__ "Tria::CreatePVectorSlopeCompute"2458 2418 2459 2419 void Tria::CreatePVectorSlopeCompute( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ … … 2549 2509 /*}}}*/ 2550 2510 /*FUNCTION CreatePVectorThermalShelf {{{1*/ 2551 #undef __FUNCT__2552 #define __FUNCT__ "Tria::CreatePVectorThermalShelf"2553 2511 void Tria::CreatePVectorThermalShelf( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ 2554 2512 … … 2614 2572 /*recover extra inputs from users, dt and velocity: */ 2615 2573 found=inputs->Recover("dt",&dt); 2616 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");2574 if(!found)ISSMERROR(" could not find dt in inputs!"); 2617 2575 found=inputs->Recover("pressure",&pressure_list[0],1,dofs1,numgrids,(void**)nodes); 2618 if(!found) throw ErrorException(__FUNCT__," could not find pressure in inputs!");2576 if(!found)ISSMERROR(" could not find pressure in inputs!"); 2619 2577 2620 2578 /* Ice/ocean heat exchange flux on ice shelf base */ … … 2662 2620 /*}}}*/ 2663 2621 /*FUNCTION CreatePVectorThermalSheet {{{1*/ 2664 #undef __FUNCT__2665 #define __FUNCT__ "Tria::CreatePVectorThermalSheet"2666 2622 void Tria::CreatePVectorThermalSheet( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){ 2667 2623 … … 2724 2680 /*recover extra inputs from users, dt and velocity: */ 2725 2681 found=inputs->Recover("dt",&dt); 2726 if(!found) throw ErrorException(__FUNCT__," could not find dt in inputs!");2682 if(!found)ISSMERROR(" could not find dt in inputs!"); 2727 2683 2728 2684 found=inputs->Recover("velocity",&vxvyvz_list[0][0],3,dofs,numgrids,(void**)nodes); 2729 if(!found) throw ErrorException(__FUNCT__," could not find velocity in inputs!");2685 if(!found)ISSMERROR(" could not find velocity in inputs!"); 2730 2686 2731 2687 for(i=0;i<numgrids;i++){ … … 2738 2694 2739 2695 /*Initialize all fields: */ 2740 if (friction_type!=2) throw ErrorException(__FUNCT__," non-viscous friction not supported yet!");2696 if (friction_type!=2)ISSMERROR(" non-viscous friction not supported yet!"); 2741 2697 2742 2698 friction->element_type=(char*)xmalloc((strlen("3d")+1)*sizeof(char)); … … 2807 2763 /*}}}*/ 2808 2764 /*FUNCTION DeepEcho{{{1*/ 2809 #undef __FUNCT__2810 #define __FUNCT__ "Tria::DeepEcho"2811 2765 2812 2766 void Tria::DeepEcho(void){ … … 2844 2798 /*}}}*/ 2845 2799 /*FUNCTION Du {{{1*/ 2846 #undef __FUNCT__2847 #define __FUNCT__ "Tria::Du"2848 2800 void Tria::Du(Vec du_g,void* vinputs,int analysis_type,int sub_analysis_type){ 2849 2801 … … 2914 2866 2915 2867 /* Recover input data: */ 2916 if(!inputs->Recover("fit",&fit)) throw ErrorException(__FUNCT__," missing fit input parameter");2868 if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter"); 2917 2869 if(!inputs->Recover("velocity_obs",&obs_vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 2918 throw ErrorException(__FUNCT__,"missing velocity_obs input parameter");2870 ISSMERROR("missing velocity_obs input parameter"); 2919 2871 } 2920 2872 if(fit==3 && !inputs->Recover("surfacearea",&S)){ 2921 throw ErrorException(__FUNCT__,"missing surface area input parameter");2873 ISSMERROR("missing surface area input parameter"); 2922 2874 } 2923 2875 if(!inputs->Recover("velocity",&vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 2924 throw ErrorException(__FUNCT__,"missing velocity input parameter");2876 ISSMERROR("missing velocity input parameter"); 2925 2877 } 2926 2878 if(!inputs->Recover("weights",&weights_list[0],1,dofs1,numgrids,(void**)nodes)){ 2927 throw ErrorException(__FUNCT__,"missing weights input parameter");2879 ISSMERROR("missing weights input parameter"); 2928 2880 } 2929 2881 … … 3044 2996 else{ 3045 2997 /*Not supported yet! : */ 3046 throw ErrorException(__FUNCT__,exprintf("%s%g","unsupported type of fit: ",fit));2998 ISSMERROR(exprintf("%s%g","unsupported type of fit: ",fit)); 3047 2999 } 3048 3000 … … 3111 3063 /*}}}*/ 3112 3064 /*FUNCTION Echo {{{1*/ 3113 #undef __FUNCT__3114 #define __FUNCT__ "Tria::Echo"3115 3065 3116 3066 void Tria::Echo(void){ … … 3155 3105 /*}}}*/ 3156 3106 /*FUNCTION GetArea {{{1*/ 3157 #undef __FUNCT__3158 #define __FUNCT__ "Tria::GetArea"3159 3107 double Tria::GetArea(void){ 3160 3108 … … 3174 3122 /*}}}*/ 3175 3123 /*FUNCTION GetAreaCoordinate {{{1*/ 3176 #undef __FUNCT__3177 #define __FUNCT__ "Tria::GetAreaCoordinate"3178 3124 double Tria::GetAreaCoordinate(double x, double y, int which_one){ 3179 3125 … … 3204 3150 return 1-((x-x3)*(y2-y3)-(x2-x3)*(y-y3))/area -((x1-x3)*(y-y3)-(x-x3)*(y1-y3))/area; 3205 3151 } 3206 else throw ErrorException(__FUNCT__,exprintf("%s%i%s\n"," error message: area coordinate ",which_one," done not exist!"));3152 else ISSMERROR(exprintf("%s%i%s\n"," error message: area coordinate ",which_one," done not exist!")); 3207 3153 } 3208 3154 /*}}}*/ 3209 3155 /*FUNCTION GetB {{{1*/ 3210 #undef __FUNCT__3211 #define __FUNCT__ "Tria::GetB"3212 3156 3213 3157 void Tria::GetB(double* B, double* xyz_list, double* gauss_l1l2l3){ … … 3252 3196 /*}}}*/ 3253 3197 /*FUNCTION GetB_prog {{{1*/ 3254 #undef __FUNCT__3255 #define __FUNCT__ "Tria::GetB_prog"3256 3198 3257 3199 void Tria::GetB_prog(double* B_prog, double* xyz_list, double* gauss_l1l2l3){ … … 3299 3241 /*}}}*/ 3300 3242 /*FUNCTION GetBPrime {{{1*/ 3301 #undef __FUNCT__3302 #define __FUNCT__ "Tria::GetBPrime"3303 3243 3304 3244 void Tria::GetBPrime(double* Bprime, double* xyz_list, double* gauss_l1l2l3){ … … 3338 3278 /*}}}*/ 3339 3279 /*FUNCTION GetBPrime_prog {{{1*/ 3340 #undef __FUNCT__3341 #define __FUNCT__ "Tria::GetBPrime_prog"3342 3280 3343 3281 void Tria::GetBPrime_prog(double* Bprime_prog, double* xyz_list, double* gauss_l1l2l3){ … … 3404 3342 /*}}}*/ 3405 3343 /*FUNCTION GetJacobian {{{1*/ 3406 #undef __FUNCT__3407 #define __FUNCT__ "Tria::GetJacobian"3408 3344 void Tria::GetJacobian(double* J, double* xyz_list,double* gauss_l1l2l3){ 3409 3345 … … 3430 3366 /*}}}*/ 3431 3367 /*FUNCTION GetJacobianDeterminant2d {{{1*/ 3432 #undef __FUNCT__3433 #define __FUNCT__ "Tria::GetJacobianDeterminant2d"3434 3368 void Tria::GetJacobianDeterminant2d(double* Jdet, double* xyz_list,double* gauss_l1l2l3){ 3435 3369 … … 3451 3385 3452 3386 if(Jdet<0){ 3453 printf("%s%s\n",__FUNCT__," error message:negative jacobian determinant!");3387 ISSMERROR("negative jacobian determinant!"); 3454 3388 } 3455 3389 … … 3457 3391 /*}}}*/ 3458 3392 /*FUNCTION GetJacobianDeterminant3d {{{1*/ 3459 #undef __FUNCT__3460 #define __FUNCT__ "Tria::GetJacobianDeterminant3d"3461 3393 void Tria::GetJacobianDeterminant3d(double* Jdet, double* xyz_list,double* gauss_l1l2l3){ 3462 3394 … … 3479 3411 *Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5); 3480 3412 3481 3482 3413 if(Jdet<0){ 3483 printf("%s%s\n",__FUNCT__," error message:negative jacobian determinant!");3414 ISSMERROR("negative jacobian determinant!"); 3484 3415 } 3485 3416 … … 3487 3418 /*}}}*/ 3488 3419 /*FUNCTION GetJacobianInvert {{{1*/ 3489 #undef __FUNCT__3490 #define __FUNCT__ "Tria::GetJacobianInvert"3491 3420 void Tria::GetJacobianInvert(double* Jinv, double* xyz_list,double* gauss_l1l2l3){ 3492 3421 … … 3504 3433 /*}}}*/ 3505 3434 /*FUNCTION GetL {{{1*/ 3506 #undef __FUNCT__3507 #define __FUNCT__ "Tria::GetL"3508 3435 3509 3436 void Tria::GetL(double* L, double* xyz_list, double* gauss_l1l2l3,int numdof){ … … 3565 3492 /*}}}*/ 3566 3493 /*FUNCTION GetNodalFunctions {{{1*/ 3567 #undef __FUNCT__3568 #define __FUNCT__ "Tria::GetNodalFunctions"3569 3494 void Tria::GetNodalFunctions(double* l1l2l3, double* gauss_l1l2l3){ 3570 3495 … … 3583 3508 /*}}}*/ 3584 3509 /*FUNCTION GetNodalFunctionsDerivatives {{{1*/ 3585 #undef __FUNCT__3586 #define __FUNCT__ "Tria::GetNodalFunctionsDerivatives"3587 3510 void Tria::GetNodalFunctionsDerivatives(double* dh1dh3,double* xyz_list, double* gauss_l1l2l3){ 3588 3511 … … 3618 3541 /*}}}*/ 3619 3542 /*FUNCTION GetNodalFunctionsDerivativesReference {{{1*/ 3620 #undef __FUNCT__3621 #define __FUNCT__ "Tria::GetNodalFunctionsDerivativesReference"3622 3543 void Tria::GetNodalFunctionsDerivativesReference(double* dl1dl3,double* gauss_l1l2l3){ 3623 3544 … … 3658 3579 /*}}}*/ 3659 3580 /*FUNCTION GetParameterDerivativeValue {{{1*/ 3660 #undef __FUNCT__3661 #define __FUNCT__ "Tria::GetParameterDerivativeValue"3662 3581 void Tria::GetParameterDerivativeValue(double* p, double* plist,double* xyz_list, double* gauss_l1l2l3){ 3663 3582 … … 3683 3602 /*}}}*/ 3684 3603 /*FUNCTION GetParameterValue {{{1*/ 3685 #undef __FUNCT__3686 #define __FUNCT__ "Tria::GetParameterValue"3687 3604 void Tria::GetParameterValue(double* pp, double* plist, double* gauss_l1l2l3){ 3688 3605 … … 3710 3627 /*}}}*/ 3711 3628 /*FUNCTION GetStrainRate {{{1*/ 3712 #undef __FUNCT__3713 #define __FUNCT__ "Tria::GetStrainRate"3714 3629 void Tria::GetStrainRate(double* epsilon, double* velocity, double* xyz_list, double* gauss_l1l2l3){ 3715 3630 … … 3738 3653 /*}}}*/ 3739 3654 /*FUNCTION Gradj {{{1*/ 3740 #undef __FUNCT__3741 #define __FUNCT__ "Tria::Gradj"3742 3655 void Tria::Gradj(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type,char* control_type){ 3743 3656 … … 3751 3664 GradjB( grad_g,inputs,analysis_type,sub_analysis_type); 3752 3665 } 3753 else throw ErrorException(__FUNCT__,exprintf("%s%s","control type not supported yet: ",control_type));3666 else ISSMERROR(exprintf("%s%s","control type not supported yet: ",control_type)); 3754 3667 } 3755 3668 /*}}}*/ 3756 3669 /*FUNCTION GradjB{{{1*/ 3757 #undef __FUNCT__3758 #define __FUNCT__ "Tria::GradjB"3759 3670 void Tria::GradjB(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){ 3760 3671 … … 3832 3743 inputs->Recover("thickness",&h[0],1,dofs,numgrids,(void**)nodes); 3833 3744 if(!inputs->Recover("velocity",&vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 3834 throw ErrorException(__FUNCT__,"missing velocity input parameter");3745 ISSMERROR("missing velocity input parameter"); 3835 3746 } 3836 3747 if(!inputs->Recover("adjoint",&adjxadjy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 3837 throw ErrorException(__FUNCT__,"missing adjoint input parameter");3748 ISSMERROR("missing adjoint input parameter"); 3838 3749 } 3839 3750 if(!inputs->Recover("B",&B[0],1,dofs1,numgrids,(void**)nodes)){ 3840 throw ErrorException(__FUNCT__,"parameter B not found in input");3751 ISSMERROR("parameter B not found in input"); 3841 3752 } 3842 3753 … … 3931 3842 /*}}}*/ 3932 3843 /*FUNCTION GradjDrag {{{1*/ 3933 #undef __FUNCT__3934 #define __FUNCT__ "Tria::GradjDrag"3935 3844 void Tria::GradjDrag(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){ 3936 3845 … … 4011 3920 inputs->Recover("thickness",&h[0],1,dofs1,numgrids,(void**)nodes); 4012 3921 if(!inputs->Recover("velocity",&vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 4013 throw ErrorException(__FUNCT__,"missing velocity input parameter");3922 ISSMERROR("missing velocity input parameter"); 4014 3923 } 4015 3924 if(!inputs->Recover("adjoint",&adjxadjy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 4016 throw ErrorException(__FUNCT__,"missing adjoint input parameter");3925 ISSMERROR("missing adjoint input parameter"); 4017 3926 } 4018 3927 … … 4065 3974 friction->q=q; 4066 3975 4067 if(friction->p!=1) throw ErrorException(__FUNCT__,"non-linear friction not supported yet in control methods!");3976 if(friction->p!=1) ISSMERROR("non-linear friction not supported yet in control methods!"); 4068 3977 4069 3978 /*Compute alpha complement: */ … … 4151 4060 /*}}}*/ 4152 4061 /*FUNCTION GradjDragStokes {{{1*/ 4153 #undef __FUNCT__4154 #define __FUNCT__ "Tria::GradjDragStokes"4155 4062 void Tria::GradjDragStokes(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){ 4156 4063 … … 4233 4140 inputs->Recover("thickness",&h[0],1,dofs1,numgrids,(void**)nodes); 4234 4141 if(!inputs->Recover("velocity",&vxvyvz_list[0][0],3,dofs3,numgrids,(void**)nodes)){ 4235 throw ErrorException(__FUNCT__,"missing velocity input parameter");4142 ISSMERROR("missing velocity input parameter"); 4236 4143 } 4237 4144 if(!inputs->Recover("adjoint",&adjxyz_list[0][0],3,dofs3,numgrids,(void**)nodes)){ 4238 throw ErrorException(__FUNCT__,"missing adjoint input parameter");4145 ISSMERROR("missing adjoint input parameter"); 4239 4146 } 4240 4147 … … 4289 4196 friction->q=q; 4290 4197 4291 if(friction->p!=1) throw ErrorException(__FUNCT__,"non-linear friction not supported yet in control methods!");4198 if(friction->p!=1) ISSMERROR("non-linear friction not supported yet in control methods!"); 4292 4199 4293 4200 /*Compute alpha complement: */ … … 4387 4294 /*}}}*/ 4388 4295 /*FUNCTION MassFlux {{{1*/ 4389 #undef __FUNCT__4390 #define __FUNCT__ "Tria::MassFlux"4391 4296 double Tria::MassFlux( double* segment,double* ug){ 4392 4297 … … 4414 4319 4415 4320 /*First off, check that this segment belongs to this element: */ 4416 if ((int)*(segment+4)!=this->id) throw ErrorException(__FUNCT__,exprintf("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id));4321 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)); 4417 4322 4418 4323 /*Recover segment node locations: */ … … 4459 4364 /*}}}*/ 4460 4365 /*FUNCTION MaticeConfiguration {{{1*/ 4461 #undef __FUNCT__4462 #define __FUNCT__ "Tria::MaticeConfiguration"4463 4366 void Tria::MaticeConfiguration(Matice* tria_matice,int tria_matice_offset){ 4464 4367 matice=tria_matice; … … 4467 4370 /*}}}*/ 4468 4371 /*FUNCTION MatparConfiguration {{{1*/ 4469 #undef __FUNCT__4470 #define __FUNCT__ "Tria::MatparConfiguration"4471 4372 void Tria::MatparConfiguration(Matpar* tria_matpar,int tria_matpar_offset){ 4472 4373 … … 4477 4378 /*}}}*/ 4478 4379 /*FUNCTION Misfit {{{1*/ 4479 #undef __FUNCT__4480 #define __FUNCT__ "Tria::Misfit"4481 4380 double Tria::Misfit(void* vinputs,int analysis_type,int sub_analysis_type){ 4482 4381 … … 4538 4437 4539 4438 /* Recover input data: */ 4540 if(!inputs->Recover("fit",&fit)) throw ErrorException(__FUNCT__," missing fit input parameter");4439 if(!inputs->Recover("fit",&fit)) ISSMERROR(" missing fit input parameter"); 4541 4440 if(fit==3 && !inputs->Recover("surfacearea",&S)){ 4542 throw ErrorException(__FUNCT__,"missing surface area input parameter");4441 ISSMERROR("missing surface area input parameter"); 4543 4442 } 4544 4443 if(!inputs->Recover("velocity_obs",&obs_vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 4545 throw ErrorException(__FUNCT__,"missing velocity_obs input parameter");4444 ISSMERROR("missing velocity_obs input parameter"); 4546 4445 } 4547 4446 if(!inputs->Recover("velocity",&vxvy_list[0][0],2,dofs2,numgrids,(void**)nodes)){ 4548 throw ErrorException(__FUNCT__,"missing velocity input parameter");4447 ISSMERROR("missing velocity input parameter"); 4549 4448 } 4550 4449 if(!inputs->Recover("weights",&weights_list[0],1,dofs1,numgrids,(void**)nodes)){ 4551 throw ErrorException(__FUNCT__,"missing weights input parameter");4450 ISSMERROR("missing weights input parameter"); 4552 4451 } 4553 4452 … … 4638 4537 else{ 4639 4538 /*Not supported yet! : */ 4640 throw ErrorException(__FUNCT__,exprintf("%s%g","unsupported type of fit: ",fit));4539 ISSMERROR(exprintf("%s%g","unsupported type of fit: ",fit)); 4641 4540 } 4642 4541 … … 4683 4582 /*}}}*/ 4684 4583 /*FUNCTION NodeConfiguration {{{1*/ 4685 #undef __FUNCT__4686 #define __FUNCT__ "Tria::NodeConfiguration"4687 4584 void Tria::NodeConfiguration(int* tria_node_ids,Node* tria_nodes[3],int* tria_node_offsets){ 4688 4585 … … 4697 4594 /*}}}*/ 4698 4595 /*FUNCTION NumparConfiguration {{{1*/ 4699 #undef __FUNCT__4700 #define __FUNCT__ "Tria::NumparConfiguration"4701 4596 void Tria::NumparConfiguration(Numpar* tria_numpar,int tria_numpar_offset){ 4702 4597 … … 4707 4602 /*}}}*/ 4708 4603 /*FUNCTION SurfaceNormal{{{1*/ 4709 #undef __FUNCT__4710 #define __FUNCT__ "Tria::SurfaceNormal"4711 4604 4712 4605 void Tria::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){ … … 4736 4629 /*}}}*/ 4737 4630 /*FUNCTION SurfaceArea {{{1*/ 4738 #undef __FUNCT__4739 #define __FUNCT__ "Tria::SurfaceArea"4740 4631 double Tria::SurfaceArea(void* vinputs,int analysis_type,int sub_analysis_type){ 4741 4632 … … 4774 4665 /*}}}*/ 4775 4666 /*FUNCTION UpdateFromInputs {{{1*/ 4776 #undef __FUNCT__4777 #define __FUNCT__ "Tria::UpdateFromInputs"4778 4667 void Tria::UpdateFromInputs(void* vinputs){ 4779 4668 -
issm/trunk/src/c/parallel/ControlInitialization.cpp
r3086 r3332 2 2 * \brief: ... 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "ControlInitialization"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/ControlRestart.cpp
r2383 r3332 3 3 * \brief: core of the control solution 4 4 */ 5 6 #undef __FUNCT__7 #define __FUNCT__ "ControlRestart"8 5 9 6 #include "./parallel.h" -
issm/trunk/src/c/parallel/OutputResults.cpp
r693 r3332 13 13 #include "../io/io.h" 14 14 15 #undef __FUNCT__16 #define __FUNCT__ "OutputResults"17 15 void OutputResults(DataSet* results,char* filename){ 18 16 -
issm/trunk/src/c/parallel/ProcessResults.cpp
r3086 r3332 12 12 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 13 13 #endif 14 15 #undef __FUNCT__16 #define __FUNCT__ "ProcessResults"17 14 18 15 #include "../DataSet/DataSet.h" -
issm/trunk/src/c/parallel/WriteLockFile.cpp
r1 r3332 2 2 * \brief 3 3 */ 4 #undef __FUNCT__5 #define __FUNCT__ "WriteLockFile"6 7 4 #include "stdio.h" 8 5 #include "../shared/shared.h" 6 #include "../include/macros.h" 9 7 10 8 void WriteLockFile(char* filename){ … … 19 17 if(my_rank==0){ 20 18 fid=fopen(filename,"w"); 21 if(fid==NULL) throw ErrorException(__FUNCT__,exprintf("%s%s","error message: could not open lock file ",filename));19 if(fid==NULL) ISSMERROR(exprintf("%s%s","error message: could not open lock file ",filename)); 22 20 23 21 /*Close file: */ 24 if(fclose(fid)!=0) throw ErrorException(__FUNCT__,exprintf("%s%s","could not close lock file ",filename));22 if(fclose(fid)!=0) ISSMERROR(exprintf("%s%s","could not close lock file ",filename)); 25 23 } 26 24 -
issm/trunk/src/c/parallel/balancedthickness.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "balancedthickness"10 7 11 8 #ifdef HAVE_CONFIG_H … … 52 49 53 50 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 54 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");51 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 55 52 #endif 56 53 … … 121 118 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 122 119 #else 123 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");120 ISSMERROR(" Dakota not present, cannot do qmu!"); 124 121 #endif 125 122 } -
issm/trunk/src/c/parallel/balancedthickness_core.cpp
r2715 r3332 3 3 */ 4 4 5 #undef __FUNCT__6 #define __FUNCT__ "balancedthickness_core"7 8 5 #include "../toolkits/toolkits.h" 9 6 #include "../objects/objects.h" 10 7 #include "../shared/shared.h" 8 #include "../include/macros.h" 11 9 #include "../EnumDefinitions/EnumDefinitions.h" 12 10 #include "./parallel.h" -
issm/trunk/src/c/parallel/balancedvelocities.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "balancedvelocities"10 7 11 8 #ifdef HAVE_CONFIG_H … … 49 46 50 47 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 51 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");48 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 52 49 #endif 53 50 … … 118 115 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 119 116 #else 120 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");117 ISSMERROR(" Dakota not present, cannot do qmu!"); 121 118 #endif 122 119 } -
issm/trunk/src/c/parallel/balancedvelocities_core.cpp
r2722 r3332 2 2 * \brief: core of the balancedvelocities solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "balancedvelocities_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/control_core.cpp
r2892 r3332 2 2 * \brief: core of the control solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "control_core"7 4 8 5 #include "./parallel.h" -
issm/trunk/src/c/parallel/convergence.cpp
r2333 r3332 2 2 * \brief: figure out if convergence has been reached 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "convergence"7 4 8 5 #include "../objects/objects.h" … … 72 69 PetscSynchronizedPrintf(MPI_COMM_WORLD,"norm kuold %lf \n",nKUoldF); 73 70 PetscSynchronizedFlush(MPI_COMM_WORLD); 74 throw ErrorException(__FUNCT__,exprintf("mechanical equilibrium convergence criterion is NaN! "));71 ISSMERROR("mechanical equilibrium convergence criterion is NaN!"); 75 72 } 76 73 … … 96 93 VecNorm(duf,NORM_2,&ndu); VecNorm(old_uf,NORM_2,&nu); 97 94 98 if (isnan(ndu) || isnan(nu)) throw ErrorException(__FUNCT__,exprintf("convergence criterion is NaN! "));95 if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!"); 99 96 100 97 //clean up … … 121 118 VecDuplicate(old_uf,&duf);VecCopy(old_uf,duf); VecAYPX(duf,-1.0,uf); 122 119 VecNorm(duf,NORM_2,&ndu); VecNorm(duf,NORM_INFINITY,&nduinf); 123 if (isnan(ndu) || isnan(nu)) throw ErrorException(__FUNCT__,exprintf("convergence criterion is NaN! "));120 if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!"); 124 121 125 122 //clean up -
issm/trunk/src/c/parallel/diagnostic.cpp
r3203 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "diagnostic"10 7 11 8 #ifdef HAVE_CONFIG_H … … 54 51 55 52 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 56 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");53 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 57 54 #endif 58 55 … … 163 160 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 164 161 #else 165 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");162 ISSMERROR(" Dakota not present, cannot do qmu!"); 166 163 #endif 167 164 } -
issm/trunk/src/c/parallel/diagnostic_core.cpp
r3086 r3332 2 2 * \brief: core of the diagnostic solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "diagnostic_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/diagnostic_core_linear.cpp
r2333 r3332 2 2 * \brief: core of the diagnostic solution for non linear materials 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "diagnostic_core_inear"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
r3201 r3332 2 2 * \brief: core of the diagnostic solution for non linear materials 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "diagnostic_core_nonlinear"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/gradjcompute_core.cpp
r2333 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "gradjcompute_core"10 7 11 8 #ifdef HAVE_CONFIG_H -
issm/trunk/src/c/parallel/objectivefunctionC.cpp
r3169 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "diagnostic"10 7 11 8 #ifdef HAVE_CONFIG_H -
issm/trunk/src/c/parallel/prognostic.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "prognostic"10 7 11 8 #ifdef HAVE_CONFIG_H … … 53 50 54 51 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 55 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");52 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 56 53 #endif 57 54 … … 127 124 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 128 125 #else 129 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");126 ISSMERROR(" Dakota not present, cannot do qmu!"); 130 127 #endif 131 128 } -
issm/trunk/src/c/parallel/prognostic_core.cpp
r2333 r3332 2 2 * \brief: core of the prognostic solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "prognostic_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/slopecompute.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "slopecompute"10 7 11 8 #ifdef HAVE_CONFIG_H … … 44 41 45 42 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 46 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");43 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 47 44 #endif 48 45 -
issm/trunk/src/c/parallel/slopecompute_core.cpp
r3086 r3332 2 2 * \brief: core of the slopecompute solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "slopecompute_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/steadystate.cpp
r3251 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "steadystate"10 7 11 8 #ifdef HAVE_CONFIG_H … … 56 53 57 54 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 58 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");55 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 59 56 #endif 60 57 … … 183 180 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 184 181 #else 185 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");182 ISSMERROR(" Dakota not present, cannot do qmu!"); 186 183 #endif 187 184 } -
issm/trunk/src/c/parallel/steadystate_core.cpp
r3086 r3332 2 2 * \brief: core of the steadystate solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "steadystate_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/thermal.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "thermal"10 7 11 8 #ifdef HAVE_CONFIG_H … … 53 50 54 51 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 55 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");52 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 56 53 #endif 57 54 … … 129 126 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 130 127 #else 131 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");128 ISSMERROR(" Dakota not present, cannot do qmu!"); 132 129 #endif 133 130 } -
issm/trunk/src/c/parallel/thermal_core.cpp
r2333 r3332 2 2 * \brief: core of the thermal solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "thermal_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp
r2333 r3332 2 2 * \brief: core of the thermal solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "thermal_core_nonlinear"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/transient.cpp
r3097 r3332 5 5 #include "../issm.h" 6 6 #include "./parallel.h" 7 8 #undef __FUNCT__9 #define __FUNCT__ "transient"10 7 11 8 #ifdef HAVE_CONFIG_H … … 54 51 55 52 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 56 throw ErrorException(__FUNCT__," parallel executable was compiled without support of parallel libraries!");53 ISSMERROR(" parallel executable was compiled without support of parallel libraries!"); 57 54 #endif 58 55 … … 156 153 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 157 154 #else 158 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");155 ISSMERROR(" Dakota not present, cannot do qmu!"); 159 156 #endif 160 157 } -
issm/trunk/src/c/parallel/transient_core.cpp
r1881 r3332 2 2 * \brief: core of the transient solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "transient_core"7 4 8 5 #include "../toolkits/toolkits.h" … … 29 26 transient_core_3d(results,model,inputs); 30 27 } 31 else throw ErrorException(__FUNCT__,exprintf("%s%i%s"," dimension ",dim," not supported yet!"));28 else ISSMERROR(exprintf("%s%i%s"," dimension ",dim," not supported yet!")); 32 29 33 30 } -
issm/trunk/src/c/parallel/transient_core_2d.cpp
r3086 r3332 2 2 * \brief: core of the transient_2d solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "transient_2d_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/parallel/transient_core_3d.cpp
r3086 r3332 2 2 * \brief: core of the transient_3d solution 3 3 */ 4 5 #undef __FUNCT__6 #define __FUNCT__ "transient_3d_core"7 4 8 5 #include "../toolkits/toolkits.h" -
issm/trunk/src/c/shared/Alloc/alloc.cpp
r3280 r3332 27 27 #include "./alloc.h" 28 28 #include "../Exceptions/exceptions.h" 29 #include "../../include/macros.h" 29 30 30 #undef __FUNCT__31 #define __FUNCT__ "xmalloc"32 31 void* xmalloc(int size){ 33 32 34 33 void* memptr=NULL; 35 34 36 if(!size) throw ErrorException(__FUNCT__," attempting to 0 size allocation!");35 if(!size)ISSMERROR(" attempting to 0 size allocation!"); 37 36 38 37 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) … … 43 42 memptr=malloc(size); 44 43 #endif 45 if(!memptr) throw ErrorException(__FUNCT__,"memory allocation failed!");44 if(!memptr) ISSMERROR("memory allocation failed!"); 46 45 47 46 return memptr; 48 47 } 49 48 50 #undef __FUNCT__51 #define __FUNCT__ "xcalloc"52 49 void* xcalloc(int n,int size){ 53 50 54 51 void* memptr=NULL; 55 52 56 if(!size) throw ErrorException(__FUNCT__,"attempting to 0 size allocation!");53 if(!size)ISSMERROR("attempting to 0 size allocation!"); 57 54 58 55 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) … … 63 60 memptr=calloc(n,size); 64 61 #endif 65 if(!memptr) throw ErrorException(__FUNCT__,"memory allocation failed!");62 if(!memptr) ISSMERROR("memory allocation failed!"); 66 63 67 64 return memptr; … … 82 79 } 83 80 84 85 #undef __FUNCT__86 #define __FUNCT__ "xrealloc"87 81 void* xrealloc ( void* pv, int size){ 88 82 89 83 register void* value=NULL; 90 84 91 if(!size) throw ErrorException(__FUNCT__,"attempting to realloc to zero");85 if(!size)ISSMERROR("attempting to realloc to zero"); 92 86 93 87 #ifndef MATLAB … … 98 92 99 93 if (value == NULL) { 100 throw ErrorException(__FUNCT__,"virtual memory exhausted");94 ISSMERROR("virtual memory exhausted"); 101 95 } 102 96 return value; -
issm/trunk/src/c/shared/Dofs/DistributeNumDofs.cpp
r3086 r3332 6 6 #include "../../EnumDefinitions/EnumDefinitions.h" 7 7 #include "../shared.h" 8 9 #undef __FUNCT__10 #define __FUNCT__ "DistributeNumDofs"11 8 12 9 int DistributeNumDofs(int *pnumdofs,int analysis_type,int sub_analysis_type){ … … 62 59 numdofs=1; 63 60 } 64 else throw ErrorException(__FUNCT__,exprintf("%s%i%s"," analysis type: ",analysis_type," not implemented yet!"));61 else ISSMERROR(exprintf("%s%i%s"," analysis type: ",analysis_type," not implemented yet!")); 65 62 66 63 /*Assign output pointers:*/ -
issm/trunk/src/c/shared/Dofs/dofsetgen.cpp
r459 r3332 12 12 #include "../../include/macros.h" 13 13 #include "stdio.h" 14 15 #undef __FUNCT__16 #define __FUNCT__ "dofsetgen"17 14 18 15 double* dofsetgen(int numdofs,int* doflist,int dofspernode,int totaldofs){ -
issm/trunk/src/c/shared/Elements/Paterson.cpp
r1678 r3332 5 5 */ 6 6 7 #undef __FUNCT__8 #define __FUNCT__ "Paterson"9 7 #include <math.h> 10 11 8 12 9 double Paterson(double temperature){ -
issm/trunk/src/c/shared/Elements/ResolvePointers.cpp
r3159 r3332 12 12 #include "../../DataSet/DataSet.h" 13 13 #include "../../include/typedefs.h" 14 #include "../../include/macros.h" 14 15 #include "../Exceptions/exceptions.h" 15 16 17 #undef __FUNCT__18 #define __FUNCT__ "ResolvePointers"19 16 20 17 void ResolvePointers(Object** objects,int* object_ids,int* object_offsets,int num_objects,DataSet* dataset){ … … 53 50 objects[i]=(Object*)dataset->GetObjectById(object_offsets+i,object_ids[i]); //remember the offset for later on. 54 51 /*check the id is correct!: */ 55 if (objects[i]->GetId()!=object_ids[i]) throw ErrorException(__FUNCT__,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(exprintf("%s%i%s%i%s"," wrong id: ",objects[i]->GetId()," vs ",object_ids[i]," in resolved pointer!")); 56 53 } 57 54 } -
issm/trunk/src/c/shared/Exceptions/Exceptions.cpp
r3329 r3332 6 6 #include "../../include/macros.h" 7 7 8 ErrorException::ErrorException(const string &what_function,const string &what_arg){ 9 10 what_str=what_arg; 11 file_name=""; 12 function_name=what_function; 13 file_line=0; 14 } 15 16 ErrorException::ErrorException(string what_arg){ 8 ErrorException::ErrorException(const string &what_arg){ 17 9 18 10 what_str=what_arg; … … 39 31 void ErrorException::Report(){ 40 32 41 if (function_name==""){ 42 _printf_("%s%s"," error message: ",what()); 43 } 44 else if (file_line==0){ 45 _printf_("%s%s%s",function_name.c_str()," error message: ",what()); 33 if (function_name=="" || file_line==0){ //WINDOWS 34 _printf_("%s%s","Error message: ",what()); 46 35 } 47 36 else{ -
issm/trunk/src/c/shared/Exceptions/exceptions.h
r3329 r3332 24 24 public: 25 25 26 ErrorException(const string &what_function,const string &what_arg);//default27 26 ErrorException(const string &what_arg); //for windows 28 27 ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX -
issm/trunk/src/c/shared/Exceptions/exprintf.cpp
r1 r3332 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 * throw ErrorException(__FUNCT__,exprintf("%s%i\n","test failed for id:",id));5 * ISSMERROR(exprintf("%s%i\n","test failed for id:",id)); 6 6 */ 7 7 -
issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp
r1904 r3332 6 6 */ 7 7 8 9 8 #include "stdio.h" 10 9 #include "../Alloc/alloc.h" 10 #include "../../include/macros.h" 11 #include "../Exceptions/exceptions.h" 11 12 12 #undef __FUNCT__13 #define __FUNCT__ "DomainOutlineRead"14 13 int DomainOutlineRead(int* pnprof,int** pprofngrids,double*** ppprofx,double*** ppprofy,char* domainname){ 15 14 … … 38 37 /*open domain outline file for reading: */ 39 38 if ((fid=fopen(domainname,"r"))==NULL){ 40 printf("%s%s%s\n",__FUNCT__," error message: could not find domain file ",domainname);39 ISSMERROR(exprintf("%s%s","could not find domain file ",domainname)); 41 40 noerr=0; goto cleanupandreturn; 42 41 } -
issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp
r1 r3332 6 6 7 7 #include "../Exceptions/exceptions.h" 8 #include "../../include/macros.h" 8 9 #include "mex.h" 9 10 … … 16 17 /* special case: */ 17 18 function(); 18 throw ErrorException(__FUNCT__,"usage: see above");19 ISSMERROR("usage: see above"); 19 20 } 20 else if ( 21 else if (nlhs!=NLHS || nrhs!=NRHS ) { 21 22 function(); 22 throw ErrorException(__FUNCT__,"usage error.");23 ISSMERROR("usage error."); 23 24 } 24 25 return 1; -
issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp
r1439 r3332 29 29 30 30 */ 31 #undef __FUNCT__32 #define __FUNCT__ "TripleMultiply"33 34 31 #include "./matrix.h" 35 32 #include "../Exceptions/exceptions.h" 36 33 #include "../Alloc/alloc.h" 37 #include "../../include/macros.h"38 34 #include "../Matlab/matlabshared.h" 39 35 #include <stdio.h> … … 41 37 #include <math.h> 42 38 #include <float.h> /* DBL_EPSILON */ 39 #include "../../include/macros.h" 43 40 44 41 int TripleMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int nrowc, int ncolc, int itrnc, double* d, int iaddd){ … … 60 57 if (!itrnb) { 61 58 if (nrowb != idimb) { 62 throw ErrorException(__FUNCT__,"Matrix A and B inner vectors not equal size.");59 ISSMERROR("Matrix A and B inner vectors not equal size."); 63 60 } 64 61 idimc=ncolb; … … 66 63 else { 67 64 if (ncolb != idimb) { 68 throw ErrorException(__FUNCT__,"Matrix A and B inner vectors not equal size.");65 ISSMERROR("Matrix A and B inner vectors not equal size."); 69 66 } 70 67 idimc=nrowb; … … 73 70 if (!itrnc) { 74 71 if (nrowc != idimc) { 75 throw ErrorException(__FUNCT__,"Matrix B and C inner vectors not equal size.");72 ISSMERROR("Matrix B and C inner vectors not equal size."); 76 73 } 77 74 idimd=ncolc; … … 79 76 else { 80 77 if (ncolc != idimc) { 81 throw ErrorException(__FUNCT__,"Matrix B and C inner vectors not equal size.");78 ISSMERROR("Matrix B and C inner vectors not equal size."); 82 79 } 83 80 idimd=nrowc; … … 196 193 197 194 if (ntrma != ntrmb) { 198 _printf_("%s -- Matrix A and B inner vectors not equal size.\n", 199 __FUNCT__); 195 ISSMERROR("Matrix A and B inner vectors not equal size"); 200 196 noerr=0; 201 197 return noerr; … … 274 270 275 271 if (!b && nvec) { 276 _printf_("%s -- No right-hand side for nvec=%d.\n", 277 __FUNCT__,nvec); 272 ISSMERROR(exprintf("No right-hand side for nvec=%d.",nvec)); 278 273 noerr=0; 279 274 return noerr; … … 309 304 xfree((void **)&pivrc); 310 305 xfree((void **)&pindx); 311 _printf_("%s -- Pivot %f less than machine epsilon.\n", 312 __FUNCT__,pivot); 306 ISSMERROR(exprintf("Pivot %f less than machine epsilon",pivot)); 313 307 noerr=0; 314 308 return noerr; -
issm/trunk/src/c/shared/Matrix/matrix.h
r1 r3332 6 6 #define _MATRIXUTILS_H_ 7 7 8 9 8 int TripleMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int nrowc, int ncolc, int itrnc, double* d, int iaddd); 10 9 int MatrixMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int iaddc ); 11 10 int MatrixInverse( double* a, int ndim, int nrow, double* b, int nvec, double* pdet ); 12 13 11 14 12 15 13 #endif //ifndef _MATRIXUTILS_H_ 16 -
issm/trunk/src/c/shared/Numerics/GaussPoints.cpp
r3159 r3332 40 40 41 41 =========1=========2=========3=========4=========5=========6=========7========*/ 42 #undef __FUNCT__43 #define __FUNCT__ "GaussLegendre"44 42 void GaussLegendre( double** pxgaus, double** pxwgt, int ngaus ) { 45 43 … … 163 161 164 162 =========1=========2=========3=========4=========5=========6=========7========*/ 165 166 #undef __FUNCT__167 #define __FUNCT__ "GaussLobatto"168 163 169 164 void GaussLobatto( double** pxgaus, double** pxwgt, int ngaus ) { … … 311 306 312 307 =========1=========2=========3=========4=========5=========6=========7========*/ 313 #undef __FUNCT__314 #define __FUNCT__ "GaussRecur"315 316 308 void GaussRecur( double* zero, double* weight, int n, double* alpha, double* beta ) { 317 309 int i,j,k,l,m,ii,mml,iter; … … 401 393 if (iter >= MAX_GAUS_ITER) { 402 394 xfree((void **)&work); 403 throw ErrorException(__FUNCT__,exprintf("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER));395 ISSMERROR(exprintf("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER)); 404 396 } 405 397 } … … 456 448 457 449 =========1=========2=========3=========4=========5=========6=========7========*/ 458 #undef __FUNCT__459 #define __FUNCT__ "GaussQuad"460 461 450 void GaussQuad( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, int nigaus, int njgaus ) { 462 451 … … 496 485 497 486 =========1=========2=========3=========4=========5=========6=========7========*/ 498 #undef __FUNCT__499 #define __FUNCT__ "GaussTria"500 487 void GaussTria( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, int iord ) { 501 488 … … 1656 1643 1657 1644 =========1=========2=========3=========4=========5=========6=========7========*/ 1658 #undef __FUNCT__1659 #define __FUNCT__ "GaussHexa"1660 1645 void GaussHexa( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, double** pzgaus, double** pzwgt, int nigaus, int njgaus, int nkgaus ) { 1661 1646 … … 1697 1682 1698 1683 =========1=========2=========3=========4=========5=========6=========7========*/ 1699 #undef __FUNCT__1700 #define __FUNCT__ "GaussPenta"1701 1702 1684 void GaussPenta( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, double** pzgaus, double** pzwgt, int iord, int nkgaus ) { 1703 1685 … … 1743 1725 1744 1726 =========1=========2=========3=========4=========5=========6=========7========*/ 1745 #undef __FUNCT__1746 #define __FUNCT__ "GaussTetra"1747 1748 1727 void GaussTetra( int* pngaus, double** pl1, double** pl2, double** pl3, double** pl4, double** pwgt, int iord ) { 1749 1728 int i,j,k,ipt,nigaus; -
issm/trunk/src/c/shared/Numerics/OptFunc.cpp
r1844 r3332 11 11 #include "../../objects/objects.h" 12 12 #include "../../shared/shared.h" 13 14 #undef __FUNCT__ 15 #define __FUNCT__ "OptFunc" 16 13 #include "../../include/macros.h" 17 14 18 15 #ifdef _SERIAL_ … … 46 43 #else 47 44 double OptFunc(double scalar, OptArgs* optargs){ 48 throw ErrorException(__FUNCT__," not implemented yet");45 ISSMERROR(" not implemented yet"); 49 46 } 50 47 #endif -
issm/trunk/src/c/shared/Sorting/binary_search.cpp
r1904 r3332 8 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 9 9 #endif 10 11 #undef __FUNCT__12 #define __FUNCT__ "binary_search"13 10 14 11 #include "stdio.h" -
issm/trunk/src/c/shared/String/isdistributed.cpp
r765 r3332 17 17 #include "../Alloc/alloc.h" 18 18 19 #undef __FUNCT__20 #define __FUNCT__ "isdistributed"21 19 int isdistributed(char** proot,char* name){ 22 20 -
issm/trunk/src/c/shared/Threads/LaunchThread.cpp
r2418 r3332 22 22 #include "../Alloc/alloc.h" 23 23 #include "../Exceptions/exceptions.h" 24 25 #undef __FUNCT__ 26 #define __FUNCT__ "LaunchThread" 24 #include "../../include/macros.h" 27 25 28 26 void LaunchThread(void* function(void*), void* gate,int num_threads){ … … 48 46 49 47 if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){ 50 throw ErrorException(__FUNCT__," pthread_create error");48 ISSMERROR(" pthread_create error"); 51 49 } 52 50 } 53 51 for(i=0;i<num_threads;i++){ 54 52 if(pthread_join(threads[i],(void**)&status)){ 55 throw ErrorException(__FUNCT__," pthread_join error");53 ISSMERROR(" pthread_join error"); 56 54 } 57 55 } -
issm/trunk/src/c/shared/Threads/PartitionRange.cpp
r2551 r3332 10 10 11 11 #include <math.h> 12 13 #undef __FUNCT__14 #define __FUNCT__ "PartitionRange"15 12 16 13 void PartitionRange(int* pi0,int* pi1, int num_el,int num_threads,int my_thread){ -
issm/trunk/src/c/shared/TriMesh/AssociateSegmentToElement.cpp
r1 r3332 4 4 5 5 #include "./trimesh.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "AssociateSegmentToElement"9 6 10 7 int AssociateSegmentToElement(double** psegments,int nseg, double* index,int nel){ -
issm/trunk/src/c/shared/TriMesh/GridInsideHole.cpp
r1439 r3332 4 4 */ 5 5 6 #undef __FUNCT__7 #define __FUNCT__ "GridInsideHole"8 9 6 #include <math.h> 10 11 7 12 8 #include "./trimesh.h" -
issm/trunk/src/c/shared/TriMesh/OrderSegments.cpp
r1 r3332 4 4 */ 5 5 #include "./trimesh.h" 6 7 #undef __FUNCT__8 #define __FUNCT__ "OrderSegments"9 6 10 7 int OrderSegments(double** psegments,int nseg, double* index,int nel){ -
issm/trunk/src/c/shared/TriMesh/SplitMeshForRifts.cpp
r1 r3332 3 3 */ 4 4 #include "./trimesh.h" 5 6 #undef __FUNCT__7 #define __FUNCT__ "SplitMeshForRifts"8 5 9 6 #include "../Alloc/alloc.h" -
issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp
r3253 r3332 436 436 ******************************************************************************************************************************/ 437 437 438 #undef __FUNCT__439 #define __FUNCT__ "FindElement"440 441 438 int FindElement(double A,double B,double* index,int nel){ 442 439 … … 461 458 ******************************************************************************************************************************/ 462 459 463 #undef __FUNCT__464 #define __FUNCT__ "SplitRiftSegments"465 466 460 int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts){ 467 461 … … 555 549 ******************************************************************************************************************************/ 556 550 557 #undef __FUNCT__558 #define __FUNCT__ "PairRiftElements"559 560 561 551 int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y){ 562 552 … … 614 604 ******************************************************************************************************************************/ 615 605 616 #undef __FUNCT__617 #define __FUNCT__ "RemoveRifts"618 619 606 double dabs(double x){ 620 607 if (x<0)x=-x; … … 810 797 ******************************************************************************************************************************/ 811 798 812 #undef __FUNCT__813 #define __FUNCT__ "IsRiftPresent"814 815 799 int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs){ 816 800 … … 845 829 ******************************************************************************************************************************/ 846 830 847 #undef __FUNCT__848 #define __FUNCT__ "OrderRifts"849 850 831 int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y){ 851 832 … … 1018 999 ******************************************************************************************************************************/ 1019 1000 1020 #undef __FUNCT__1021 #define __FUNCT__ "PenaltyPairs"1022 1023 1001 int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double** riftssegments, 1024 1002 int* riftsnumsegs,double** riftspairs,double* riftstips,double* x,double* y){ … … 1167 1145 ******************************************************************************************************************************/ 1168 1146 1169 #undef __FUNCT__1170 #define __FUNCT__ "RemoveCorners"1171 1172 1173 1147 int RemoveCornersFromRifts(double** pindex,int* pnel,double** px,double** py,int* pnods, double* segments,double* segmentmarkers,int num_seg){ 1174 1148 -
issm/trunk/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp
r1 r3332 13 13 #include "stdio.h" 14 14 #include "../../../shared/shared.h" 15 16 #undef __FUNCT__17 #define __FUNCT__ "GetOwnershipBoundariesFromRange"18 15 19 16 void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range){ -
issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp
r2042 r3332 2 2 * \brief invert petsc matrix using LU factorization, and multiple right hand sides. 3 3 */ 4 5 6 #undef __FUNCT__7 #define __FUNCT__ "MatInvert"8 4 9 5 /*Petsc includes: */ … … 13 9 14 10 #include "../../../shared/shared.h" 11 #include "../../../include/macros.h" 15 12 16 13 void MatInvert(Mat* pinv, Mat matrix){ … … 32 29 /*Some checks: */ 33 30 MatGetSize(matrix,&M,&N); 34 if(M!=N) throw ErrorException(__FUNCT__,"trying to invert a non square matrix!");31 if(M!=N) ISSMERROR("trying to invert a non square matrix!"); 35 32 36 33 /*Create identitiy matrix: */ -
issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp
r2042 r3332 15 15 16 16 #include "../../../shared/shared.h" 17 18 19 #undef __FUNCT__20 #define __FUNCT__ "MatPartition"21 17 22 18 int MatPartition(Mat* poutmatrix,Mat matrixA,double* row_partition_vector,int row_partition_vector_size , -
issm/trunk/src/c/toolkits/petsc/patches/MatToSerial.cpp
r1 r3332 6 6 #include "../../../shared/shared.h" 7 7 8 #undef __FUNCT__9 #define __FUNCT__ "MatToSerial"10 8 void MatToSerial(double** poutmatrix,Mat matrix){ 11 9 -
issm/trunk/src/c/toolkits/petsc/patches/NewMat.cpp
r2273 r3332 17 17 18 18 #include "../../../shared/shared.h" 19 19 #include "../../../include/macros.h" 20 20 21 21 Mat NewMat(int M,int N,double* psparsity,int* pconnectivity,int* pnumberofdofspernode){ … … 58 58 /*Same as above, except we bypass the default sparsity: */ 59 59 if(pconnectivity || pnumberofdofspernode) 60 throw ErrorException(__FUNCT__,exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ",60 ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 61 61 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 62 62 … … 75 75 *present per row: */ 76 76 77 if(psparsity) throw ErrorException(__FUNCT__,exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ",77 if(psparsity) ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 78 78 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 79 79 … … 89 89 } 90 90 else{ 91 throw ErrorException(__FUNCT__,exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ",91 ISSMERROR(exprintf("%s%p%s%p%s%p","cannot determine logic with following set of pointers-> sparsity: ", 92 92 psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode)); 93 93 } -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r3223 r3332 37 37 38 38 #include "../../../shared/shared.h" 39 40 #undef __FUNCT__ 41 #define __FUNCT__ "PetscOptionsDetermineSolverType" 39 #include "../../../include/macros.h" 42 40 43 41 void PetscOptionsDetermineSolverType(int* psolver_type,char* options_string){ … … 78 76 if(first[0]!='-'){ 79 77 /*This is not good, the option does not have '-'! Get out*/ 80 throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));78 ISSMERROR(exprintf("%s%s%s","Option ",first," should be preceded by '-'!")); 81 79 } 82 80 break; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r3223 r3332 16 16 #include "./petscpatches.h" 17 17 18 #undef __FUNCT__19 #define __FUNCT__ "PetscOptionsInsertMultipleString"20 21 18 #include "../../../shared/shared.h" 19 #include "../../../include/macros.h" 22 20 23 21 void PetscOptionsInsertMultipleString(char* options_string){ … … 57 55 if(first[0]!='-'){ 58 56 /*This is not good, the option does not have '-'! Get out*/ 59 throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));57 ISSMERROR(exprintf("%s%s%s","Option ",first," should be preceded by '-'!")); 60 58 } 61 59 /*Reduce first to bare option value*/ -
issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp
r1904 r3332 17 17 18 18 #include "../../../shared/shared.h" 19 #include "../../../include/macros.h" 19 20 20 #undef __FUNCT__21 #define __FUNCT__ "VecMerge"22 21 void VecMerge(Vec A, Vec B, double* row_partition_vector,int row_partition_size){ 23 22 … … 46 45 /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */ 47 46 if ( (row_partition_size !=MB) ){ 48 throw ErrorException(__FUNCT__,"Dimensions of partitioning vector incompatible with dimensions of input vector\n");47 ISSMERROR("Dimensions of partitioning vector incompatible with dimensions of input vector\n"); 49 48 } 50 49 -
issm/trunk/src/c/toolkits/petsc/patches/VecPartition.cpp
r1904 r3332 15 15 16 16 #include "../../../shared/shared.h" 17 18 19 #undef __FUNCT__20 #define __FUNCT__ "VecPartition"21 17 22 18 void VecPartition(Vec* poutvector,Vec vectorA, double* row_partition_vector, int row_partition_vector_size){ -
issm/trunk/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp
r1904 r3332 8 8 9 9 int SmallestPrimeFactor(int* output,int input); 10 11 #undef __FUNCT__12 #define __FUNCT__ "CyclicalFactorization"13 10 14 11 int CyclicalFactorization(int* pnprows,int* pnpcols,int num_procs){ … … 44 41 } 45 42 46 #undef __FUNCT__47 #define __FUNCT__ "PrimeDecomp"48 43 int PrimeDecomp(int** pdecomp,int* pdecomp_size,int input){ 49 44 … … 82 77 of integer input 83 78 */ 84 #undef __FUNCT__85 #define __FUNCT__ "SmallestPrimeFactor"86 79 int SmallestPrimeFactor(int* output,int input){ 87 80 -
issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
r1904 r3332 2 2 * \brief invert petsc matrix using Plapack 3 3 */ 4 #include "../../../include/macros.h" 4 5 5 6 /* petsc: */ … … 12 13 #include "../../scalapack/FortranMapping.h" 13 14 14 #undef __FUNCT__15 #define __FUNCT__ "PlapackInvertMatrix"16 15 void PlapackInvertMatrixLocalCleanup(PLA_Obj* pa,PLA_Template* ptempl,double** parrayA, 17 16 int** pidxnA,MPI_Comm* pcomm_2d); … … 54 53 55 54 /*Some dimensions checks: */ 56 if (mA!=nA) throw ErrorException(__FUNCT__," trying to take the invert of a non-square matrix!");55 if (mA!=nA) ISSMERROR(" trying to take the invert of a non-square matrix!"); 57 56 58 57 /* Set default Plapack parameters */ -
issm/trunk/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp
r831 r3332 6 6 #include "../plapackincludes.h" 7 7 8 #undef __FUNCT__9 #define __FUNCT__ "PlapackToPetsc"10 8 int PlapackToPetsc(Mat* A,int local_mA,int local_nA,int mA,int nA,MatType type,PLA_Obj a,PLA_Template templ,int nprows,int npcols,int nb){ 11 9 -
issm/trunk/src/m/classes/@bamgmesh/bamgmesh.m
r3313 r3332 17 17 bm.VerticesOnGeometricEdge=[]; 18 18 bm.EdgesOnGeometricEdge=[]; 19 bm.CrackedEdges=[];20 19 bm.SubDomains=[]; 21 20 bm.SubDomainsFromGeom=[]; … … 23 22 bm.NodalConnectivity=[]; 24 23 bm.NodalElementConnectivity=[]; 24 bm.CrackedVertices=[]; 25 bm.CrackedEdges=[]; 25 26 bm.hVertices=[]; 26 27 -
issm/trunk/src/m/classes/public/bamg.m
r3311 r3332 242 242 243 243 % Bamg Options {{{1 244 bamg_options.Crack=getfieldvalue(options,'Crack',0); 244 245 bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30); 245 246 bamg_options.coef=getfieldvalue(options,'coef',1); -
issm/trunk/src/mex/Bamg/Bamg.cpp
r3314 r3332 34 34 FetchData(&bamggeom_in.SubDomains, &bamggeom_in.SubDomainsSize[0], &bamggeom_in.SubDomainsSize[1], mxGetField(BAMGGEOMETRY,0,"SubDomains")); 35 35 FetchData(&bamggeom_in.hVertices,&lines,&cols,mxGetField(BAMGGEOMETRY,0,"hVertices")); 36 if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.VerticesSize[0])){ throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.VerticesSize[0],1));}36 if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.VerticesSize[0])){ISSMERROR(exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.VerticesSize[0],1));} 37 37 38 38 /*create bamg mesh input*/ … … 47 47 FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.VerticesOnGeometricVertexSize[0],&bamgmesh_in.VerticesOnGeometricVertexSize[1],mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex")); 48 48 FetchData(&bamgmesh_in.hVertices,&lines,&cols,mxGetField(BAMGMESH,0,"hVertices")); 49 if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ throw ErrorException(__FUNCT__,exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}49 if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR(exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));} 50 50 51 51 /*create bamg options input*/ … … 53 53 FetchData(&bamgopts.coef,mxGetField(BAMGOPTIONS,0,"coef")); 54 54 FetchData(&bamgopts.maxsubdiv,mxGetField(BAMGOPTIONS,0,"maxsubdiv")); 55 FetchData(&bamgopts.Crack,mxGetField(BAMGOPTIONS,0,"Crack")); 55 56 FetchData(&bamgopts.Hessiantype,mxGetField(BAMGOPTIONS,0,"Hessiantype")); 56 57 FetchData(&bamgopts.Metrictype,mxGetField(BAMGOPTIONS,0,"Metrictype")); … … 72 73 FetchData(&bamgopts.MaximalAngleOfCorner,mxGetField(BAMGOPTIONS,0,"MaximalAngleOfCorner")); 73 74 FetchData(&bamgopts.hminVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hminVertices")); 74 if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ throw ErrorException(__FUNCT__,exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}75 if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR(exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));} 75 76 FetchData(&bamgopts.hmaxVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hmaxVertices")); 76 if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ throw ErrorException(__FUNCT__,exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}77 if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR(exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));} 77 78 FetchData(&bamgopts.metric,&lines,&cols,mxGetField(BAMGOPTIONS,0,"metric")); 78 if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.VerticesSize[0])){ throw ErrorException(__FUNCT__,exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.VerticesSize[0],3));}79 if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR(exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.VerticesSize[0],3));} 79 80 FetchData(&bamgopts.field,&lines,&bamgopts.numfields,mxGetField(BAMGOPTIONS,0,"field")); 80 if (bamgopts.field && lines!=bamgmesh_in.VerticesSize[0]){ throw ErrorException(__FUNCT__,exprintf("the size of 'field' should be [%i %i]",bamgmesh_in.VerticesSize[0],bamgopts.numfields));}81 if (bamgopts.field && lines!=bamgmesh_in.VerticesSize[0]){ISSMERROR(exprintf("the size of 'field' should be [%i %i]",bamgmesh_in.VerticesSize[0],bamgopts.numfields));} 81 82 FetchData(&bamgopts.err,NULL,&cols,mxGetField(BAMGOPTIONS,0,"err")); 82 if (bamgopts.numfields!=0 && cols!=bamgopts.numfields){ throw ErrorException(__FUNCT__,exprintf("the size of 'err' should be the same as 'field'"));}83 if (bamgopts.numfields!=0 && cols!=bamgopts.numfields){ISSMERROR(exprintf("the size of 'err' should be the same as 'field'"));} 83 84 BamgOptsCheck(&bamgopts); 84 85 -
issm/trunk/src/mex/Bamg/Bamg.h
r3271 r3332 1 2 1 /* 3 2 Bamg.h 4 3 */ 5 6 4 7 5 #ifndef _BAMG_H … … 15 13 #undef __FUNCT__ 16 14 #define __FUNCT__ "Bamg" 17 18 15 19 16 /* serial input macros: */ -
issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp
r2627 r3332 55 55 if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){ 56 56 ContourToMeshUsage(); 57 throw ErrorException(__FUNCT__," usage. See above");57 ISSMERROR(" usage. See above"); 58 58 } 59 59 … … 110 110 WriteData(PLHS1,in_elem); 111 111 } 112 else throw ErrorException(__FUNCT__," wrong interpolation type");112 else ISSMERROR(" wrong interpolation type"); 113 113 114 114 /*end module: */ -
issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
r3128 r3332 55 55 if (verbose) printf("Checking inputs\n"); 56 56 if (x_data_rows!=y_data_rows){ 57 throw ErrorException(__FUNCT__,"vectors x and y should have the same length!");57 ISSMERROR("vectors x and y should have the same length!"); 58 58 } 59 59 if (x_interp_rows!=y_interp_rows){ 60 throw ErrorException(__FUNCT__,"vectors x_interp and y_interp should have the same length!");60 ISSMERROR("vectors x_interp and y_interp should have the same length!"); 61 61 } 62 62 -
issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
r2627 r3332 76 76 /*some checks*/ 77 77 if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){ 78 throw ErrorException(__FUNCT__,"vectors x, y and z should have the same length!");78 ISSMERROR("vectors x, y and z should have the same length!"); 79 79 } 80 80 if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){ 81 throw ErrorException(__FUNCT__,"vectors x_prime, y_prime and z_prime should have the same length!");81 ISSMERROR("vectors x_prime, y_prime and z_prime should have the same length!"); 82 82 } 83 83 /*get number of elements and number of nodes in the data*/ -
issm/trunk/src/mex/Qmu/Qmu.cpp
r2333 r3332 28 28 29 29 #ifndef _HAVE_DAKOTA_ //only works if dakota library has been compiled in. 30 throw ErrorException(__FUNCT__," Dakota not available! Cannot carry out qmu analysis!");30 ISSMERROR(" Dakota not available! Cannot carry out qmu analysis!"); 31 31 #endif 32 32
Note:
See TracChangeset
for help on using the changeset viewer.