Changeset 3332


Ignore:
Timestamp:
03/24/10 16:53:27 (15 years ago)
Author:
Mathieu Morlighem
Message:

Do not use throw ErrorException -> ISSMERROR macro
Removed all FUNCT definitions (now useless)

Location:
issm/trunk/src
Files:
225 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/AverageFilterx/AverageFilterx.cpp

    r3109 r3332  
    44 * for more details.
    55 */
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "AverageFilterx"
    96
    107#include <stdio.h>
  • issm/trunk/src/c/Bamgx/Bamgx.cpp

    r3329 r3332  
    22 * \brief: use Bamg capabilities.
    33 */
    4 #undef __FUNCT__
    5 #define __FUNCT__ "Bamgx"
    6 
    74#include "./Bamgx.h"
    85#include "../shared/shared.h"
  • issm/trunk/src/c/Bamgx/objects/CrackedEdge.cpp

    r3329 r3332  
    55
    66#include "CrackedEdge.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "CrackedEdge"
    107
    118namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Curve.cpp

    r3263 r3332  
    66#include "Curve.h"
    77#include "Geometry.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "Curve"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Direction.cpp

    r3263 r3332  
    55
    66#include "Direction.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "Direction"
    107
    118namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Edge.cpp

    r3263 r3332  
    77#include "Triangles.h"
    88#include "Geometry.h"
    9 
    10 #undef __FUNCT__
    11 #define __FUNCT__ "Edge"
    129
    1310namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Edge.h

    r3280 r3332  
    3939                        int Intersection(const  Edge & e) const {
    4040                                if (!(adj[0]==&e || adj[1]==&e)){
    41                                         throw ErrorException(__FUNCT__,exprintf("Intersection bug"));
     41                                        ISSMERROR(exprintf("Intersection bug"));
    4242                                }
    4343                                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"));
    4545                                }
    4646                                return adj[0]==&e ? 0 : 1;
  • issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp

    r3303 r3332  
    66#include "GeometricalEdge.h"
    77#include "Geometry.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "GeometricalEdge"
    118
    129using namespace std;
     
    9794                double ca,cb,cta,ctb;
    9895                if ( theta<-1e-12){
    99                         throw ErrorException(__FUNCT__,exprintf("theta<-1e-12"));
     96                        ISSMERROR(exprintf("theta<-1e-12"));
    10097                }
    10198                if ( theta>1+1e-12){
    102                         throw ErrorException(__FUNCT__,exprintf("theta>1+1e-12"));
     99                        ISSMERROR(exprintf("theta>1+1e-12"));
    103100                }
    104101                if (TgA())
  • issm/trunk/src/c/Bamgx/objects/GeometricalSubDomain.cpp

    r3263 r3332  
    66#include "GeometricalSubDomain.h"
    77#include "Geometry.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "GeometricalSubDomain"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/GeometricalVertex.cpp

    r3263 r3332  
    66
    77#include "GeometricalVertex.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "GeometricalVertex"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Geometry.cpp

    r3329 r3332  
    3434                 subdomains[i].Set(Gh.subdomains[i],Gh,*this);
    3535                if (nbt);  {
    36                         throw ErrorException(__FUNCT__,exprintf("nbt"));
     36                        ISSMERROR(exprintf("nbt"));
    3737                }
    3838        }
     
    4545
    4646                if (NbRef>0){
    47                         throw ErrorException(__FUNCT__,exprintf("NbRef>0"));
     47                        ISSMERROR(exprintf("NbRef>0"));
    4848                }
    4949                if(vertices)  delete [] vertices;vertices=0;
     
    8484                }
    8585                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"));
    8787                }
    8888
     
    9090                if (bamggeom->Vertices){
    9191                        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"));
    9393                        vertices = new GeometricalVertex[nbvx];
    9494                        for (i=0;i<nbv;i++) {
     
    117117                        coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    118118                        if(coefIcoor <=0){
    119                                 throw ErrorException(__FUNCT__,exprintf("coefIcoor should be positive"));
     119                                ISSMERROR(exprintf("coefIcoor should be positive"));
    120120                        }
    121121                }
    122122                else{
    123                         throw ErrorException(__FUNCT__,exprintf("No Vertex provided"));
     123                        ISSMERROR(exprintf("No Vertex provided"));
    124124                }
    125125
     
    130130
    131131                        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"));
    133133                        edges = new GeometricalEdge[nbe];
    134134
     
    181181                }
    182182                else{
    183                         throw ErrorException(__FUNCT__,exprintf("No edges provided"));
     183                        ISSMERROR(exprintf("No edges provided"));
    184184                }
    185185
     
    224224                if (bamggeom->TangentAtEdges){
    225225                        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"));
    227227                        int n,i,j,k;
    228228                        R2 tg;
     
    235235                                tg.y=bamggeom->TangentAtEdges[k*4+3];
    236236                                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"));
    238238                                }
    239239                                edges[i].tg[j] = tg;
     
    244244                if(bamggeom->Corners){
    245245                        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"));
    247247                        n=bamggeom->CornersSize[0];
    248248                        for (i=0;i<n;i++) {     
    249249                                j=(int)bamggeom->Corners[i]-1; //for C indexing
    250250                                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));
    252252                                }
    253253                                vertices[j].SetCorner();
     
    258258                if(bamggeom->RequiredVertices){
    259259                        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"));
    261261                        n=bamggeom->RequiredVerticesSize[0];
    262262                        for (i=0;i<n;i++) {     
    263263                                j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing
    264264                                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));
    266266                                }
    267267                                vertices[j].SetRequired();  }
     
    271271                if(bamggeom->RequiredEdges){
    272272                        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"));
    274274                        n=bamggeom->RequiredEdgesSize[0];
    275275                        for (i=0;i<n;i++) {     
    276276                                j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing
    277277                                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));
    279279                                }
    280280                                edges[j].SetRequired(); 
     
    286286                        long i0,i1,i2,i3;
    287287                        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"));
    289289                        NbSubDomains=bamggeom->SubDomainsSize[0];
    290290                        subdomains = new GeometricalSubDomain[NbSubDomains];
     
    294294                                i2=(int)bamggeom->SubDomains[i*4+2];
    295295                                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));
    298298                                subdomains[i].edge=edges + (i1-1);
    299299                                subdomains[i].sens = (int) i2;
     
    467467                                //check that the clostest vertex is not itself...
    468468                                if ( v !=  &(Vertex &) vertices[j]){
    469                                         throw ErrorException(__FUNCT__,exprintf(" v !=  &(Vertex &) vertices[j]"));
     469                                        ISSMERROR(exprintf(" v !=  &(Vertex &) vertices[j]"));
    470470                                }
    471471                                vertices[i].link = vertices + j;
     
    485485                                if (!vertices[i].IsThe()) printf("  %i and %i\n",i,Number(vertices[i].The()));
    486486                        }
    487                         throw ErrorException(__FUNCT__,exprintf("See above"));
     487                        ISSMERROR(exprintf("See above"));
    488488                }
    489489
     
    556556                        //check that its length is not 0
    557557                        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));
    559559                        }
    560560                        //compute angle in [-Pi Pi]
     
    648648                                long i1 = n1/2 ,j1=n1%2;
    649649                                if( edges[i1].v[j1] != edges[i].v[j]) {
    650                                         throw ErrorException(__FUNCT__,exprintf("Bug Adj edge"));
     650                                        ISSMERROR(exprintf("Bug Adj edge"));
    651651                                }
    652652                                edges[i1].Adj[j1] = edges + i;
     
    764764                        pon = on;
    765765                        if (k>=100){
    766                                 throw ErrorException(__FUNCT__,exprintf("k>=100"));
     766                                ISSMERROR(exprintf("k>=100"));
    767767                        }
    768768                        R2 A= (*on)[0];
     
    843843                GeometricalEdge* on=e.onGeometry;
    844844                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"));
    846846                }
    847847                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"));
    849849                }
    850850
     
    887887                                        printf(" 2)  code bug : be sure that we call   Triangles::SetVertexFieldOn() before\n");
    888888                                        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"));
    890890                                  }
    891891                                NbTry++;
     
    907907                                printf(" 2)  code bug : be sure that we call   Triangles::SetVertexFieldOn() before\n");
    908908                                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"));
    910910                        }
    911911                        GeometricalEdge* tmpge = eg1;
     
    941941                                // search the geometrical edge
    942942                                if (s>1.0){
    943                                         throw ErrorException(__FUNCT__,exprintf("s>1.0"));
     943                                        ISSMERROR(exprintf("s>1.0"));
    944944                                }
    945945                                double ls= s*ll;
     
    951951                                while (  (l1=lge[i]) < ls ) {
    952952                                        if (i<0 || i>mxe){
    953                                                 throw ErrorException(__FUNCT__,exprintf("i<0 || i>mxe"));
     953                                                ISSMERROR(exprintf("i<0 || i>mxe"));
    954954                                        }
    955955                                        i++,s0=1-(s1=sensge[i]),l0=l1;
  • issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.cpp

    r3263 r3332  
    66#include "BamgObjects.h"
    77#include "../shared/shared.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "ListofIntersectionTriangles"
    118
    129namespace bamg {
     
    6461                                k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
    6562                                if (k<0){
    66                                         throw ErrorException(__FUNCT__,exprintf("k<0"));
     63                                        ISSMERROR(exprintf("k<0"));
    6764                                }
    6865                                ocut = OppositeEdge[k];
     
    108105                                double dij = detj-deti;
    109106                                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"));
    111108                                }
    112109                                ba[j] =  detj/dij;
     
    180177                                        }
    181178                                        else {
    182                                                 throw ErrorException(__FUNCT__,exprintf("Bug Split Edge"));
     179                                                ISSMERROR(exprintf("Bug Split Edge"));
    183180                                        }
    184181                                }
     
    270267                // check Size
    271268                if (Size<=0){
    272                         throw ErrorException(__FUNCT__,exprintf("Size<=0"));
     269                        ISSMERROR(exprintf("Size<=0"));
    273270                }
    274271
  • issm/trunk/src/c/Bamgx/objects/ListofIntersectionTriangles.h

    r3280 r3332  
    4343                                        double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
    4444                                        if (lBegin>s || s>lEnd){
    45                                                 throw ErrorException(__FUNCT__,exprintf("lBegin>s || s>lEnd"));
     45                                                ISSMERROR(exprintf("lBegin>s || s>lEnd"));
    4646                                        }
    4747                                        return e->F(sBegin*c0+sEnd*c1);
     
    9393                                        SegInterpolation * lEn =  new SegInterpolation[MaxNbSeg];
    9494                                        if (!lSegsI || NbSeg>=MaxNbSeg){
    95                                                 throw ErrorException(__FUNCT__,exprintf("!lSegsI || NbSeg>=MaxNbSeg"));
     95                                                ISSMERROR(exprintf("!lSegsI || NbSeg>=MaxNbSeg"));
    9696                                        }
    9797                                        for (int i=0;i< NbSeg;i++)
     
    109109                                register int newsize = MaxSize*2;
    110110                                IntersectionTriangles* nw = new IntersectionTriangles[newsize];
    111                                 if (!nw){ throw ErrorException(__FUNCT__,exprintf("!nw"));}
     111                                if (!nw) ISSMERROR("!nw");
    112112                                // recopy
    113113                                for (int i=0;i<MaxSize;i++) nw[i] = lIntTria[i];       
  • issm/trunk/src/c/Bamgx/objects/MatVVP2x2.cpp

    r3246 r3332  
    55
    66#include "Metric.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "MatVVP2x2"
    107
    118namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Metric.cpp

    r3303 r3332  
    44
    55#include "Metric.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Metric"
    96
    107using namespace std;
     
    180177                // warning for optimisation S is in [0:0.5] not in [0:1]
    181178                if (i>=512){
    182                         throw ErrorException(__FUNCT__,exprintf("i>=512"));
     179                        ISSMERROR(exprintf("i>=512"));
    183180                }
    184181                LastMetricInterpole.lab=l;
     
    324321                  }
    325322                if (r>1 || r<0){
    326                         throw ErrorException(__FUNCT__,exprintf("r>1 || r<0"));
     323                        ISSMERROR(exprintf("r>1 || r<0"));
    327324                }
    328325                return r ;
  • issm/trunk/src/c/Bamgx/objects/QuadTree.cpp

    r3267 r3332  
    55//#include "QuadTree.h"
    66#include "BamgObjects.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "QuadTree"
    107
    118namespace bamg {
     
    9188         root=NewQuadTreeBox();
    9289         if ( MaxISize <= MaxICoor){
    93                  throw ErrorException(__FUNCT__,exprintf("MaxISize <= MaxICoor"));
     90                 ISSMERROR(exprintf("MaxISize <= MaxICoor"));
    9491         }
    9592         for (int i=0;i<nbv;i++)
     
    159156                //check that l is not 0 (this should not happen as MaxDeep = 30)
    160157                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));
    162159                }
    163160
     
    471468                be = b +ll;
    472469                if (!b){
    473                         throw ErrorException(__FUNCT__,exprintf("!b"));
     470                        ISSMERROR(exprintf("!b"));
    474471                }
    475472        }
  • issm/trunk/src/c/Bamgx/objects/QuadTree.h

    r3280 r3332  
    6262                        QuadTreeBox* NewQuadTreeBox(){
    6363                                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)"));}
    6565                                NbQuadTreeBox++;
    6666                                return sb->bc++;
  • issm/trunk/src/c/Bamgx/objects/SetOfE4.cpp

    r3309 r3332  
    11#include <assert.h>
    22#include "BamgObjects.h"
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "SetOfEdges4"
    63
    74using namespace std;
     
    8178                //check that nbax <=NbOfEdges
    8279                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));
    8481                }
    8582
  • issm/trunk/src/c/Bamgx/objects/SubDomain.cpp

    r3263 r3332  
    66#include "SubDomain.h"
    77#include "Triangles.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "SubDomains"
    118
    129namespace bamg {
     
    1916                *this = Th.subdomains[i];
    2017                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"));
    2219                }
    2320                head = ThNew.triangles + Th.Number(head) ;
    2421                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"));
    2623                }
    2724                edge = ThNew.edges+ Th.Number(edge);
  • issm/trunk/src/c/Bamgx/objects/Triangle.cpp

    r3263 r3332  
    66#include "BamgObjects.h"
    77#include "../shared/shared.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "Triangle"
    118
    129namespace bamg {
     
    1815                long nbv = Th->nbv;
    1916                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"));
    2118                }
    2219                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"));
    2421                }
    2522                TriaVertices[0]=v+i;
     
    117114                        //check number of iterations
    118115                        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)"));
    120117                        }
    121118                } while (this!= t);
     
    140137                do {
    141138                        while (t->swap(j,koption)){
    142                                 if (k>=20000) throw ErrorException(__FUNCT__,exprintf("k>=20000"));
     139                                if (k>=20000) ISSMERROR(exprintf("k>=20000"));
    143140                                NbSwap++;
    144141                                k++;
  • issm/trunk/src/c/Bamgx/objects/TriangleAdjacent.cpp

    r3325 r3332  
    66#include "TriangleAdjacent.h"
    77#include "Triangles.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "TriangleAdjacent"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/Triangles.cpp

    r3329 r3332  
    77#include "BamgObjects.h"
    88#include "../shared/shared.h"
    9 
    10 #undef __FUNCT__
    11 #define __FUNCT__ "Triangles"
    129
    1310namespace bamg {
     
    116113                          }
    117114                  if (inbvx != nbv){
    118                           throw ErrorException(__FUNCT__,exprintf("inbvx != nbv"));
     115                          ISSMERROR("inbvx != nbv");
    119116                  }
    120117                  for (i=0;i<Tho.nbt;i++)
     
    126123                                int i2 = Tho.Number(t[2]);
    127124                                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"));
    129126                                }
    130127                                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"));
    132129                                }
    133130                                triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]);
     
    136133                          }
    137134                  if (kt!=nbt){
    138                           throw ErrorException(__FUNCT__,exprintf("kt!=nbt"));
     135                          ISSMERROR(exprintf("kt!=nbt"));
    139136                  }
    140137                  if (nbt==0 && nbv==0) {
    141                           throw ErrorException(__FUNCT__,exprintf("All triangles have been removed"));
     138                          ISSMERROR(exprintf("All triangles have been removed"));
    142139                  }
    143140                  delete [] kk;
     
    151148
    152149                  if (!NbSubDomains){
    153                           throw ErrorException(__FUNCT__,exprintf("NbSubDomains==0"));
     150                          ISSMERROR(exprintf("NbSubDomains==0"));
    154151                  }
    155152                  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"));
    157154                  }
    158155
     
    337334                }
    338335                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"));
    340337                }
    341338
     
    355352                }
    356353                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"));
    358355                }
    359356
     
    481478                                //Check value
    482479                                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));
    484481                                }
    485482                                edges[i].onGeometry=Gh.edges+j;
     
    507504                                head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing
    508505                                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));
    511508                                subdomains[i].head = triangles+head;
    512509                        }
     
    555552                                for (j=0;j<3;j++){
    556553                                        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));
    558555                                        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));
    560557                                        head_1[v]=k++;
    561558                                        connectivitysize_1[v]+=1;
     
    679676                                }
    680677                                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));
    682679                                }
    683680                        }
     
    777774                                const VertexOnGeom &v=VerticesOnGeomEdge[i];
    778775                                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"));
    780777                                }
    781778                                bamgmesh->VerticesOnGeometricEdge[i*3+0]=Number((Vertex*)v)+1; //back to Matlab indexing
     
    860857                        for (j=0;j<2;j++){
    861858                                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));
    863860                                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));
    865862                                head_2[v]=k++;
    866863                                connectivitysize_2[v]+=1;
     
    995992                //check that hmax is positive
    996993                if (hmax<=0){
    997                         throw ErrorException(__FUNCT__,exprintf("hmax<=0"));
     994                        ISSMERROR(exprintf("hmax<=0"));
    998995                }
    999996
     
    10241021
    10251022                                if (ht<=0 || hn<=0){
    1026                                         throw ErrorException(__FUNCT__,exprintf("ht<=0 || hn<=0"));
     1023                                        ISSMERROR(exprintf("ht<=0 || hn<=0"));
    10271024                                }
    10281025                                MatVVP2x2 Vp(1/(ht*ht),1/(hn*hn),tg);
     
    10491046                }
    10501047                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));
    10521049                }
    10531050        }
     
    10911088                //some checks
    10921089                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"));
    10941091                }
    10951092
     
    11361133                                printf("\nproblem while trying to add:\n");
    11371134                                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));
    11391136                        }
    11401137                }
     
    11501147
    11511148                if (nbt>nbtx) {
    1152                         throw ErrorException(__FUNCT__,exprintf("Not ebough triangles"));
     1149                        ISSMERROR(exprintf("Not ebough triangles"));
    11531150                }
    11541151
     
    11891186
    11901187                        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"));
    11921189                        }
    11931190                }
     
    12561253                //check that the mesh is not empty
    12571254                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?)"));
    12591256                }
    12601257
     
    12771274                //check that there is no double edge
    12781275                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()));
    12801277                }
    12811278                //keep nbe in nbeold
     
    12971294                                        //check that it is not an edge on boundary (should not alrady exist)
    12981295                                        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?)"));
    13001297                                        }
    13011298                                        //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list
     
    13151312                                        printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3);
    13161313                                        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"));
    13181315                                }       
    13191316                        }
     
    13971394                        //check that we have been through all edges
    13981395                        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)"));
    14001397                        }
    14011398                        //delete edgessave
     
    14421439                                        //check that we have the correct vertex
    14431440                                        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"));
    14451442                                        }
    14461443
     
    14591456                //check that NbSubDomains is empty
    14601457                if (NbSubDomains){
    1461                         throw ErrorException(__FUNCT__,exprintf("NbSubDomains should be 0"));
     1458                        ISSMERROR(exprintf("NbSubDomains should be 0"));
    14621459                }
    14631460                NbSubDomains=0;
     
    15271524                //check that we have been through all subdomains
    15281525                if (k!= NbSubDomains){
    1529                         throw ErrorException(__FUNCT__,exprintf("k!= NbSubDomains"));
     1526                        ISSMERROR(exprintf("k!= NbSubDomains"));
    15301527                }
    15311528                //delete colorT and st
     
    15871584                Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y));
    15881585                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)"));
    15901587                }
    15911588
     
    16381635                        k = edge4->SortAndAdd(i0,i1);
    16391636                        if (k != i){
    1640                                 throw ErrorException(__FUNCT__,exprintf("problem in Edge4 construction: k != i"));
     1637                                ISSMERROR(exprintf("problem in Edge4 construction: k != i"));
    16411638                        }
    16421639                }
     
    16671664                        }
    16681665                        else
    1669                          throw ErrorException(__FUNCT__,exprintf("%i should be >=0"));
     1666                         ISSMERROR(exprintf("%i should be >=0"));
    16701667                  }
    16711668
     
    22242221                                //The vertex cannot be marked more than twice
    22252222                                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"));
    22272224                                }
    22282225                        }
     
    23022299                                //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);
    23032300                                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"));
    23052302                        }while ((tbegin != ta));
    23062303                }
     
    23092306                for(i=0;i<NbCrackedEdges;i++){
    23102307                        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));
    23122309                        }
    23132310                }
     
    23352332                        }
    23362333                        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));
    23382335                        }
    23392336
     
    23522349                                                printf("Edge %i: %i %i\n",j,Number(edges[j][0]),Number(edges[j][1]));
    23532350                                        }
    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])));
    23552352                                }
    23562353                        }
    23572354
    23582355                        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));
    23602357                        }
    23612358                        for (int j=0;j<nbv;j++){
     
    24382435                        it++;} // end while (it<nbt)
    24392436                        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"));
    24412438                        }
    24422439
     
    24752472                                                it++;} // end white (it<nbt)
    24762473                                                if (k!=NbSubDomains){
    2477                                                         throw ErrorException(__FUNCT__,exprintf("k!=NbSubDomains"));
     2474                                                        ISSMERROR(exprintf("k!=NbSubDomains"));
    24782475                                                }
    24792476                                                if(OutSide)
     
    25462543                                        Edge &e = *GeometricalEdgetoEdge[Gh.Number(eg)];
    25472544                                        if (&e==NULL){
    2548                                                 throw ErrorException(__FUNCT__,exprintf("&e==NULL"));
     2545                                                ISSMERROR(exprintf("&e==NULL"));
    25492546                                        }
    25502547                                        Vertex * v0 =  e(0),*v1 = e(1);
     
    25562553                                        subdomains[i].edge = &e;
    25572554                                        if (!t || !sens){
    2558                                                 throw ErrorException(__FUNCT__,exprintf("!t || !sens"));
     2555                                                ISSMERROR(exprintf("!t || !sens"));
    25592556                                        }
    25602557
     
    25632560                                        while (1) {
    25642561                                                if ( v0 != ta.EdgeVertex(1) ){
    2565                                                         throw ErrorException(__FUNCT__,exprintf("v0 != ta.EdgeVertex(1)"));
     2562                                                        ISSMERROR(exprintf("v0 != ta.EdgeVertex(1)"));
    25662563                                                }
    25672564                                                if (ta.EdgeVertex(0) == v1) { // ok we find the edge
     
    25712568                                                         subdomains[i].head=t=ta;
    25722569                                                        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));
    25742571                                                        }
    25752572                                                        long it = Number(t);
     
    25862583                                                                kkk++;
    25872584                                                                if (mark[Number(tt)]>=0){
    2588                                                                         throw ErrorException(__FUNCT__,exprintf("mark[Number(tt)]>=0"));
     2585                                                                        ISSMERROR(exprintf("mark[Number(tt)]>=0"));
    25892586                                                                }
    25902587                                                                mark[Number(tt)]=i;
     
    25952592                                                ta = Previous(Adj(ta));         
    25962593                                                if(t == (Triangle *) ta) {
    2597                                                         throw ErrorException(__FUNCT__,exprintf("bad definition of SubSomain %i",i));
     2594                                                        ISSMERROR(exprintf("bad definition of SubSomain %i",i));
    25982595                                                }
    25992596                                        }
     
    26262623                else {
    26272624                        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"));
    26292626                        }
    26302627                        Vertex *a = quadtree->NearestVertex(B.x,B.y) ;
     
    26342631                                        printf("TriangleContaining vertex number %i, another call to ReMakeTriangleContainingTheVertex was required\n", Number(a));
    26352632                                }
    2636                                 throw ErrorException(__FUNCT__,exprintf("problem in Triangles::FindTriangleContaining"));
     2633                                ISSMERROR(exprintf("problem in Triangles::FindTriangleContaining"));
    26372634                        }
    26382635                        if (a<vertices || a>=vertices+nbv){
    2639                                 throw ErrorException(__FUNCT__,exprintf("a<vertices || a>=vertices+nbv"));
     2636                                ISSMERROR(exprintf("a<vertices || a>=vertices+nbv"));
    26402637                        }
    26412638                        t = a->t;
    26422639                        if (t<triangles || t>=triangles+nbt){
    26432640                                a->Echo();
    2644                                 throw ErrorException(__FUNCT__,exprintf("t<triangles || t>=triangles+nbt"));
     2641                                ISSMERROR(exprintf("t<triangles || t>=triangles+nbt"));
    26452642                        }
    26462643                }
     
    26542651                        int k0=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
    26552652                        if (k0<0){ // k0 the NULL vertex
    2656                                 throw ErrorException(__FUNCT__,exprintf("k0<0"));
     2653                                ISSMERROR(exprintf("k0<0"));
    26572654                        }
    26582655                        int k1=NextVertex[k0],k2=PreviousVertex[k0];
     
    26642661                        kkkk++;
    26652662                        if (kkkk>=2){
    2666                                 throw ErrorException(__FUNCT__,exprintf("kkkk>=2"));
     2663                                ISSMERROR(exprintf("kkkk>=2"));
    26672664                        }
    26682665                }
     
    26742671                        kkkk++;
    26752672                        if (kkkk>=2000){
    2676                                 throw ErrorException(__FUNCT__,exprintf("kkkk>=2000"));
     2673                                ISSMERROR(exprintf("kkkk>=2000"));
    26772674                        }
    26782675                        j= OppositeVertex[jj];
     
    26952692                        if (k == 2 && BinaryRand()) Exchange(ii[0],ii[1]);
    26962693                        if ( k>=3){
    2697                                 throw ErrorException(__FUNCT__,exprintf("k>=3"));
     2694                                ISSMERROR(exprintf("k>=3"));
    26982695                        }
    26992696                        TriangleAdjacent t1 = t->Adj(jj=ii[0]);
     
    27512748                VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 
    27522749                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));
    27542751                }
    27552752
     
    27682765                                }
    27692766                                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));
    27712768                                }
    27722769                               
     
    27842781                //check that edges has been allocated
    27852782                if (edges){
    2786                         throw ErrorException(__FUNCT__,exprintf("edges is empty"));
     2783                        ISSMERROR(exprintf("edges is empty"));
    27872784                }
    27882785
     
    28302827                                                                        //check that edges has been allocated
    28312828                                                                        if (!edges){
    2832                                                                                 throw ErrorException(__FUNCT__,exprintf("edges has not been allocated..."));
     2829                                                                                ISSMERROR(exprintf("edges has not been allocated..."));
    28332830                                                                        }
    28342831                                                                        edges[nbe].v[0]=a->to;
     
    28532850                                                                NbEdgeCurve=0;
    28542851                                                                if (nbvend>=nbvx){
    2855                                                                         throw ErrorException(__FUNCT__,exprintf("nbvend>=nbvx"));
     2852                                                                        ISSMERROR(exprintf("nbvend>=nbvx"));
    28562853                                                                }
    28572854                                                                lcurve =0;
     
    29282925                                                                                }
    29292926                                                                                if (kk1 == kk0){
    2930                                                                                         throw ErrorException(__FUNCT__,exprintf("kk1 == kk0"));
     2927                                                                                        ISSMERROR(exprintf("kk1 == kk0"));
    29312928                                                                                }
    29322929
     
    29632960                                                                        e = e->Adj[kprev];
    29642961                                                                        if (!e){
    2965                                                                                 throw ErrorException(__FUNCT__,exprintf("!e"));
     2962                                                                                ISSMERROR(exprintf("!e"));
    29662963                                                                        }
    29672964                                                                }// for(;;)
     
    29932990                        if(!step) {
    29942991                                if (edges){
    2995                                         throw ErrorException(__FUNCT__,exprintf("edges"));
     2992                                        ISSMERROR(exprintf("edges"));
    29962993                                }
    29972994                                if (VerticesOnGeomEdge){
    2998                                         throw ErrorException(__FUNCT__,exprintf("VerticesOnGeomEdge"));
     2995                                        ISSMERROR(exprintf("VerticesOnGeomEdge"));
    29992996                                }
    30002997                                edges = new Edge[nbex=nbe];
     
    30022999                                 VerticesOnGeomEdge = new VertexOnGeom[NbVerticesOnGeomEdge0];
    30033000                                if (!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0){
    3004                                         throw ErrorException(__FUNCT__,exprintf("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0"));
     3001                                        ISSMERROR(exprintf("!VerticesOnGeomEdge && NbVerticesOnGeomEdge0!=0"));
    30053002                                }
    30063003                                // do the vertex on a geometrical vertex
     
    30083005                        }
    30093006                        else if (NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0){
    3010                                 throw ErrorException(__FUNCT__,exprintf("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0"));
     3007                                ISSMERROR(exprintf("NbVerticesOnGeomEdge != NbVerticesOnGeomEdge0"));
    30113008                        }
    30123009                }
     
    30853082                int i;
    30863083                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));}
    30883085
    30893086                VerticesOnGeomVertex = new VertexOnGeom[  NbVerticesOnGeomVertex];
     
    31443141                }
    31453142                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));
    31473144                }
    31483145
     
    32363233                                                                                double se= (sNew-L0)/LAB;
    32373234                                                                                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));
    32393236                                                                                }
    32403237                                                                                se = abscisseInterpole(v0.m,v1.m,AB,se,1);
    32413238                                                                                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));
    32433240                                                                                }
    32443241                                                                                se = k1         ? se : 1. - se;
     
    32723269                                                                }
    32733270                                                                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));
    32753272                                                                }
    32763273                                                                pe = ee.adj[k1]; // next edge
     
    33143311                        if(step==0){
    33153312                                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));
    33173314                                }
    33183315                                edges = new Edge[NbOfNewEdge];
     
    34093406                        //all vertices are aligned!
    34103407                        if  ( ++i >= nbv) {
    3411                                 throw ErrorException(__FUNCT__,exprintf("all the vertices are aligned"));
     3408                                ISSMERROR(exprintf("all the vertices are aligned"));
    34123409                        }
    34133410                }
     
    35473544                                long  j=vj.ReferenceNumber;
    35483545                                if (&vj!=ordre[j]){
    3549                                         throw ErrorException(__FUNCT__,exprintf("&vj!= ordre[j]"));
     3546                                        ISSMERROR(exprintf("&vj!= ordre[j]"));
    35503547                                }
    35513548                                if(i!=j){
     
    35573554                                if (tcvj && !tcvj->link){
    35583555                                        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));
    35603557                                }
    35613558                                quadtree->Add(vj);
     
    35843581
    35853582                if (!Gh.nbe){
    3586                         throw ErrorException(__FUNCT__,exprintf("!Gh.nbe"));
     3583                        ISSMERROR(exprintf("!Gh.nbe"));
    35873584                }
    35883585                Edge **e= new (Edge* [Gh.nbe]);
     
    36173614                        }
    36183615                }
    3619                 if(kk) throw ErrorException(__FUNCT__,exprintf("See above"));
     3616                if(kk) ISSMERROR(exprintf("See above"));
    36203617
    36213618                return e;
     
    38063803                                //check i
    38073804                                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));
    38093806                                }
    38103807                                //change first_np_or_next_t[i]
     
    38573854                                        }
    38583855                                        if (ta.EdgeVertex(0)!=s){
    3859                                                 throw ErrorException(__FUNCT__,exprintf("ta.EdgeVertex(0)!=s"));
     3856                                                ISSMERROR(exprintf("ta.EdgeVertex(0)!=s"));
    38603857                                        }
    38613858                                        ta = Next(Adj(ta));
     
    39073904                vertices=new Vertex[nbvx];
    39083905                if (!vertices){
    3909                         throw ErrorException(__FUNCT__,exprintf("!vertices"));
     3906                        ISSMERROR(exprintf("!vertices"));
    39103907                }
    39113908                ordre=new (Vertex* [nbvx]);
    39123909                if (!ordre){
    3913                         throw ErrorException(__FUNCT__,exprintf("!ordre"));
     3910                        ISSMERROR(exprintf("!ordre"));
    39143911                }
    39153912                triangles=new Triangle[nbtx];
    39163913                if (!triangles){
    3917                         throw ErrorException(__FUNCT__,exprintf("!triangles"));
     3914                        ISSMERROR(exprintf("!triangles"));
    39183915                }
    39193916        }
     
    39523949                }
    39533950                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)));
    39553952                }
    39563953
     
    39633960                }
    39643961                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)));
    39663963                }
    39673964                Edge * e = &BhAB;
    39683965                if (!pA || !pB || !e){
    3969                         throw ErrorException(__FUNCT__,exprintf("!pA || !pB || !e"));
     3966                        ISSMERROR(exprintf("!pA || !pB || !e"));
    39703967                }
    39713968                // be carefull the back ground edge e is on same geom edge
     
    39733970                //check Is a background Mesh;   
    39743971                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"));
    39763973                }
    39773974                // walk on BTh edge
     
    39963993                  }
    39973994                else{ // do the search by walking
    3998                         throw ErrorException(__FUNCT__,exprintf("case not supported yet"));
     3995                        ISSMERROR(exprintf("case not supported yet"));
    39993996                  }
    40003997
     
    40254022                                kkk=kkk+1;
    40264023                                if (kkk>=100){
    4027                                         throw ErrorException(__FUNCT__,exprintf("kkk>=100"));
     4024                                        ISSMERROR(exprintf("kkk>=100"));
    40284025                                }
    40294026                                if (!eee){
    4030                                         throw ErrorException(__FUNCT__,exprintf("!eee"));
     4027                                        ISSMERROR(exprintf("!eee"));
    40314028                                }
    40324029                                double lg0 = lg;
     
    40374034                                        double thetab = te0*(1-sss)+ sss*iii;
    40384035                                        if (thetab<0 || thetab>1){
    4039                                                 throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));
     4036                                                ISSMERROR(exprintf("thetab<0 || thetab>1"));
    40404037                                        }
    40414038                                        BR = VertexOnEdge(&R,eee,thetab);
     
    40504047                                double lg0 = lg;
    40514048                                if (!eee){
    4052                                         throw ErrorException(__FUNCT__,exprintf("!eee"));
     4049                                        ISSMERROR(exprintf("!eee"));
    40534050                                }
    40544051                                v1 = pvB;
     
    40614058                                        double thetab = te0*(1-sss)+ sss*tB;
    40624059                                        if (thetab<0 || thetab>1){
    4063                                                 throw ErrorException(__FUNCT__,exprintf("thetab<0 || thetab>1"));
     4060                                                ISSMERROR(exprintf("thetab<0 || thetab>1"));
    40644061                                        }
    40654062                                        BR = VertexOnEdge(&R,eee,thetab);
     
    40704067
    40714068                  }
    4072                 throw ErrorException(__FUNCT__,exprintf("Big bug..."));
     4069                ISSMERROR(exprintf("Big bug..."));
    40734070                return 0; // just for the compiler
    40744071        }                 
     
    41114108        }
    41124109        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));
    41144111        }
    41154112
     
    41434140                        //An edge belongs to 2 triangles
    41444141                        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",
    41464143                                                                Number(triangles[i][VerticesOfTriangularEdge[j][0]]),Number(triangles[i][VerticesOfTriangularEdge[j][1]])));
    41474144                        }
     
    41824179        }
    41834180        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));
    41854182        }
    41864183
     
    42094206        for (i=2;det(ordre[0]->i,ordre[1]->i,ordre[i]->i)==0;)
    42104207         if  (++i>=nbvb) {
    4211                  throw ErrorException(__FUNCT__,exprintf("ReconstructExistingMesh: All the vertices are aligned"));
     4208                 ISSMERROR(exprintf("ReconstructExistingMesh: All the vertices are aligned"));
    42124209         }
    42134210        //Move this vertex (i) to the 2d position in ordre
     
    42694266        }
    42704267        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));
    42724269        }
    42734270
     
    43444341        subdomains = savesubdomains;
    43454342        if (k) {
    4346                 throw ErrorException(__FUNCT__,exprintf("number of triangles edges alone = %i",k));
     4343                ISSMERROR(exprintf("number of triangles edges alone = %i",k));
    43474344        }
    43484345        FindSubDomain();
     
    43744371
    43754372                                                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...)"));
    43774374                                        }
    43784375                                }
     
    43974394                        t=t0=subdomains[i].head;
    43984395                        if (!t0){ // not empty sub domain
    4399                                 throw ErrorException(__FUNCT__,exprintf("!t0"));
     4396                                ISSMERROR(exprintf("!t0"));
    44004397                        }
    44014398                        do {
    44024399                                long kt = Number(t);
    44034400                                if (kt<0 || kt >= nbt ){
    4404                                         throw ErrorException(__FUNCT__,exprintf("kt<0 || kt >= nbt"));
     4401                                        ISSMERROR(exprintf("kt<0 || kt >= nbt"));
    44054402                                }
    44064403                                if (renu[kt]!=-1){
    4407                                         throw ErrorException(__FUNCT__,exprintf("renu[kt]!=-1"));
     4404                                        ISSMERROR(exprintf("renu[kt]!=-1"));
    44084405                                }
    44094406                                renu[kt]=k++;
     
    44224419                }
    44234420                if (k != nbt){
    4424                         throw ErrorException(__FUNCT__,exprintf("k != nbt"));
     4421                        ISSMERROR(exprintf("k != nbt"));
    44254422                }
    44264423                // do the change on all the pointeur
     
    45494546        coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    45504547        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"));
    45524549        }
    45534550
     
    45704567                                if(Nberr==1)
    45714568                                 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));
    45734570                                 }
    45744571                                 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));
    45764573                                 }
    45774574                        }
     
    47634760                        register Triangle* t= vertices[i].t;
    47644761                        if (!t){
    4765                                 throw ErrorException(__FUNCT__,exprintf("!t"));
     4762                                ISSMERROR(exprintf("!t"));
    47664763                        }
    47674764                        Vertex & vi = vertices[i];
     
    47714768                                ta=Previous(Adj(ta));
    47724769                                if (vertices+i != ta.EdgeVertex(1)){
    4773                                         throw ErrorException(__FUNCT__,exprintf("vertices+i != ta.EdgeVertex(1)"));
     4770                                        ISSMERROR(exprintf("vertices+i != ta.EdgeVertex(1)"));
    47744771                                }
    47754772                                Vertex & vj = *(ta.EdgeVertex(0));
     
    47774774                                        j= &vj-vertices;
    47784775                                        if (j<0 || j >= nbv){
    4779                                                 throw ErrorException(__FUNCT__,exprintf("j<0 || j >= nbv"));
     4776                                                ISSMERROR(exprintf("j<0 || j >= nbv"));
    47804777                                        }
    47814778                                        R2 Aij = (R2) vj - (R2) vi;
     
    49014898                                        // the first PB is to now a background edge between the 2 vertices
    49024899                                        if (!edgesGtoB){
    4903                                                 throw ErrorException(__FUNCT__,exprintf("!edgesGtoB"));
     4900                                                ISSMERROR(exprintf("!edgesGtoB"));
    49044901                                        }
    49054902                                        ong= ProjectOnCurve(*edgesGtoB[Gh.Number(edges[i].onGeometry)],
     
    49734970                        Triangle & t = triangles[i];
    49744971                        if (!t.link){
    4975                                 throw ErrorException(__FUNCT__,exprintf("!t.link"));
     4972                                ISSMERROR(exprintf("!t.link"));
    49764973                        }
    49774974                        for(int j=0;j<3;j++)
     
    50004997                                                                                ||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
    50014998                                                        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"));
    50035000                                                }
    50045001                                        }
     
    50085005                                                                                ||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
    50095006                                                        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"));
    50115008                                                }
    50125009                                        }
     
    50565053                                                  } // tt
    50575054                                                else
    5058                                                  throw ErrorException(__FUNCT__,exprintf("Bug..."));
     5055                                                 ISSMERROR(exprintf("Bug..."));
    50595056                                          } // ke<0           
    50605057                                        else
     
    50695066                          }
    50705067                        if (nbinvisible>=2){
    5071                                 throw ErrorException(__FUNCT__,exprintf("nbinvisible>=2"));
     5068                                ISSMERROR(exprintf("nbinvisible>=2"));
    50725069                        }
    50735070                        switch (nbsplitedge) {
     
    50815078                        }
    50825079                        if (ksplit[i]<40){
    5083                                 throw ErrorException(__FUNCT__,exprintf("ksplit[i]<40"));
     5080                                ISSMERROR(exprintf("ksplit[i]<40"));
    50845081                        }
    50855082                  }
     
    50985095                        int  ke=(int) (ksplit[i]%10);
    50995096                        if (kk>=7 || kk<=0){
    5100                                 throw ErrorException(__FUNCT__,exprintf("kk>=7 || kk<=0"));
     5097                                ISSMERROR(exprintf("kk>=7 || kk<=0"));
    51015098                        }
    51025099
     
    51155112
    51165113                        if (nbmkadj>=10){
    5117                                 throw ErrorException(__FUNCT__,exprintf("nbmkadj>=10"));
     5114                                ISSMERROR(exprintf("nbmkadj>=10"));
    51185115                        }
    51195116                        // --------------------------
     
    51335130                                                        t1=t0;
    51345131                                                        if (kedge[3*i+i0]<0){
    5135                                                                 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+i0]<0"));
     5132                                                                ISSMERROR(exprintf("kedge[3*i+i0]<0"));
    51365133                                                        }
    51375134                                                        Vertex * v3 = vertices + kedge[3*i+k0];
     
    51495146                                                        t2=t1=t0;
    51505147                                                        if (kedge[3*i+k1]<0){
    5151                                                                 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+k1]<0"));
     5148                                                                ISSMERROR(exprintf("kedge[3*i+k1]<0"));
    51525149                                                        }
    51535150                                                        if (kedge[3*i+k2]<0){
    5154                                                                 throw ErrorException(__FUNCT__,exprintf("kedge[3*i+k2]<0"));
     5151                                                                ISSMERROR(exprintf("kedge[3*i+k2]<0"));
    51555152                                                        }
    51565153
     
    51765173                                                        t3=t2=t1=t0;
    51775174                                                        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"));
    51795176                                                        }
    51805177                                                        Vertex * v12 = vertices + kedge[3*i+k0];
     
    52505247                                }
    52515248                        if (nbmkadj>13){// 13 = 6 + 4 +
    5252                                 throw ErrorException(__FUNCT__,exprintf("nbmkadj>13"));
     5249                                ISSMERROR(exprintf("nbmkadj>13"));
    52535250                        }
    52545251
     
    53765373                        quadtree->Add(vi);
    53775374                        if (!tcvi || tcvi->det<0){// internal
    5378                                 throw ErrorException(__FUNCT__,exprintf("!tcvi || tcvi->det < 0"));
     5375                                ISSMERROR(exprintf("!tcvi || tcvi->det < 0"));
    53795376                        }
    53805377                        AddVertex(vi,tcvi,dete);
     
    54135410
    54145411                //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"));}
    54165413
    54175414                //loop
     
    54235420
    54245421                        //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"));}
    54265423
    54275424                        //reft of this triangle is the subdomain number
     
    54555452                int dir=0;
    54565453                if (k<0){
    5457                         throw ErrorException(__FUNCT__,exprintf("k<0"));
     5454                        ISSMERROR(exprintf("k<0"));
    54585455                }
    54595456                int kkk=0; 
     
    54635460                        kkk++;
    54645461                        if (kkk>=1000){
    5465                                 throw ErrorException(__FUNCT__,exprintf("kkk>=1000"));
     5462                                ISSMERROR(exprintf("kkk>=1000"));
    54665463                        }
    54675464                        Vertex  &vI =  *edge.EdgeVertex(0);
     
    54805477                                                        double IJ2 = IJ_IA + IJ_AJ;
    54815478                                                        if (IJ2==0){
    5482                                                                 throw ErrorException(__FUNCT__,exprintf("IJ2==0"));
     5479                                                                ISSMERROR(exprintf("IJ2==0"));
    54835480                                                        }
    54845481                                                        a= IJ_AJ/IJ2;
     
    54985495                //   int dir=0;
    54995496                if (t->link != 0){
    5500                         throw ErrorException(__FUNCT__,exprintf("t->link != 0"));
     5497                        ISSMERROR(exprintf("t->link != 0"));
    55015498                }
    55025499                // to have a starting edges
     
    55705567                  }
    55715568                if (cas ==-2){
    5572                         throw ErrorException(__FUNCT__,exprintf("cas==-2"));
     5569                        ISSMERROR(exprintf("cas==-2"));
    55735570                }
    55745571                // l1 = ||C s1||  , l0 = ||C s0||
     
    55875584                                kkk++;
    55885585                                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"));
    55905587                                }
    55915588
     
    56195616
    56205617                        if (!(Triangle *) er){
    5621                                 throw ErrorException(__FUNCT__,exprintf("!(Triangle *) er"));
     5618                                ISSMERROR(exprintf("!(Triangle *) er"));
    56225619                        }
    56235620                        I2 A((I2)*er.EdgeVertex(0));
     
    56435640        int NbSwap =0;
    56445641        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"));
    56465643        }
    56475644        int k=0;
     
    56605657                vbegin =v2;
    56615658                if (!v2){
    5662                         throw ErrorException(__FUNCT__,exprintf("!v2"));
     5659                        ISSMERROR(exprintf("!v2"));
    56635660                }
    56645661                det2 = det(*v2,a,b);
     
    56775674                        tc = Previous(tc);
    56785675                        if (!v1 || !v2){
    5679                                 throw ErrorException(__FUNCT__,exprintf("!v1 || !v2"));
     5676                                ISSMERROR(exprintf("!v1 || !v2"));
    56805677                        }
    56815678                        Icoor2 detss = 0,l=0,ks;
    56825679                        while ((ks=SwapForForcingEdge(  va,  vb, tc, detss, det1,det2,NbSwap)))
    56835680                         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));
    56855682                         }
    56865683                        Vertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1);
     
    57015698                k++;
    57025699                if (k>=2000){
    5703                         throw ErrorException(__FUNCT__,exprintf("k>=2000"));
     5700                        ISSMERROR(exprintf("k>=2000"));
    57045701                }
    57055702                if ( vbegin == v2 ) return -1;// error
     
    57735770                short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles
    57745771                if ( a1<0 || a1>=3 ){
    5775                         throw ErrorException(__FUNCT__,exprintf("a1<0 || a1>=3"));
     5772                        ISSMERROR(exprintf("a1<0 || a1>=3"));
    57765773                }
    57775774
     
    57855782                Icoor2 detT = det1+det2;
    57865783                if ((det1<=0 ) || (det2<=0)){
    5787                         throw ErrorException(__FUNCT__,exprintf("(det1<=0 ) || (det2<=0)"));
     5784                        ISSMERROR(exprintf("(det1<=0 ) || (det2<=0)"));
    57885785                }
    57895786                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)"));
    57915788                }
    57925789                Icoor2 ndet1 = bamg::det(s1,sa,s2);
  • issm/trunk/src/c/Bamgx/objects/Vertex.cpp

    r3263 r3332  
    66#include "BamgObjects.h"
    77#include "../shared/shared.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "Vertex"
    118
    129namespace bamg {
     
    4037                        j = NextEdge[jc];
    4138                        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)"));
    4340                        }
    4441                } while ( tbegin != tria);
     
    107104                                j = NextEdge[jc];
    108105                                if (k>=2000){
    109                                         throw ErrorException(__FUNCT__,exprintf("k>=2000"));
     106                                        ISSMERROR(exprintf("k>=2000"));
    110107                                }
    111108                        }while ( tbegin != tria);
     
    166163                }
    167164                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));
    169166                }
    170167
  • issm/trunk/src/c/Bamgx/objects/VertexOnEdge.cpp

    r3263 r3332  
    66#include "VertexOnEdge.h"
    77#include "Triangles.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "VertexOnEdge"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/VertexOnGeom.cpp

    r3263 r3332  
    77#include "Triangles.h"
    88#include "Geometry.h"
    9 
    10 #undef __FUNCT__
    11 #define __FUNCT__ "VertexOnGeom"
    129
    1310namespace bamg {
  • issm/trunk/src/c/Bamgx/objects/VertexOnVertex.cpp

    r3263 r3332  
    66#include "VertexOnVertex.h"
    77#include "Triangles.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "VertexOnVertex"
    118
    129namespace bamg {
  • issm/trunk/src/c/Bamgx/shared/BigPrimeNumber.cpp

    r3280 r3332  
    1 #undef __FUNCT__
    2 #define __FUNCT__ "BigPrimeNumber"
    3 
    41#include "./BigPrimeNumber.h"
    52
  • issm/trunk/src/c/BuildNodeSetsx/BuildNodeSetsx.cpp

    r832 r3332  
    44
    55#include "./BuildNodeSetsx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "NodeSetsx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp

    r1973 r3332  
    55#include "stdio.h"
    66#include "../shared/shared.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "PartitionSets"
     7#include "../include/macros.h"
    108
    119void PartitionSets(Vec* ppartitionb, Vec* ppartitionc,Vec flags_a,Vec flags_b,Vec flags_c,int gsize){
     
    7977                                ccount++;
    8078                        }
    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"));
    8280                       
    8381                        acount++;
  • issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp

    r2333 r3332  
    44
    55#include "./ComputePressurex.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "ComputePressurex"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp

    r2333 r3332  
    44
    55#include "./ConfigureObjectsx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "ConfigureObjectsx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/ContourToMeshx/ContourToMeshx.cpp

    r2591 r3332  
    1010
    1111#include "./ContourToMeshx.h"
    12 
    13 #undef __FUNCT__
    14 #define __FUNCT__  "ContourToMeshx"
    1512
    1613int 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  
    1010
    1111#include "./ContourToMeshx.h"
    12 
    13 #undef __FUNCT__
    14 #define __FUNCT__  "ContourToMeshxt"
    1512
    1613void* ContourToMeshxt(void* vpthread_handle){
  • issm/trunk/src/c/ContourToNodesx/ContourToNodesx.cpp

    r2591 r3332  
    33
    44#include "./ContourToNodesx.h"
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__  "ContourToNodesx"
    85
    96int ContourToNodesx( Vec* pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){
  • issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp

    r2583 r3332  
    44
    55#include "./ControlConstrainx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "ControlConstrainx"
    96
    107#include "../shared/shared.h"
     
    2320                for(i=0;i<numdofnodes;i++){
    2421                        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));
    2623                        }
    2724                        if(!isnan(cm_min)){
  • issm/trunk/src/c/CostFunctionx/CostFunctionx.cpp

    r3180 r3332  
    44
    55#include "./CostFunctionx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "CostFunctionx"
    96
    107#include "../shared/shared.h"
     
    3027
    3128        /*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");
    3330        if (fit==3 && !inputs->IsPresent("surfacearea")){
    3431
  • issm/trunk/src/c/DataSet/DataSet.cpp

    r3180 r3332  
    33 * \brief: implementation of the DataSet class
    44 */
    5 
    65
    76#ifdef HAVE_CONFIG_H
     
    5049}
    5150       
    52 #undef __FUNCT__
    53 #define  __FUNCT__ "DataSet::Echo"
    54 
    5551void DataSet::Echo(){
    5652
     
    5854        vector<Object*>::iterator object;
    5955
    60         if(this==NULL)throw ErrorException(__FUNCT__," trying to echo a NULL dataset");
     56        if(this==NULL)ISSMERROR(" trying to echo a NULL dataset");
    6157
    6258        _printf_("DataSet echo: %i objects\n",objects.size());
     
    7167}
    7268
    73 #undef __FUNCT__
    74 #define  __FUNCT__ "DataSet::DeepEcho"
    75 
    7669void DataSet::DeepEcho(){
    7770
     
    7972        vector<Object*>::iterator object;
    8073
    81         if(this==NULL)throw ErrorException(__FUNCT__," trying to echo a NULL dataset");
     74        if(this==NULL)ISSMERROR(" trying to echo a NULL dataset");
    8275
    8376        _printf_("DataSet echo: %i objects\n",objects.size());
     
    111104        return marshalled_dataset_size;
    112105}
    113 #undef __FUNCT__
    114 #define __FUNCT__ "DataSet::Marshall"
    115106
    116107char* DataSet::Marshall(){
     
    152143         * because this is a nasty error: */
    153144        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!");
    155146                abort();
    156147        }
     
    184175}
    185176
    186 #undef __FUNCT__
    187 #define __FUNCT__ "DataSetDemarshall"
    188177DataSet* DataSetDemarshall(char* marshalled_dataset){
    189178
     
    314303                }
    315304                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));
    317306                }
    318307
     
    322311}
    323312
    324 #undef __FUNCT__
    325 #define __FUNCT__ "DataSet::FindParam"
    326313int   DataSet::FindParam(double* pscalar, char* name){
    327314       
     
    353340}
    354341
    355 #undef __FUNCT__
    356 #define __FUNCT__ "DataSet::FindParam"
    357342int   DataSet::FindParam(int* pinteger,char* name){
    358343       
     
    385370}
    386371
    387 #undef __FUNCT__
    388 #define __FUNCT__ "DataSet::FindParam"
    389372int   DataSet::FindParam(char** pstring,char* name){
    390373       
     
    416399
    417400}
    418 #undef __FUNCT__
    419 #define __FUNCT__ "DataSet::FindParam"
    420401int   DataSet::FindParam(char*** pstringarray,int* pM,char* name){
    421402       
     
    448429
    449430}
    450 #undef __FUNCT__
    451 #define __FUNCT__ "DataSet::FindParam"
    452431int   DataSet::FindParam(double** pdoublearray,int* pM, int* pN,char* name){
    453432       
     
    481460
    482461}
    483 #undef __FUNCT__
    484 #define __FUNCT__ "DataSet::FindParam"
    485462int   DataSet::FindParam(Vec* pvec,char* name){
    486463       
     
    512489
    513490}
    514 #undef __FUNCT__
    515 #define __FUNCT__ "DataSet::FindParam"
    516491int   DataSet::FindParam(Mat* pmat,char* name){
    517492       
     
    544519}
    545520
    546 #undef __FUNCT__
    547 #define __FUNCT__ "DataSet::FindResult"
    548521int   DataSet::FindResult(Vec* presult,char* name){
    549522
     
    912885}
    913886
    914 #undef __FUNCT__
    915 #define __FUNCT__ "DataSet::SetupSpcs"
    916                
    917887void   DataSet::SetupSpcs(DataSet* nodes,Vec yg){
    918888
     
    974944}
    975945
    976 #undef __FUNCT__
    977 #define __FUNCT__  "DataSet::SetupMpcs"
    978946void DataSet::SetupMpcs(Mat Rmg,DataSet* nodes){
    979947
     
    1013981                        if ((node1 && !node2) || (!node1 && node2)){
    1014982                                /*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));
    1016984                        }
    1017985
     
    11441112}
    11451113
    1146 #undef __FUNCT__
    1147 #define __FUNCT__ "DataSet::Sort"
    11481114void DataSet::Sort(){
    11491115
    11501116        /*Only sort if we are not already sorted: */
    11511117        if(!sorted){
    1152                 throw ErrorException(__FUNCT__," not implemented yet!");
     1118                ISSMERROR(" not implemented yet!");
    11531119        }
    11541120}
     
    11611127}
    11621128
    1163 
    1164 
    1165 #undef __FUNCT__
    1166 #define __FUNCT__ "GetObjectById"
    11671129Object* DataSet::GetObjectById(int* poffset,int eid){
    11681130
     
    11711133        int i;
    11721134
    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!");
    11741136
    11751137        /*Carry out a binary search on the sorted_ids: */
    11761138        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));
    11781140        }
    11791141
     
    11871149        return objects[offset];
    11881150}
    1189 
    1190 
    1191 #undef __FUNCT__
    1192 #define __FUNCT__ "DataSet::SetSorting"
    11931151
    11941152void DataSet::SetSorting(int* in_sorted_ids,int* in_id_offsets){
     
    11991157}
    12001158
    1201 #undef __FUNCT__
    1202 #define __FUNCT__ "DataSet::CreateKMatrix"
    12031159void  DataSet::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
    12041160
     
    12231179}
    12241180
    1225 #undef __FUNCT__
    1226 #define __FUNCT__ "DataSet::CreatePVector"
    12271181void  DataSet::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){
    12281182
     
    12471201}
    12481202
    1249 #undef __FUNCT__               
    1250 #define __FUNCT__ "UpdateFromInputs"
    12511203void  DataSet::UpdateFromInputs(void* inputs){
    12521204
     
    12821234}
    12831235
    1284 
    1285 #undef __FUNCT__
    1286 #define __FUNCT__ "DataSet::PenaltyCreateKMatrix"
    12871236void  DataSet::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    12881237
     
    13011250}
    13021251
    1303 #undef __FUNCT__
    1304 #define __FUNCT__ "DataSet::PenaltyCreatePVector"
    13051252void  DataSet::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    13061253
     
    13191266}
    13201267
    1321 #undef __FUNCT__
    1322 #define __FUNCT__ "RiftIsPresent"
    13231268int   DataSet::RiftIsPresent(){
    13241269
     
    13481293}
    13491294
    1350 #undef __FUNCT__
    1351 #define __FUNCT__ "MeltingIsPresent"
    13521295int   DataSet::MeltingIsPresent(){
    13531296
     
    13741317}
    13751318
    1376 #undef __FUNCT__
    1377 #define __FUNCT__ "MeltingConstraints"
    13781319void  DataSet::MeltingConstraints(int* pconverged, int* pnum_unstable_constraints,void* inputs,int analysis_type,int sub_analysis_type){
    13791320
     
    14171358}
    14181359
    1419 #undef __FUNCT__
    1420 #define __FUNCT__ "DataSet::Copy"
    14211360DataSet*   DataSet::Copy(void){
    14221361
  • issm/trunk/src/c/Dofx/Dofx.cpp

    r2333 r3332  
    44
    55#include "./Dofx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Dofx"
    96
    107#include "../shared/shared.h"
     
    3633        /*First, recover number of grids from parameters: */
    3734        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");
    3936
    4037        /*Recover number of dofs per node: */
    4138        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");
    4340
    4441        /*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  
    44
    55#include "./Dux.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Dux"
    96
    107#include "../shared/shared.h"
     
    3229
    3330        /*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");
    3532        if (fit==3 && !inputs->IsPresent("surfacearea")){
    3633
  • issm/trunk/src/c/ElementConnectivityx/ElementConnectivityx.cpp

    r1105 r3332  
    99
    1010#include "./ElementConnectivityx.h"
    11 
    12 #undef __FUNCT__
    13 #define __FUNCT__ "ElementConnectivityx"
    1411
    1512#include "../shared/shared.h"
  • issm/trunk/src/c/FieldDepthAveragex/FieldDepthAveragex.cpp

    r2333 r3332  
    44
    55#include "./FieldDepthAveragex.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "FieldDepthAveragex"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/FieldExtrudex/FieldExtrudex.cpp

    r2333 r3332  
    44
    55#include "./FieldExtrudex.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "FieldExtrudex"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/Gradjx/Gradjx.cpp

    r2333 r3332  
    44
    55#include "./Gradjx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Gradjx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/HoleFillerx/HoleFillerx.cpp

    r3110 r3332  
    44 * for more details.
    55 */
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "HoleFillerx"
    96
    107#include <stdio.h>
  • issm/trunk/src/c/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp

    r2578 r3332  
    99#endif
    1010
    11 
    1211#include "./InterpFromGridToMeshx.h"
    1312#include "../shared/shared.h"
    14 
    15 #undef __FUNCT__
    16 #define __FUNCT__ "InterpFromGridToMeshx"
    17 
     13#include "../include/macros.h"
    1814
    1915int 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) {
     
    3935        /*Some checks on arguments: */
    4036        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.");
    4238        }
    4339        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)");
    4541        }
    4642        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)");
    4844        }
    4945
     
    7167        }
    7268        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.");
    7470        }
    7571
  • issm/trunk/src/c/InterpFromGridToMeshx/InterpFromGridToMeshxt.cpp

    r2550 r3332  
    55#include "./InterpFromGridToMeshx.h"
    66#include "../shared/shared.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "InterpFromGridToMeshxt"
    107
    118void* InterpFromGridToMeshxt(void* vpthread_handle){
  • issm/trunk/src/c/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp

    r2333 r3332  
    55#include "./InterpFromMeshToGridx.h"
    66#include "../shared/shared.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "InterpFromMeshToGridx"
     7#include "../include/macros.h"
    108
    119void 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) {
     
    3533        /*some checks*/
    3634        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");
    3836        }
    3937
     
    4644        }
    4745        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)!");
    4947        }
    5048
  • issm/trunk/src/c/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r3301 r3332  
    33
    44#include "./InterpFromMeshToMesh2dx.h"
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__ "InterpFromMeshToMesh2dx"
    85
    96#include "../shared/shared.h"
     
    3734        /*Checks*/
    3835        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"));
    4037        }
    4138        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));
    4340        }
    4441
     
    104101                        for (j=0;j<data_cols;j++){
    105102                                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));
    107104                                }
    108105                                data_interp[i*data_cols+j]=data[data_cols*it+j];
  • issm/trunk/src/c/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp

    r2362 r3332  
    55#include "./InterpFromMeshToMesh3dx.h"
    66#include "../shared/shared.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "InterpFromMeshToMesh3dx"
     7#include "../include/macros.h"
    108
    119int 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) {
     
    2927        /*some checks*/
    3028        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");
    3230        }
    3331
     
    4341        }
    4442        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)!");
    4644        }
    4745
  • issm/trunk/src/c/MassFluxx/MassFluxx.cpp

    r2333 r3332  
    44
    55#include "./MassFluxx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "MassFluxx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp

    r1 r3332  
    44
    55#include "./Mergesolutionfromftogx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Mergesolutionfromftogx"
    96
    107void    Mergesolutionfromftogx( Vec* pug, Vec uf, Mat Gmn, Vec ys, NodeSets* nodesets){
  • issm/trunk/src/c/MeshPartitionx/MeshPartitionx.cpp

    r3067 r3332  
    22 * \brief partition elements and grids across a cluster of size numprocs.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "MeshPartitionx"
    74
    85#include "./MeshPartitionx.h"
     
    118#include "../toolkits/toolkits.h"
    129#include "../EnumDefinitions/EnumDefinitions.h"
    13 
    1410
    1511int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofgrids,double* elements,
  • issm/trunk/src/c/Misfitx/Misfitx.cpp

    r3180 r3332  
    44
    55#include "./Misfitx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Misfitx"
    96
    107#include "../shared/shared.h"
     
    3027
    3128        /*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");
    3330        if (fit==3 && !inputs->IsPresent("surfacearea")){
    3431
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp

    r2715 r3332  
    22 * CreateConstraintsBalancedthickness.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsBalancedthickness"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateElementsNodesAndMaterialsBalancedthickness.cpp

    r2715 r3332  
    22 * CreateElementsNodesAndMaterialsBalancedthickness.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsBalancedthickness"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateLoadsBalancedthickness.cpp

    r2715 r3332  
    11/*! \file CreateLoadsBalancedthickness.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsBalancedthickness"
    63
    74#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateParametersBalancedthickness.cpp

    r2715 r3332  
    22 * \brief driver for creating parameters dataset, for prognostic analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersBalancedthickness"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateConstraintsBalancedvelocities.cpp

    r2722 r3332  
    22 * CreateConstraintsBalancedvelocities.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsBalancedvelocities"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateElementsNodesAndMaterialsBalancedvelocities.cpp

    r2722 r3332  
    22 * CreateElementsNodesAndMaterialsBalancedvelocities.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsBalancedvelocities"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateLoadsBalancedvelocities.cpp

    r2722 r3332  
    11/*! \file CreateLoadsBalancedvelocities.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsBalancedvelocities"
    63
    74#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateParametersBalancedvelocities.cpp

    r2722 r3332  
    22 * \brief driver for creating parameters dataset, for prognostic analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersBalancedvelocities"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp

    r3203 r3332  
    22 * \brief driver for creating parameters dataset, for control analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParameters"
    74
    85#include "../../DataSet/DataSet.h"
     
    118#include "../../objects/objects.h"
    129#include "../../shared/shared.h"
     10#include "../../include/macros.h"
    1311#include "../IoModel.h"
    1412
     
    6058                if (strcmp(iomodel->control_type,"drag")==0)   param->SetDouble(0);
    6159                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));
    6361                parameters->AddObject(param);
    6462
  • issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp

    r3086 r3332  
    99#endif
    1010
    11 #undef __FUNCT__
    12 #define __FUNCT__ "CreateElementsNodesAndMaterials"
    13 
    1411#include "./IoModel.h"
    1512#include "../shared/shared.h"
     13#include "../include/macros.h"
    1614#include "../EnumDefinitions/EnumDefinitions.h"
    1715
     
    104102        else{
    105103
    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!"));
    107105
    108106        }
  • issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp

    r3201 r3332  
    22 * \brief general driver for creating parameters dataset
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParameters"
    74
    85#include "../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r2333 r3332  
    22 * CreateConstraintsDiagnosticHoriz.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsDiagnosticHoriz"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r2333 r3332  
    22 * CreateElementsNodesAndMaterialsDiagnosticHoriz.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticHoriz"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r3201 r3332  
    11/*! \file CreateLoadsDiagnosticHoriz.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsDiagnosticHoriz"
    63
    74#include "../../DataSet/DataSet.h"
     
    150147                }
    151148                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)));
    153150                }
    154151
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateParametersDiagnosticHoriz.cpp

    r2333 r3332  
    22 * \brief driver for creating parameters dataset, for diagnostic horiz analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersDiagnosticHoriz"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r2333 r3332  
    22 * CreateConstraintsDiagnosticHutter.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsDiagnosticHutter"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticHutter"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp

    r1835 r3332  
    22 */
    33
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsDiagnosticHutter"
    64
    75#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateConstraintsDiagnosticStokes.cpp

    r2333 r3332  
    22 * CreateConstraintsDiagnosticStokes.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsDiagnosticStokes"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp

    r2333 r3332  
    22 * CreateElementsNodesAndMaterialsDiagnosticStokes.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticStokes"
    74
    85#include "../../DataSet/DataSet.h"
     
    118#include "../../objects/objects.h"
    129#include "../../shared/shared.h"
     10#include "../../include/macros.h"
    1311#include "../../MeshPartitionx/MeshPartitionx.h"
    1412#include "../IoModel.h"
    1513
    16 
    1714void    CreateElementsNodesAndMaterialsDiagnosticStokes(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
    18 
    1915
    2016       
     
    158154        /*2d mesh: */
    159155        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!");
    163157        }
    164158        else{ //        if (strcmp(meshtype,"2d")==0)
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r3105 r3332  
    11/*! \file CreateLoadsDiagnosticStokes.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsDiagnosticStokes"
    63
    74#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsDiagnosticHoriz"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsDiagnosticVert"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp

    r1834 r3332  
    22 */
    33
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsDiagnosticVert"
    64
    75#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/IoModel.cpp

    r3203 r3332  
    287287  --------------------------------------------------*/
    288288
    289 #undef __FUNCT__
    290 #define __FUNCT__ "IoModelInit"
    291 
    292289int     IoModelInit(IoModel** piomodel,ConstDataHandle iomodel_handle){
    293290
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateConstraintsMelting.cpp

    r1834 r3332  
    22 * CreateConstraintsMelting.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsMelting"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp

    r2333 r3332  
    22 * CreateElementsNodesAndMaterialsMelting.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsMelting"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r2333 r3332  
    11/*! \file CreateLoadsMelting.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsMelting"
    63
    74#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp

    r2333 r3332  
    22 * \brief driver for creating parameters dataset, for diagnostic horiz analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersMelting"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsPrognostic"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateElementsNodesAndMaterialsPrognostic.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsPrognostic"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp

    r1834 r3332  
    22 */
    33
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsPrognostic"
    64
    75#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersPrognostic"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp

    r3043 r3332  
    22 * \brief general driver for creating parameters dataset
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersQmu"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateConstraintsSlopeCompute.cpp

    r1833 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsSlopeCompute"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateElementsNodesAndMaterialsSlopeCompute.cpp

    r2333 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsSlopeCompute"
    75
    86#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateLoadsSlopeCompute.cpp

    r1833 r3332  
    22 */
    33
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsSlopeCompute"
    64
    75#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r2333 r3332  
    22 * CreateConstraintsThermal.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateConstraintsThermal"
    74
    85#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp

    r2333 r3332  
    22 * CreateElementsNodesAndMaterialsThermal.c:
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateElementsNodesAndMaterialsThermal"
    74
    85#include "../../DataSet/DataSet.h"
     
    1411#include "../IoModel.h"
    1512
    16 #undef __FUNCT__
    17 #define __FUNCT__ "CreateElementsNodesAndMaterialsThermal"
    1813void    CreateElementsNodesAndMaterialsThermal(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
    1914
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r2333 r3332  
    11/*! \file CreateLoadsThermal.c:
    22 */
    3 
    4 #undef __FUNCT__
    5 #define __FUNCT__ "CreateLoadsThermal"
    63
    74#include "../../DataSet/DataSet.h"
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp

    r2358 r3332  
    22 * \brief driver for creating parameters dataset, for diagnostic horiz analysis.
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "CreateParametersThermal"
    74
    85#include "../../DataSet/DataSet.h"
     
    118#include "../../objects/objects.h"
    129#include "../../shared/shared.h"
     10#include "../../include/macros.h"
    1311#include "../IoModel.h"
    1412
     
    8381                param= new Param(count,"t_g",DOUBLEVEC);
    8482                if(temperature) param->SetDoubleVec(temperature,iomodel->numberofnodes,1);
    85                 else throw ErrorException(__FUNCT__,exprintf("Missing initial temperature"));
     83                else ISSMERROR(exprintf("Missing initial temperature"));
    8684                parameters->AddObject(param);
    8785
  • issm/trunk/src/c/MpcNodesx/MpcNodesx.cpp

    r1 r3332  
    44
    55#include "./MpcNodesx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "MpcNodesx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/NodeConnectivityx/NodeConnectivityx.cpp

    r2263 r3332  
    1212
    1313#include "./NodeConnectivityx.h"
    14 
    15 #undef __FUNCT__
    16 #define __FUNCT__ "NodeConnectivityx"
    1714
    1815#include "../shared/shared.h"
     
    7471         * warn the user to increase the connectivity width: */
    7572        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 (",
    7774                                        *(connectivity+width*i+maxels),")! increase width of connectivity table"));
    7875        }
  • issm/trunk/src/c/NormalizeConstraintsx/NormalizeConstraintsx.cpp

    r832 r3332  
    66
    77#include "../shared/shared.h"
    8 
    9 #undef __FUNCT__
    10 #define __FUNCT__ "NormalizeConstraintsx"
    118
    129void NormalizeConstraintsx( Mat* pGmn, Mat Rmg, NodeSets* nodesets){
  • issm/trunk/src/c/Orthx/Orthx.cpp

    r236 r3332  
    44
    55#include "./Orthx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Orthx"
    96
    107void    Orthx( Vec* pnewgradj, Vec gradj, Vec oldgradj){
  • issm/trunk/src/c/OutputRiftsx/OutputRiftsx.cpp

    r1805 r3332  
    55
    66#include "./OutputRiftsx.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "OutputRiftsx"
    107
    118#include "../shared/shared.h"
  • issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp

    r3201 r3332  
    55#include "./PenaltyConstraintsx.h"
    66#include "./RiftConstraints.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "PenaltyConstraintsx"
    107
    118#include "../shared/shared.h"
  • issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp

    r3201 r3332  
    1010#define _ZIGZAGCOUNTER_
    1111
    12 #undef __FUNCT__
    13 #define __FUNCT__ "RiftConstrain"
    1412int RiftConstraints(int* pconverged, int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int min_mechanical_constraints,int analysis_type,int sub_analysis_type){
    1513
     
    3735}
    3836
    39 #undef __FUNCT__
    40 #define __FUNCT__ "IsMaterialStable"
    4137int IsMaterialStable(DataSet* loads,ParameterInputs* inputs,int analysis_type){
    4238
     
    7066}
    7167
    72 #undef __FUNCT__
    73 #define __FUNCT__ "RiftIsPresent"
    74 
    7568int RiftIsPresent(DataSet* loads){
    7669
     
    9891        return found;
    9992}
    100 
    101 #undef __FUNCT__
    102 #define __FUNCT__ "IsPreStable"
    10393
    10494int IsPreStable(DataSet* loads){
     
    140130}
    141131
    142 #undef __FUNCT__
    143 #define __FUNCT__ "SetPreStable"
    144 
    145132int SetPreStable(DataSet* loads){
    146133
     
    162149        }
    163150}
    164 
    165 #undef __FUNCT__
    166 #define __FUNCT__ "PreConstrain"
    167151
    168152int PreConstrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){
     
    201185}
    202186
    203 #undef __FUNCT__
    204 #define __FUNCT__ "Constrain"
    205 
    206187int Constrain(int* pnum_unstable_constraints,DataSet* loads,ParameterInputs* inputs,int analysis_type){
    207188
     
    239220}
    240221
    241 #undef __FUNCT__
    242 #define __FUNCT__ "FreezeConstraints"
    243 
    244222void FreezeConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){
    245223
     
    263241}
    264242
    265 #undef __FUNCT__
    266 #define __FUNCT__ "IsFrozen"
    267243int IsFrozen(DataSet* loads){
    268244
     
    297273}
    298274
    299 #undef __FUNCT__
    300 #define __FUNCT__ "MaxPenetrationInInputs"
    301 
    302275int MaxPenetrationInInputs(DataSet* loads,ParameterInputs* inputs,int analysis_type){
    303276
     
    341314        inputs->Add("max_penetration",max_penetration);
    342315}
    343 
    344 
    345 #undef __FUNCT__
    346 #define __FUNCT__ "PotentialUnstableConstraints"
    347316
    348317int PotentialUnstableConstraints(DataSet* loads,ParameterInputs* inputs,int analysis_type){
  • issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp

    r2333 r3332  
    44
    55#include "./PenaltySystemMatricesx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "PenaltySystemMatricesx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/ProcessParamsx/ProcessParamsx.cpp

    r2496 r3332  
    88
    99#include "./ProcessParamsx.h"
    10 
    11 #undef __FUNCT__
    12 #define __FUNCT__ "ProcessParamsx"
    1310
    1411#include "../shared/shared.h"
  • issm/trunk/src/c/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp

    r2888 r3332  
    33
    44#include "./PropagateFlagsFromConnectivityx.h"
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__ "PropagateFlagsFromConnectivityx"
    85
    96#include "../shared/shared.h"
  • issm/trunk/src/c/Qmux/DakotaResponses.cpp

    r3169 r3332  
    1111#include "../DataSet/DataSet.h"   
    1212#include "../shared/shared.h"
     13#include "../include/macros.h"
    1314#include "../EnumDefinitions/EnumDefinitions.h"
    1415#include "../MassFluxx/MassFluxx.h"
    1516#include "../Misfitx/Misfitx.h"
    1617
    17 #undef __FUNCT__
    18 #define __FUNCT__ "DakotaResponses"
    1918void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,Model* model,DataSet* results,DataSet* processed_results,ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
    2019
     
    4039               
    4140                        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");
    4342
    4443                        min_vel=vel[0];
     
    5958
    6059                        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");
    6261
    6362                        max_vel=vel[0];
     
    7675                       
    7776                        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");
    7978
    8079                        min_vx=vx[0];
     
    9392                       
    9493                        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");
    9695
    9796                        max_vx=vx[0];
     
    110109                       
    111110                        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");
    113112
    114113                        max_abs_vx=fabs(vx[0]);
     
    127126                       
    128127                        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");
    130129
    131130                        min_vy=vy[0];
     
    144143                       
    145144                        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");
    147146
    148147                        max_vy=vy[0];
     
    161160                       
    162161                        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");
    164163
    165164                        max_abs_vy=fabs(vy[0]);
     
    178177                       
    179178                        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");
    181180
    182181                        min_vz=vz[0];
     
    195194                       
    196195                        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");
    198197
    199198                        max_vz=vz[0];
     
    212211                       
    213212                        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");
    215214
    216215                        max_abs_vz=fabs(vz[0]);
     
    257256                        found=results->FindResult(&u_g,"u_g");
    258257                        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");
    260259
    261260                        /*Add to inputs: */
     
    292291                        /*retrieve velocities: */
    293292                        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");
    295294                        VecToMPISerial(&ug_serial,ug);
    296295               
     
    312311                        /*retrieve qmu_mass_flux_segments: */
    313312                        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");
    315314                       
    316315                        param->GetParameterValue(&segments);
     
    329328                else{
    330329                        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!"));
    332331                }
    333332        }
  • issm/trunk/src/c/Qmux/Qmux.cpp

    r2048 r3332  
    2727 */
    2828
    29 
    30 
    3129#ifdef HAVE_CONFIG_H
    3230#include "config.h"
     
    3432#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    3533#endif
    36 
    37 
    38 #undef __FUNCT__
    39 #define __FUNCT__ "Qmux"
    4034
    4135#include "./Qmux.h"
  • issm/trunk/src/c/Qmux/SpawnCore.cpp

    r2048 r3332  
    99#endif
    1010
    11 #undef __FUNCT__
    12 #define __FUNCT__ "SpawnCore"
    1311
    1412#include "../objects/objects.h"
  • issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp

    r3056 r3332  
    2525#endif
    2626
    27 #undef __FUNCT__
    28 #define __FUNCT__ "SpawnCoreParallel"
    2927
    3028#include "../objects/objects.h"
     
    6361        /*First off, recover the response descriptors for the response functions: */
    6462        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!");
    6664
    6765        param->GetParameterValue(&responses_descriptors);
     
    156154
    157155        }
    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!"));
    159157       
    160158               
  • issm/trunk/src/c/Qmux/SpawnCoreSerial.cpp

    r1842 r3332  
    1111#endif
    1212
    13 #undef __FUNCT__
    14 #define __FUNCT__ "SpawnCoreSerial"
    1513
    1614#include "../objects/objects.h"
  • issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp

    r3223 r3332  
    99#endif
    1010
    11 
    1211#include "./Reduceloadfromgtofx.h"
    13 
    14 #undef __FUNCT__
    15 #define __FUNCT__ "Reduceloadfromgtofx"
    1612
    1713void    Reduceloadfromgtofx( Vec* ppf, Vec pg, Mat G_mn, Mat Kfs, Vec y_s, NodeSets* nodesets){
  • issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp

    r1 r3332  
    44
    55#include "./Reducematrixfromgtofx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Reducematrixfromgtofx"
    96
    107void Reducematrixfromgtofx( Mat* pKff, Mat* pKfs,Mat Kgg,Mat Gmn,NodeSets* nodesets){
  • issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp

    r3223 r3332  
    99#endif
    1010
    11 #undef __FUNCT__
    12 #define __FUNCT__ "Reducematrixfromgton"
    13 
    1411#include "../toolkits/toolkits.h"
    15 
    1612
    1713void  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  
    55
    66#include "./Reducevectorgtofx.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "Reducevectorgtofx"
    107
    118void Reducevectorgtofx(Vec* puf, Vec ug, NodeSets* nodesets){
  • issm/trunk/src/c/Reducevectorgtosx/Reducevectorgtosx.cpp

    r304 r3332  
    55
    66#include "./Reducevectorgtosx.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "Reducevectorgtosx"
    107
    118void Reducevectorgtosx( Vec* pys, Vec* pys0, Vec yg, NodeSets* nodesets){
  • issm/trunk/src/c/Solverx/Solverx.cpp

    r3226 r3332  
    55#include "./Solverx.h"
    66
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Solverx"
    9 
    107#include "../shared/shared.h"
     8#include "../include/macros.h"
    119
    1210#ifdef HAVE_CONFIG_H
     
    104102        KSPGetIterationNumber(ksp,&iteration_number);
    105103        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));
    107105        }
    108106        else{
  • issm/trunk/src/c/SpcNodesx/SpcNodesx.cpp

    r2316 r3332  
    44
    55#include "./SpcNodesx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "SpcNodesx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/SurfaceAreax/SurfaceAreax.cpp

    r3180 r3332  
    44
    55#include "./SurfaceAreax.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "SurfaceAreax"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp

    r2333 r3332  
    44
    55#include "./SystemMatricesx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "SystemMatricesx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/UpdateFromInputsx/UpdateFromInputsx.cpp

    r2333 r3332  
    44
    55#include "./UpdateFromInputsx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "UpdateFromInputsx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/UpdateGeometryx/UpdateGeometryx.cpp

    r2333 r3332  
    44
    55#include "./UpdateGeometryx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "UpdateGeometryx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/UpdateNodePositionsx/UpdateNodePositionsx.cpp

    r2333 r3332  
    44
    55#include "./UpdateNodePositionsx.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "UpdateNodePositionsx"
    96
    107#include "../shared/shared.h"
  • issm/trunk/src/c/io/FetchData.cpp

    r2333 r3332  
    1111#include "./io.h"
    1212#include "../shared/shared.h"
    13 
    14 #undef __FUNCT__
    15 #define __FUNCT__ "FetchData"
    16 
    17 
     13#include "../include/macros.h"
    1814
    1915/***************** **************** **************** **************** **************** **************** **************** **************** **************** ****************
     
    5046                else{
    5147                        /*This is an error: we don't have the correct input!: */
    52                         throw ErrorException(__FUNCT__,"  wrong input parameter!");
     48                        ISSMERROR("  wrong input parameter!");
    5349                }
    5450        }
     
    8581        else{
    8682                /*This is an error: we don't have the correct input!: */
    87                 throw ErrorException(__FUNCT__,"wrong input parameter");
     83                ISSMERROR("wrong input parameter");
    8884        }
    8985
     
    120116        else{
    121117                /*This is an error: we don't have the correct input!: */
    122                 throw ErrorException(__FUNCT__,"wrong input parameter");
     118                ISSMERROR("wrong input parameter");
    123119        }
    124120
     
    145141        else{
    146142                /*This is an error: we don't have the correct input!: */
    147                 throw ErrorException(__FUNCT__,"wrong input parameter");
     143                ISSMERROR("wrong input parameter");
    148144        }
    149145
     
    169165        else{
    170166                /*This is an error: we don't have the correct input!: */
    171                 throw ErrorException(__FUNCT__,"wrong input parameter");
     167                ISSMERROR("wrong input parameter");
    172168        }
    173169
     
    183179        /*Ok, the string should be coming directly from the matlab workspace: */
    184180        if (!mxIsChar(dataref)){
    185                 throw ErrorException(__FUNCT__,"input data_type is not a string!");
     181                ISSMERROR("input data_type is not a string!");
    186182        }
    187183        else{
     
    203199
    204200        if (!mxIsDouble(dataref)){
    205                 throw ErrorException(__FUNCT__,"input data_type is not a scalar!");
     201                ISSMERROR("input data_type is not a scalar!");
    206202        }
    207203        else{
     
    219215
    220216        if (!mxIsDouble(dataref)){
    221                 throw ErrorException(__FUNCT__,"input data_type is not a scalar!");
     217                ISSMERROR("input data_type is not a scalar!");
    222218        }
    223219        else{
     
    251247        /*numberofelements: */
    252248        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 ");
    254250        }
    255251
     
    257253
    258254        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 ");
    260256        }
    261257        MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD);
     
    267263                /*Read matrix on node 0, then broadcast: */
    268264                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 ");
    270266                }
    271267               
     
    292288        /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    293289        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 ");
    295291        }
    296292
     
    304300                /*Read string on node 0, then broadcast: */
    305301                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 ");
    307303                }
    308304                MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD);
     
    329325        /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
    330326        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 ");
    332328        }
    333329        MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
     
    348344        /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
    349345        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 ");
    351347        }
    352348
  • issm/trunk/src/c/io/FetchNodeSets.cpp

    r2333 r3332  
    88#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    99#endif
    10 
    11 #undef __FUNCT__
    12 #define __FUNCT__  "FetchNodeSets"
    1310
    1411#ifdef _SERIAL_
  • issm/trunk/src/c/io/FetchParams.cpp

    r2714 r3332  
    99#endif
    1010
    11 
    1211#ifdef _SERIAL_
    1312
     
    1716#include "./io.h"
    1817#include "../shared/shared.h"
    19 
    20 #undef __FUNCT__
    21 #define __FUNCT__  "FetchParams"
     18#include "../include/macros.h"
    2219
    2320void FetchParams(DataSet** pparameters, DataHandle dataref){
     
    6663
    6764                        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,")"));
    6966                        }
    7067
     
    150147
    151148                }
    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));
    153150        }
    154151
  • issm/trunk/src/c/io/IoModelFetchData.cpp

    r2333 r3332  
    1212#include "../ModelProcessorx/IoModel.h"
    1313#include "../shared/shared.h"
    14 
    15 
     14#include "../include/macros.h"
    1615
    1716#ifdef _SERIAL_
     
    125124        MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD);
    126125
    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));
    128127
    129128        return fid;
  • issm/trunk/src/c/io/ParameterInputsInit.cpp

    r246 r3332  
    1414#include "../include/macros.h"
    1515#include "./io.h"
    16 
    17 #undef __FUNCT__
    18 #define __FUNCT__ "ParameterInputsInit"
    1916
    2017#ifdef _SERIAL_
     
    8582                                break;
    8683                        default:
    87                                 throw ErrorException(__FUNCT__,exprintf("%s%i"," unknow parameter input type ",type));
     84                                ISSMERROR(exprintf("%s%i"," unknow parameter input type ",type));
    8885                }
    8986
  • issm/trunk/src/c/io/WriteData.cpp

    r3324 r3332  
    1212#include "./shared/shared.h"
    1313#include "./io.h"
    14 
    15 #undef __FUNCT__
    16 #define __FUNCT__  "WriteData"
    1714
    1815#ifdef _SERIAL_
  • issm/trunk/src/c/io/WriteDataToDisk.cpp

    r1 r3332  
    22 * \brief
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "WriteDataToDisk"
    74
    85#include "stdio.h"
     
    6865        }
    6966        else{
    70                 _printf_("%s%s\n",__FUNCT__," error message: data type not supported yet!");
     67                ISSMERROR("data type not supported yet!");
    7168        }
    7269}
  • issm/trunk/src/c/io/WriteNodeSets.cpp

    r1439 r3332  
    88#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    99#endif
    10 
    11 #undef __FUNCT__
    12 #define __FUNCT__  "WriteNodeSets"
    1310
    1411#ifdef _SERIAL_
  • issm/trunk/src/c/io/WriteParams.cpp

    r2333 r3332  
    1616#include "./io.h"
    1717#include "../shared/shared.h"
     18#include "../include/macros.h"
    1819
    19 #undef __FUNCT__
    20 #define __FUNCT__  "WriteParams"
    2120void WriteParams(DataHandle* pdataref,DataSet* parameters){
    2221
     
    143142                                break;
    144143                        default:
    145                                 throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type: ",param->GetType()));
     144                                ISSMERROR(exprintf("%s%i","unknown parameter type: ",param->GetType()));
    146145                                break;
    147146                }
  • issm/trunk/src/c/io/pfclose.cpp

    r3143 r3332  
    1111#include "stdio.h"
    1212#include "../shared/shared.h"
    13 
    14 #undef __FUNCT__
    15 #define __FUNCT__ "pfclose"
     13#include "../include/macros.h"
    1614
    1715void pfclose(FILE* fid,char* filename){
     
    2018        extern int my_rank;
    2119        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));
    2321        }
    2422}
  • issm/trunk/src/c/io/pfopen.cpp

    r3142 r3332  
    1111#include "stdio.h"
    1212#include "../shared/shared.h"
    13 
    14 #undef __FUNCT__
    15 #define __FUNCT__ "pfopen"
     13#include "../include/macros.h"
    1614
    1715FILE* pfopen(char* filename,char* format){
     
    2321        if(my_rank==0){
    2422                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"));
    2624        }
    2725
  • issm/trunk/src/c/objects/BamgOpts.cpp

    r3329 r3332  
    11#include "stdio.h"
    22#include "../shared/shared.h"
     3#include "../include/macros.h"
    34#include "./BamgOpts.h"
    45
     
    4041        int i;
    4142
    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"));};
    5859
    5960}
  • issm/trunk/src/c/objects/Beam.cpp

    r3180 r3332  
    1616#include "../DataSet/DataSet.h"
    1717#include "../include/typedefs.h"
    18 
     18#include "../include/macros.h"
    1919
    2020/*Object constructors and destructor*/
     
    167167/*Object functions*/
    168168/*FUNCTION Beam ComputePressure{{{1*/
    169 #undef __FUNCT__
    170 #define __FUNCT__ "Beam::ComputePressure"
    171169void  Beam::ComputePressure(Vec p_g){
    172170
     
    197195/*}}}*/
    198196/*FUNCTION Beam Configure{{{1*/
    199 #undef __FUNCT__
    200 #define __FUNCT__ "Beam::Configure"
    201197void  Beam::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){
    202198
     
    234230/*}}}*/
    235231/*FUNCTION Beam CostFunction{{{1*/
    236 #undef __FUNCT__
    237 #define __FUNCT__ "Beam::CostFunction"
    238232double Beam::CostFunction(void*,int,int){
    239         throw ErrorException(__FUNCT__," not supported yet!");
     233        ISSMERROR(" not supported yet!");
    240234}
    241235/*}}}*/
    242236/*FUNCTION Beam CreateKMatrix{{{1*/
    243 #undef __FUNCT__
    244 #define __FUNCT__ "Beam::CreateKMatrix"
    245237
    246238void  Beam::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    254246                }
    255247                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"));
    257249        }
    258250        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"));
    260252        }
    261253
     
    263255/*}}}*/
    264256/*FUNCTION Beam CreateKMatrixDiagnosticHutter{{{1*/
    265 #undef __FUNCT__
    266 #define __FUNCT__ "Beam::CreateKMatrixDiagnosticHutter"
    267257
    268258void  Beam::CreateKMatrixDiagnosticHutter(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
     
    299289/*}}}*/
    300290/*FUNCTION Beam CreatePVector{{{1*/
    301 #undef __FUNCT__
    302 #define __FUNCT__ "Beam::CreatePVector"
    303291void  Beam::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){
    304292       
     
    309297                }
    310298                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"));
    312300        }
    313301        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"));
    315303        }
    316304
     
    318306/*}}}*/
    319307/*FUNCTION Beam CreatePVectorDiagnosticHutter{{{1*/
    320 #undef __FUNCT__
    321 #define __FUNCT__ "Beam::CreatePVectorDiagnosticHutter"
    322308
    323309void Beam::CreatePVectorDiagnosticHutter( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
     
    370356        //recover extra inputs
    371357        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!");
    373359       
    374360        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!");
    376362
    377363        //Get all element grid data:
     
    434420/*}}}*/
    435421/*FUNCTION Beam DeepEcho{{{1*/
    436 #undef __FUNCT__
    437 #define __FUNCT__ "Beam::DeepEcho"
    438422void Beam::DeepEcho(void){
    439423
     
    461445/*}}}*/
    462446/*FUNCTION Beam Du{{{1*/
    463 #undef __FUNCT__
    464 #define __FUNCT__ "Beam::Du"
    465447void  Beam::Du(_p_Vec*,void*,int,int){
    466         throw ErrorException(__FUNCT__," not supported yet!");
     448        ISSMERROR(" not supported yet!");
    467449}
    468450/*}}}*/
    469451/*FUNCTION Beam Echo {{{1*/
    470 #undef __FUNCT__
    471 #define __FUNCT__ "Beam::Echo"
    472452void Beam::Echo(void){
    473453
     
    502482/*}}}*/
    503483/*FUNCTION Beam GetBedList{{{1*/
    504 #undef __FUNCT__
    505 #define __FUNCT__ "Beam::GetBedList"
    506484void  Beam::GetBedList(double*){
    507         throw ErrorException(__FUNCT__," not supported yet!");
     485        ISSMERROR(" not supported yet!");
    508486}
    509487/*}}}*/
     
    541519/*}}}*/
    542520/*FUNCTION Beam GetJacobianDeterminant{{{1*/
    543 #undef __FUNCT__
    544 #define __FUNCT__ "Beam::GetJacobianDeterminant"
    545521void Beam::GetJacobianDeterminant(double* pJdet,double* z_list, double gauss_coord){
    546522
     
    551527
    552528        if(Jdet<0){
    553                 throw ErrorException(__FUNCT__," negative jacobian determinant!");
     529                ISSMERROR(" negative jacobian determinant!");
    554530        }
    555531       
     
    568544/*}}}*/
    569545/*FUNCTION Beam GetNodalFunctions{{{1*/
    570 #undef __FUNCT__
    571 #define __FUNCT__ "Beam::GetNodalFunctions"
    572546void Beam::GetNodalFunctions(double* l1l2, double gauss_coord){
    573547       
     
    592566/*}}}*/
    593567/*FUNCTION Beam GetOnBed{{{1*/
    594 #undef __FUNCT__
    595 #define __FUNCT__ "Beam::GetOnBed"
    596568int   Beam::GetOnBed(){
    597         throw ErrorException(__FUNCT__," not supported yet!");
     569        ISSMERROR(" not supported yet!");
    598570}
    599571/*}}}*/
    600572/*FUNCTION Beam GetParameterValue{{{1*/
    601 #undef __FUNCT__
    602 #define __FUNCT__ "Beam::GetParameterValue"
    603573void Beam::GetParameterValue(double* pvalue, double* value_list,double gauss_coord){
    604574
     
    611581/*}}}*/
    612582/*FUNCTION Beam GetShelf{{{1*/
    613 #undef __FUNCT__
    614 #define __FUNCT__ "Beam::GetShelf"
    615583int   Beam::GetShelf(){
    616         throw ErrorException(__FUNCT__," not supported yet!");
     584        ISSMERROR(" not supported yet!");
    617585}
    618586/*}}}*/
    619587/*FUNCTION Beam GetThicknessList{{{1*/
    620 #undef __FUNCT__
    621 #define __FUNCT__ "Beam::GetThicknessList"
    622588void  Beam::GetThicknessList(double* thickness_list){
    623         throw ErrorException(__FUNCT__," not supported yet!");
     589        ISSMERROR(" not supported yet!");
    624590}
    625591/*}}}*/
    626592/*FUNCTION Beam Gradj{{{1*/
    627 #undef __FUNCT__
    628 #define __FUNCT__ "Beam::Gradj"
    629593void  Beam::Gradj(_p_Vec*, void*, int, int,char*){
    630         throw ErrorException(__FUNCT__," not supported yet!");
     594        ISSMERROR(" not supported yet!");
    631595}
    632596/*}}}*/
    633597/*FUNCTION Beam GradjB{{{1*/
    634 #undef __FUNCT__
    635 #define __FUNCT__ "Beam::GradjB"
    636598void  Beam::GradjB(_p_Vec*, void*, int, int){
    637         throw ErrorException(__FUNCT__," not supported yet!");
     599        ISSMERROR(" not supported yet!");
    638600}
    639601/*}}}*/
    640602/*FUNCTION Beam GradjDrag{{{1*/
    641 #undef __FUNCT__
    642 #define __FUNCT__ "Beam::GradjDrag"
    643603void  Beam::GradjDrag(_p_Vec*, void*, int,int ){
    644         throw ErrorException(__FUNCT__," not supported yet!");
     604        ISSMERROR(" not supported yet!");
    645605}
    646606/*}}}*/
    647607/*FUNCTION Beam MassFlux{{{1*/
    648 #undef __FUNCT__
    649 #define __FUNCT__ "Beam::MassFlux"
    650608double Beam::MassFlux( double* segment,double* ug){
    651         throw ErrorException(__FUNCT__," not supported yet!");
     609        ISSMERROR(" not supported yet!");
    652610}
    653611/*}}}*/
    654612/*FUNCTION Beam MaticeConfiguration{{{1*/
    655 #undef __FUNCT__
    656 #define __FUNCT__ "Beam::MaticeConfiguration"
    657613void  Beam::MaticeConfiguration(Matice* beam_matice,int beam_matice_offset){
    658614        matice=beam_matice;
     
    661617/*}}}*/
    662618/*FUNCTION Beam MatparConfiguration{{{1*/
    663 #undef __FUNCT__
    664 #define __FUNCT__ "Beam::MatparConfiguration"
    665619void  Beam::MatparConfiguration(Matpar* beam_matpar,int beam_matpar_offset){
    666620
     
    671625/*}}}*/
    672626/*FUNCTION Beam Misfit{{{1*/
    673 #undef __FUNCT__
    674 #define __FUNCT__ "Beam::Misfit"
    675627double Beam::Misfit(void*,int,int){
    676         throw ErrorException(__FUNCT__," not supported yet!");
     628        ISSMERROR(" not supported yet!");
    677629}
    678630/*}}}*/
     
    684636/*}}}*/
    685637/*FUNCTION Beam NodeConfiguration{{{1*/
    686 #undef __FUNCT__
    687 #define __FUNCT__ "Beam::NodeConfiguration"
    688638void  Beam::NodeConfiguration(int* beam_node_ids,Node* beam_nodes[2],int* beam_node_offsets){
    689639
     
    698648/*}}}*/
    699649/*FUNCTION Beam SurfaceArea{{{1*/
    700 #undef __FUNCT__
    701 #define __FUNCT__ "Beam::SurfaceArea"
    702650double Beam::SurfaceArea(void*,int,int){
    703         throw ErrorException(__FUNCT__," not supported yet!");
     651        ISSMERROR(" not supported yet!");
    704652}
    705653/*}}}*/
    706654/*FUNCTION Beam UpdateFromInputs{{{1*/
    707 #undef __FUNCT__
    708 #define __FUNCT__ "Beam::UpdateFromInputs"
    709655void  Beam::UpdateFromInputs(void* vinputs){
    710656
  • issm/trunk/src/c/objects/DofVec.cpp

    r2316 r3332  
    1111#include "./DofVec.h"
    1212#include "../shared/shared.h"
     13#include "../include/macros.h"
    1314#include "../EnumDefinitions/EnumDefinitions.h"
    1415
     
    9899}
    99100       
    100 #undef __FUNCT__
    101 #define __FUNCT__ "DofVec::Echo"
    102101void DofVec::Echo(void){
    103102
     
    111110}
    112111
    113 #undef __FUNCT__
    114 #define __FUNCT__ "DofVec::DeepEcho"
    115112void DofVec::DeepEcho(void){
    116113
     
    206203}
    207204
    208 #undef __FUNCT__
    209 #define __FUNCT__ "DofVec::GetId"
    210205int DofVec::GetId(void){
    211         throw ErrorException(__FUNCT__," no id function for DofVec class");
     206        ISSMERROR(" no id function for DofVec class");
    212207}
    213208
     
    231226}
    232227
    233 #undef __FUNCT__
    234 #define __FUNCT__ "DofVec::GetVecFromDof"
    235228void DofVec::GetVecFromDof(double** pvector,int dof){
    236229
     
    242235        /*check we are not out of bounds: */
    243236        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));
    245238        }
    246239
     
    259252
    260253
    261 #undef __FUNCT__
    262 #define __FUNCT__ "DofVec::GetVecFromDof"
    263254void DofVec::GetVecFromDof(Vec* pvector, int dof){
    264255
     
    269260        /*check we are not out of bounds: */
    270261        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));
    272263        }
    273264
     
    282273}
    283274
    284 #undef __FUNCT__
    285 #define __FUNCT__ "DofVec::GetVecFromDofList"
    286275void DofVec::GetVecFromDofList(double** pvector, int requested_numdofs,int* requested_doflist){
    287276
     
    292281       
    293282        /*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));
    295284
    296285        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));
    298287        }
    299288
     
    314303
    315304
    316 #undef __FUNCT__
    317 #define __FUNCT__ "DofVec::GetVecFromDofList"
    318305void DofVec::GetVecFromDofList(Vec* pvector, int requested_numdofs,int* requested_doflist){
    319306
     
    323310       
    324311        /*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));
    326313
    327314        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));
    329316        }
    330317
     
    341328}
    342329
    343 #undef __FUNCT__
    344 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"
    345330void DofVec::SetValuesFromVecAndDofList(double* serial_vector,int vector_size,int requested_numdofs,int* requested_doflist){
    346331
     
    349334
    350335        /*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));
    352337
    353338        /*Create dofset: */
     
    365350}
    366351
    367 #undef __FUNCT__
    368 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"
    369352void DofVec::SetValuesFromVecAndDofList(Vec vector,int requested_numdofs,int* requested_doflist){
    370353
     
    375358
    376359        /*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));
    378361
    379362        /*Create dofset: */
     
    387370}
    388371
    389 #undef __FUNCT__
    390 #define __FUNCT__ "DofVec::SetValuesFromVecAndDofList"
    391372void DofVec::SetValuesFromVecAndDofList(DofVec* vector,int requested_numdofs,int* requested_doflist){
    392373
     
    397378
    398379        /*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));
    400381
    401382        /*Create dofset: */
  • issm/trunk/src/c/objects/FemModel.cpp

    r2333 r3332  
    1212#include "stdio.h"
    1313#include "../shared/shared.h"
     14#include "../include/macros.h"
    1415
    1516FemModel::FemModel(){
     
    7677}
    7778
    78 #undef __FUNCT__
    79 #define __FUNCT__ "FemModel::Echo"
    8079
    8180void FemModel::Echo(void){
     
    9897
    9998}
    100 #undef __FUNCT__
    101 #define __FUNCT__ "FemModel::DeepEcho"
    10299
    103100void FemModel::DeepEcho(void){
     
    133130
    134131}
    135 #undef __FUNCT__
    136 #define __FUNCT__ "FemModel::GetId"
    137132int   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
    143136int   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
    149140void  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
    155144int   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}
    160147char*   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}
    165150void  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}
    170153int   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}
    175156Object* 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
    182161int FemModel::FindParam(double* pscalar,char* name){
    183162       
     
    185164
    186165}
    187 #undef __FUNCT__
    188 #define __FUNCT__ "FemModel::FindParam"
    189166int FemModel::FindParam(int* pinteger,char* name){
    190167       
     
    193170}
    194171
    195 #undef __FUNCT__
    196 #define __FUNCT__ "FemModel::FindParam"
    197172int FemModel::FindParam(char** pstring,char* name){
    198173       
     
    201176}
    202177
    203 #undef __FUNCT__
    204 #define __FUNCT__ "FemModel::FindParam"
    205178int FemModel::FindParam(char*** pstringarray,int* pM,char* name){
    206179       
     
    209182}
    210183
    211 #undef __FUNCT__
    212 #define __FUNCT__ "FemModel::FindParam"
    213184int FemModel::FindParam(double** pdoublearray,int* pM,int* pN,char* name){
    214185       
     
    217188}
    218189
    219 #undef __FUNCT__
    220 #define __FUNCT__ "FemModel::FindParam"
    221190int FemModel::FindParam(Vec* pvec,char* name){
    222191       
     
    225194}
    226195
    227 #undef __FUNCT__
    228 #define __FUNCT__ "FemModel::FindParam"
    229196int FemModel::FindParam(Mat* pmat,char* name){
    230197       
  • issm/trunk/src/c/objects/Icefront.cpp

    r3159 r3332  
    159159/*Object functions*/
    160160/*FUNCTION Icefront Configure {{{1*/
    161 #undef __FUNCT__
    162 #define __FUNCT__ "Icefront::Configure"
    163161
    164162void  Icefront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
     
    199197/*}}}*/
    200198/*FUNCTION Icefront CreateKMatrix {{{1*/
    201 #undef __FUNCT__
    202 #define __FUNCT__ "Icefront::CreateKMatrix"
    203199
    204200void  Icefront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    211207/*}}}*/
    212208/*FUNCTION Icefront CreatePVector {{{1*/
    213 #undef __FUNCT__
    214 #define __FUNCT__ "Icefront::CreatePVector"
    215209void  Icefront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    216210
     
    233227
    234228                }
    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"));
    236230
    237231        }
    238232        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"));
    240234        }
    241235}
    242236/*}}}*/
    243237/*FUNCTION Icefront CreatePVectorDiagnosticHoriz {{{1*/
    244 #undef __FUNCT__
    245 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHoriz"
    246238void Icefront::CreatePVectorDiagnosticHoriz( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    247239
     
    256248/*}}}*/
    257249/*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/
    258 #undef __FUNCT__
    259 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHorizSegment"
    260250
    261251void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
     
    368358/*}}}*/
    369359/*FUNCTION Icefront CreatePVectorDiagnosticHorizQuad {{{1*/
    370 #undef __FUNCT__
    371 #define __FUNCT__ "Icefont::CreatePVectorDiagnosticHorizQuad"
    372360void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
    373361
     
    413401        /*check icefront is associated to a pentaelem: */
    414402        if(element_type!=PentaEnum()){
    415                 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
     403                ISSMERROR(" quad icefront is associated to a TriaElem!");
    416404        }
    417405        /*Recover material*/
     
    438426       
    439427        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!");
    441429        }
    442430
     
    527515/*}}}*/
    528516/*FUNCTION Icefront CreatePVectorDiagnosticStokes {{{1*/
    529 #undef __FUNCT__
    530 #define __FUNCT__ "Icefont::CreatePVectorDiagnosticStokes"
    531517void Icefront::CreatePVectorDiagnosticStokes( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
    532518
     
    572558        /*check icefront is associated to a pentaelem: */
    573559        if(element_type!=PentaEnum()){
    574                 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
     560                ISSMERROR(" quad icefront is associated to a TriaElem!");
    575561        }
    576562        /*Recover material*/
     
    597583       
    598584        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!");
    600586        }
    601587
     
    778764/*}}}*/
    779765/*FUNCTION Icefront GetDofList{{{1*/
    780 #undef __FUNCT__
    781 #define __FUNCT__ "Icefront::GetDofList"
    782766
    783767void  Icefront::GetDofList(int* doflist,int* pnumberofdofspernode){
     
    825809/*}}}*/
    826810/*FUNCTION Icefront PenaltyCreateKMatrix {{{1*/
    827 #undef __FUNCT__
    828 #define __FUNCT__ "Icefront::PenaltyCreateKMatrix"
    829811void  Icefront::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    830812        /*do nothing: */
     
    832814/*}}}*/
    833815/*FUNCTION Icefront PenaltyCreatePVector{{{1*/
    834 #undef __FUNCT__
    835 #define __FUNCT__ "Icefront::PenaltyCreatePVector"
    836816void  Icefront::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    837817        /*do nothing: */
     
    839819/*}}}*/
    840820/*FUNCTION Icefront QuadPressureLoad {{{1*/
    841 #undef __FUNCT__
    842 #define __FUNCT__ "Icefront::QuadPressureLoad"
    843821void Icefront::QuadPressureLoad(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list,
    844822                                              double* normal1,double* normal2,double* normal3,double* normal4,double* xyz_list){
     
    10621040                        }
    10631041                        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");
    10651043                        }
    10661044
     
    10971075/*}}}*/
    10981076/*FUNCTION Icefront QuadPressureLoadStokes {{{1*/
    1099 #undef __FUNCT__
    1100 #define __FUNCT__ "Icefront::QuadPressureLoadStokes"
    11011077void Icefront::QuadPressureLoadStokes(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list,
    11021078                                              double* normal1,double* normal2,double* normal3,double* normal4,double* xyz_list){
     
    13181294                        }
    13191295                        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");
    13211297                        }
    13221298
     
    13551331/*}}}*/
    13561332/*FUNCTION Icefront SegmentPressureLoad {{{1*/
    1357 #undef __FUNCT__
    1358 #define __FUNCT__ "Icefront::SegmentPressureLoad"
    13591333
    13601334void Icefront::SegmentPressureLoad(double* pe_g,double rho_water,double rho_ice,double gravity, double* thickness_list, double* bed_list, double* normal,double length){
     
    14091383                }
    14101384                else{
    1411                         throw ErrorException(__FUNCT__,exprintf("fill type %i not supported yet",fill));
     1385                        ISSMERROR(exprintf("fill type %i not supported yet",fill));
    14121386                }
    14131387
     
    14261400/*}}}*/
    14271401/*FUNCTION Icefront UpdateFromInputs {{{1*/
    1428 #undef __FUNCT__
    1429 #define __FUNCT__ "Icefront::UpdateFromInputs"
    14301402void  Icefront::UpdateFromInputs(void* vinputs){
    14311403
  • issm/trunk/src/c/objects/Input.cpp

    r3180 r3332  
    9494/*Object marshall*/
    9595/*FUNCTION Input::Demarshall {{{1*/
    96 #undef __FUNCT__
    97 #define __FUNCT__ "Input::Demarshall"
    9896void  Input::Demarshall(char** pmarshalled_dataset){
    99         throw ErrorException(__FUNCT__,"not supported yet!");
     97        ISSMERROR("not supported yet!");
    10098}
    10199/*}}}*/
    102100/*FUNCTION Input::Marshall {{{1*/
    103 #undef __FUNCT__
    104 #define __FUNCT__ "Input::Marshall"
    105101void  Input::Marshall(char** pmarshalled_dataset){
    106         throw ErrorException(__FUNCT__,"not supported yet!");
     102        ISSMERROR("not supported yet!");
    107103}
    108104/*}}}*/
    109105/*FUNCTION Input::MarshallSize {{{1*/
    110 #undef __FUNCT__
    111 #define __FUNCT__ "Input::MarshallSize"
    112106int   Input::MarshallSize(){
    113         throw ErrorException(__FUNCT__,"not supported yet!");
     107        ISSMERROR("not supported yet!");
    114108}
    115109/*}}}*/
     
    164158/*}}}*/
    165159/*FUNCTION Input::Get {{{1*/
    166 #undef __FUNCT__
    167 #define __FUNCT__ "Input::Get"
    168160Vec   Input::Get(int* in_dofs, int in_numdofs){
    169161
     
    179171        int totaldofs=0;
    180172
    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!");
    182174
    183175        /*figure out how many dofs are requested: */
     
    212204/*}}}*/
    213205/*FUNCTION Input::GetId {{{1*/
    214 #undef __FUNCT__
    215 #define __FUNCT__ "Input::GetId"
    216206int   Input::GetId(){
    217         throw ErrorException(__FUNCT__,"not supported yet!");
     207        ISSMERROR("not supported yet!");
    218208}
    219209/*}}}*/
    220210/*FUNCTION Input::GetName {{{1*/
    221 #undef __FUNCT__
    222 #define __FUNCT__ "Input::GetName"
    223211char* Input::GetName(){
    224         throw ErrorException(__FUNCT__,"not supported yet!");
     212        ISSMERROR("not supported yet!");
    225213}
    226214/*}}}*/
     
    264252        nodes=(Node**)vpnodesin;
    265253       
    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"));
    267255       
    268256        /*Ok, we are trying to fill values. values is of size ndof*numnodes.  The dofs
  • issm/trunk/src/c/objects/Matice.cpp

    r2907 r3332  
    22 * \brief: implementation of the Matice object
    33 */
    4 
    54
    65#ifdef HAVE_CONFIG_H
     
    144143/*}}}*/
    145144/*FUNCTION Matice::GetViscosity2d {{{1*/
    146 #undef __FUNCT__
    147 #define __FUNCT__ "MatIce::GetViscosity2d"
    148145void  Matice::GetViscosity2d(double* pviscosity, double* epsilon){
    149146
     
    207204/*}}}*/
    208205/*FUNCTION Matice::GetViscosity3d {{{1*/
    209 #undef __FUNCT__
    210 #define __FUNCT__ "MatIce::GetViscosity3d"
    211206void  Matice::GetViscosity3d(double* pviscosity3d, double* epsilon){
    212207
     
    273268/*}}}*/
    274269/*FUNCTION Matice::GetViscosity3dStokes {{{1*/
    275 #undef __FUNCT__
    276 #define __FUNCT__ "MatIce::GetViscosity3dStokes"
    277270void  Matice::GetViscosity3dStokes(double* pviscosity3d, double* epsilon){
    278271
     
    343336/*}}}*/
    344337/*FUNCTION Matice::GetViscosityComplement {{{1*/
    345 #undef __FUNCT__
    346 #define __FUNCT__ "MatIce::GetViscosityComplement"
    347338void  Matice::GetViscosityComplement(double* pviscosity_complement, double* epsilon){
    348339
     
    405396/*}}}*/
    406397/*FUNCTION Matice::SetB {{{1*/
    407 #undef __FUNCT__
    408 #define __FUNCT__ "Matice::SetB"
    409398void  Matice::SetB(double B_param){
    410399        B=B_param;
     
    412401/*}}}*/
    413402/*FUNCTION Matice::UpdateFromInputs {{{1*/
    414 #undef __FUNCT__
    415 #define __FUNCT__ "Matice::UpdateFromInputs"
    416403void  Matice::UpdateFromInputs(void* inputs){
    417404       
    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  
    245245/*}}}1*/
    246246/*FUNCTION Matpar::UpdateFromInputs {{{1*/
    247 #undef __FUNCT__
    248 #define __FUNCT__ "Matpar::UpdateFromInputs"
    249247void  Matpar::UpdateFromInputs(void* inputs){
    250248       
    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  
    3737/*Object functions*/
    3838/*FUNCTION Model::AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type){{{1*/
    39 #undef __FUNCT__
    40 #define __FUNCT__ "Model::AddFormulation"
    4139void  Model::AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type){
    4240
     
    112110/*}}}1*/
    113111/*FUNCTION Model::AddFormulation(ConstDataHandle MODEL, int analysis_type) {{{1*/
    114 #undef __FUNCT__
    115 #define __FUNCT__ "Model::AddFormulation"
    116112void  Model::AddFormulation(ConstDataHandle MODEL, int analysis_type){
    117113
     
    191187/*}}}1*/
    192188/*FUNCTION Model::DeepEcho {{{1*/
    193 #undef __FUNCT__
    194 #define __FUNCT__ "Model::DeepEcho"
    195189
    196190void Model::DeepEcho(void){
     
    201195/*}}}1*/
    202196/*FUNCTION Model::Echo {{{1*/
    203 #undef __FUNCT__
    204 #define __FUNCT__ "Model::Echo"
    205197
    206198void Model::Echo(void){
     
    212204/*}}}1*/
    213205/*FUNCTION Model::FindParam(int* pparameter,char* parametername {{{1*/
    214 #undef __FUNCT__
    215 #define __FUNCT__ "Model::FindParam"
    216206
    217207int   Model::FindParam(int* pparameter,char* parametername){
     
    220210
    221211        /*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!");
    223213
    224214        /*recover first femmodel: */
     
    237227
    238228        /*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!");
    240230
    241231        /*recover first femmodel: */
     
    255245
    256246        /*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!");
    258248
    259249        /*recover first femmodel: */
     
    273263
    274264        /*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!");
    276266
    277267        /*recover first femmodel: */
     
    400390/*}}}1*/
    401391/*FUNCTION Model::GetFormulation(int analysis_type,int sub_analysis_type) {{{1*/
    402 #undef __FUNCT__
    403 #define __FUNCT__ "Model::GetFormulation"
    404392
    405393FemModel* Model::GetFormulation(int analysis_type,int sub_analysis_type){
     
    411399        int found=0;
    412400       
    413         if (!femmodels->Size())throw ErrorException(__FUNCT__," no fem models were found!");
     401        if (!femmodels->Size())ISSMERROR(" no fem models were found!");
    414402
    415403        /*find femmodel with correct analysis_type and sub_analysis_type: */
     
    431419/*}}}1*/
    432420/*FUNCTION Model::GetFormulation(int analysis_type) {{{1*/
    433 #undef __FUNCT__
    434 #define __FUNCT__ "Model::GetFormulation"
    435421
    436422FemModel* Model::GetFormulation(int analysis_type){
     
    442428        int found=0;
    443429       
    444         if (!femmodels->Size())throw ErrorException(__FUNCT__," no fem models were found!");
     430        if (!femmodels->Size())ISSMERROR(" no fem models were found!");
    445431
    446432        /*find femmodel with correct analysis_type and sub_analysis_type: */
  • issm/trunk/src/c/objects/Node.cpp

    r2907 r3332  
    1717#include "../shared/shared.h"
    1818#include "../include/typedefs.h"
     19#include "../include/macros.h"
    1920
    2021/*Object constructors and destructor*/
     
    194195/*}}}*/
    195196/*FUNCTION Node Configure {{{1*/
    196 #undef __FUNCT__
    197 #define __FUNCT__ "Node::Configure"
    198197void  Node::Configure(void* pnodes){
    199198
     
    408407/*}}}*/
    409408/*FUNCTION Node FieldDepthAverageAtBase{{{1*/
    410 #undef __FUNCT__
    411 #define __FUNCT__ "Node::FieldDepthAverageAtBase"
    412409void  Node::FieldDepthAverageAtBase(Vec field,double* field_serial,char* fieldname){
    413410
     
    532529/*}}}*/
    533530/*FUNCTION Node FieldExtrude {{{1*/
    534 #undef __FUNCT__
    535 #define __FUNCT__ "Node::FieldExtrude"
    536531void  Node::FieldExtrude(Vec field,double* field_serial,char* field_name){
    537532               
     
    638633                        }
    639634                }
    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!"));
    641636
    642637        } //if (extrude)
     
    692687/*}}}*/
    693688/*FUNCTION Node GetUpperNode {{{1*/
    694 #undef __FUNCT__
    695 #define __FUNCT__ "Node::GetUpperNode"
    696689Node* Node::GetUpperNode(){
    697690        return upper_node;
     
    822815/*}}}*/
    823816/*FUNCTION Node UpdateFromInputs {{{1*/
    824 #undef __FUNCT__
    825 #define __FUNCT__ "Node::UpdateFromInputs"
    826817void  Node::UpdateFromInputs(void* vinputs){
    827818       
  • issm/trunk/src/c/objects/Numpar.cpp

    r3053 r3332  
    1616#include "../DataSet/DataSet.h"
    1717#include "../include/typedefs.h"
    18 
     18#include "../include/macros.h"
    1919
    2020/*Object constructors and destructor*/
     
    133133/*Object functions*/
    134134/*FUNCTION Numpar::Configure {{{1*/
    135 #undef __FUNCT__
    136 #define __FUNCT__ "Numpar::Configure"
    137135void  Numpar::Configure(void* pparametersin){
    138136
     
    146144        parameters->FindParam(&meanvel,"meanvel");
    147145        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");
    151149        xfree((void**)&control_type);
    152150        parameters->FindParam(&control_type,"control_type");
     
    168166/*}}}*/
    169167/*FUNCTION Numpar::DeepEcho {{{1*/
    170 #undef __FUNCT__
    171 #define __FUNCT__ "Numpar::DeepEcho"
    172168void Numpar::DeepEcho(void){
    173169
     
    188184/*}}}*/
    189185/*FUNCTION Numpar::Echo{{{1*/
    190 #undef __FUNCT__
    191 #define __FUNCT__ "Numpar::Echo"
    192186void Numpar::Echo(void){
    193187
     
    229223/*}}}*/
    230224/*FUNCTION Numpar::UpdateFromInputs {{{1*/
    231 #undef __FUNCT__
    232 #define __FUNCT__ "Numpar::UpdateFromInputs"
    233225void  Numpar::UpdateFromInputs(void* vinputs){
    234226
  • issm/trunk/src/c/objects/Param.cpp

    r2913 r3332  
    2020/*Object constructors and destructor*/
    2121/*FUNCTION Param::constructor {{{1*/
    22 #undef __FUNCT__
    23 #define __FUNCT__  "Param constructor"
    2422Param::Param(int param_id, char* param_name, int param_type){
    2523
     
    3028                (param_type!=DOUBLEVEC) & (param_type!=DOUBLEMAT) & (param_type!=PETSCVEC) & (param_type!=PETSCMAT)
    3129                ){
    32                 throw ErrorException(__FUNCT__,exprintf("%s%i"," unknow parameter type ",param_type));
     30                ISSMERROR(exprintf("%s%i"," unknow parameter type ",param_type));
    3331        }
    3432        stringarray=NULL;
     
    9492
    9593                default:
    96                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));
     94                        ISSMERROR(exprintf("%s%i","unknow parameter type ",type));
    9795        }
    9896}
     
    212210
    213211                default:
    214                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));
     212                        ISSMERROR(exprintf("%s%i","unknown parameter type",type));
    215213        }
    216214
     
    221219/*}}}*/
    222220/*FUNCTION Param::Marshall {{{1*/
    223 #undef __FUNCT__
    224 #define __FUNCT__ "Marshall"
    225221
    226222void  Param::Marshall(char** pmarshalled_dataset){
     
    315311               
    316312                default:
    317                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));
     313                        ISSMERROR(exprintf("%s%i","unknown parameter type",type));
    318314                        break;
    319315        }
     
    370366
    371367                default:
    372                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknown parameter type",type));
     368                        ISSMERROR(exprintf("%s%i","unknown parameter type",type));
    373369        }
    374370
     
    384380/*}}}*/
    385381/*FUNCTION Param::Echo {{{1*/
    386 #undef __FUNCT__
    387 #define __FUNCT__  "Param echo"
    388382void Param::Echo(void){
    389383
     
    436430
    437431                default:
    438                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));
     432                        ISSMERROR(exprintf("%s%i","unknow parameter type ",type));
    439433        }
    440434}
     
    447441/*}}}*/
    448442/*FUNCTION Param::DeepEcho {{{1*/
    449 #undef __FUNCT__
    450 #define __FUNCT__  "Param Deep Echo"
    451443void Param::DeepEcho(void){
    452444
     
    498490
    499491                default:
    500                         throw ErrorException(__FUNCT__,exprintf("%s%i","unknow parameter type ",type));
     492                        ISSMERROR(exprintf("%s%i","unknow parameter type ",type));
    501493        }
    502494}       
     
    521513/*}}}*/
    522514/*FUNCTION Param::GetParameterValue(Mat* pmat) {{{1*/
    523 #undef __FUNCT__
    524 #define __FUNCT__ "GetParameterValue"
    525515
    526516void  Param::GetParameterValue(Mat* pmat){
     
    528518        Mat  outmat=NULL;
    529519       
    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));
    531521       
    532522        if(mat){
     
    547537/*}}}*/
    548538/*FUNCTION Param::GetParameterValue(double* pdouble) {{{1*/
    549 #undef __FUNCT__
    550 #define __FUNCT__ "GetParameterValue"
    551539void  Param::GetParameterValue(double* pdouble){
    552540
    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));
    554542        *pdouble=ddouble;
    555543}
    556544/*}}}*/
    557545/*FUNCTION Param::GetParameterValue(int* pinteger) {{{1*/
    558 #undef __FUNCT__
    559 #define __FUNCT__ "GetParameterValue"
    560546void  Param::GetParameterValue(int* pinteger){
    561547       
    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));
    563549        *pinteger=(int)ddouble;
    564550}
    565551/*}}}*/
    566552/*FUNCTION Param::GetParameterValue(char** pstring) {{{1*/
    567 #undef __FUNCT__
    568 #define __FUNCT__ "GetParameterValue"
    569553void  Param::GetParameterValue(char** pstring){
    570554       
    571555        char*  outstring=NULL;
    572556       
    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));
    574558        outstring=(char*)xmalloc((strlen(string)+1)*sizeof(char));
    575559        strcpy(outstring,string);
     
    579563/*}}}*/
    580564/*FUNCTION Param::GetParameterValue(char*** pstringarray) {{{1*/
    581 #undef __FUNCT__
    582 #define __FUNCT__ "GetParameterValue"
    583565void  Param::GetParameterValue(char*** pstringarray){
    584566
    585567        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));
    587569
    588570        char**  outstringarray=NULL;
     
    597579/*}}}*/
    598580/*FUNCTION Param::GetParameterValue(double** pdoublearray) {{{1*/
    599 #undef __FUNCT__
    600 #define __FUNCT__ "GetParameterValue"
    601581       
    602582void  Param::GetParameterValue(double** pdoublearray){
     
    605585        double* outdoublearray=NULL;
    606586       
    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));
    608588       
    609589        if(type==DOUBLEVEC){
     
    627607/*}}}*/
    628608/*FUNCTION Param::GetParameterValue(Vec* pvec) {{{1*/
    629 #undef __FUNCT__
    630 #define __FUNCT__ "GetParameterValue"
    631609void  Param::GetParameterValue(Vec* pvec){
    632610       
    633611        Vec  outvec=NULL;
    634612       
    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));
    636614
    637615        if(vec){
     
    657635/*}}}*/
    658636/*FUNCTION Param::SetDouble(double value) {{{1*/
    659 #undef __FUNCT__
    660 #define __FUNCT__ "SetDouble"
    661637void  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));
    663639        ddouble=value;
    664640}
    665641/*}}}*/
    666642/*FUNCTION Param::SetDouble(int value) {{{1*/
    667 #undef __FUNCT__
    668 #define __FUNCT__ "SetDouble"
    669643void  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));
    671645        ddouble=(double)value;
    672646}
    673647/*}}}*/
    674648/*FUNCTION Param::SetDoubleMat {{{1*/
    675 #undef __FUNCT__
    676 #define __FUNCT__ "SetDoubleMat"
    677649void  Param::SetDoubleMat(double* value,int pM,int pN){
    678650       
    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));
    680652
    681653        this->M=pM;
     
    688660/*}}}*/
    689661/*FUNCTION Param::SetDoubleVec(double* value,int size) {{{1*/
    690 #undef __FUNCT__
    691 #define __FUNCT__ "SetDoubleVec"
    692662void  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));
    694664       
    695665        M=size;
     
    706676/*}}}*/
    707677/*FUNCTION Param::SetDoubleVec(double* value,int size, int numberofdofs) {{{1*/
    708 #undef __FUNCT__
    709 #define __FUNCT__ "SetDoubleVec"
    710678void  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));
    712680       
    713681        M=size;
     
    720688/*}}}*/
    721689/*FUNCTION Param::SetString {{{1*/
    722 #undef __FUNCT__
    723 #define __FUNCT__ "SetString"
    724690void  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));
    726692        strcpy(string,value);
    727693}
    728694/*}}}*/
    729695/*FUNCTION Param::SetStringArray {{{1*/
    730 #undef __FUNCT__
    731 #define __FUNCT__ "SetStringArray"
    732696void  Param::SetStringArray(char** value,int size){
    733697       
    734698        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));
    736700        M=size;
    737701        stringarray=(char**)xmalloc(M*sizeof(char*));
     
    744708/*}}}*/
    745709/*FUNCTION Param::SetVec {{{1*/
    746 #undef __FUNCT__
    747 #define __FUNCT__ "SetVec"
    748710void  Param::SetVec(Vec value){
    749711
  • issm/trunk/src/c/objects/ParameterInputs.cpp

    r3180 r3332  
    155155/*}}}*/
    156156/*FUNCTION ParameterInputs::Get {{{1*/
    157 #undef __FUNCT__
    158 #define __FUNCT__ "ParameterInputs::Get"
    159157Vec ParameterInputs::Get(char* name,int* dofs, int numdofs){
    160158       
     
    284282/*}}}*/
    285283/*FUNCTION ParameterInputs::Recover(char* name,double* values, int ndof, int* dofs,int numnodes,void** pnodes) {{{1*/
    286 #undef __FUNCT__
    287 #define __FUNCT__ "ParameterInputs::Recover"
    288284int ParameterInputs::Recover(char* name,double* values, int ndof, int* dofs,int numnodes,void** pnodes){
    289285
     
    315311/*}}}*/
    316312/*FUNCTION ParameterInputs::UpdateFromDakota {{{1*/
    317 #undef __FUNCT__
    318 #define __FUNCT__ "ParameterInputs::UpdateFromDakota"
    319313void ParameterInputs::UpdateFromDakota(double* variables,char** variables_descriptors,int numvariables,DataSet* parameters,double* qmu_part,int qmu_npart){
    320314
     
    334328        /*retrive some necessary parameters first: */
    335329        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!");
    337331
    338332        for(i=0;i<numvariables;i++){
     
    360354                        /*Now, pick up the parameter corresponding to root: */
    361355                        found=parameters->FindParam(&parameter,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"));
    363357                       
    364358                        /*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  
    1616#include "../shared/shared.h"
    1717#include "../include/typedefs.h"
    18 
     18#include "../include/macros.h"
    1919               
    2020/*Object constructors and destructor*/
     
    144144/*}}}1*/
    145145/*FUNCTION Pengrid::Configure {{{1*/
    146 #undef __FUNCT__
    147 #define __FUNCT__ "Pengrid::Configure"
    148146
    149147void  Pengrid::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
     
    162160/*}}}1*/
    163161/*FUNCTION Pengrid::CreateKMatrix {{{1*/
    164 #undef __FUNCT__
    165 #define __FUNCT__ "Pengrid::CreateKMatrix"
    166162
    167163void  Pengrid::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    173169/*}}}1*/
    174170/*FUNCTION Pengrid::CreatePVector {{{1*/
    175 #undef __FUNCT__
    176 #define __FUNCT__ "Pengrid::CreatePVector"
    177171void  Pengrid::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    178172
     
    258252/*}}}1*/
    259253/*FUNCTION Pengrid::PenaltyConstrain {{{1*/
    260 #undef __FUNCT__
    261 #define __FUNCT__ "Pengrid::PenaltyConstrain"
    262254void  Pengrid::PenaltyConstrain(int* punstable,void* vinputs,int analysis_type,int sub_analysis_type){
    263255
     
    280272        }
    281273        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"));
    283275        }
    284276
     
    286278/*}}}1*/
    287279/*FUNCTION Pengrid::PenaltyConstrainThermal {{{1*/
    288 #undef __FUNCT__
    289 #define __FUNCT__ "Pengrid::PenaltyConstrainThermal"
    290280void  Pengrid::PenaltyConstrainThermal(int* punstable,void* vinputs,int analysis_type,int sub_analysis_type){
    291281
     
    319309        //First recover beta, pressure and temperature vectors;
    320310        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!");
    322312
    323313        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!");
    325315       
    326316        found=inputs->Recover("reset_penalties",&reset_penalties);
     
    369359/*}}}1*/
    370360/*FUNCTION Pengrid::PenaltyCreateMatrix {{{1*/
    371 #undef __FUNCT__
    372 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrix"
    373361void  Pengrid::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    374362
     
    388376        }
    389377        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"));
    391379        }
    392380
     
    394382/*}}}1*/
    395383/*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{1*/
    396 #undef __FUNCT__
    397 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixDiagnosticStokes"
    398384void  Pengrid::PenaltyCreateKMatrixDiagnosticStokes(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    399385       
     
    420406        /*recover slope: */
    421407        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!");
    423409        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!");
    425411
    426412        //Create elementary matrix: add penalty to contrain wb (wb=ub*db/dx+vb*db/dy)
     
    434420/*}}}1*/
    435421/*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{1*/
    436 #undef __FUNCT__
    437 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixMelting"
    438422void  Pengrid::PenaltyCreateKMatrixMelting(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    439423
     
    462446
    463447        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!");
    465449
    466450        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!");
    468452
    469453        /*Get dof list: */
     
    484468/*}}}1*/
    485469/*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{1*/
    486 #undef __FUNCT__
    487 #define __FUNCT__ "Pengrid::PenaltyCreateKMatrixThermal"
    488470void  Pengrid::PenaltyCreateKMatrixThermal(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    489471
     
    515497/*}}}1*/
    516498/*FUNCTION Pengrid::PenaltyCreatePVector {{{1*/
    517 #undef __FUNCT__
    518 #define __FUNCT__ "Pengrid::PenaltyCreatePVector"
    519499void  Pengrid::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    520500
     
    536516        }
    537517        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"));
    539519        }
    540520
     
    574554        //First recover pressure,melting offset and temperature vectors
    575555        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!");
    577557
    578558        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!");
    580560
    581561        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!");
    583563
    584564        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!");
    586566
    587567        meltingpoint=matpar->GetMeltingPoint();
     
    641621        //First recover pressure
    642622        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!");
    644624
    645625        //Compute pressure melting point
     
    656636/*}}}1*/
    657637/*FUNCTION Pengrid::UpdateFromInputs {{{1*/
    658 #undef __FUNCT__
    659 #define __FUNCT__ "Pengrid::UpdateFromInputs"
    660638void  Pengrid::UpdateFromInputs(void* inputs){
    661639       
  • issm/trunk/src/c/objects/Penpair.cpp

    r2907 r3332  
    120120/*Object functions*/
    121121/*FUNCTION Penpair::Configure {{{1*/
    122 #undef __FUNCT__
    123 #define __FUNCT__ "Penpair::Configure"
    124122
    125123void  Penpair::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
     
    142140/*}}}1*/
    143141/*FUNCTION Penpair::CreateKMatrix {{{1*/
    144 #undef __FUNCT__
    145 #define __FUNCT__ "Penpair::CreateKMatrix"
    146142
    147143void  Penpair::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    153149/*}}}1*/
    154150/*FUNCTION Penpair::CreatePVector {{{1*/
    155 #undef __FUNCT__
    156 #define __FUNCT__ "Penpair::CreatePVector"
    157151void  Penpair::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    158152
     
    221215/*}}}1*/
    222216/*FUNCTION Penpair::PenaltyCreateKMatrix {{{1*/
    223 #undef __FUNCT__
    224 #define __FUNCT__ "Penpair::PenaltyCreateKMatrix"
    225217void  Penpair::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    226218               
     
    230222/*}}}1*/
    231223/*FUNCTION Penpair::PenaltyCreatePVector {{{1*/
    232 #undef __FUNCT__
    233 #define __FUNCT__ "Penpair::PenaltyCreatePVector"
    234224void  Penpair::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
    235225        /*No loads applied, do nothing: */
     
    238228/*}}}1*/
    239229/*FUNCTION Penpair::UpdateFromInputs {{{1*/
    240 #undef __FUNCT__
    241 #define __FUNCT__ "Penpair::UpdateFromInputs"
    242230void  Penpair::UpdateFromInputs(void* inputs){
    243231       
  • issm/trunk/src/c/objects/Penta.cpp

    r3180 r3332  
    1515#include "../shared/shared.h"
    1616#include "../include/typedefs.h"
     17#include "../include/macros.h"
    1718
    1819/*Object constructors and destructor*/
     
    214215/*Object functions*/
    215216/*FUNCTION ComputePressure {{{1*/
    216 #undef __FUNCT__
    217 #define __FUNCT__ "Penta::ComputePressure"
    218217void  Penta::ComputePressure(Vec pg){
    219218
     
    250249/*}}}*/
    251250/*FUNCTION Configure {{{1*/
    252 #undef __FUNCT__
    253 #define __FUNCT__ "Penta::Configure"
    254251void  Penta::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){
    255252
     
    285282/*}}}*/
    286283/*FUNCTION CostFunction {{{1*/
    287 #undef __FUNCT__
    288 #define __FUNCT__ "Penta::CostFunction"
    289284double Penta::CostFunction(void* inputs,int analysis_type,int sub_analysis_type){
    290285
     
    320315/*}}}*/
    321316/*FUNCTION CreateKMatrix {{{1*/
    322 #undef __FUNCT__
    323 #define __FUNCT__ "Penta::CreateKMatrix"
    324317
    325318void  Penta::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    346339
    347340                }
    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"));
    349342        }
    350343        else if (analysis_type==SlopecomputeAnalysisEnum()){
     
    373366        }
    374367        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"));
    376369        }
    377370
     
    379372/*}}}*/
    380373/*FUNCTION CreateKMatrixBalancedthickness {{{1*/
    381 #undef __FUNCT__
    382 #define __FUNCT__ "Penta::CreateKMatrixBalancedthickness"
    383374
    384375void  Penta::CreateKMatrixBalancedthickness(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    402393/*}}}*/
    403394/*FUNCTION CreateKMatrixBalancedvelocities {{{1*/
    404 #undef __FUNCT__
    405 #define __FUNCT__ "Penta::CreateKMatrixBalancedvelocities"
    406395
    407396void  Penta::CreateKMatrixBalancedvelocities(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    425414/*}}}*/
    426415/*FUNCTION CreateKMatrixDiagnosticHoriz {{{1*/
    427 #undef __FUNCT__
    428 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticHoriz"
    429416void Penta::CreateKMatrixDiagnosticHoriz( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
    430417
     
    683670/*}}}*/
    684671/*FUNCTION CreateKMatrixDiagnosticStokes {{{1*/
    685 #undef __FUNCT__
    686 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticStokes"
    687672void Penta::CreateKMatrixDiagnosticStokes( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
    688673
     
    968953/*}}}*/
    969954/*FUNCTION CreateKMatrixDiagnosticVert {{{1*/
    970 #undef __FUNCT__
    971 #define __FUNCT__ "Penta:CreateKMatrixDiagnosticVert"
    972955void Penta::CreateKMatrixDiagnosticVert( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
    973956
     
    11081091/*}}}*/
    11091092/*FUNCTION CreateKMatrixMelting {{{1*/
    1110 #undef __FUNCT__
    1111 #define __FUNCT__ "Penta::CreateKMatrixMelting"
    11121093void  Penta::CreateKMatrixMelting(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
    11131094
     
    11301111/*}}}*/
    11311112/*FUNCTION CreateKMatrixPrognostic {{{1*/
    1132 #undef __FUNCT__
    1133 #define __FUNCT__ "Penta::CreateKMatrixPrognostic"
    11341113
    11351114void  Penta::CreateKMatrixPrognostic(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    11531132/*}}}*/
    11541133/*FUNCTION CreateKMatrixSlopeCompute {{{1*/
    1155 #undef __FUNCT__
    1156 #define __FUNCT__ "Penta::CreateKMatrixSlopeCompute"
    11571134
    11581135void  Penta::CreateKMatrixSlopeCompute(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    11761153/*}}}*/
    11771154/*FUNCTION CreateKMatrixThermal {{{1*/
    1178 #undef __FUNCT__
    1179 #define __FUNCT__ "Penta::CreateKMatrixThermal"
    11801155void  Penta::CreateKMatrixThermal(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    11811156
     
    12751250        /*recover extra inputs from users, dt and velocity: */
    12761251        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!");
    12781253        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!");
    12801255
    12811256        for(i=0;i<numgrids;i++){
     
    14311406/*}}}*/
    14321407/*FUNCTION CreatePVector {{{1*/
    1433 #undef __FUNCT__
    1434 #define __FUNCT__ "Penta::CreatePVector"
    14351408void  Penta::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    14361409
     
    14541427                        CreatePVectorDiagnosticStokes( pg,inputs,analysis_type,sub_analysis_type);
    14551428                }
    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"));
    14571430        }
    14581431        else if (analysis_type==SlopecomputeAnalysisEnum()){
     
    14811454        }
    14821455        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"));
    14841457        }       
    14851458
     
    14871460/*}}}*/
    14881461/*FUNCTION CreatePVectorBalancedthickness {{{1*/
    1489 #undef __FUNCT__
    1490 #define __FUNCT__ "Penta::CreatePVectorBalancedthickness"
    14911462
    14921463void Penta::CreatePVectorBalancedthickness( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     
    15091480/*}}}*/
    15101481/*FUNCTION CreatePVectorBalancedvelocities {{{1*/
    1511 #undef __FUNCT__
    1512 #define __FUNCT__ "Penta::CreatePVectorBalancedvelocities"
    15131482
    15141483void Penta::CreatePVectorBalancedvelocities( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     
    15311500/*}}}*/
    15321501/*FUNCTION CreatePVectorDiagnosticHoriz {{{1*/
    1533 #undef __FUNCT__
    1534 #define __FUNCT__ "Penta::CreatePVectorDiagnosticHoriz"
    15351502void Penta::CreatePVectorDiagnosticHoriz( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
    15361503
     
    16881655/*}}}*/
    16891656/*FUNCTION CreatePVectorDiagnosticStokes {{{1*/
    1690 #undef __FUNCT__
    1691 #define __FUNCT__ "Penta::CreatePVectorDiagnosticStokes"
    16921657void Penta::CreatePVectorDiagnosticStokes( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
    16931658
     
    19281893/*}}}*/
    19291894/*FUNCTION CreatePVectorDiagnosticVert {{{1*/
    1930 #undef __FUNCT__
    1931 #define __FUNCT__ "Penta:CreatePVectorDiagnosticVert"
    19321895void  Penta::CreatePVectorDiagnosticVert( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
    19331896
     
    20041967
    20051968        /* 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!");
    20071970        inputs->Recover("velocity",&vy_list[0],1,dofs2,numgrids,(void**)nodes);
    20081971
     
    20742037/*}}}*/
    20752038/*FUNCTION CreatePVectorMelting {{{1*/
    2076 #undef __FUNCT__
    2077 #define __FUNCT__ "Penta::CreatePVectorMelting"
    20782039void Penta::CreatePVectorMelting( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
    20792040        return;
     
    20812042/*}}}*/
    20822043/*FUNCTION CreatePVectorPrognostic {{{1*/
    2083 #undef __FUNCT__
    2084 #define __FUNCT__ "Penta::CreatePVectorPrognostic"
    20852044
    20862045void Penta::CreatePVectorPrognostic( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     
    21032062/*}}}*/
    21042063/*FUNCTION CreatePVectorSlopeCompute {{{1*/
    2105 #undef __FUNCT__
    2106 #define __FUNCT__ "Penta::CreatePVectorSlopeCompute"
    21072064
    21082065void Penta::CreatePVectorSlopeCompute( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     
    21252082/*}}}*/
    21262083/*FUNCTION CreatePVectorThermal {{{1*/
    2127 #undef __FUNCT__
    2128 #define __FUNCT__ "Penta::CreatePVectorThermal"
    21292084void Penta::CreatePVectorThermal( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
    21302085
     
    22202175        /*recover extra inputs from users, dt and velocity: */
    22212176        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!");
    22232178        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!");
    22252180
    22262181        if(dt){
    22272182                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!");
    22292184        }
    22302185
     
    23552310/*}}}*/
    23562311/*FUNCTION Du {{{1*/
    2357 #undef __FUNCT__
    2358 #define __FUNCT__ "Penta::Du"
    23592312void  Penta::Du(Vec du_g,void* inputs,int analysis_type,int sub_analysis_type){
    23602313
     
    24322385/*}}}*/
    24332386/*FUNCTION FieldExtrude {{{1*/
    2434 #undef __FUNCT__
    2435 #define __FUNCT__ "Penta::FieldExtrude"
    24362387void  Penta::FieldExtrude(Vec field,double* field_serial,char* field_name, int iscollapsed){
    24372388
     
    25672518
    25682519                }
    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!"));
    25702521
    25712522        } //if (extrude)
     
    25732524/*}}}*/
    25742525/*FUNCTION GetB {{{1*/
    2575 #undef __FUNCT__
    2576 #define __FUNCT__ "Penta::GetB"
    25772526void Penta::GetB(double* B, double* xyz_list, double* gauss_coord){
    25782527
     
    26272576/*}}}*/
    26282577/*FUNCTION GetB_artdiff {{{1*/
    2629 #undef __FUNCT__
    2630 #define __FUNCT__ "Penta::GetB_artdiff"
    26312578void Penta::GetB_artdiff(double* B_artdiff, double* xyz_list, double* gauss_coord){
    26322579
     
    26602607/*}}}*/
    26612608/*FUNCTION GetB_advec {{{1*/
    2662 #undef __FUNCT__
    2663 #define __FUNCT__ "Penta::GetB_advec"
    26642609void Penta::GetB_advec(double* B_advec, double* xyz_list, double* gauss_coord){
    26652610
     
    26952640/*}}}*/
    26962641/*FUNCTION GetB_conduct {{{1*/
    2697 #undef __FUNCT__
    2698 #define __FUNCT__ "Penta::GetB_conduct"
    26992642void Penta::GetB_conduct(double* B_conduct, double* xyz_list, double* gauss_coord){
    27002643
     
    27302673/*}}}*/
    27312674/*FUNCTION GetB_vert {{{1*/
    2732 #undef __FUNCT__
    2733 #define __FUNCT__ "Penta:GetB_vert"
    27342675void Penta::GetB_vert(double* B, double* xyz_list, double* gauss_coord){
    27352676
     
    27682709/*}}}*/
    27692710/*FUNCTION GetBPrime {{{1*/
    2770 #undef __FUNCT__
    2771 #define __FUNCT__ "Penta::GetBPrime"
    27722711void Penta::GetBPrime(double* B, double* xyz_list, double* gauss_coord){
    27732712
     
    28212760/*}}}*/
    28222761/*FUNCTION GetBprime_advec {{{1*/
    2823 #undef __FUNCT__
    2824 #define __FUNCT__ "Penta::GetBprime_advec"
    28252762void Penta::GetBprime_advec(double* Bprime_advec, double* xyz_list, double* gauss_coord){
    28262763
     
    28572794/*}}}*/
    28582795/*FUNCTION GetBPrime_vert {{{1*/
    2859 #undef __FUNCT__
    2860 #define __FUNCT__ "Penta:GetBPrime_vert"
    28612796void Penta::GetBPrime_vert(double* B, double* xyz_list, double* gauss_coord){
    28622797
     
    28702805/*}}}*/
    28712806/*FUNCTION GetBprimeStokes {{{1*/
    2872 #undef __FUNCT__
    2873 #define __FUNCT__ "Penta::GetBprimeStokes"
    28742807void Penta::GetBprimeStokes(double* B_prime, double* xyz_list, double* gauss_coord){
    28752808
     
    29522885/*}}}*/
    29532886/*FUNCTION GetBStokes {{{1*/
    2954 #undef __FUNCT__
    2955 #define __FUNCT__ "Penta::GetBStokes"
    29562887void Penta::GetBStokes(double* B, double* xyz_list, double* gauss_coord){
    29572888
     
    30672998/*}}}*/
    30682999/*FUNCTION GetJacobian {{{1*/
    3069 #undef __FUNCT__
    3070 #define __FUNCT__ "Penta::GetJacobian"
    30713000void Penta::GetJacobian(double* J, double* xyz_list,double* gauss_coord){
    30723001
     
    31383067/*}}}*/
    31393068/*FUNCTION GetJacobianDeterminant {{{1*/
    3140 #undef __FUNCT__
    3141 #define __FUNCT__ "Penta::GetJacobianDeterminant"
    31423069void Penta::GetJacobianDeterminant(double*  Jdet, double* xyz_list,double* gauss_coord){
    31433070
     
    31513078
    31523079        *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
    31533081        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));
    31553083        }
    31563084}
    31573085/*}}}*/
    31583086/*FUNCTION GetJacobianInvert {{{1*/
    3159 #undef __FUNCT__
    3160 #define __FUNCT__ "Penta::GetJacobianInvert"
    31613087void Penta::GetJacobianInvert(double*  Jinv, double* xyz_list,double* gauss_coord){
    31623088
     
    31723098/*}}}*/
    31733099/*FUNCTION GetLStokes {{{1*/
    3174 #undef __FUNCT__
    3175 #define __FUNCT__ "Penta::GetLStokes"
    31763100void Penta::GetLStokes(double* LStokes, double* gauss_coord_tria){
    31773101
     
    32793203/*}}}*/
    32803204/*FUNCTION GetLprimeStokes {{{1*/
    3281 #undef __FUNCT__
    3282 #define __FUNCT__ "Penta::GetLprimeStokes"
    32833205void Penta::GetLprimeStokes(double* LprimeStokes, double* xyz_list, double* gauss_coord_tria, double* gauss_coord){
    32843206
     
    33933315/*}}}*/
    33943316/*FUNCTION GetMatrixInvert {{{1*/
    3395 #undef __FUNCT__
    3396 #define __FUNCT__ "GetMatrixInvert"
    33973317void Penta::GetMatrixInvert(double*  Ke_invert, double* Ke){
    33983318        /*Inverse a 3 by 3 matrix only */
     
    34333353/*}}}*/
    34343354/*FUNCTION GetNodalFunctions {{{1*/
    3435 #undef __FUNCT__
    3436 #define __FUNCT__ "Penta::GetNodalFunctions"
    34373355void Penta::GetNodalFunctions(double* l1l6, double* gauss_coord){
    34383356
     
    34543372/*}}}*/
    34553373/*FUNCTION GetNodalFunctionsDerivatives {{{1*/
    3456 #undef __FUNCT__
    3457 #define __FUNCT__ "Penta::GetNodalFunctionsDerivatives"
    34583374void Penta::GetNodalFunctionsDerivatives(double* dh1dh6,double* xyz_list, double* gauss_coord){
    34593375
     
    34903406/*}}}*/
    34913407/*FUNCTION GetNodalFunctionsDerivativesStokes {{{1*/
    3492 #undef __FUNCT__
    3493 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesStokes"
    34943408void Penta::GetNodalFunctionsDerivativesStokes(double* dh1dh7,double* xyz_list, double* gauss_coord){
    34953409
     
    35263440/*}}}*/
    35273441/*FUNCTION GetNodalFunctionsDerivativesReference {{{1*/
    3528 #undef __FUNCT__
    3529 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesReference"
    35303442void Penta::GetNodalFunctionsDerivativesReference(double* dl1dl6,double* gauss_coord){
    35313443
     
    35743486/*}}}*/
    35753487/*FUNCTION GetNodalFunctionsDerivativesReferenceStokes {{{1*/
    3576 #undef __FUNCT__
    3577 #define __FUNCT__ "Penta::GetNodalFunctionsDerivativesReferenceStokes"
    35783488void Penta::GetNodalFunctionsDerivativesReferenceStokes(double* dl1dl7,double* gauss_coord){
    35793489
     
    36253535/*}}}*/
    36263536/*FUNCTION GetNodalFunctionsStokes {{{1*/
    3627 #undef __FUNCT__
    3628 #define __FUNCT__ "Penta::GetNodalFunctionsStokes"
    36293537void Penta::GetNodalFunctionsStokes(double* l1l7, double* gauss_coord){
    36303538
     
    36703578/*}}}*/
    36713579/*FUNCTION GetParameterDerivativeValue {{{1*/
    3672 #undef __FUNCT__
    3673 #define __FUNCT__ "Penta::GetParameterDerivativeValue"
    36743580void Penta::GetParameterDerivativeValue(double* p, double* p_list,double* xyz_list, double* gauss_coord){
    36753581
     
    36983604/*}}}*/
    36993605/*FUNCTION GetParameterValue {{{1*/
    3700 #undef __FUNCT__
    3701 #define __FUNCT__ "Penta::GetParameterValue"
    37023606void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){
    37033607
     
    37113615/*}}}*/
    37123616/*FUNCTION GetPhi {{{1*/
    3713 #undef __FUNCT__
    3714 #define __FUNCT__ "Penta::GetPhi"
    37153617void Penta::GetPhi(double* phi, double*  epsilon, double viscosity){
    37163618        /*Compute deformational heating from epsilon and viscosity */
     
    37523654/*}}}*/
    37533655/*FUNCTION GetStrainRate {{{1*/
    3754 #undef __FUNCT__
    3755 #define __FUNCT__ "Penta::GetStrainRate"
    37563656void Penta::GetStrainRate(double* epsilon, double* velocity, double* xyz_list, double* gauss_coord){
    37573657
     
    38123712/*}}}*/
    38133713/*FUNCTION GetStrainRateStokes {{{1*/
    3814 #undef __FUNCT__
    3815 #define __FUNCT__ "Penta::GetStrainRateStokes"
    38163714void Penta::GetStrainRateStokes(double* epsilon, double* velocity, double* xyz_list, double* gauss_coord){
    38173715
     
    38593757/*}}}*/
    38603758/*FUNCTION Gradj {{{1*/
    3861 #undef __FUNCT__
    3862 #define __FUNCT__ "Penta::Gradj"
    38633759void  Penta::Gradj(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type,char* control_type){
    38643760
     
    38723768                GradjB( grad_g, inputs,analysis_type,sub_analysis_type);
    38733769        }
    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));
    38753771}
    38763772/*}}}*/
    38773773/*FUNCTION GradjDrag {{{1*/
    3878 #undef __FUNCT__
    3879 #define __FUNCT__ "Penta::GradjDrag"
    38803774void  Penta::GradjDrag(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){
    38813775
     
    39073801                return;
    39083802        }
    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"));
    39103804}
    39113805/*}}}*/
    39123806/*FUNCTION GradjB {{{1*/
    3913 #undef __FUNCT__
    3914 #define __FUNCT__ "Penta::GradjB"
    39153807void  Penta::GradjB(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){
    39163808
     
    39413833/*}}}*/
    39423834/*FUNCTION MassFlux {{{1*/
    3943 #undef __FUNCT__
    3944 #define __FUNCT__ "Penta::MassFlux"
    39453835double Penta::MassFlux( double* segment,double* ug){
    3946         throw ErrorException(__FUNCT__," not supported yet!");
     3836        ISSMERROR(" not supported yet!");
    39473837}
    39483838/*}}}*/
    39493839/*FUNCTION Misfit {{{1*/
    3950 #undef __FUNCT__
    3951 #define __FUNCT__ "Penta::Misfit"
    39523840double Penta::Misfit(void* inputs,int analysis_type,int sub_analysis_type){
    39533841
     
    39893877/*}}}*/
    39903878/*FUNCTION ReduceMatrixStokes {{{1*/
    3991 #undef __FUNCT__
    3992 #define __FUNCT__ "ReduceMatrixStokes"
    39933879void Penta::ReduceMatrixStokes(double* Ke_reduced, double* Ke_temp){
    39943880
     
    40373923/*}}}*/
    40383924/*FUNCTION ReduceVectorStokes {{{1*/
    4039 #undef __FUNCT__
    4040 #define __FUNCT__ "Penta::ReduceVectorStokes"
    40413925void Penta::ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp){
    40423926
     
    40813965/*}}}*/
    40823966/*FUNCTION SpawnTria {{{1*/
    4083 #undef __FUNCT__
    4084 #define __FUNCT__ "Penta::SpawnTria"
    40853967void*  Penta::SpawnTria(int g0, int g1, int g2){
    40863968
     
    41534035/*}}}*/
    41544036/*FUNCTION UpdateFromInputs {{{1*/
    4155 #undef __FUNCT__
    4156 #define __FUNCT__ "Penta::UpdateFromInputs"
    41574037void  Penta::UpdateFromInputs(void* vinputs){
    41584038
     
    42104090/*}}}*/
    42114091/*FUNCTION SurfaceArea {{{1*/
    4212 #undef __FUNCT__
    4213 #define __FUNCT__ "Penta::SurfaceArea"
    42144092double Penta::SurfaceArea(void* inputs,int analysis_type,int sub_analysis_type){
    42154093
     
    42454123/*}}}*/
    42464124/*FUNCTION SurfaceNormal {{{1*/
    4247 #undef __FUNCT__
    4248 #define __FUNCT__ "Penta::SurfaceNormal"
    42494125void Penta::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
    42504126
  • issm/trunk/src/c/objects/Result.cpp

    r2907 r3332  
    1717#include "../shared/shared.h"
    1818#include "../include/typedefs.h"
     19#include "../include/macros.h"
    1920
    2021/*Object constructors and destructor*/
     
    6566/*}}}1*/
    6667/*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"
    6968Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,Vec result_field){
    7069
     
    7473       
    7574        if(!result_fieldname){
    76                 throw  ErrorException(__FUNCT__," NULL fieldname in constructor argument");
     75                ISSMERROR("NULL fieldname in constructor argument");
    7776        }
    7877        else{
     
    8786/*}}}1*/
    8887/*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"
    9188Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,double* result_field,int result_size){
    9289
     
    9693       
    9794        if(!result_fieldname){
    98                 throw  ErrorException(__FUNCT__," NULL fieldname in constructor argument");
     95                ISSMERROR(" NULL fieldname in constructor argument");
    9996        }
    10097        else{
     
    111108/*}}}1*/
    112109/*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"
    115110Result::Result(int result_id,double result_time,int result_step,char* result_fieldname,char* result_field){
    116111
     
    120115       
    121116        if(!result_fieldname){
    122                 throw  ErrorException(__FUNCT__," NULL fieldname in constructor argument");
     117                ISSMERROR(" NULL fieldname in constructor argument");
    123118        }
    124119        else{
     
    136131/*Object marshall*/
    137132/*FUNCTION Result::Marshall {{{1*/
    138 #undef __FUNCT__
    139 #define __FUNCT__ "Result::Marshall"
    140133void  Result::Marshall(char** pmarshalled_dataset){
    141134
    142         throw  ErrorException(__FUNCT__," not supported yet!");
     135        ISSMERROR(" not supported yet!");
    143136
    144137}
    145138/*}}}1*/
    146139/*FUNCTION Result::MarshallSize {{{1*/
    147 #undef __FUNCT__
    148 #define __FUNCT__ "Result::MarshallSize"
    149140int   Result::MarshallSize(){
    150141
    151         throw  ErrorException(__FUNCT__," not supported yet!");
     142        ISSMERROR(" not supported yet!");
    152143}
    153144/*}}}1*/
    154145/*FUNCTION Result::Demarshall {{{1*/
    155 #undef __FUNCT__
    156 #define __FUNCT__ "Result::Demarshall"
    157146void  Result::Demarshall(char** pmarshalled_dataset){
    158147
    159         throw  ErrorException(__FUNCT__," not supported yet!");
     148        ISSMERROR(" not supported yet!");
    160149}
    161150/*}}}1*/
  • issm/trunk/src/c/objects/Riftfront.cpp

    r3201 r3332  
    202202/*Object functions*/
    203203/*FUNCTION Riftfront::Configure {{{1*/
    204 #undef __FUNCT__
    205 #define __FUNCT__ "Riftfront::Configure"
    206204void  Riftfront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
    207205
     
    224222#define _ZIGZAGCOUNTER_
    225223
    226 #undef __FUNCT__
    227 #define __FUNCT__ "Riftfront::Constrain"
    228224int   Riftfront::Constrain(int* punstable, void* vinputs, int analysis_type){
    229225
     
    249245        /*First recover parameter inputs: */
    250246        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!");
    252248
    253249
     
    294290/*}}}1*/
    295291/*FUNCTION Riftfront::CreateKMatrix {{{1*/
    296 #undef __FUNCT__
    297 #define __FUNCT__ "Riftfront::CreateKMatrix"
    298292void  Riftfront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
    299293        /*do nothing: */
     
    301295/*}}}1*/
    302296/*FUNCTION Riftfront::CreatePVector {{{1*/
    303 #undef __FUNCT__
    304 #define __FUNCT__ "Riftfront::CreatePVector"
    305297void  Riftfront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    306298        /*do nothing: */
     
    373365/*}}}1*/
    374366/*FUNCTION Riftfront::GetDofList {{{1*/
    375 #undef __FUNCT__
    376 #define __FUNCT__ "Riftfront::GetDofList"
    377367
    378368void  Riftfront::GetDofList(int* doflist,int* pnumberofdofspernode){
     
    402392/*}}}1*/
    403393/*FUNCTION Riftfront::IsMaterialStable {{{1*/
    404 #undef __FUNCT__
    405 #define __FUNCT__ "Riftfront::IsMaterialStable"
    406394int   Riftfront::IsMaterialStable(void* vinputs, int analysis_type){
    407395
     
    413401
    414402        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!");
    416404
    417405        if(converged){
     
    426414/*}}}1*/
    427415/*FUNCTION Riftfront::MaxPenetration {{{1*/
    428 #undef __FUNCT__
    429 #define __FUNCT__ "Riftfront::MaxPenetration"
    430416int   Riftfront::MaxPenetration(double* ppenetration, void* vinputs, int analysis_type){
    431417
     
    445431
    446432        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!");
    448434
    449435        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    468454/*}}}1*/
    469455/*FUNCTION Riftfront::OutputProperties {{{1*/
    470 #undef __FUNCT__
    471 #define __FUNCT__ "Riftfront::OutputProperties"
    472456void  Riftfront::OutputProperties(Vec riftproperties){
    473457
     
    484468/*}}}1*/
    485469/*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/
    486 #undef __FUNCT__
    487 #define __FUNCT__ "Riftfront::PenaltyCreateKMatrix"
    488470void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    489471
     
    519501                /*Recover input parameters: */
    520502                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");
    522504                thickness=h[0];
    523505
     
    583565/*}}}1*/
    584566/*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/
    585 #undef __FUNCT__
    586 #define __FUNCT__ "Riftfront::PenaltyCreatePVector"
    587567void  Riftfront::PenaltyCreatePVector(Vec pg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    588568
     
    632612                /*get thickness: */
    633613                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");
    635615                thickness=h[0];
    636616
    637617                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");
    639619                bed=b[0];
    640620
     
    658638                else if(fill==MelangeEnum()){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
    659639                       
    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."));
    661641
    662642                        pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2;
     
    668648                }
    669649                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."));
    671651                }
    672652
     
    690670/*}}}1*/
    691671/*FUNCTION Riftfront::Penetration {{{1*/
    692 #undef __FUNCT__
    693 #define __FUNCT__ "Riftfront::Penetration"
    694672int   Riftfront::Penetration(double* ppenetration, void* vinputs, int analysis_type){
    695673
     
    707685
    708686        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!");
    710688
    711689        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    722700/*FUNCTION Riftfront::PotentialUnstableC
    723701 * nstraint {{{1*/
    724 #undef __FUNCT__
    725 #define __FUNCT__ "Riftfront::PotentialUnstableConstraint"
    726702int   Riftfront::PotentialUnstableConstraint(int* punstable, void* vinputs, int analysis_type){
    727703
     
    741717
    742718        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!");
    744720
    745721        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    764740/*}}}1*/
    765741/*FUNCTION Riftfront::PreConstrain {{{1*/
    766 #undef __FUNCT__
    767 #define __FUNCT__ "Riftfront::PreConstrain"
    768742int   Riftfront::PreConstrain(int* punstable, void* vinputs, int analysis_type){
    769743
     
    780754        /*First recover velocity: */
    781755        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!");
    783757       
    784758        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    828802/*}}}1*/
    829803/*FUNCTION Riftfront::UpdateFromInputs {{{1*/
    830 #undef __FUNCT__
    831 #define __FUNCT__ "Riftfront::UpdateFromInputs"
    832804void  Riftfront::UpdateFromInputs(void* vinputs){
    833805
     
    844816/*}}}1*/
    845817/*FUNCTION Riftfront::FreezeConstraints{{{1*/
    846 #undef __FUNCT__
    847 #define __FUNCT__ "Riftfront::FreezeConstraints"
    848818void   Riftfront::FreezeConstraints(void* vinputs, int analysis_type){
    849819
     
    854824/*}}}1*/
    855825/*FUNCTION Riftfront::IsFrozen{{{1*/
    856 #undef __FUNCT__
    857 #define __FUNCT__ "Riftfront::IsFrozen"
    858826bool   Riftfront::IsFrozen(void){
    859827
  • issm/trunk/src/c/objects/Sing.cpp

    r3180 r3332  
    1616#include "../DataSet/DataSet.h"
    1717#include "../include/typedefs.h"
    18 
     18#include "../include/macros.h"
    1919
    2020/*Object constructors and destructor*/
     
    158158/*Object functions*/
    159159/*FUNCTION Sing::ComputePressure {{{1*/
    160 #undef __FUNCT__
    161 #define __FUNCT__ "Sing::ComputePressure"
    162160void  Sing::ComputePressure(Vec p_g){
    163161
     
    182180/*}}}*/
    183181/*FUNCTION Sing::Configure {{{1*/
    184 #undef __FUNCT__
    185 #define __FUNCT__ "Sing::Configure"
    186182void  Sing::Configure(void* ploadsin, void* pnodesin,void* pmaterialsin,void* pparametersin){
    187183
     
    217213/*}}}*/
    218214/*FUNCTION Sing::CostFunction {{{1*/
    219 #undef __FUNCT__
    220 #define __FUNCT__ "Sing::CostFunction"
    221215double Sing::CostFunction(void*, int,int){
    222         throw ErrorException(__FUNCT__," not supported yet!");
     216        ISSMERROR(" not supported yet!");
    223217}
    224218/*}}}*/
    225219/*FUNCTION Sing::CreateKMatrix {{{1*/
    226 #undef __FUNCT__
    227 #define __FUNCT__ "Sing::CreateKMatrix"
    228220
    229221void  Sing::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    236228        }
    237229        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"));
    239231        }
    240232
     
    242234/*}}}*/
    243235/*FUNCTION Sing::CreateKMatrixDiagnosticHutter {{{1*/
    244 #undef __FUNCT__
    245 #define __FUNCT__ "Sing::CreateKMatrixDiagnosticHutter"
    246236
    247237void  Sing::CreateKMatrixDiagnosticHutter(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
     
    266256/*}}}*/
    267257/*FUNCTION Sing::CreatePVector {{{1*/
    268 #undef __FUNCT__
    269 #define __FUNCT__ "Sing::CreatePVector"
    270258void  Sing::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){
    271259       
     
    277265        }
    278266        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"));
    280268        }
    281269
     
    283271/*}}}*/
    284272/*FUNCTION Sing::CreatePVectorDiagnosticHutter {{{1*/
    285 #undef __FUNCT__
    286 #define __FUNCT__ "Sing::CreatePVectorDiagnosticHutter"
    287273
    288274void Sing::CreatePVectorDiagnosticHutter( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
     
    309295
    310296        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!");
    312298        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!");
    314300
    315301        GetDofList(&doflist[0],&numberofdofspernode);
     
    339325/*}}}*/
    340326/*FUNCTION Sing::DeepEcho {{{1*/
    341 #undef __FUNCT__
    342 #define __FUNCT__ "Sing::DeepEcho"
    343327void Sing::DeepEcho(void){
    344328
     
    362346/*}}}*/
    363347/*FUNCTION Sing::Du {{{1*/
    364 #undef __FUNCT__
    365 #define __FUNCT__ "Sing::Du"
    366348void  Sing::Du(_p_Vec*,void*,int,int){
    367         throw ErrorException(__FUNCT__," not supported yet!");
     349        ISSMERROR(" not supported yet!");
    368350}
    369351/*}}}*/
    370352/*FUNCTION Sing::Echo{{{1*/
    371 #undef __FUNCT__
    372 #define __FUNCT__ "Sing::Echo"
    373353
    374354void Sing::Echo(void){
     
    400380/*}}}*/
    401381/*FUNCTION Sing::GetBedList {{{1*/
    402 #undef __FUNCT__
    403 #define __FUNCT__ "Sing::GetBedList"
    404382void  Sing::GetBedList(double*){
    405         throw ErrorException(__FUNCT__," not supported yet!");
     383        ISSMERROR(" not supported yet!");
    406384}
    407385/*}}}*/
     
    453431/*}}}*/
    454432/*FUNCTION Sing::GetOnBed {{{1*/
    455 #undef __FUNCT__
    456 #define __FUNCT__ "Sing::GetOnBed"
    457433int   Sing::GetOnBed(){
    458         throw ErrorException(__FUNCT__," not supported yet!");
     434        ISSMERROR(" not supported yet!");
    459435}
    460436/*}}}*/
    461437/*FUNCTION Sing::GetShelf {{{1*/
    462 #undef __FUNCT__
    463 #define __FUNCT__ "Sing::GetShelf"
    464438int   Sing::GetShelf(){
    465         throw ErrorException(__FUNCT__," not supported yet!");
     439        ISSMERROR(" not supported yet!");
    466440}
    467441/*}}}*/
    468442/*FUNCTION Sing::GetThicknessList {{{1*/
    469 #undef __FUNCT__
    470 #define __FUNCT__ "Sing::GetThicknessList"
    471443void  Sing::GetThicknessList(double* thickness_list){
    472         throw ErrorException(__FUNCT__," not supported yet!");
     444        ISSMERROR(" not supported yet!");
    473445}
    474446/*}}}*/
    475447/*FUNCTION Sing::Gradj {{{1*/
    476 #undef __FUNCT__
    477 #define __FUNCT__ "Sing::Gradj"
    478448void  Sing::Gradj(_p_Vec*, void*, int, int ,char*){
    479         throw ErrorException(__FUNCT__," not supported yet!");
     449        ISSMERROR(" not supported yet!");
    480450}
    481451/*}}}*/
    482452/*FUNCTION Sing::GradB {{{1*/
    483 #undef __FUNCT__
    484 #define __FUNCT__ "Sing::GradjB"
    485453void  Sing::GradjB(_p_Vec*, void*, int,int){
    486         throw ErrorException(__FUNCT__," not supported yet!");
     454        ISSMERROR(" not supported yet!");
    487455}
    488456/*}}}*/
    489457/*FUNCTION Sing::GradjDrag {{{1*/
    490 #undef __FUNCT__
    491 #define __FUNCT__ "Sing::GradjDrag"
    492458void  Sing::GradjDrag(_p_Vec*, void*, int,int){
    493         throw ErrorException(__FUNCT__," not supported yet!");
     459        ISSMERROR(" not supported yet!");
    494460}
    495461/*}}}*/
    496462/*FUNCTION Sing::MassFlux {{{1*/
    497 #undef __FUNCT__
    498 #define __FUNCT__ "Sing::MassFlux"
    499463double Sing::MassFlux( double* segment,double* ug){
    500         throw ErrorException(__FUNCT__," not supported yet!");
     464        ISSMERROR(" not supported yet!");
    501465}
    502466/*}}}*/
    503467/*FUNCTION Sing::MaticeConfiguration {{{1*/
    504 #undef __FUNCT__
    505 #define __FUNCT__ "Sing::MaticeConfiguration"
    506468void  Sing::MaticeConfiguration(Matice* sing_matice,int sing_matice_offset){
    507469        matice=sing_matice;
     
    510472/*}}}*/
    511473/*FUNCTION Sing::MatparConfiguration {{{1*/
    512 #undef __FUNCT__
    513 #define __FUNCT__ "Sing::MatparConfiguration"
    514474void  Sing::MatparConfiguration(Matpar* sing_matpar,int sing_matpar_offset){
    515475
     
    520480/*}}}*/
    521481/*FUNCTION Sing::Misfit {{{1*/
    522 #undef __FUNCT__
    523 #define __FUNCT__ "Sing::Misfit"
    524482double Sing::Misfit(void*, int,int){
    525         throw ErrorException(__FUNCT__," not supported yet!");
     483        ISSMERROR(" not supported yet!");
    526484}
    527485/*}}}*/
     
    533491/*}}}*/
    534492/*FUNCTION Sing::SurfaceArea {{{1*/
    535 #undef __FUNCT__
    536 #define __FUNCT__ "Sing::SurfaceArea"
    537493double Sing::SurfaceArea(void*, int,int){
    538         throw ErrorException(__FUNCT__," not supported yet!");
     494        ISSMERROR(" not supported yet!");
    539495}
    540496/*}}}*/
    541497/*FUNCTION Sing::UpdateFromInputs {{{1*/
    542 #undef __FUNCT__
    543 #define __FUNCT__ "Sing::UpdateFromInputs"
    544498void  Sing::UpdateFromInputs(void* vinputs){
    545499
  • issm/trunk/src/c/objects/Tria.cpp

    r3203 r3332  
    1616#include "../DataSet/DataSet.h"
    1717#include "../include/typedefs.h"
    18 
     18#include "../include/macros.h"
    1919
    2020/*For debugging purposes: */
     
    206206/*Object functions*/
    207207/*FUNCTION ComputePressure {{{1*/
    208 #undef __FUNCT__
    209 #define __FUNCT__ "Tria::ComputePressure"
    210208void  Tria::ComputePressure(Vec pg){
    211209
     
    232230/*}}}*/
    233231/*FUNCTION Configure {{{1*/
    234 #undef __FUNCT__
    235 #define __FUNCT__ "Tria::Configure"
    236232void  Tria::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){
    237233
     
    269265/*}}}*/
    270266/*FUNCTION CostFunction {{{1*/
    271 #undef __FUNCT__
    272 #define __FUNCT__ "Tria::CostFunction"
    273267double Tria::CostFunction(void* vinputs,int analysis_type,int sub_analysis_type){
    274268
     
    353347
    354348                        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");
    356350                        }
    357351                        GetParameterDerivativeValue(&dB[0], &B[0],&xyz_list[0][0], gauss_l1l2l3);
     
    360354                }
    361355                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));
    363357                }
    364358
     
    375369/*}}}*/
    376370/*FUNCTION CreateKMatrix {{{1*/
    377 #undef __FUNCT__
    378 #define __FUNCT__ "Tria::CreateKMatrix"
    379371
    380372void  Tria::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     
    391383                        CreateKMatrixDiagnosticHoriz( Kgg,inputs,analysis_type,sub_analysis_type);
    392384                }
    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"));
    394386
    395387        }
     
    415407        }
    416408        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"));
    418410        }
    419411
     
    421413/*}}}*/
    422414/*FUNCTION CreateKMatrixBalancedthickness {{{1*/
    423 #undef __FUNCT__
    424 #define __FUNCT__ "Tria::CreateKMatrixBalancedthickness"
    425415void  Tria::CreateKMatrixBalancedthickness(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    426416
     
    480470        /*recover extra inputs from users, at current convergence iteration: */
    481471        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!");
    483473
    484474        for(i=0;i<numgrids;i++){
     
    624614/*}}}*/
    625615/*FUNCTION CreateKMatrixBalancedvelocities {{{1*/
    626 #undef __FUNCT__
    627 #define __FUNCT__ "Tria::CreateKMatrixBalancedvelocities"
    628616void  Tria::CreateKMatrixBalancedvelocities(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    629617
     
    684672        /*recover extra inputs from users, at current convergence iteration: */
    685673        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!");
    687675
    688676        for(i=0;i<numgrids;i++){
     
    836824/*}}}*/
    837825/*FUNCTION CreateKMatrixDiagnosticHoriz {{{1*/
    838 #undef __FUNCT__
    839 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticHoriz"
    840826
    841827void  Tria::CreateKMatrixDiagnosticHoriz(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
     
    10551041/*}}}*/
    10561042/*FUNCTION CreateKMatrixDiagnosticHorizFriction {{{1*/
    1057 #undef __FUNCT__
    1058 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticHorizFriction"
    10591043void  Tria::CreateKMatrixDiagnosticHorizFriction(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    10601044
     
    11221106        }
    11231107
    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!");
    11251109
    11261110        /*recover extra inputs from users, at current convergence iteration: */
     
    12241208/*}}}*/
    12251209/*FUNCTION CreateKMatrixDiagnosticSurfaceVert {{{1*/
    1226 #undef __FUNCT__
    1227 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticSurfaceVert"
    12281210void  Tria::CreateKMatrixDiagnosticSurfaceVert(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    12291211
     
    13521334/*}}}*/
    13531335/*FUNCTION CreateKMatrixMelting {{{1*/
    1354 #undef __FUNCT__
    1355 #define __FUNCT__ "Tria::CreateKMatrixMelting"
    13561336void  Tria::CreateKMatrixMelting(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    13571337
     
    14381418/*}}}*/
    14391419/*FUNCTION CreateKMatrixPrognostic {{{1*/
    1440 #undef __FUNCT__
    1441 #define __FUNCT__ "Tria::CreateKMatrixPrognostic"
    14421420void  Tria::CreateKMatrixPrognostic(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    14431421
     
    14971475        /*recover extra inputs from users, at current convergence iteration: */
    14981476        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!");
    15001478
    15011479        for(i=0;i<numgrids;i++){
     
    15051483
    15061484        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!");
    15081486
    15091487        /* Get node coordinates and dof list: */
     
    16571635/*}}}*/
    16581636/*FUNCTION CreateKMatrixSlopeCompute {{{1*/
    1659 #undef __FUNCT__
    1660 #define __FUNCT__ "Tria::CreateKMatrixSlopeCompute"
    16611637
    16621638void  Tria::CreateKMatrixSlopeCompute(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
     
    17401716/*}}}*/
    17411717/*FUNCTION CreateKMatrixThermal {{{1*/
    1742 #undef __FUNCT__
    1743 #define __FUNCT__ "Tria::CreateKMatrixThermal"
    17441718void  Tria::CreateKMatrixThermal(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    17451719
     
    17841758        /*recover extra inputs from users, dt: */
    17851759        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!");
    17871761
    17881762        /* Get node coordinates and dof list: */
     
    18421816/*}}}*/
    18431817/*FUNCTION CreatePVector {{{1*/
    1844 #undef __FUNCT__
    1845 #define __FUNCT__ "Tria::CreatePVector"
    18461818void  Tria::CreatePVector(Vec pg,void* inputs,int analysis_type,int sub_analysis_type){
    18471819       
     
    18581830               
    18591831                }
    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"));
    18611833        }
    18621834        else if (analysis_type==SlopecomputeAnalysisEnum()){
     
    18771849        }
    18781850        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"));
    18801852        }
    18811853
     
    18831855/*}}}*/
    18841856/*FUNCTION CreatePVectorBalancedthickness {{{1*/
    1885 #undef __FUNCT__
    1886 #define __FUNCT__ "Tria::CreatePVectorBalancedthickness"
    18871857void  Tria::CreatePVectorBalancedthickness(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){
    18881858
     
    19301900        /*recover extra inputs from users, at current convergence iteration: */
    19311901        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!");
    19331903        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!");
    19351905
    19361906        /* Get node coordinates and dof list: */
     
    19761946/*}}}*/
    19771947/*FUNCTION CreatePVectorBalancedvelocities {{{1*/
    1978 #undef __FUNCT__
    1979 #define __FUNCT__ "Tria::CreatePVectorBalancedvelocities"
    19801948void  Tria::CreatePVectorBalancedvelocities(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){
    19811949
     
    20211989        /*recover extra inputs from users, at current convergence iteration: */
    20221990        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!");
    20241992        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!");
    20261994
    20271995        /* Get node coordinates and dof list: */
     
    20672035/*}}}*/
    20682036/*FUNCTION CreatePVectorDiagnosticBaseVert {{{1*/
    2069 #undef __FUNCT__
    2070 #define __FUNCT__ "Tria::CreatePVectorDiagnosticBaseVert"
    20712037void  Tria::CreatePVectorDiagnosticBaseVert(Vec pg,void* vinputs,int analysis_type,int sub_analysis_type){
    20722038
     
    21202086
    21212087        /* 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");
    21232089        inputs->Recover("velocity",&vy_list[0],1,dofs2,numgrids,(void**)nodes);
    21242090
     
    21842150/*}}}*/
    21852151/*FUNCTION CreatePVectorDiagnosticHoriz {{{1*/
    2186 #undef __FUNCT__
    2187 #define __FUNCT__ "Tria::CreatePVectorDiagnosticHoriz"
    21882152void Tria::CreatePVectorDiagnosticHoriz( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
    21892153
     
    23552319/*}}}*/
    23562320/*FUNCTION CreatePVectorPrognostic {{{1*/
    2357 #undef __FUNCT__
    2358 #define __FUNCT__ "Tria::CreatePVectorPrognostic"
    23592321void  Tria::CreatePVectorPrognostic(Vec pg ,void* vinputs,int analysis_type,int sub_analysis_type){
    23602322
     
    24032365        /*recover extra inputs from users, at current convergence iteration: */
    24042366        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!");
    24062368        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!");
    24082370        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!");
    24102372        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!");
    24122374
    24132375        /* Get node coordinates and dof list: */
     
    24542416/*}}}*/
    24552417/*FUNCTION CreatePVectorSlopeCompute {{{1*/
    2456 #undef __FUNCT__
    2457 #define __FUNCT__ "Tria::CreatePVectorSlopeCompute"
    24582418
    24592419void Tria::CreatePVectorSlopeCompute( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
     
    25492509/*}}}*/
    25502510/*FUNCTION CreatePVectorThermalShelf {{{1*/
    2551 #undef __FUNCT__
    2552 #define __FUNCT__ "Tria::CreatePVectorThermalShelf"
    25532511void Tria::CreatePVectorThermalShelf( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
    25542512
     
    26142572        /*recover extra inputs from users, dt and velocity: */
    26152573        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!");
    26172575        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!");
    26192577
    26202578        /* Ice/ocean heat exchange flux on ice shelf base */
     
    26622620/*}}}*/
    26632621/*FUNCTION CreatePVectorThermalSheet {{{1*/
    2664 #undef __FUNCT__
    2665 #define __FUNCT__ "Tria::CreatePVectorThermalSheet"
    26662622void Tria::CreatePVectorThermalSheet( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type){
    26672623
     
    27242680        /*recover extra inputs from users, dt and velocity: */
    27252681        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!");
    27272683       
    27282684        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!");
    27302686
    27312687        for(i=0;i<numgrids;i++){
     
    27382694       
    27392695        /*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!");
    27412697       
    27422698        friction->element_type=(char*)xmalloc((strlen("3d")+1)*sizeof(char));
     
    28072763/*}}}*/
    28082764/*FUNCTION DeepEcho{{{1*/
    2809 #undef __FUNCT__
    2810 #define __FUNCT__ "Tria::DeepEcho"
    28112765
    28122766void Tria::DeepEcho(void){
     
    28442798/*}}}*/
    28452799/*FUNCTION Du {{{1*/
    2846 #undef __FUNCT__
    2847 #define __FUNCT__ "Tria::Du"
    28482800void Tria::Du(Vec du_g,void* vinputs,int analysis_type,int sub_analysis_type){
    28492801
     
    29142866
    29152867        /* 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");
    29172869        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");
    29192871        }
    29202872        if(fit==3 && !inputs->Recover("surfacearea",&S)){
    2921                 throw ErrorException(__FUNCT__,"missing surface area input parameter");
     2873                ISSMERROR("missing surface area input parameter");
    29222874        }
    29232875        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");
    29252877        }
    29262878        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");
    29282880        }
    29292881
     
    30442996        else{
    30452997                /*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));
    30472999        }
    30483000
     
    31113063/*}}}*/
    31123064/*FUNCTION Echo {{{1*/
    3113 #undef __FUNCT__
    3114 #define __FUNCT__ "Tria::Echo"
    31153065
    31163066void Tria::Echo(void){
     
    31553105/*}}}*/
    31563106/*FUNCTION GetArea {{{1*/
    3157 #undef __FUNCT__
    3158 #define __FUNCT__ "Tria::GetArea"
    31593107double Tria::GetArea(void){
    31603108
     
    31743122/*}}}*/
    31753123/*FUNCTION GetAreaCoordinate {{{1*/
    3176 #undef __FUNCT__
    3177 #define __FUNCT__ "Tria::GetAreaCoordinate"
    31783124double Tria::GetAreaCoordinate(double x, double y, int which_one){
    31793125
     
    32043150                return 1-((x-x3)*(y2-y3)-(x2-x3)*(y-y3))/area -((x1-x3)*(y-y3)-(x-x3)*(y1-y3))/area;
    32053151        }
    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!"));
    32073153}
    32083154/*}}}*/
    32093155/*FUNCTION GetB {{{1*/
    3210 #undef __FUNCT__
    3211 #define __FUNCT__ "Tria::GetB"
    32123156
    32133157void Tria::GetB(double* B, double* xyz_list, double* gauss_l1l2l3){
     
    32523196/*}}}*/
    32533197/*FUNCTION GetB_prog {{{1*/
    3254 #undef __FUNCT__
    3255 #define __FUNCT__ "Tria::GetB_prog"
    32563198
    32573199void Tria::GetB_prog(double* B_prog, double* xyz_list, double* gauss_l1l2l3){
     
    32993241/*}}}*/
    33003242/*FUNCTION GetBPrime {{{1*/
    3301 #undef __FUNCT__
    3302 #define __FUNCT__ "Tria::GetBPrime"
    33033243
    33043244void Tria::GetBPrime(double* Bprime, double* xyz_list, double* gauss_l1l2l3){
     
    33383278/*}}}*/
    33393279/*FUNCTION GetBPrime_prog {{{1*/
    3340 #undef __FUNCT__
    3341 #define __FUNCT__ "Tria::GetBPrime_prog"
    33423280
    33433281void Tria::GetBPrime_prog(double* Bprime_prog, double* xyz_list, double* gauss_l1l2l3){
     
    34043342/*}}}*/
    34053343/*FUNCTION GetJacobian {{{1*/
    3406 #undef __FUNCT__
    3407 #define __FUNCT__ "Tria::GetJacobian"
    34083344void Tria::GetJacobian(double* J, double* xyz_list,double* gauss_l1l2l3){
    34093345
     
    34303366/*}}}*/
    34313367/*FUNCTION GetJacobianDeterminant2d {{{1*/
    3432 #undef __FUNCT__
    3433 #define __FUNCT__ "Tria::GetJacobianDeterminant2d"
    34343368void Tria::GetJacobianDeterminant2d(double*  Jdet, double* xyz_list,double* gauss_l1l2l3){
    34353369
     
    34513385
    34523386        if(Jdet<0){
    3453                 printf("%s%s\n",__FUNCT__," error message: negative jacobian determinant!");
     3387                ISSMERROR("negative jacobian determinant!");
    34543388        }
    34553389       
     
    34573391/*}}}*/
    34583392/*FUNCTION GetJacobianDeterminant3d {{{1*/
    3459 #undef __FUNCT__
    3460 #define __FUNCT__ "Tria::GetJacobianDeterminant3d"
    34613393void Tria::GetJacobianDeterminant3d(double*  Jdet, double* xyz_list,double* gauss_l1l2l3){
    34623394
     
    34793411        *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);
    34803412
    3481 
    34823413        if(Jdet<0){
    3483                 printf("%s%s\n",__FUNCT__," error message: negative jacobian determinant!");
     3414                ISSMERROR("negative jacobian determinant!");
    34843415        }
    34853416       
     
    34873418/*}}}*/
    34883419/*FUNCTION GetJacobianInvert {{{1*/
    3489 #undef __FUNCT__
    3490 #define __FUNCT__ "Tria::GetJacobianInvert"
    34913420void Tria::GetJacobianInvert(double*  Jinv, double* xyz_list,double* gauss_l1l2l3){
    34923421
     
    35043433/*}}}*/
    35053434/*FUNCTION GetL {{{1*/
    3506 #undef __FUNCT__
    3507 #define __FUNCT__ "Tria::GetL"
    35083435
    35093436void Tria::GetL(double* L, double* xyz_list, double* gauss_l1l2l3,int numdof){
     
    35653492/*}}}*/
    35663493/*FUNCTION GetNodalFunctions {{{1*/
    3567 #undef __FUNCT__
    3568 #define __FUNCT__ "Tria::GetNodalFunctions"
    35693494void Tria::GetNodalFunctions(double* l1l2l3, double* gauss_l1l2l3){
    35703495       
     
    35833508/*}}}*/
    35843509/*FUNCTION GetNodalFunctionsDerivatives {{{1*/
    3585 #undef __FUNCT__
    3586 #define __FUNCT__ "Tria::GetNodalFunctionsDerivatives"
    35873510void Tria::GetNodalFunctionsDerivatives(double* dh1dh3,double* xyz_list, double* gauss_l1l2l3){
    35883511       
     
    36183541/*}}}*/
    36193542/*FUNCTION GetNodalFunctionsDerivativesReference {{{1*/
    3620 #undef __FUNCT__
    3621 #define __FUNCT__ "Tria::GetNodalFunctionsDerivativesReference"
    36223543void Tria::GetNodalFunctionsDerivativesReference(double* dl1dl3,double* gauss_l1l2l3){
    36233544       
     
    36583579/*}}}*/
    36593580/*FUNCTION GetParameterDerivativeValue {{{1*/
    3660 #undef __FUNCT__
    3661 #define __FUNCT__ "Tria::GetParameterDerivativeValue"
    36623581void Tria::GetParameterDerivativeValue(double* p, double* plist,double* xyz_list, double* gauss_l1l2l3){
    36633582         
     
    36833602/*}}}*/
    36843603/*FUNCTION GetParameterValue {{{1*/
    3685 #undef __FUNCT__
    3686 #define __FUNCT__ "Tria::GetParameterValue"
    36873604void Tria::GetParameterValue(double* pp, double* plist, double* gauss_l1l2l3){
    36883605       
     
    37103627/*}}}*/
    37113628/*FUNCTION GetStrainRate {{{1*/
    3712 #undef __FUNCT__
    3713 #define __FUNCT__ "Tria::GetStrainRate"
    37143629void Tria::GetStrainRate(double* epsilon, double* velocity, double* xyz_list, double* gauss_l1l2l3){
    37153630
     
    37383653/*}}}*/
    37393654/*FUNCTION Gradj {{{1*/
    3740 #undef __FUNCT__
    3741 #define __FUNCT__ "Tria::Gradj"
    37423655void  Tria::Gradj(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type,char* control_type){
    37433656
     
    37513664                GradjB( grad_g,inputs,analysis_type,sub_analysis_type);
    37523665        }
    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));
    37543667}
    37553668/*}}}*/
    37563669/*FUNCTION GradjB{{{1*/
    3757 #undef __FUNCT__
    3758 #define __FUNCT__ "Tria::GradjB"
    37593670void  Tria::GradjB(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){
    37603671
     
    38323743        inputs->Recover("thickness",&h[0],1,dofs,numgrids,(void**)nodes);
    38333744        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");
    38353746        }
    38363747        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");
    38383749        }
    38393750        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");
    38413752        }
    38423753
     
    39313842/*}}}*/
    39323843/*FUNCTION GradjDrag {{{1*/
    3933 #undef __FUNCT__
    3934 #define __FUNCT__ "Tria::GradjDrag"
    39353844void  Tria::GradjDrag(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){
    39363845
     
    40113920        inputs->Recover("thickness",&h[0],1,dofs1,numgrids,(void**)nodes);
    40123921        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");
    40143923        }
    40153924        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");
    40173926        }
    40183927
     
    40653974                        friction->q=q;
    40663975
    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!");
    40683977
    40693978                        /*Compute alpha complement: */
     
    41514060/*}}}*/
    41524061/*FUNCTION GradjDragStokes {{{1*/
    4153 #undef __FUNCT__
    4154 #define __FUNCT__ "Tria::GradjDragStokes"
    41554062void  Tria::GradjDragStokes(Vec grad_g,void* vinputs,int analysis_type,int sub_analysis_type){
    41564063
     
    42334140        inputs->Recover("thickness",&h[0],1,dofs1,numgrids,(void**)nodes);
    42344141        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");
    42364143        }
    42374144        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");
    42394146        }
    42404147
     
    42894196                        friction->q=q;
    42904197
    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!");
    42924199
    42934200                        /*Compute alpha complement: */
     
    43874294/*}}}*/
    43884295/*FUNCTION MassFlux {{{1*/
    4389 #undef __FUNCT__
    4390 #define __FUNCT__ "Tria::MassFlux"
    43914296double Tria::MassFlux( double* segment,double* ug){
    43924297
     
    44144319
    44154320        /*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));
    44174322
    44184323        /*Recover segment node locations: */
     
    44594364/*}}}*/
    44604365/*FUNCTION MaticeConfiguration {{{1*/
    4461 #undef __FUNCT__
    4462 #define __FUNCT__ "Tria::MaticeConfiguration"
    44634366void  Tria::MaticeConfiguration(Matice* tria_matice,int tria_matice_offset){
    44644367           matice=tria_matice;
     
    44674370/*}}}*/
    44684371/*FUNCTION MatparConfiguration {{{1*/
    4469 #undef __FUNCT__
    4470 #define __FUNCT__ "Tria::MatparConfiguration"
    44714372void  Tria::MatparConfiguration(Matpar* tria_matpar,int tria_matpar_offset){
    44724373
     
    44774378/*}}}*/
    44784379/*FUNCTION Misfit {{{1*/
    4479 #undef __FUNCT__
    4480 #define __FUNCT__ "Tria::Misfit"
    44814380double Tria::Misfit(void* vinputs,int analysis_type,int sub_analysis_type){
    44824381
     
    45384437
    45394438        /* 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");
    45414440        if(fit==3 && !inputs->Recover("surfacearea",&S)){
    4542                 throw ErrorException(__FUNCT__,"missing surface area input parameter");
     4441                ISSMERROR("missing surface area input parameter");
    45434442        }
    45444443        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");
    45464445        }
    45474446        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");
    45494448        }
    45504449        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");
    45524451        }
    45534452
     
    46384537        else{
    46394538                /*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));
    46414540        }
    46424541
     
    46834582/*}}}*/
    46844583/*FUNCTION NodeConfiguration {{{1*/
    4685 #undef __FUNCT__
    4686 #define __FUNCT__ "Tria::NodeConfiguration"
    46874584void  Tria::NodeConfiguration(int* tria_node_ids,Node* tria_nodes[3],int* tria_node_offsets){
    46884585
     
    46974594/*}}}*/
    46984595/*FUNCTION NumparConfiguration {{{1*/
    4699 #undef __FUNCT__
    4700 #define __FUNCT__ "Tria::NumparConfiguration"
    47014596void  Tria::NumparConfiguration(Numpar* tria_numpar,int tria_numpar_offset){
    47024597
     
    47074602/*}}}*/
    47084603/*FUNCTION SurfaceNormal{{{1*/
    4709 #undef __FUNCT__
    4710 #define __FUNCT__ "Tria::SurfaceNormal"
    47114604
    47124605void Tria::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
     
    47364629/*}}}*/
    47374630/*FUNCTION SurfaceArea {{{1*/
    4738 #undef __FUNCT__
    4739 #define __FUNCT__ "Tria::SurfaceArea"
    47404631double Tria::SurfaceArea(void* vinputs,int analysis_type,int sub_analysis_type){
    47414632
     
    47744665/*}}}*/
    47754666/*FUNCTION UpdateFromInputs {{{1*/
    4776 #undef __FUNCT__
    4777 #define __FUNCT__ "Tria::UpdateFromInputs"
    47784667void  Tria::UpdateFromInputs(void* vinputs){
    47794668
  • issm/trunk/src/c/parallel/ControlInitialization.cpp

    r3086 r3332  
    22 * \brief: ...
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "ControlInitialization"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/ControlRestart.cpp

    r2383 r3332  
    33 * \brief: core of the control solution
    44 */
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__ "ControlRestart"
    85
    96#include "./parallel.h"
  • issm/trunk/src/c/parallel/OutputResults.cpp

    r693 r3332  
    1313#include "../io/io.h"
    1414
    15 #undef __FUNCT__
    16 #define __FUNCT__ "OutputResults"
    1715void OutputResults(DataSet* results,char* filename){
    1816
  • issm/trunk/src/c/parallel/ProcessResults.cpp

    r3086 r3332  
    1212#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    1313#endif
    14 
    15 #undef __FUNCT__
    16 #define __FUNCT__ "ProcessResults"
    1714
    1815#include "../DataSet/DataSet.h"
  • issm/trunk/src/c/parallel/WriteLockFile.cpp

    r1 r3332  
    22 * \brief
    33 */
    4 #undef __FUNCT__
    5 #define __FUNCT__ "WriteLockFile"
    6 
    74#include "stdio.h"
    85#include "../shared/shared.h"
     6#include "../include/macros.h"
    97
    108void WriteLockFile(char* filename){
     
    1917        if(my_rank==0){
    2018                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));
    2220
    2321                /*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));
    2523        }
    2624
  • issm/trunk/src/c/parallel/balancedthickness.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "balancedthickness"
    107
    118#ifdef HAVE_CONFIG_H
     
    5249
    5350        #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!");
    5552        #endif
    5653
     
    121118                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    122119                #else
    123                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     120                ISSMERROR(" Dakota not present, cannot do qmu!");
    124121                #endif
    125122        }
  • issm/trunk/src/c/parallel/balancedthickness_core.cpp

    r2715 r3332  
    33 */
    44
    5 #undef __FUNCT__
    6 #define __FUNCT__ "balancedthickness_core"
    7 
    85#include "../toolkits/toolkits.h"
    96#include "../objects/objects.h"
    107#include "../shared/shared.h"
     8#include "../include/macros.h"
    119#include "../EnumDefinitions/EnumDefinitions.h"
    1210#include "./parallel.h"
  • issm/trunk/src/c/parallel/balancedvelocities.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "balancedvelocities"
    107
    118#ifdef HAVE_CONFIG_H
     
    4946
    5047        #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!");
    5249        #endif
    5350
     
    118115                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    119116                #else
    120                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     117                ISSMERROR(" Dakota not present, cannot do qmu!");
    121118                #endif
    122119        }
  • issm/trunk/src/c/parallel/balancedvelocities_core.cpp

    r2722 r3332  
    22 * \brief: core of the balancedvelocities solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "balancedvelocities_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/control_core.cpp

    r2892 r3332  
    22 * \brief: core of the control solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "control_core"
    74
    85#include "./parallel.h"
  • issm/trunk/src/c/parallel/convergence.cpp

    r2333 r3332  
    22 * \brief: figure out if convergence has been reached
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "convergence"
    74
    85#include "../objects/objects.h"
     
    7269                PetscSynchronizedPrintf(MPI_COMM_WORLD,"norm kuold %lf \n",nKUoldF);
    7370                PetscSynchronizedFlush(MPI_COMM_WORLD);
    74                 throw ErrorException(__FUNCT__,exprintf("mechanical equilibrium convergence criterion is NaN! "));
     71                ISSMERROR("mechanical equilibrium convergence criterion is NaN!");
    7572        }
    7673
     
    9693                VecNorm(duf,NORM_2,&ndu); VecNorm(old_uf,NORM_2,&nu);
    9794
    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!");
    9996
    10097                //clean up
     
    121118                VecDuplicate(old_uf,&duf);VecCopy(old_uf,duf); VecAYPX(duf,-1.0,uf);
    122119                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!");
    124121
    125122                //clean up
  • issm/trunk/src/c/parallel/diagnostic.cpp

    r3203 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "diagnostic"
    107
    118#ifdef HAVE_CONFIG_H
     
    5451
    5552        #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!");
    5754        #endif
    5855
     
    163160                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    164161                #else
    165                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     162                ISSMERROR(" Dakota not present, cannot do qmu!");
    166163                #endif
    167164        }
  • issm/trunk/src/c/parallel/diagnostic_core.cpp

    r3086 r3332  
    22 * \brief: core of the diagnostic solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "diagnostic_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/diagnostic_core_linear.cpp

    r2333 r3332  
    22 * \brief: core of the diagnostic solution for non linear materials
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "diagnostic_core_inear"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp

    r3201 r3332  
    22 * \brief: core of the diagnostic solution for non linear materials
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "diagnostic_core_nonlinear"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/gradjcompute_core.cpp

    r2333 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "gradjcompute_core"
    107
    118#ifdef HAVE_CONFIG_H
  • issm/trunk/src/c/parallel/objectivefunctionC.cpp

    r3169 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "diagnostic"
    107
    118#ifdef HAVE_CONFIG_H
  • issm/trunk/src/c/parallel/prognostic.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "prognostic"
    107
    118#ifdef HAVE_CONFIG_H
     
    5350
    5451        #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!");
    5653        #endif
    5754
     
    127124                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    128125                #else
    129                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     126                ISSMERROR(" Dakota not present, cannot do qmu!");
    130127                #endif
    131128        }
  • issm/trunk/src/c/parallel/prognostic_core.cpp

    r2333 r3332  
    22 * \brief: core of the prognostic solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "prognostic_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/slopecompute.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "slopecompute"
    107
    118#ifdef HAVE_CONFIG_H
     
    4441
    4542        #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!");
    4744        #endif
    4845
  • issm/trunk/src/c/parallel/slopecompute_core.cpp

    r3086 r3332  
    22 * \brief: core of the slopecompute solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "slopecompute_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/steadystate.cpp

    r3251 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "steadystate"
    107
    118#ifdef HAVE_CONFIG_H
     
    5653
    5754        #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!");
    5956        #endif
    6057
     
    183180                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    184181                #else
    185                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     182                ISSMERROR(" Dakota not present, cannot do qmu!");
    186183                #endif
    187184        }
  • issm/trunk/src/c/parallel/steadystate_core.cpp

    r3086 r3332  
    22 * \brief: core of the steadystate solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "steadystate_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/thermal.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "thermal"
    107
    118#ifdef HAVE_CONFIG_H
     
    5350
    5451        #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!");
    5653        #endif
    5754
     
    129126                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    130127                #else
    131                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     128                ISSMERROR(" Dakota not present, cannot do qmu!");
    132129                #endif
    133130        }
  • issm/trunk/src/c/parallel/thermal_core.cpp

    r2333 r3332  
    22 * \brief: core of the thermal solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "thermal_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp

    r2333 r3332  
    22 * \brief: core of the thermal solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "thermal_core_nonlinear"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/transient.cpp

    r3097 r3332  
    55#include "../issm.h"
    66#include "./parallel.h"
    7 
    8 #undef __FUNCT__
    9 #define __FUNCT__ "transient"
    107
    118#ifdef HAVE_CONFIG_H
     
    5451
    5552        #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!");
    5754        #endif
    5855
     
    156153                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    157154                #else
    158                 throw ErrorException(__FUNCT__," Dakota not present, cannot do qmu!");
     155                ISSMERROR(" Dakota not present, cannot do qmu!");
    159156                #endif
    160157        }
  • issm/trunk/src/c/parallel/transient_core.cpp

    r1881 r3332  
    22 * \brief: core of the transient solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "transient_core"
    74
    85#include "../toolkits/toolkits.h"
     
    2926                transient_core_3d(results,model,inputs);
    3027        }
    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!"));
    3229
    3330}
  • issm/trunk/src/c/parallel/transient_core_2d.cpp

    r3086 r3332  
    22 * \brief: core of the transient_2d solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "transient_2d_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/parallel/transient_core_3d.cpp

    r3086 r3332  
    22 * \brief: core of the transient_3d solution
    33 */
    4 
    5 #undef __FUNCT__
    6 #define __FUNCT__ "transient_3d_core"
    74
    85#include "../toolkits/toolkits.h"
  • issm/trunk/src/c/shared/Alloc/alloc.cpp

    r3280 r3332  
    2727#include  "./alloc.h"
    2828#include "../Exceptions/exceptions.h"
     29#include "../../include/macros.h"
    2930
    30 #undef __FUNCT__
    31 #define __FUNCT__ "xmalloc"
    3231void* xmalloc(int size){
    3332
    3433        void* memptr=NULL;
    3534
    36         if(!size)throw ErrorException(__FUNCT__," attempting to 0 size allocation!");
     35        if(!size)ISSMERROR(" attempting to 0 size allocation!");
    3736
    3837        #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
     
    4342        memptr=malloc(size);
    4443        #endif
    45         if(!memptr) throw ErrorException(__FUNCT__," memory allocation failed!");
     44        if(!memptr) ISSMERROR("memory allocation failed!");
    4645
    4746        return memptr;
    4847}
    4948
    50 #undef __FUNCT__
    51 #define __FUNCT__ "xcalloc"
    5249void* xcalloc(int n,int size){
    5350
    5451        void* memptr=NULL;
    5552       
    56         if(!size)throw ErrorException(__FUNCT__," attempting to 0 size allocation!");
     53        if(!size)ISSMERROR("attempting to 0 size allocation!");
    5754
    5855        #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
     
    6360        memptr=calloc(n,size);
    6461        #endif
    65         if(!memptr) throw ErrorException(__FUNCT__," memory allocation failed!");
     62        if(!memptr) ISSMERROR("memory allocation failed!");
    6663
    6764        return memptr;
     
    8279}
    8380
    84 
    85 #undef __FUNCT__
    86 #define __FUNCT__ "xrealloc"
    8781void* xrealloc ( void* pv, int size){
    8882       
    8983        register void* value=NULL;
    9084       
    91         if(!size)throw ErrorException(__FUNCT__," attempting to realloc to zero");
     85        if(!size)ISSMERROR("attempting to realloc to zero");
    9286
    9387        #ifndef MATLAB
     
    9892
    9993        if (value == NULL) {
    100                 throw ErrorException(__FUNCT__,"virtual memory exhausted");
     94                ISSMERROR("virtual memory exhausted");
    10195        }
    10296        return value;
  • issm/trunk/src/c/shared/Dofs/DistributeNumDofs.cpp

    r3086 r3332  
    66#include "../../EnumDefinitions/EnumDefinitions.h"
    77#include "../shared.h"
    8 
    9 #undef __FUNCT__ 
    10 #define __FUNCT__ "DistributeNumDofs"
    118
    129int DistributeNumDofs(int *pnumdofs,int analysis_type,int sub_analysis_type){
     
    6259                numdofs=1;
    6360        }
    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!"));
    6562
    6663        /*Assign output pointers:*/
  • issm/trunk/src/c/shared/Dofs/dofsetgen.cpp

    r459 r3332  
    1212#include "../../include/macros.h"
    1313#include "stdio.h"
    14 
    15 #undef __FUNCT__
    16 #define __FUNCT__ "dofsetgen"
    1714
    1815double* dofsetgen(int numdofs,int* doflist,int dofspernode,int totaldofs){
  • issm/trunk/src/c/shared/Elements/Paterson.cpp

    r1678 r3332  
    55 */
    66
    7 #undef __FUNCT__
    8 #define __FUNCT__ "Paterson"
    97#include <math.h>
    10 
    118
    129double Paterson(double temperature){
  • issm/trunk/src/c/shared/Elements/ResolvePointers.cpp

    r3159 r3332  
    1212#include "../../DataSet/DataSet.h"
    1313#include "../../include/typedefs.h"
     14#include "../../include/macros.h"
    1415#include "../Exceptions/exceptions.h"
    15 
    16 
    17 #undef __FUNCT__
    18 #define __FUNCT__ "ResolvePointers"
    1916
    2017void ResolvePointers(Object** objects,int* object_ids,int* object_offsets,int num_objects,DataSet* dataset){
     
    5350                        objects[i]=(Object*)dataset->GetObjectById(object_offsets+i,object_ids[i]); //remember the offset for later on.
    5451                        /*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!"));
    5653                }
    5754        }
  • issm/trunk/src/c/shared/Exceptions/Exceptions.cpp

    r3329 r3332  
    66#include "../../include/macros.h"
    77
    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){
     8ErrorException::ErrorException(const string &what_arg){
    179
    1810        what_str=what_arg;
     
    3931void ErrorException::Report(){
    4032
    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());
    4635        }
    4736        else{
  • issm/trunk/src/c/shared/Exceptions/exceptions.h

    r3329 r3332  
    2424        public:
    2525
    26         ErrorException(const string &what_function,const string &what_arg);//default
    2726        ErrorException(const string &what_arg); //for windows
    2827        ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX
  • issm/trunk/src/c/shared/Exceptions/exprintf.cpp

    r1 r3332  
    33 * Instead of returning an int, it will return the char* itself.
    44 * 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));
    66 */
    77
  • issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp

    r1904 r3332  
    66 */
    77
    8 
    98#include "stdio.h"
    109#include "../Alloc/alloc.h"
     10#include "../../include/macros.h"
     11#include "../Exceptions/exceptions.h"
    1112
    12 #undef __FUNCT__
    13 #define __FUNCT__ "DomainOutlineRead"
    1413int DomainOutlineRead(int* pnprof,int** pprofngrids,double*** ppprofx,double*** ppprofy,char* domainname){
    1514
     
    3837        /*open domain outline file for reading: */
    3938        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));
    4140                noerr=0; goto cleanupandreturn;
    4241        }
  • issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp

    r1 r3332  
    66
    77#include "../Exceptions/exceptions.h"
     8#include "../../include/macros.h"
    89#include "mex.h"
    910
     
    1617                /* special case: */
    1718                function();
    18                 throw ErrorException(__FUNCT__," usage: see above");
     19                ISSMERROR("usage: see above");
    1920        }
    20         else if ( nlhs!=NLHS || nrhs!=NRHS ) {
     21        else if (nlhs!=NLHS || nrhs!=NRHS ) {
    2122                function();
    22                 throw ErrorException(__FUNCT__," usage error.");
     23                ISSMERROR("usage error.");
    2324        }
    2425        return 1;
  • issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp

    r1439 r3332  
    2929
    3030*/
    31 #undef __FUNCT__
    32 #define __FUNCT__ "TripleMultiply"
    33 
    3431#include "./matrix.h"
    3532#include "../Exceptions/exceptions.h"
    3633#include "../Alloc/alloc.h"
    37 #include "../../include/macros.h"
    3834#include "../Matlab/matlabshared.h"
    3935#include <stdio.h>
     
    4137#include <math.h>
    4238#include <float.h>    /*  DBL_EPSILON  */
     39#include "../../include/macros.h"
    4340
    4441int 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){
     
    6057        if (!itrnb) {
    6158                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.");
    6360                }
    6461                idimc=ncolb;
     
    6663        else {
    6764                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.");
    6966                }
    7067                idimc=nrowb;
     
    7370        if (!itrnc) {
    7471                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.");
    7673                }
    7774                idimd=ncolc;
     
    7976        else {
    8077                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.");
    8279                }
    8380                idimd=nrowc;
     
    196193
    197194        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");
    200196            noerr=0;   
    201197                return noerr;
     
    274270
    275271        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));
    278273                noerr=0;
    279274                return noerr;
     
    309304                        xfree((void **)&pivrc);
    310305                        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));
    313307                        noerr=0;
    314308                        return noerr;
  • issm/trunk/src/c/shared/Matrix/matrix.h

    r1 r3332  
    66#define  _MATRIXUTILS_H_
    77
    8 
    98int 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);
    109int MatrixMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int iaddc );
    1110int MatrixInverse( double* a, int ndim, int nrow, double* b, int nvec, double* pdet );
    12 
    1311       
    1412
    1513#endif //ifndef _MATRIXUTILS_H_
    16 
  • issm/trunk/src/c/shared/Numerics/GaussPoints.cpp

    r3159 r3332  
    4040
    4141=========1=========2=========3=========4=========5=========6=========7========*/
    42 #undef __FUNCT__
    43 #define __FUNCT__ "GaussLegendre"
    4442void GaussLegendre( double** pxgaus, double** pxwgt, int ngaus ) {
    4543       
     
    163161
    164162=========1=========2=========3=========4=========5=========6=========7========*/
    165 
    166 #undef __FUNCT__
    167 #define __FUNCT__ "GaussLobatto"
    168163
    169164void GaussLobatto( double** pxgaus, double** pxwgt, int ngaus ) {
     
    311306
    312307=========1=========2=========3=========4=========5=========6=========7========*/
    313 #undef __FUNCT__
    314 #define __FUNCT__ "GaussRecur"
    315 
    316308void GaussRecur( double* zero, double* weight, int n, double* alpha, double* beta ) {
    317309        int i,j,k,l,m,ii,mml,iter;
     
    401393                if (iter >= MAX_GAUS_ITER) {
    402394                        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));
    404396                }
    405397        }
     
    456448
    457449=========1=========2=========3=========4=========5=========6=========7========*/
    458 #undef __FUNCT__
    459 #define __FUNCT__ "GaussQuad"
    460 
    461450void GaussQuad( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, int nigaus, int njgaus ) {
    462451
     
    496485
    497486=========1=========2=========3=========4=========5=========6=========7========*/
    498 #undef __FUNCT__
    499 #define __FUNCT__ "GaussTria"
    500487void GaussTria( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, int iord ) {
    501488       
     
    16561643
    16571644=========1=========2=========3=========4=========5=========6=========7========*/
    1658 #undef __FUNCT__
    1659 #define __FUNCT__ "GaussHexa"
    16601645void GaussHexa( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, double** pzgaus, double** pzwgt, int nigaus, int njgaus, int nkgaus ) {
    16611646
     
    16971682
    16981683=========1=========2=========3=========4=========5=========6=========7========*/
    1699 #undef __FUNCT__
    1700 #define __FUNCT__ "GaussPenta"
    1701 
    17021684void GaussPenta( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, double** pzgaus, double** pzwgt, int iord, int nkgaus ) {
    17031685
     
    17431725
    17441726=========1=========2=========3=========4=========5=========6=========7========*/
    1745 #undef __FUNCT__
    1746 #define __FUNCT__ "GaussTetra"
    1747 
    17481727void GaussTetra( int* pngaus, double** pl1, double** pl2, double** pl3, double** pl4, double** pwgt, int iord ) {
    17491728        int i,j,k,ipt,nigaus;
  • issm/trunk/src/c/shared/Numerics/OptFunc.cpp

    r1844 r3332  
    1111#include "../../objects/objects.h"
    1212#include "../../shared/shared.h"
    13 
    14 #undef __FUNCT__
    15 #define __FUNCT__ "OptFunc"
    16 
     13#include "../../include/macros.h"
    1714
    1815#ifdef _SERIAL_
     
    4643#else
    4744double OptFunc(double scalar, OptArgs* optargs){
    48         throw ErrorException(__FUNCT__," not implemented yet");
     45        ISSMERROR(" not implemented yet");
    4946}
    5047#endif
  • issm/trunk/src/c/shared/Sorting/binary_search.cpp

    r1904 r3332  
    88#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
    99#endif
    10 
    11 #undef __FUNCT__
    12 #define __FUNCT__ "binary_search"
    1310
    1411#include "stdio.h"
  • issm/trunk/src/c/shared/String/isdistributed.cpp

    r765 r3332  
    1717#include "../Alloc/alloc.h"
    1818
    19 #undef __FUNCT__
    20 #define __FUNCT__ "isdistributed"
    2119int isdistributed(char** proot,char* name){
    2220
  • issm/trunk/src/c/shared/Threads/LaunchThread.cpp

    r2418 r3332  
    2222#include "../Alloc/alloc.h"
    2323#include "../Exceptions/exceptions.h"
    24 
    25 #undef __FUNCT__
    26 #define __FUNCT__ "LaunchThread"
     24#include "../../include/macros.h"
    2725
    2826void LaunchThread(void* function(void*), void* gate,int num_threads){
     
    4846
    4947                if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
    50                         throw ErrorException(__FUNCT__," pthread_create error");
     48                        ISSMERROR(" pthread_create error");
    5149                }
    5250        }
    5351        for(i=0;i<num_threads;i++){
    5452                if(pthread_join(threads[i],(void**)&status)){
    55                         throw ErrorException(__FUNCT__," pthread_join error");
     53                        ISSMERROR(" pthread_join error");
    5654                }
    5755        }
  • issm/trunk/src/c/shared/Threads/PartitionRange.cpp

    r2551 r3332  
    1010
    1111#include <math.h>
    12 
    13 #undef __FUNCT__
    14 #define __FUNCT__ "PartitionRange"
    1512
    1613void PartitionRange(int* pi0,int* pi1, int num_el,int num_threads,int my_thread){
  • issm/trunk/src/c/shared/TriMesh/AssociateSegmentToElement.cpp

    r1 r3332  
    44
    55#include "./trimesh.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "AssociateSegmentToElement"
    96
    107int AssociateSegmentToElement(double** psegments,int nseg, double* index,int nel){
  • issm/trunk/src/c/shared/TriMesh/GridInsideHole.cpp

    r1439 r3332  
    44 */
    55
    6 #undef __FUNCT__
    7 #define __FUNCT__ "GridInsideHole"
    8 
    96#include <math.h>
    10 
    117
    128#include "./trimesh.h"
  • issm/trunk/src/c/shared/TriMesh/OrderSegments.cpp

    r1 r3332  
    44 */
    55#include "./trimesh.h"
    6 
    7 #undef __FUNCT__
    8 #define __FUNCT__ "OrderSegments"
    96
    107int OrderSegments(double** psegments,int nseg, double* index,int nel){
  • issm/trunk/src/c/shared/TriMesh/SplitMeshForRifts.cpp

    r1 r3332  
    33 */
    44#include "./trimesh.h"
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__ "SplitMeshForRifts"
    85
    96#include "../Alloc/alloc.h"
  • issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp

    r3253 r3332  
    436436******************************************************************************************************************************/
    437437
    438 #undef __FUNCT__
    439 #define __FUNCT__ "FindElement"
    440 
    441438int FindElement(double A,double B,double* index,int nel){
    442439
     
    461458******************************************************************************************************************************/
    462459
    463 #undef __FUNCT__
    464 #define __FUNCT__ "SplitRiftSegments"
    465 
    466460int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts){
    467461
     
    555549******************************************************************************************************************************/
    556550
    557 #undef __FUNCT__
    558 #define __FUNCT__ "PairRiftElements"
    559                
    560                
    561551int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y){
    562552
     
    614604******************************************************************************************************************************/
    615605
    616 #undef __FUNCT__
    617 #define __FUNCT__ "RemoveRifts"
    618                
    619606double dabs(double x){
    620607        if (x<0)x=-x;
     
    810797******************************************************************************************************************************/
    811798
    812 #undef __FUNCT__
    813 #define __FUNCT__ "IsRiftPresent"
    814        
    815799int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs){
    816800
     
    845829******************************************************************************************************************************/
    846830
    847 #undef __FUNCT__
    848 #define __FUNCT__ "OrderRifts"
    849                
    850831int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y){
    851832       
     
    1018999******************************************************************************************************************************/
    10191000
    1020 #undef __FUNCT__
    1021 #define __FUNCT__ "PenaltyPairs"
    1022                        
    10231001int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double** riftssegments,
    10241002                int* riftsnumsegs,double** riftspairs,double* riftstips,double* x,double* y){
     
    11671145******************************************************************************************************************************/
    11681146
    1169 #undef __FUNCT__
    1170 #define __FUNCT__ "RemoveCorners"
    1171                
    1172 
    11731147int RemoveCornersFromRifts(double** pindex,int* pnel,double** px,double** py,int* pnods, double* segments,double* segmentmarkers,int num_seg){
    11741148
  • issm/trunk/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp

    r1 r3332  
    1313#include "stdio.h"
    1414#include "../../../shared/shared.h"
    15 
    16 #undef __FUNCT__
    17 #define __FUNCT__ "GetOwnershipBoundariesFromRange"
    1815
    1916void GetOwnershipBoundariesFromRange(int* plower_row,int* pupper_row,int range){
  • issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp

    r2042 r3332  
    22 * \brief  invert petsc matrix using LU factorization, and multiple right hand sides.
    33 */
    4 
    5 
    6 #undef __FUNCT__
    7 #define __FUNCT__ "MatInvert"
    84
    95/*Petsc includes: */
     
    139
    1410#include "../../../shared/shared.h"
     11#include "../../../include/macros.h"
    1512
    1613void MatInvert(Mat* pinv, Mat matrix){
     
    3229        /*Some checks: */
    3330        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!");
    3532
    3633        /*Create identitiy matrix: */
  • issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp

    r2042 r3332  
    1515
    1616#include "../../../shared/shared.h"
    17 
    18 
    19 #undef __FUNCT__
    20 #define __FUNCT__ "MatPartition"
    2117
    2218int 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  
    66#include "../../../shared/shared.h"
    77
    8 #undef __FUNCT__
    9 #define __FUNCT__ "MatToSerial"
    108void MatToSerial(double** poutmatrix,Mat matrix){
    119
  • issm/trunk/src/c/toolkits/petsc/patches/NewMat.cpp

    r2273 r3332  
    1717
    1818#include "../../../shared/shared.h"
    19 
     19#include "../../../include/macros.h"
    2020
    2121Mat NewMat(int M,int N,double* psparsity,int* pconnectivity,int* pnumberofdofspernode){
     
    5858                /*Same as above, except we bypass the default sparsity: */
    5959                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: ",
    6161                                                psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode));
    6262
     
    7575                 *present per row: */
    7676
    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: ",
    7878                                                psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode));
    7979
     
    8989        }
    9090        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: ",
    9292                                                psparsity," connectivity: ",pconnectivity," numberofdofspernode: ",pnumberofdofspernode));
    9393        }
  • issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp

    r3223 r3332  
    3737
    3838#include "../../../shared/shared.h"
    39 
    40 #undef __FUNCT__
    41 #define __FUNCT__ "PetscOptionsDetermineSolverType"
     39#include "../../../include/macros.h"
    4240
    4341void PetscOptionsDetermineSolverType(int* psolver_type,char* options_string){
     
    7876                        if(first[0]!='-'){
    7977                                /*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 '-'!"));
    8179                        }
    8280                        break;
  • issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp

    r3223 r3332  
    1616#include "./petscpatches.h"
    1717
    18 #undef __FUNCT__
    19 #define __FUNCT__ "PetscOptionsInsertMultipleString"
    20 
    2118#include "../../../shared/shared.h"
     19#include "../../../include/macros.h"
    2220
    2321void PetscOptionsInsertMultipleString(char* options_string){
     
    5755                        if(first[0]!='-'){
    5856                                /*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 '-'!"));
    6058                        }
    6159                        /*Reduce first to bare option value*/
  • issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp

    r1904 r3332  
    1717
    1818#include "../../../shared/shared.h"
     19#include "../../../include/macros.h"
    1920
    20 #undef __FUNCT__
    21 #define __FUNCT__ "VecMerge"
    2221void VecMerge(Vec A, Vec B, double* row_partition_vector,int row_partition_size){
    2322
     
    4645        /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
    4746        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");
    4948        }
    5049
  • issm/trunk/src/c/toolkits/petsc/patches/VecPartition.cpp

    r1904 r3332  
    1515
    1616#include "../../../shared/shared.h"
    17 
    18 
    19 #undef __FUNCT__
    20 #define __FUNCT__ "VecPartition"
    2117
    2218void 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  
    88
    99int SmallestPrimeFactor(int* output,int input);
    10 
    11 #undef __FUNCT__
    12 #define __FUNCT__ "CyclicalFactorization"
    1310
    1411int CyclicalFactorization(int* pnprows,int* pnpcols,int num_procs){
     
    4441}
    4542
    46 #undef __FUNCT__
    47 #define __FUNCT__ "PrimeDecomp"
    4843int PrimeDecomp(int** pdecomp,int* pdecomp_size,int input){
    4944
     
    8277        of integer input
    8378*/
    84 #undef __FUNCT__
    85 #define __FUNCT__  "SmallestPrimeFactor"
    8679int SmallestPrimeFactor(int* output,int input){
    8780       
  • issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp

    r1904 r3332  
    22 * \brief invert petsc matrix using Plapack
    33 */
     4#include "../../../include/macros.h"
    45
    56/* petsc: */
     
    1213#include "../../scalapack/FortranMapping.h"
    1314
    14 #undef __FUNCT__
    15 #define __FUNCT__ "PlapackInvertMatrix"
    1615void PlapackInvertMatrixLocalCleanup(PLA_Obj* pa,PLA_Template* ptempl,double** parrayA,
    1716                int** pidxnA,MPI_Comm* pcomm_2d);
     
    5453
    5554        /*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!");
    5756
    5857        /* Set default Plapack parameters */
  • issm/trunk/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp

    r831 r3332  
    66#include "../plapackincludes.h"
    77
    8 #undef __FUNCT__
    9 #define __FUNCT__ "PlapackToPetsc"
    108int 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){
    119
  • issm/trunk/src/m/classes/@bamgmesh/bamgmesh.m

    r3313 r3332  
    1717        bm.VerticesOnGeometricEdge=[];
    1818        bm.EdgesOnGeometricEdge=[];
    19         bm.CrackedEdges=[];
    2019        bm.SubDomains=[];
    2120        bm.SubDomainsFromGeom=[];
     
    2322        bm.NodalConnectivity=[];
    2423        bm.NodalElementConnectivity=[];
     24        bm.CrackedVertices=[];
     25        bm.CrackedEdges=[];
    2526        bm.hVertices=[];
    2627
  • issm/trunk/src/m/classes/public/bamg.m

    r3311 r3332  
    242242
    243243% Bamg Options {{{1
     244bamg_options.Crack=getfieldvalue(options,'Crack',0);
    244245bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30);
    245246bamg_options.coef=getfieldvalue(options,'coef',1);
  • issm/trunk/src/mex/Bamg/Bamg.cpp

    r3314 r3332  
    3434        FetchData(&bamggeom_in.SubDomains,      &bamggeom_in.SubDomainsSize[0],      &bamggeom_in.SubDomainsSize[1],      mxGetField(BAMGGEOMETRY,0,"SubDomains"));
    3535        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));}
    3737
    3838        /*create bamg mesh input*/
     
    4747        FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.VerticesOnGeometricVertexSize[0],&bamgmesh_in.VerticesOnGeometricVertexSize[1],mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex"));
    4848        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));}
    5050
    5151        /*create bamg options input*/
     
    5353        FetchData(&bamgopts.coef,mxGetField(BAMGOPTIONS,0,"coef"));
    5454        FetchData(&bamgopts.maxsubdiv,mxGetField(BAMGOPTIONS,0,"maxsubdiv"));
     55        FetchData(&bamgopts.Crack,mxGetField(BAMGOPTIONS,0,"Crack"));
    5556        FetchData(&bamgopts.Hessiantype,mxGetField(BAMGOPTIONS,0,"Hessiantype"));
    5657        FetchData(&bamgopts.Metrictype,mxGetField(BAMGOPTIONS,0,"Metrictype"));
     
    7273        FetchData(&bamgopts.MaximalAngleOfCorner,mxGetField(BAMGOPTIONS,0,"MaximalAngleOfCorner"));
    7374        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));}
    7576        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));}
    7778        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));}
    7980        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));}
    8182        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'"));}
    8384        BamgOptsCheck(&bamgopts);
    8485
  • issm/trunk/src/mex/Bamg/Bamg.h

    r3271 r3332  
    1 
    21/*
    32        Bamg.h
    43*/
    5 
    64
    75#ifndef _BAMG_H
     
    1513#undef __FUNCT__
    1614#define __FUNCT__  "Bamg"
    17 
    1815   
    1916/* serial input macros: */
  • issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp

    r2627 r3332  
    5555        if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){
    5656                ContourToMeshUsage();
    57                 throw ErrorException(__FUNCT__," usage. See above");
     57                ISSMERROR(" usage. See above");
    5858        }
    5959
     
    110110                WriteData(PLHS1,in_elem);
    111111        }
    112         else throw ErrorException(__FUNCT__," wrong interpolation type");
     112        else ISSMERROR(" wrong interpolation type");
    113113
    114114        /*end module: */
  • issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp

    r3128 r3332  
    5555        if (verbose) printf("Checking inputs\n");
    5656        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!");
    5858        }
    5959        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!");
    6161        }
    6262
  • issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp

    r2627 r3332  
    7676        /*some checks*/
    7777        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!");
    7979        }
    8080        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!");
    8282        }
    8383        /*get number of elements and number of nodes in the data*/
  • issm/trunk/src/mex/Qmu/Qmu.cpp

    r2333 r3332  
    2828
    2929        #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!");
    3131        #endif
    3232
Note: See TracChangeset for help on using the changeset viewer.