Changeset 12493


Ignore:
Timestamp:
06/21/12 10:02:29 (13 years ago)
Author:
Mathieu Morlighem
Message:

replaced all _error_ to _error2_

Location:
issm/trunk-jpl/src/c
Files:
181 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/DataSet.cpp

    r12466 r12493  
    133133        vector<Object*>::iterator object;
    134134
    135         if(this==NULL)_error_(" trying to echo a NULL dataset");
     135        if(this==NULL)_error2_(" trying to echo a NULL dataset");
    136136
    137137        _printf_(true,"DataSet echo: %i objects\n",objects.size());
     
    150150        vector<Object*>::iterator object;
    151151
    152         if(this==NULL)_error_(" trying to echo a NULL dataset");
     152        if(this==NULL)_error2_(" trying to echo a NULL dataset");
    153153
    154154        _printf_(true,"DataSet echo: %i objects\n",objects.size());
     
    194194
    195195        _assert_(this);
    196         if(!sorted)_error_(" trying to binary search on a non-sorted dataset!");
     196        if(!sorted)_error2_(" trying to binary search on a non-sorted dataset!");
    197197
    198198        /*Carry out a binary search on the sorted_ids: */
    199199        if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){
    200                 _error_("could not find object with id %i in DataSet %s",eid,EnumToStringx(enum_type));
     200                _error2_("could not find object with id " << eid << " in DataSet " << EnumToStringx(enum_type));
    201201        }
    202202
     
    259259        /*Only sort if we are not already sorted: */
    260260        if(!sorted){
    261                 _error_(" not implemented yet!");
    262         }
    263 }
    264 /*}}}*/
     261                _error2_(" not implemented yet!");
     262        }
     263}
     264/*}}}*/
  • issm/trunk-jpl/src/c/Container/Elements.cpp

    r12466 r12493  
    203203                /*see what the first element of this partition has in stock (this is common to all partitions)*/
    204204                if(my_rank==minrank){
    205                         if(this->Size()==0) _error_("Cannot write results because there is no element??");
     205                        if(this->Size()==0) _error2_("Cannot write results because there is no element??");
    206206                        Element* element=(Element*)this->GetObjectByOffset(0);
    207207                        element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
     
    232232                        if(resultssizes[i]==P1Enum)      vectorsize=numberofvertices;
    233233                        else if(resultssizes[i]==P0Enum) vectorsize=numberofelements;
    234                         else _error_("Unkown result size: %s",EnumToStringx(resultssizes[i]));
     234                        else _error2_("Unkown result size: " << EnumToStringx(resultssizes[i]));
    235235                        vector=new Vector(vectorsize);
    236236
  • issm/trunk-jpl/src/c/Container/Inputs.cpp

    r12466 r12493  
    5757                /*we could not find an input with the correct enum type. No defaults values were provided,
    5858                 * error out: */
    59                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     59                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    6060        }
    6161
     
    8585                /*we could not find an input with the correct enum type. No defaults values were provided,
    8686                 * error out: */
    87                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     87                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    8888        }
    8989
     
    113113                /*we could not find an input with the correct enum type. No defaults values were provided,
    114114                 * error out: */
    115                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     115                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    116116        }
    117117
     
    141141                /*we could not find an input with the correct enum type. No defaults values were provided,
    142142                 * error out: */
    143                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     143                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    144144        }
    145145
     
    213213
    214214        /*some checks: */
    215         if(!constrain_input) _error_(" input %s could not be found!",EnumToStringx(constrain_enum));
     215        if(!constrain_input) _error2_(" input " << EnumToStringx(constrain_enum) << " could not be found!");
    216216
    217217        /*Apply ContrainMin: */
     
    254254        }
    255255        else{
    256                 _error_("Input %s not found",EnumToStringx(enumtype));
     256                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    257257        }
    258258
     
    275275        }
    276276        else{
    277                 _error_("Input %s not found",EnumToStringx(enumtype));
     277                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    278278        }
    279279
     
    296296        }
    297297        else{
    298                 _error_("Input %s not found",EnumToStringx(enumtype));
     298                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    299299        }
    300300
     
    317317        }
    318318        else{
    319                 _error_("Input %s not found",EnumToStringx(enumtype));
     319                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    320320        }
    321321
     
    369369        /*Make a copy of the original input: */
    370370        original=(Input*)this->GetInput(original_enum);
    371         if(!original)_error_("could not find input with enum: %s",EnumToStringx(original_enum));
     371        if(!original)_error2_("could not find input with enum: " << EnumToStringx(original_enum));
    372372        copy=(Input*)original->copy();
    373373
     
    416416
    417417        /*some checks: */
    418         if(!xinput) _error_(" input %s could not be found!",EnumToStringx(MeshXEnum));
    419         if(!yinput) _error_(" input %s could not be found!",EnumToStringx(MeshYEnum));
     418        if(!xinput) _error2_(" input " << EnumToStringx(MeshXEnum) << " could not be found!");
     419        if(!yinput) _error2_(" input " << EnumToStringx(MeshYEnum) << " could not be found!");
    420420
    421421        /*Apply AXPY: */
  • issm/trunk-jpl/src/c/Container/Observations.cpp

    r12466 r12493  
    5959        options->Get(&maxtrimming,"maxtrimming",+1.e+21);
    6060        options->Get(&minspacing,"minspacing",0.01);
    61         if(minspacing<=0) _error_("minspacing must > 0");
     61        if(minspacing<=0) _error2_("minspacing must > 0");
    6262
    6363        /*Get Minimum box size*/
    6464        if(options->GetOption("boxlength")){
    6565                options->Get(&minlength,"boxlength");
    66                 if(minlength<=0)_error_("boxlength should be a positive number");
     66                if(minlength<=0)_error2_("boxlength should be a positive number");
    6767                maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0));
    6868        }
     
    384384        SolverxGsl(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
    385385#else
    386         _error_("GSL is required");
     386        _error2_("GSL is required");
    387387#endif
    388388
  • issm/trunk-jpl/src/c/Container/Options.cpp

    r12466 r12493  
    4747
    4848        /*Also, check the option name*/
    49         if(!in_option->name) _error_("input option has an empty name");
    50         if(strchr(in_option->name,'.')) _error_("Option \"%s\" has a protected character \".\"",in_option->name);
    51         if(strchr(in_option->name,'[')) _error_("Option \"%s\" has a protected character \"[\"",in_option->name);
    52         if(strchr(in_option->name,']')) _error_("Option \"%s\" has a protected character \"]\"",in_option->name);
     49        if(!in_option->name) _error2_("input option has an empty name");
     50        if(strchr(in_option->name,'.')) _error2_("Option \"" << in_option->name << "\" has a protected character \".\"");
     51        if(strchr(in_option->name,'[')) _error2_("Option \"" << in_option->name << "\" has a protected character \"[\"");
     52        if(strchr(in_option->name,']')) _error2_("Option \"" << in_option->name << "\" has a protected character \"]\"");
    5353
    5454        /*Finally, check that no option of the same name already exists in the dataset*/
     
    5757                option=(Option*)(*object);
    5858                if (!strcmp(option->name,in_option->name)){
    59                         _error_("Options \"%s\" found multiple times",in_option->name);
     59                        _error2_("Options \"" << in_option->name << "\" found multiple times");
    6060                        break;
    6161                }
     
    8383        /*Else, the Option does not exist, no default provided*/
    8484        else{
    85                 _error_("option of name \"%s\" not found, and no default value has been provided",name);
     85                _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
    8686        }
    8787}
     
    121121        /*Else, the Option does not exist, no default provided*/
    122122        else{
    123                 _error_("option of name \"%s\" not found, and no default value has been provided",name);
     123                _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
    124124        }
    125125}
     
    159159        /*Else, the Option does not exist, no default provided*/
    160160        else{
    161                 _error_("option of name \"%s\" not found, and no default value has been provided",name);
     161                _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
    162162        }
    163163}
     
    199199        /*Else, the Option does not exist, no default provided*/
    200200        else{
    201                 _error_("option of name \"%s\" not found, and no default value has been provided",name);
     201                _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
    202202        }
    203203
     
    264264                /*Else: not supported*/
    265265                else{
    266                         _error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToStringx(option->ObjectEnum()));
     266                        _error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
    267267                }
    268268        }
     
    290290        /*Else, the Option does not exist, no default provided*/
    291291        else{
    292                 _error_("option of name \"%s\" not found, and no default value has been provided",name);
     292                _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
    293293        }
    294294}
     
    324324                                /*Else: not supported*/
    325325                                else{
    326                                         _error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToStringx(option->ObjectEnum()));
     326                                        _error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
    327327                                }
    328328                        }
  • issm/trunk-jpl/src/c/Container/Parameters.cpp

    r12466 r12493  
    6565                }
    6666        }
    67         _error_("could not find parameter %s",EnumToStringx(enum_type));
     67        _error2_("could not find parameter " << EnumToStringx(enum_type));
    6868}
    6969/*}}}*/
     
    8282                }
    8383        }
    84         _error_("could not find parameter %s",EnumToStringx(enum_type));
     84        _error2_("could not find parameter " << EnumToStringx(enum_type));
    8585}
    8686/*}}}*/
     
    9999                }
    100100        }
    101         _error_("could not find parameter %s",EnumToStringx(enum_type));
     101        _error2_("could not find parameter " << EnumToStringx(enum_type));
    102102}
    103103/*}}}*/
     
    116116                }
    117117        }
    118         _error_("could not find parameter %s",EnumToStringx(enum_type));
     118        _error2_("could not find parameter " << EnumToStringx(enum_type));
    119119
    120120}
     
    134134                }
    135135        }
    136         _error_("could not find parameter %s",EnumToStringx(enum_type));
     136        _error2_("could not find parameter " << EnumToStringx(enum_type));
    137137
    138138}
     
    152152                }
    153153        }
    154         _error_("could not find parameter %s",EnumToStringx(enum_type));
     154        _error2_("could not find parameter " << EnumToStringx(enum_type));
    155155
    156156}
     
    170170                }
    171171        }
    172         _error_("could not find parameter %s",EnumToStringx(enum_type));
     172        _error2_("could not find parameter " << EnumToStringx(enum_type));
    173173
    174174}
     
    188188                }
    189189        }
    190         _error_("could not find parameter %s",EnumToStringx(enum_type));
     190        _error2_("could not find parameter " << EnumToStringx(enum_type));
    191191
    192192}
     
    206206                }
    207207        }
    208         _error_("could not find parameter %s",EnumToStringx(enum_type));
     208        _error2_("could not find parameter " << EnumToStringx(enum_type));
    209209
    210210}
     
    224224                }
    225225        }
    226         _error_("could not find parameter %s",EnumToStringx(enum_type));
     226        _error2_("could not find parameter " << EnumToStringx(enum_type));
    227227}
    228228/*}}}*/
     
    241241                }
    242242        }
    243         _error_("could not find parameter %s",EnumToStringx(enum_type));
     243        _error2_("could not find parameter " << EnumToStringx(enum_type));
    244244
    245245}
     
    259259                }
    260260        }
    261         _error_("could not find parameter %s",EnumToStringx(enum_type));
     261        _error2_("could not find parameter " << EnumToStringx(enum_type));
    262262
    263263}
     
    277277                }
    278278        }
    279         _error_("could not find parameter %s",EnumToStringx(enum_type));
     279        _error2_("could not find parameter " << EnumToStringx(enum_type));
    280280}
    281281/*}}}*/
  • issm/trunk-jpl/src/c/include/macros.h

    r12490 r12493  
    99#include <iostream>
    1010#include <sstream>
    11 
    1211#include "./typedefs.h"
    1312
     
    4241#else
    4342#define _error2_(StreamArgs)\
    44    {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
     43        {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
    4544   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
    4645   throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
  • issm/trunk-jpl/src/c/io/Disk/pfclose.cpp

    r9320 r12493  
    1818        extern int my_rank;
    1919        _assert_(fid);
    20         if(fclose(fid)!=0)_error_("%s%s","could not close file ",filename);
     20        if(fclose(fid)!=0)_error2_("" << "could not close file " << filename);
    2121}
  • issm/trunk-jpl/src/c/io/Disk/pfopen.cpp

    r11202 r12493  
    2020        /*Open handle to data on disk: */
    2121        fid=fopen(filename,format);
    22         if(fid==NULL) _error_("%s%s%s","could not open file ",filename," for binary reading or writing");
     22        if(fid==NULL) _error2_("" << "could not open file " << filename << " for binary reading or writing");
    2323
    2424        return fid;
  • issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp

    r12013 r12493  
    2222                /* special case: */
    2323                function();
    24                 _error_("usage: see above");
     24                _error2_("usage: see above");
    2525        }
    2626        else if (nlhs!=NLHS || nrhs!=NRHS ) {
    2727                function();
    28                 _error_("usage error.");
     28                _error2_("usage error.");
    2929        }
    3030        return 1;
  • issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp

    r12434 r12493  
    4444        else{
    4545                /*This is an error: we don't have the correct input!: */
    46                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     46                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    4747        }
    4848                       
     
    8585        else{
    8686                /*This is an error: we don't have the correct input!: */
    87                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     87                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    8888        }
    8989                       
     
    130130        else{
    131131                /*This is an error: we don't have the correct input!: */
    132                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     132                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    133133        }
    134134
     
    172172        else{
    173173                /*This is an error: we don't have the correct input!: */
    174                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     174                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    175175        }
    176176
     
    234234        else{
    235235                /*This is an error: we don't have the correct input!: */
    236                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     236                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    237237        }
    238238                       
     
    265265        else{
    266266                /*This is an error: we don't have the correct input!: */
    267                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     267                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    268268        }
    269269
     
    297297        else{
    298298                /*This is an error: we don't have the correct input!: */
    299                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     299                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    300300        }
    301301
     
    329329        else{
    330330                /*This is an error: we don't have the correct input!: */
    331                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     331                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    332332        }
    333333
     
    361361        else{
    362362                /*This is an error: we don't have the correct input!: */
    363                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     363                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    364364        }
    365365
     
    377377        /*Ok, the string should be coming directly from the matlab workspace: */
    378378        if (!mxIsClass(dataref,"char")){
    379                 _error_("input data_type is not a string!");
     379                _error2_("input data_type is not a string!");
    380380        }
    381381        else{
     
    412412        else{
    413413                /*This is an error: we don't have the correct input!: */
    414                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     414                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    415415        }
    416416                       
     
    430430
    431431        if (!mxIsClass(dataref,"double")){
    432                 _error_("input data_type is not a double!");
     432                _error2_("input data_type is not a double!");
    433433        }
    434434        else{
     
    447447
    448448        if (!mxIsClass(dataref,"double")){
    449                 _error_("input data_type is not a scalar!");
     449                _error2_("input data_type is not a scalar!");
    450450        }
    451451        else{
     
    464464
    465465        if (mxIsClass(dataref,"logical")){
    466                 if(mxGetM(dataref)!=1) _error_("input data is not of size 1x1");
    467                 if(mxGetN(dataref)!=1) _error_("input data is not of size 1x1");
     466                if(mxGetM(dataref)!=1) _error2_("input data is not of size 1x1");
     467                if(mxGetN(dataref)!=1) _error2_("input data is not of size 1x1");
    468468                mxbool_ptr=mxGetLogicals(dataref);
    469469        }
    470470        else{
    471                 _error_("input data_type is not a bool!");
     471                _error2_("input data_type is not a bool!");
    472472        }
    473473
     
    491491        else{
    492492                /*This is an error: we don't have the correct input!: */
    493                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     493                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    494494        }
    495495
     
    515515        else{
    516516                /*This is an error: we don't have the correct input!: */
    517                 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
     517                _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    518518        }
    519519
     
    616616        /*Fetch all options*/
    617617        for (int i=istart; i<nrhs; i=i+2){
    618                 if (!mxIsClass(pdataref[i],"char")) _error_("Argument %d must be name of option",i+1);
     618                if (!mxIsClass(pdataref[i],"char")) _error2_("Argument " << i+1 << " must be name of option");
    619619
    620620                FetchData(&name,pdataref[i]);
    621                 if(i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
     621                if(i+1 == nrhs) _error2_("Argument " << i+2 << " must exist and be value of option \"" << name << "\".");
    622622
    623623                option=(Option*)OptionParse(name,&pdataref[i+1]);
  • issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp

    r12446 r12493  
    108108        }
    109109        else{
    110                 _error_("Matlab matrix type Not implemented yet");
     110                _error2_("Matlab matrix type Not implemented yet");
    111111        }
    112112
  • issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp

    r12446 r12493  
    4646               
    4747                /*Check that input is actualy a vector*/
    48                 if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
     48                if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
    4949
    5050                nz=(int)((double)nnz/(double)rows);
     
    7777
    7878                /*Check that input is actualy a vector*/
    79                 if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
     79                if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
    8080
    8181                /*allocate and memcpy*/
  • issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp

    r12434 r12493  
    2727        /*check and parse the value  */
    2828        if (!mxIsClass(prhs[0],"double")){
    29                 _error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",odouble->name,"double",odouble->name,mxGetClassName(prhs[0]));
     29                _error2_("Value of option \"" << odouble->name  << "\" must be class \"double\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    3030        }
    3131        FetchData(&odouble->values,&odouble->numel,&odouble->ndims,&odouble->size,prhs[0]);
     
    4545        /*check and parse the value  */
    4646        if (!mxIsClass(prhs[0],"logical")){
    47                 _error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ological->name,"logical",ological->name,mxGetClassName(prhs[0]));
     47                _error2_("Value of option \"" << ological->name  << "\" must be class \"logical\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    4848        }
    4949        FetchData(&ological->values,&ological->numel,&ological->ndims,&ological->size,prhs[0]);
     
    6363        /*check and parse the value  */
    6464        if (!mxIsClass(prhs[0],"char")){
    65                 _error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ochar->name,"char",ochar->name,mxGetClassName(prhs[0]));
     65                _error2_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    6666        }
    6767        FetchData(&ochar->values,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
     
    8787        /*check and parse the value  */
    8888        if (!mxIsClass(prhs[0],"struct")){
    89                 _error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ostruct->name,"struct",ostruct->name,mxGetClassName(prhs[0]));
     89                _error2_("Value of option \"" << ostruct->name  << "\" must be class \"struct\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    9090        }
    9191        ostruct->numel=mxGetNumberOfElements(prhs[0]);
     
    133133        /*check and parse the value  */
    134134        if (!mxIsClass(prhs[0],"cell")){
    135                 _error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ocell->name,"cell",ocell->name,mxGetClassName(prhs[0]));
     135                _error2_("Value of option \"" << ocell->name  << "\" must be class \"cell\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    136136        }
    137137
     
    181181                        mxDestroyArray(lhs[0]);
    182182                }
    183                 else _error_("Second argument value of option \"%s\" is of unrecognized class \"%s\".",name,mxGetClassName(prhs[0]));
     183                else _error2_("Second argument value of option \""<< name <<"\" is of unrecognized class \""<< mxGetClassName(prhs[0]) <<"\".");
    184184        }
    185185
  • issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp

    r12450 r12493  
    8686                }
    8787                else if (flag==NodalEnum){
    88                         _error_(" nodal response functions not supported yet!");
     88                        _error2_(" nodal response functions not supported yet!");
    8989
    9090                        /*increment response_pointer :*/
     
    104104                        }
    105105                }
    106                 else _error_("%s%i%s"," flag type ",flag," not supported yet for response analysis");
     106                else _error2_("" << " flag type " << flag << " not supported yet for response analysis");
    107107        }
    108108
  • issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp

    r9761 r12493  
    2323        /*retrieve first token, separated by underscore: */
    2424        pch = strtok (descriptor,"_");
    25         if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
     25        if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
    2626
    2727        if (strncmp(pch,"scaled",6)==0){
    2828                /*we have a scaled variable. recover the root: */
    2929                pch = strtok (NULL, "_");
    30                 if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
     30                if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
    3131                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    3232
     
    4444                /*we have an indexed variable. recover the root: */
    4545                pch = strtok (NULL, "_");
    46                 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
     46                if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
    4747                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    4848                /*now recover  the index: */
    4949                pch = strtok (NULL, "_");
    50                 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
     50                if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
    5151                sscanf(pch,"%i",pindex);
    5252                return IndexedEnum;
     
    5555                /*we have an indexed variable. recover the root: */
    5656                pch = strtok (NULL, "_");
    57                 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
     57                if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
    5858                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    5959                /*now recover  the index: */
    6060                pch = strtok (NULL, "_");
    61                 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
     61                if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
    6262                sscanf(pch,"%i",pindex);
    6363                return NodalEnum;
  • issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp

    r9775 r12493  
    7272        if(control_analysis)solutioncore=&control_core;
    7373        #else
    74         _error_("ISSM was not compiled with control capabilities, exiting!");
     74        _error2_("ISSM was not compiled with control capabilities, exiting!");
    7575        #endif
    7676
  • issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp

    r12102 r12493  
    3939        #ifdef _HAVE_MPI_
    4040        MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
    41         if(!sumfound)_error_("%s%i%s","could not find material with id",index," to compute ElementResponse");
     41        if(!sumfound)_error2_("" << "could not find material with id" << index << " to compute ElementResponse");
    4242        #endif
    4343
  • issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp

    r12442 r12493  
    5555
    5656        if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
    57                 _error_("Error reading exp file.");
     57                _error2_("Error reading exp file.");
    5858        _printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
    5959//      for (i=0; i<nprof; i++)
  • issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp

    r11679 r12493  
    2626        /*Get size of vector: */
    2727        gsize=nodes->NumberOfDofs(configuration_type,GsetEnum);
    28         if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToStringx(configuration_type));
     28        if (gsize==0) _error2_("Allocating a Vec of size 0 as gsize=0 for configuration: " << EnumToStringx(configuration_type));
    2929       
    3030        /*Initialize solution: */
  • issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp

    r12470 r12493  
    3232        }
    3333        else{
    34                 _error_("%s%s%s"," vector type: ",EnumToStringx(type)," not supported yet!");
     34                _error2_("" << " vector type: " << EnumToStringx(type) << " not supported yet!");
    3535        }
    3636
  • issm/trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp

    r12450 r12493  
    5454        /*Check that gradient is clean*/
    5555        norm_inf=gradient->Norm(NORM_INF);
    56         if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
    57         if(isnan(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
     56        if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
     57        if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
    5858
    5959        /*Clean-up and assign output pointer*/
  • issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp

    r12450 r12493  
    2727
    2828        if(migration_style==NoneEnum) return;
    29         if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error_("%s not supported yet!",EnumToStringx(migration_style));
     29        if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error2_("" << EnumToStringx(migration_style) << " not supported yet!");
    3030
    3131        if(migration_style==SoftMigrationEnum){
  • issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp

    r12450 r12493  
    9595                }
    9696                else if (strncmp(descriptor,"indexed_",8)==0){
    97                         _error_(" indexed variables not supported yet!");
     97                        _error2_(" indexed variables not supported yet!");
    9898                }
    9999                else if (strncmp(descriptor,"nodal_",8)==0){
    100                         _error_(" nodal variables not supported yet!");
     100                        _error2_(" nodal variables not supported yet!");
    101101                }
    102102                else{
  • issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp

    r12450 r12493  
    3636        /*Some checks on arguments: */
    3737        if ((M<2) || (N<2) || (nods<=0)){
    38                 _error_("nothing to be done according to the dimensions of input matrices and vectors.");
     38                _error2_("nothing to be done according to the dimensions of input matrices and vectors.");
    3939        }
    4040        if (x_in[1]-x_in[0]<0){
    41                 _error_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
     41                _error2_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
    4242        }
    4343        if (y_in[1]-y_in[0]<0){
    44                 _error_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
     44                _error2_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
    4545        }
    4646
     
    6868        }
    6969        else{
    70                 _error_("x and y vectors length should be 1 or 0 more than data number of rows.");
     70                _error2_("x and y vectors length should be 1 or 0 more than data number of rows.");
    7171        }
    7272
  • issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp

    r12442 r12493  
    4141        /*some checks*/
    4242        if (nels_data<1 || nods_data<3 || nods_prime==0){
    43                 _error_("nothing to be done according to the mesh given in input");
     43                _error2_("nothing to be done according to the mesh given in input");
    4444        }
    4545
     
    5555        }
    5656        else{
    57                 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     57                _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    5858        }
    5959
    6060        if((numcontours) && (interpolation_type==2)){
    61                 _error_(" element interpolation_type with contours not supported yet!");
     61                _error2_(" element interpolation_type with contours not supported yet!");
    6262        }
    6363
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp

    r12450 r12493  
    3030        /*some checks*/
    3131        if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){
    32                 _error_("nothing to be done according to the mesh given in input");
     32                _error2_("nothing to be done according to the mesh given in input");
    3333        }
    3434
     
    4141        }
    4242        else{
    43                 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     43                _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    4444        }
    4545
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r12450 r12493  
    3838        /*Checks*/
    3939        if (data_cols<=0){
    40                 _error_("data provided has a negative number of columns");
     40                _error2_("data provided has a negative number of columns");
    4141        }
    4242        if (data_rows!=nods_data && data_rows!=nels_data){
    43                 _error_("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows);
     43                _error2_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << data_rows << ")");
    4444        }
    4545        if((num_default_values) && (data_cols>1)){
    46                 _error_("data provided can only have 1 column if a default value is provided");
     46                _error2_("data provided can only have 1 column if a default value is provided");
    4747        }
    4848       
     
    125125                                for (j=0;j<data_cols;j++){
    126126                                        if (it<0 || it>=nels_data){
    127                                                 _error_("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data);
     127                                                _error2_("Triangle number " << it << " not in [0 " << nels_data << "], because not correctly implemented yet... interpolate on grid first");
    128128                                        }
    129129                                        data_interp[i*data_cols+j]=data[data_cols*it+j];
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp

    r11695 r12493  
    2727        /*some checks*/
    2828        if (nels_data<1 || nods_data<6 || nods_prime==0){
    29                 _error_("nothing to be done according to the mesh given in input");
     29                _error2_("nothing to be done according to the mesh given in input");
    3030        }
    3131
     
    4141        }
    4242        else{
    43                 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     43                _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    4444        }
    4545
  • issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp

    r12470 r12493  
    3838        fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
    3939
    40         if(code!=7)_error_("%s%s"," expecting a IssmDouble vector for constraints with enum ",EnumToStringx(vector_enum));
    41         if(vector_layout!=1)_error_("%s%s"," expecting a nodal vector for constraints with enum ",EnumToStringx(vector_enum));
     40        if(code!=7)_error2_("" << " expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
     41        if(vector_layout!=1)_error2_("" << " expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
    4242
    4343        /*Fetch vector:*/
     
    9999        }
    100100        else{
    101                 _error_("Size of field %s not supported",EnumToStringx(vector_enum));
     101                _error2_("Size of field " << EnumToStringx(vector_enum) << " not supported");
    102102        }
    103103
  • issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp

    r12450 r12493  
    133133                                        }
    134134                                        else
    135                                                 _error_("Nodal connectivity table needs more than specified %d columns.\n",mxepg);
     135                                                _error2_("Nodal connectivity table needs more than specified " << mxepg << " columns.\n");
    136136                                }
    137137                                jpt++;
     
    173173
    174174                else
    175                         _error_("Data matrix has incorrect number of %d rows.\n",mdata);
     175                        _error2_("Data matrix has incorrect number of " << mdata << " rows.\n");
    176176        }
    177177
  • issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp

    r9761 r12493  
    4444        fidi=fopen(filkml,"r");
    4545        if (!(kobj=KMLFileReadx(fidi)))
    46                 _error_("Error reading kml file.");
     46                _error2_("Error reading kml file.");
    4747        fclose(fidi);
    4848
  • issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp

    r12450 r12493  
    139139        }
    140140        else{
    141                 _error_("output '%s' not supported yet",output);
     141                _error2_("output '" << output << "' not supported yet");
    142142        }
    143143
     
    306306                else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
    307307                else if(strcmp(model,"power")==0)       variogram = new PowerVariogram(options);
    308                 else _error_("variogram %s not supported yet (list of supported variogram: gaussian, exponential, spherical and power)",model);
     308                else _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
    309309        }
    310310        else variogram = new GaussianVariogram(options);
  • issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp

    r12446 r12493  
    103103        }
    104104        else{
    105                 _error_("output '%s' not supported yet",output);
     105                _error2_("output '" << output << "' not supported yet");
    106106        }
    107107
     
    126126                else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
    127127                else if(strcmp(model,"power")==0)       variogram = new PowerVariogram(options);
    128                 else _error_("variogram %s not supported yet (list of supported variogram: gaussian, exponential, spherical and power)",model);
     128                else _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
    129129        }
    130130        else variogram = new GaussianVariogram(options);
  • issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp

    r9761 r12493  
    5252        double  T,rho,sl,tc,mc;
    5353
    54         if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
     54        if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
    5555
    5656        delta = central_meridian;
     
    123123                _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
    124124        }
    125         else _error_("Sign should be either +1 or -1.\n");
     125        else _error2_("Sign should be either +1 or -1.\n");
    126126
    127127        return;
  • issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp

    r12470 r12493  
    5151                        for (i=0;i<numberofnodes;i++)    npart[i]=0;
    5252                }
    53                 else _error_("At least one processor is required");
     53                else _error2_("At least one processor is required");
    5454        }
    5555        else{
     
    7878                        for (i=0;i<numberofnodes2d;i++)    npart2d[i]=0;
    7979                }
    80                 else _error_("At least one processor is required");
     80                else _error2_("At least one processor is required");
    8181
    8282                /*Extrude epart2d to epart, using numlayers: */
  • issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp

    r8303 r12493  
    3838        if(    (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum)   ){
    3939                /*This case is impossible: */
    40                 _error_(" error: a line cannot go through 3 different vertices!");
     40                _error2_(" error: a line cannot go through 3 different vertices!");
    4141        }
    4242        else if(    ((edge1==IntersectEnum) && (edge2==IntersectEnum)) || ((edge2==IntersectEnum) && (edge3==IntersectEnum)) || ((edge3==IntersectEnum) && (edge1==IntersectEnum))   ){
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp

    r10522 r12493  
    4646
    4747        /*Check in 3d*/
    48         if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
     48        if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
    4949
    5050        /*First fetch data: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp

    r10970 r12493  
    4848                        case FrictionCoefficientEnum: iomodel->FetchData(1,FrictionCoefficientEnum); break;
    4949                        case MaterialsRheologyBbarEnum:    iomodel->FetchData(1,MaterialsRheologyBEnum); break;
    50                         default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
     50                        default: _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
    5151                }
    5252        }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp

    r9775 r12493  
    124124
    125125                default:
    126                         _error_("%s%s%s"," analysis_type: ",EnumToStringx(analysis_type)," not supported yet!");
     126                        _error2_("" << " analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
    127127        }
    128128
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp

    r12451 r12493  
    153153                        /*Fetch the mass flux segments necessary to compute the mass fluxes.  Build a DoubleMatArrayParam object out of them: */
    154154                        iomodel->FetchData(&array,&mdims_array,&ndims_array,&qmu_mass_flux_num_profiles,QmuMassFluxSegmentsEnum);
    155                         if(qmu_mass_flux_num_profiles==0)_error_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
     155                        if(qmu_mass_flux_num_profiles==0)_error2_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
    156156
    157157                        /*Go through segments, and extract those that belong to this cpu: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r12450 r12493  
    145145
    146146                                        }
    147                                         else _error_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
     147                                        else _error2_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
    148148                        }
    149149                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
     
    185185                                                }
    186186                                        }
    187                                         else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
     187                                        else _error2_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
    188188                        }
    189189                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
     
    225225                                                }
    226226                                        }
    227                                         else _error_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
     227                                        else _error2_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
    228228                        }
    229229                        /*Now add the regular spcs*/
     
    318318                                                count++;
    319319                                                break;
    320                                         default: _error_("Vertex approximation %s not supported",EnumToStringx((int)vertices_type[i]));
     320                                        default: _error2_("Vertex approximation " << EnumToStringx((int)vertices_type[i]) << " not supported");
    321321                                }
    322322                        }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp

    r12470 r12493  
    6161                        doftype[5]=StokesApproximationEnum;
    6262                }
    63                 else _error_("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToStringx((int)*vertices_type));
     63                else _error2_("Approximationtype " << (int)*vertices_type << " (" << EnumToStringx((int)*vertices_type) << ") not implemented yet for DiagnosticHoriz");
    6464        }
    6565        else if (analysis_type==DiagnosticVertAnalysisEnum){
     
    9090                numdofs=1;
    9191        }
    92         else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToStringx(analysis_type));
     92        else _error2_("analysis type: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not implemented yet");
    9393
    9494        /*Now initialize the index*/
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r10522 r12493  
    2626
    2727        /*if 2d: Error*/
    28         if (dim==2) _error_("2d meshes not supported yet");
     28        if (dim==2) _error2_("2d meshes not supported yet");
    2929
    3030        /*Recover pointer: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp

    r12470 r12493  
    103103        }
    104104        else{
    105                 _error_("not implemented yet");
     105                _error2_("not implemented yet");
    106106        }
    107107
     
    111111        iomodel->FetchData(&edges,&numberofedges,&cols,MeshEdgesEnum);
    112112        iomodel->FetchData(&elements,NULL,NULL,MeshElementsEnum);
    113         if (cols!=4) _error_("field edges should have 4 columns");
     113        if (cols!=4) _error2_("field edges should have 4 columns");
    114114
    115115        /*!All elements have been partitioned above, only create elements for this CPU: */
     
    152152                        }
    153153                        else{
    154                                 _error_("Problem in edges creation");
     154                                _error2_("Problem in edges creation");
    155155                        }
    156156                }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r10522 r12493  
    4646
    4747        /*Check in 3d*/
    48         if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
     48        if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
    4949
    5050        /*First fetch data: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r10522 r12493  
    3333
    3434        /*return if 2d mesh*/
    35         if (dim==2) _error_("2d meshes not supported yet");
     35        if (dim==2) _error2_("2d meshes not supported yet");
    3636
    3737        //create penalties for nodes: no node can have a temperature over the melting point
  • issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp

    r12470 r12493  
    3838        #ifdef _HAVE_MPI_
    3939        MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
    40         if(!sumfound)_error_("%s%i%s%s","could not find element with vertex with id",index," to compute nodal value ",EnumToStringx(natureofdataenum));
     40        if(!sumfound)_error2_("" << "could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
    4141        #endif
    4242
  • issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp

    r12450 r12493  
    7171         * warn the user to increase the connectivity width: */
    7272        for(i=0;i<nods;i++){
    73                 if (*(connectivity+width*i+maxels)>maxels)_error_("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table");
     73                if (*(connectivity+width*i+maxels)>maxels)_error2_("" << " max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
    7474        }
    7575
  • issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp

    r12470 r12493  
    106106                char* string=strings[i];
    107107                if(my_rank==0){
    108                         if(string==NULL) _error_("PETSc options for analysis %s have been declared but were not found",EnumToStringx((int)analyses[i]));
     108                        if(string==NULL) _error2_("PETSc options for analysis " << EnumToStringx((int)analyses[i]) << " have been declared but were not found");
    109109                }
    110110                if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
  • issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp

    r9761 r12493  
    3030         * management routine, otherwise, skip : */
    3131        if (RiftIsPresent(loads,analysis_type)){
    32                 _error_("rift constraints reset not supported yet!");
     32                _error2_("rift constraints reset not supported yet!");
    3333        }
    3434        else if(ThermalIsPresent(loads,analysis_type)){
  • issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp

    r12470 r12493  
    4646                case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break;
    4747                case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
    48                 default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
     48                default: _error2_(" response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
    4949                #else
    50                 default: _error_(" ISSM was not compiled with responses capabilities, exiting!");
     50                default: _error2_(" ISSM was not compiled with responses capabilities, exiting!");
    5151                #endif
    5252        }
  • issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp

    r12442 r12493  
    7575
    7676        hSHP = SHPOpen( filshp, "rb" );
    77         if (!hSHP) _error_("Error opening shp/shx files.");
     77        if (!hSHP) _error2_("Error opening shp/shx files.");
    7878
    7979/*  read header and print out file bounds  */
  • issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp

    r12018 r12493  
    5555
    5656                #else
    57                         _error_("GSL support not compiled in!");
     57                        _error2_("GSL support not compiled in!");
    5858                #endif
    5959        #endif
  • issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp

    r12470 r12493  
    2626        pf->GetSize(&N2);
    2727
    28         if(N!=N2)_error_("Right hand side vector of size %i, when matrix is of size %i-%i !",N2,M,N);
    29         if(M!=N)_error_("Stiffness matrix should be square!");
     28        if(N!=N2)_error2_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
     29        if(M!=N)_error2_("Stiffness matrix should be square!");
    3030
    3131        SolverxGsl(&x,Kff->matrix,pf->vector,N);
  • issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp

    r12021 r12493  
    8181                #if _PETSC_MAJOR_ >=3
    8282                        #ifndef _HAVE_MUMPS_
    83                         _error_("requested MUMPS solver, which was not compiled into ISSM!\n");
     83                        _error2_("requested MUMPS solver, which was not compiled into ISSM!\n");
    8484                        #endif
    8585                #endif
     
    105105        if (solver_type==StokesSolverEnum){
    106106                /*Make indices out of doftypes: */
    107                 if(!df)_error_("need doftypes for Stokes solver!\n");
     107                if(!df)_error2_("need doftypes for Stokes solver!\n");
    108108                DofTypesToIndexSet(&isv,&isp,df,StokesSolverEnum);
    109109
     
    136136        /*Check convergence*/
    137137        KSPGetIterationNumber(ksp,&iteration_number);
    138         if (iteration_number<0) _error_("%s%i"," Solver diverged at iteration number: ",-iteration_number);
     138        if (iteration_number<0) _error2_("" << " Solver diverged at iteration number: " << -iteration_number);
    139139
    140140        /*Free resources:*/
  • issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r12342 r12493  
    470470   }
    471471        /*If we reach this point, the string provided has not been found*/
    472    _error_("Enum %s not found",name);
     472   _error2_("Enum " << name << " not found");
    473473}
  • issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp

    r9761 r12493  
    5353        double  sl,rho,cm,T,chi;
    5454
    55         if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
     55        if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
    5656
    5757        delta = central_meridian;
     
    131131                _printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
    132132        }
    133         else _error_("Sign should be either +1 or -1.\n");
     133        else _error2_("Sign should be either +1 or -1.\n");
    134134
    135135        return;
  • issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp

    r12456 r12493  
    6060        int i;
    6161
    62         if (this->anisomax<1) _error_("'anisomax' option should be >=1");
    63         if (this->coeff==0) _error_("'coeff' should be positive");
    64         if (this->errg<0) _error_("'errg' option should be >0");
    65         if (this->gradation<1) _error_("'gradation' option should be >=1");
    66         if (this->Hessiantype!=0  && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1");
    67         if (this->maxnbv<3) _error_("'maxnbv' option should be >3");
    68         if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1");
    69         if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2");
    70         if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0");
    71         if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0");
     62        if (this->anisomax<1) _error2_("'anisomax' option should be >=1");
     63        if (this->coeff==0) _error2_("'coeff' should be positive");
     64        if (this->errg<0) _error2_("'errg' option should be >0");
     65        if (this->gradation<1) _error2_("'gradation' option should be >=1");
     66        if (this->Hessiantype!=0  && this->Hessiantype!=1) _error2_("'Hessiantype' supported options are 0 and 1");
     67        if (this->maxnbv<3) _error2_("'maxnbv' option should be >3");
     68        if (this->maxsubdiv<=1) _error2_("'maxsubdiv' should be >1");
     69        if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error2_("'Metrictype' supported options are 0, 1 and 2");
     70        if (this->nbjacobi<=0) _error2_("'nbjacobi' option should be >0");
     71        if (this->nbsmooth<=0) _error2_("'nbsmooth' option should be >0");
    7272
    73         if (this->Crack!=0  && this->Crack!=1) _error_("'Crack' supported options are 0 and 1");
    74         if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1");
    75         if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error_("'geometricalmetric' supported options are 0 and 1");
     73        if (this->Crack!=0  && this->Crack!=1) _error2_("'Crack' supported options are 0 and 1");
     74        if (this->KeepVertices!=0 && this->KeepVertices!=1) _error2_("'KeepVertices' supported options are 0 and 1");
     75        if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error2_("'geometricalmetric' supported options are 0 and 1");
    7676
    77         if (this->hmin<=0) _error_("'hmin' option should be >0");
    78         if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=%g",this->hmin);
    79         if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column");
    80         if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column");
    81         if (this->hVertices && this->hVerticesSize[1]!=1) _error_("'hVertices' should be a column");
    82         if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
     77        if (this->hmin<=0) _error2_("'hmin' option should be >0");
     78        if (this->hmax<=0 || this->hmax<this->hmin) _error2_("'hmax' option should be between 0 and hmin=" << this->hmin);
     79        if (this->hminVertices && this->hminVerticesSize[1]!=1) _error2_("'hminVertices' should be a column");
     80        if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error2_("'hmaxVertices' should be a column");
     81        if (this->hVertices && this->hVerticesSize[1]!=1) _error2_("'hVertices' should be a column");
     82        if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error2_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
    8383        if (this->field){
    84                 if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size %i x %i",1,this->fieldSize[1]);
    85                 for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");};
     84                if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error2_("'err' should be of size " << 1 << " x " << this->fieldSize[1]);
     85                for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error2_("'err' option should be >0");};
    8686        }
    8787
  • issm/trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp

    r12365 r12493  
    7676                }
    7777                else{
    78                         _error_("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);
     78                        _error2_("Metrictype " << Metrictype << " not supported yet (use 0,1 or 2(default))");
    7979                }
    8080
     
    146146                        j = NextEdge[jc];
    147147                        if (k>=2000){
    148                                 _error_("k>=2000 (Maximum number of iterations reached)");
     148                                _error2_("k>=2000 (Maximum number of iterations reached)");
    149149                        }
    150150                } while ( tbegin != tria);
     
    213213                                j = NextEdge[jc];
    214214                                if (k>=2000){
    215                                         _error_("k>=2000");
     215                                        _error2_("k>=2000");
    216216                                }
    217217                        }while ( tbegin != tria);
  • issm/trunk-jpl/src/c/objects/Bamg/Edge.cpp

    r12365 r12493  
    4545
    4646                /*some shecks*/
    47                 if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); }
     47                if (!(adj[0]==&e || adj[1]==&e)){ _error2_("Intersection bug"); }
    4848                _assert_(adj[0]==&e || adj[1]==&e);
    4949
  • issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp

    r12456 r12493  
    7676
    7777                //some checks
    78                 if (bamggeom->Vertices==NULL) _error_("the domain provided does not contain any vertex");
    79                 if (bamggeom->Edges==NULL) _error_("the domain provided does not contain any edge");
     78                if (bamggeom->Vertices==NULL) _error2_("the domain provided does not contain any vertex");
     79                if (bamggeom->Edges==NULL) _error2_("the domain provided does not contain any edge");
    8080
    8181                //Vertices
    8282                if (bamggeom->Vertices){
    8383                        if(verbose>5) printf("      processing Vertices\n");
    84                         if (bamggeom->VerticesSize[1]!=3) _error_("Vertices should have 3 columns");
     84                        if (bamggeom->VerticesSize[1]!=3) _error2_("Vertices should have 3 columns");
    8585                        vertices = new GeomVertex[nbv];
    8686                        for (i=0;i<nbv;i++) {
     
    115115                         */
    116116                        coefIcoor=(MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    117                         if(coefIcoor<=0) _error_("coefIcoor should be positive");
     117                        if(coefIcoor<=0) _error2_("coefIcoor should be positive");
    118118                }
    119119                else{
    120                         _error_("No BamgVertex provided");
     120                        _error2_("No BamgVertex provided");
    121121                }
    122122
     
    127127
    128128                        if(verbose>5) printf("      processing Edges\n");
    129                         if (bamggeom->EdgesSize[1]!=3) _error_("Edges should have 3 columns");
     129                        if (bamggeom->EdgesSize[1]!=3) _error2_("Edges should have 3 columns");
    130130                        edges = new GeomEdge[nbe];
    131131
     
    176176                }
    177177                else{
    178                         _error_("No edges provided");
     178                        _error2_("No edges provided");
    179179                }
    180180
     
    206206                if (bamggeom->TangentAtEdges){
    207207                        if(verbose>5) printf("      processing TangentAtEdges");
    208                         if (bamggeom->TangentAtEdgesSize[1]!=4) _error_("TangentAtEdges should have 4 columns");
     208                        if (bamggeom->TangentAtEdgesSize[1]!=4) _error2_("TangentAtEdges should have 4 columns");
    209209                        int n,i,j,k;
    210210                        R2 tg;
     
    216216                                tg.x=bamggeom->TangentAtEdges[k*4+2];
    217217                                tg.y=bamggeom->TangentAtEdges[k*4+3];
    218                                 if (i<0 || i>=nbe) _error_("TangentAtEdges first index exceeds matrix dimension");
    219                                 if (j!=0 && j!=1)  _error_("TangentAtEdges second index should be 1 or 2 only");
     218                                if (i<0 || i>=nbe) _error2_("TangentAtEdges first index exceeds matrix dimension");
     219                                if (j!=0 && j!=1)  _error2_("TangentAtEdges second index should be 1 or 2 only");
    220220                                edges[i].tg[j] = tg;
    221221                        }
     
    225225                if(bamggeom->Corners){
    226226                        if(verbose>5) printf("      processing Corners");
    227                         if (bamggeom->CornersSize[1]!=1) _error_("Corners should have 1 column");
     227                        if (bamggeom->CornersSize[1]!=1) _error2_("Corners should have 1 column");
    228228                        n=bamggeom->CornersSize[0];
    229229                        for (i=0;i<n;i++) {     
    230230                                j=(int)bamggeom->Corners[i]-1; //for C indexing
    231                                 if (j>nbv-1 || j<0) _error_("Bad corner definition: should in [0 %i]",nbv);
     231                                if (j>nbv-1 || j<0) _error2_("Bad corner definition: should in [0 " << nbv << "]");
    232232                                /*Required => at the same time SetRequired and SetCorner*/
    233233                                vertices[j].SetCorner();
     
    239239                if(bamggeom->RequiredVertices){
    240240                        if(verbose>5) printf("      processing RequiredVertices\n");
    241                         if (bamggeom->RequiredVerticesSize[1]!=1) _error_("RequiredVertices should have 1 column");
     241                        if (bamggeom->RequiredVerticesSize[1]!=1) _error2_("RequiredVertices should have 1 column");
    242242                        n=bamggeom->RequiredVerticesSize[0];
    243243                        for (i=0;i<n;i++) {     
    244244                                j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing
    245                                 if (j>nbv-1 || j<0) _error_("Bad RequiredVerticess  definition: should in [0 %i]",nbv);
     245                                if (j>nbv-1 || j<0) _error2_("Bad RequiredVerticess  definition: should in [0 " << nbv << "]");
    246246                                vertices[j].SetRequired();
    247247                        }
     
    251251                if(bamggeom->RequiredEdges){
    252252                        if(verbose>5) printf("      processing RequiredEdges\n");
    253                         if (bamggeom->RequiredEdgesSize[1]!=1) _error_("RequiredEdges should have 1 column");
     253                        if (bamggeom->RequiredEdgesSize[1]!=1) _error2_("RequiredEdges should have 1 column");
    254254                        n=bamggeom->RequiredEdgesSize[0];
    255255                        for (i=0;i<n;i++) {     
    256256                                j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing
    257                                 if (j>nbe-1 || j<0) _error_("Bad RequiredEdges definition: should in [0 %i]",nbe);
     257                                if (j>nbe-1 || j<0) _error2_("Bad RequiredEdges definition: should in [0 " << nbe << "]");
    258258                                edges[j].SetRequired(); 
    259259                        }
     
    263263                if(bamggeom->SubDomains){
    264264                        if(verbose>5) printf("      processing SubDomains\n");
    265                         if (bamggeom->SubDomainsSize[1]!=4) _error_("SubDomains should have 4 columns");
     265                        if (bamggeom->SubDomainsSize[1]!=4) _error2_("SubDomains should have 4 columns");
    266266                        nbsubdomains=bamggeom->SubDomainsSize[0];
    267267                        subdomains = new GeomSubDomain[nbsubdomains];
     
    271271                                i2=(int)bamggeom->SubDomains[i*4+2];
    272272                                i3=(int)bamggeom->SubDomains[i*4+3];
    273                                 if (i0!=2) _error_("Bad Subdomain definition: first number should be 2 (for Edges)");
    274                                 if (i1>nbe || i1<=0) _error_("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe);
     273                                if (i0!=2) _error2_("Bad Subdomain definition: first number should be 2 (for Edges)");
     274                                if (i1>nbe || i1<=0) _error2_("Bad Subdomain definition: second number should in [1 " << nbe << "] (edge number)");
    275275                                subdomains[i].edge=edges + (i1-1);
    276276                                subdomains[i].direction = (int) i2;
     
    532532                                delete [] head_v;
    533533                                delete [] eangle;
    534                                 _error_("two points of the geometry are very closed to each other (see reference numbers above)");
     534                                _error2_("two points of the geometry are very closed to each other (see reference numbers above)");
    535535                        }
    536536
     
    610610                                delete [] head_v;
    611611                                delete [] eangle;
    612                                 _error_("Length of edge %i is 0",i);
     612                                _error2_("Length of edge " << i << " is 0");
    613613                        }
    614614                        //compute angle in [-Pi Pi]
     
    704704                                long i1 = n1/2 ,j1=n1%2;
    705705
    706                                 if( edges[i1].v[j1] != edges[i].v[j]) _error_("Problem while processing edges: check the edge list");
     706                                if( edges[i1].v[j1] != edges[i].v[j]) _error2_("Problem while processing edges: check the edge list");
    707707
    708708                                edges[i1].Adj[j1] = edges + i;
     
    831831                GeomEdge* on=e.GeomEdgeHook;
    832832                if (!on){
    833                         _error_("ProjectOnCurve error message: edge provided should be on geometry");
     833                        _error2_("ProjectOnCurve error message: edge provided should be on geometry");
    834834                }
    835835                if (!e[0].GeomEdgeHook ||  !e[1].GeomEdgeHook){
    836                         _error_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
     836                        _error2_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
    837837                }
    838838
     
    875875                                        printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
    876876                                        printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
    877                                         _error_("see above");
     877                                        _error2_("see above");
    878878                                }
    879879                                NbTry++;
     
    895895                                printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
    896896                                printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
    897                                 _error_("see above");
     897                                _error2_("see above");
    898898                        }
    899899                        GeomEdge* tmpge = eg1;
  • issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp

    r12365 r12493  
    3838                // check Size
    3939                if (Size<=0){
    40                         _error_("Size<=0");
     40                        _error2_("Size<=0");
    4141                }
    4242
     
    268268                                k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
    269269                                if (k<0){
    270                                         _error_("k<0");
     270                                        _error2_("k<0");
    271271                                }
    272272                                ocut = OppositeEdge[k];
     
    312312                                double dij = detj-deti;
    313313                                if (i+j+k != 0 + 1 +2){
    314                                         _error_("i+j+k != 0 + 1 +2");
     314                                        _error2_("i+j+k != 0 + 1 +2");
    315315                                }
    316316                                ba[j] =  detj/dij;
     
    384384                                        }
    385385                                        else {
    386                                                 _error_("Bug Split Edge");
     386                                                _error2_("Bug Split Edge");
    387387                                        }
    388388                                }
  • issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp

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

    r12365 r12493  
    197197                // warning for optimisation S is in [0:0.5] not in [0:1]
    198198                if (i>=512){
    199                         _error_("i>=512");
     199                        _error2_("i>=512");
    200200                }
    201201                LastMetricInterpole.lab=l;
     
    345345                }
    346346                if (r>1 || r<0){
    347                         _error_("r>1 || r<0");
     347                        _error2_("r>1 || r<0");
    348348                }
    349349                return r ;
  • issm/trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp

    r12365 r12493  
    5050                //check that nbax <=NbOfEdges
    5151                if (nbax <=NbOfEdges ) {
    52                         _error_("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);
     52                        _error2_("SetOfEdges4::add overflow: NbOfEdges=" << NbOfEdges << " > nbax=" << nbax);
    5353                }
    5454
  • issm/trunk-jpl/src/c/objects/Bamg/SubDomain.cpp

    r12365 r12493  
    1616                *this = Th.subdomains[i];
    1717                if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){
    18                         _error_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
     18                        _error2_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
    1919                }
    2020                head = ThNew.triangles + Th.GetId(head) ;
    2121                if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{
    22                         _error_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
     22                        _error2_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
    2323                }
    2424                edge = ThNew.edges+ Th.GetId(edge);
  • issm/trunk-jpl/src/c/objects/Bamg/Triangle.cpp

    r12365 r12493  
    1919                long nbv = Th->nbv;
    2020                if (i<0 || j<0 || k<0){
    21                         _error_("i<0 || j<0 || k<0");
     21                        _error2_("i<0 || j<0 || k<0");
    2222                }
    2323                if (i>=nbv || j>=nbv || k>=nbv){
    24                         _error_("i>=nbv || j>=nbv || k>=nbv");
     24                        _error2_("i>=nbv || j>=nbv || k>=nbv");
    2525                }
    2626                vertices[0]=v+i;
     
    173173                        //check number of iterations
    174174                        if (k>=2000){
    175                                 _error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
     175                                _error2_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
    176176                        }
    177177                } while (this!= t);
     
    213213                do {
    214214                        while (t->swap(j,koption)){
    215                                 if (k>=20000) _error_("k>=20000");
     215                                if (k>=20000) _error2_("k>=20000");
    216216                                NbSwap++;
    217217                                k++;
  • issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp

    r12462 r12493  
    146146                }
    147147
    148                 if(!found)_error_("could not find time segment for constraint");
     148                if(!found)_error2_("could not find time segment for constraint");
    149149
    150150                /*Apply or relax constraint: */
  • issm/trunk-jpl/src/c/objects/DofIndexing.cpp

    r12457 r12493  
    143143                else this->sdoflist=NULL;
    144144        }
    145         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     145        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    146146}
    147147/*}}}*/
  • issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp

    r12463 r12493  
    130130void BoolElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
    131131
    132         _error_("cannot return vector on vertices");
     132        _error2_("cannot return vector on vertices");
    133133} /*}}}*/
    134134/*FUNCTION BoolElementResult::GetElementVectorFromResults{{{*/
  • issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp

    r12488 r12493  
    142142        IssmDouble data[6];
    143143
    144         if(numdofs!=6)_error_("Result %s is a PentaP1ElementResult and cannot write vector of %i dofs",EnumToStringx(this->enum_type),numdofs);
     144        if(numdofs!=6)_error2_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
    145145        for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
    146146        vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
     
    150150void PentaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
    151151
    152         _error_("Result %s is a PentaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
     152        _error2_("Result " << EnumToStringx(enum_type) << " is a PentaP1ElementResult and should not write vector of size numberofelemenrs");
    153153} /*}}}*/
  • issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp

    r12463 r12493  
    130130        IssmDouble data[3];
    131131
    132         if(numdofs!=3)_error_("Result %s is a TriaP1ElementResult and cannot write vector of %i dofs",numdofs);
     132        if(numdofs!=3)_error2_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
    133133        for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
    134134        vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
     
    137137/*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{*/
    138138void TriaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
    139         _error_("Result %s is a TriaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
     139        _error2_("Result " << EnumToStringx(enum_type) << " is a TriaP1ElementResult and should not write vector of size numberofelemenrs");
    140140} /*}}}*/
  • issm/trunk-jpl/src/c/objects/Elements/Penta.cpp

    r12471 r12493  
    146146/*FUNCTION Penta::AverageOntoPartition {{{*/
    147147void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
    148         _error_("Not supported yet!");
     148        _error2_("Not supported yet!");
    149149}
    150150/*}}}*/
     
    252252
    253253        /*Check analysis_types*/
    254         if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!");
    255         if (approximation!=StokesApproximationEnum) _error_("Not supported yet!");
     254        if (analysis_type!=DiagnosticHorizAnalysisEnum) _error2_("Not supported yet!");
     255        if (approximation!=StokesApproximationEnum) _error2_("Not supported yet!");
    256256
    257257        /*retrieve some parameters: */
     
    318318void  Penta::ComputeStrainRate(Vector* eps){
    319319
    320         _error_("Not implemented yet");
     320        _error2_("Not implemented yet");
    321321
    322322}
     
    464464                #endif
    465465                default:
    466                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     466                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    467467        }
    468468
     
    569569                #endif
    570570                default:
    571                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     571                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    572572        }
    573573
     
    638638#endif
    639639                default:
    640                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     640                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    641641        }
    642642
     
    816816                 return i;
    817817        }
    818         _error_("Node provided not found among element nodes");
     818        _error2_("Node provided not found among element nodes");
    819819
    820820}
     
    829829        /*Recover input*/
    830830        Input* input=inputs->GetInput(enumtype);
    831         if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype));
     831        if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
    832832
    833833        /*Checks in debugging mode*/
     
    878878
    879879        Input* input=inputs->GetInput(enumtype);
    880         if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
     880        if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
    881881
    882882        GaussPenta* gauss=new GaussPenta();
     
    973973        #endif
    974974        default:
    975                 _error_("analysis: %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     975                _error2_("analysis: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    976976        }
    977977}
     
    10131013        /*Check that both inputs have been found*/
    10141014        if (!vx_input || !vy_input){
    1015                 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
     1015                _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
    10161016        }
    10171017
     
    10381038        /*Check that both inputs have been found*/
    10391039        if (!vx_input || !vy_input || !vz_input){
    1040                 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input);
     1040                _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << ", vz: " << vz_input << "\n");
    10411041        }
    10421042
     
    10731073        /*Get input (either in element or material)*/
    10741074        Input* input=inputs->GetInput(input_enum);
    1075         if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum));
     1075        if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
    10761076
    10771077        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    11331133        /*Make a copy of the original input: */
    11341134        input=(Input*)this->inputs->GetInput(enum_type);
    1135         if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
     1135        if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
    11361136
    11371137        /*ArtificialNoise: */
     
    11531153                new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
    11541154                old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
    1155                 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
    1156                 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
     1155                if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1156                if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
    11571157        }
    11581158
     
    11861186                this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
    11871187        }
    1188         else _error_("%s%i"," could not recognize nature of vector from code ",code);
     1188        else _error2_("" << " could not recognize nature of vector from code " << code);
    11891189
    11901190}
     
    12511251                        this->inputs->AddInput(transientinput);
    12521252                }
    1253                 else _error_("nodal vector is either numberofnodes (%i), or numberofnodes+1 long. Field provided is %i long. Enum %s",numberofvertices,M,EnumToStringx(vector_enum));
     1253                else _error2_("nodal vector is either numberofnodes (" << numberofvertices << "), or numberofnodes+1 long. Field provided is " << M << " long. Enum " << EnumToStringx(vector_enum));
    12541254        }
    12551255        else if(vector_type==2){ //element vector
     
    12681268                                this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
    12691269                        }
    1270                         else _error_("%s%i"," could not recognize nature of vector from code ",code);
     1270                        else _error2_("" << " could not recognize nature of vector from code " << code);
    12711271                }
    12721272                else {
    1273                         _error_("transient elementary inputs not supported yet!");
     1273                        _error2_("transient elementary inputs not supported yet!");
    12741274                }
    12751275        }
    12761276        else{
    1277                 _error_("Cannot add input for vector type %i (not supported)",vector_type);
     1277                _error2_("Cannot add input for vector type " << vector_type << " (not supported)");
    12781278        }
    12791279
     
    13141314                 original_input=(Input*)penta->matice->inputs->GetInput(enum_type);
    13151315                else
    1316                  _error_("object %s not supported yet",EnumToStringx(object_enum));
    1317                 if(!original_input) _error_("could not find input with enum %s",EnumToStringx(enum_type));
     1316                 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
     1317                if(!original_input) _error2_("could not find input with enum " << EnumToStringx(enum_type));
    13181318
    13191319                /*If first time, initialize total_integrated_input*/
     
    13261326                         total_integrated_input=new DoubleInput(average_enum_type,0.0);
    13271327                        else
    1328                          _error_("object %s not supported yet",EnumToStringx(original_input->ObjectEnum()));
     1328                         _error2_("object " << EnumToStringx(original_input->ObjectEnum()) << " not supported yet");
    13291329                }
    13301330
     
    13741374         this->matice->inputs->AddInput((Input*)depth_averaged_input);
    13751375        else
    1376          _error_("object %s not supported yet",EnumToStringx(object_enum));
     1376         _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
    13771377}
    13781378/*}}}*/
     
    14151415        }
    14161416        else{
    1417                 _error_("object of type %s not supported yet",EnumToStringx(object_type));
     1417                _error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
    14181418        }
    14191419        for(i=0;i<num_inputs;i++){
    1420                 if(!base_inputs[i]) _error_("could not find input with enum %s in object %s",EnumToStringx(enum_type),EnumToStringx(object_type));
     1420                if(!base_inputs[i]) _error2_("could not find input with enum " << EnumToStringx(enum_type) << " in object " << EnumToStringx(object_type));
    14211421                base_inputs[i]->Extrude();
    14221422        }
     
    14451445                        }
    14461446                        else{
    1447                                 _error_("object of type %s not supported yet",EnumToStringx(object_type));
     1447                                _error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
    14481448                        }
    14491449                }
     
    14641464        /*Make a copy of the original input: */
    14651465        input=(Input*)this->inputs->GetInput(enum_type);
    1466         if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
     1466        if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
    14671467
    14681468        /*Scale: */
     
    14801480        if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum);
    14811481        else input=this->inputs->GetInput(enum_type);
    1482         //if (!input) _error_("Input %s not found in penta->inputs",EnumToStringx(enum_type)); why error out? if the requested input does not exist, we should still
     1482        //if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in penta->inputs"); why error out? if the requested input does not exist, we should still
    14831483        //try and output whatever we can instead of just failing.
    14841484        if(!input)return;
     
    15941594                                        /*Matice will take care of it*/ break;
    15951595                                default:
    1596                                         _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
     1596                                        _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
    15971597                        }
    15981598                }
     
    16271627                }
    16281628                else{
    1629                         _error_("Approximation type %s not supported yet",EnumToStringx((int)*(iomodel->Data(FlowequationElementEquationEnum)+index)));
     1629                        _error2_("Approximation type " << EnumToStringx((int)*(iomodel->Data(FlowequationElementEquationEnum)+index)) << " not supported yet");
    16301630                }
    16311631        }
     
    17111711        #endif
    17121712        default:
    1713                 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     1713                _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    17141714        }
    17151715}
     
    17421742        for(i=0;i<numdof2d;i++){
    17431743                newthickness[i]=solution[doflist[i]];
    1744                 if(isnan(newthickness[i])) _error_("NaN found in solution vector");
     1744                if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
    17451745                /*Constrain thickness to be at least 1m*/
    17461746                if(newthickness[i]<minthickness) newthickness[i]=minthickness;
     
    17751775                                newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
    17761776                        }
    1777                         else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));
     1777                        else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
    17781778                }
    17791779        }
     
    18121812        for(int i=0;i<numdof;i++){
    18131813                values[i]=solution[doflist[i]];
    1814                 if(isnan(values[i])) _error_("NaN found in solution vector");
     1814                if(isnan(values[i])) _error2_("NaN found in solution vector");
    18151815        }
    18161816
     
    18421842                values[i]         =solution[doflist[i]];
    18431843                values[i+numdof2d]=values[i];
    1844                 if(isnan(values[i])) _error_("NaN found in solution vector");
     1844                if(isnan(values[i])) _error2_("NaN found in solution vector");
    18451845        }
    18461846
     
    18881888                default:
    18891889
    1890                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     1890                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    18911891        }
    18921892}
     
    18941894/*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/
    18951895void  Penta::InputUpdateFromVector(int* vector, int name, int type){
    1896         _error_(" not supported yet!");
     1896        _error2_(" not supported yet!");
    18971897}
    18981898/*}}}*/
    18991899/*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
    19001900void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
    1901         _error_(" not supported yet!");
     1901        _error2_(" not supported yet!");
    19021902}
    19031903/*}}}*/
     
    26762676void  Penta::SetClone(int* minranks){
    26772677
    2678         _error_("not implemented yet");
     2678        _error2_("not implemented yet");
    26792679}
    26802680/*}}}*/
     
    29882988                                this->inputs->AddInput(new PentaP1Input(EnthalpyEnum,nodeinputs));
    29892989                        }
    2990                         else _error_("temperature and waterfraction required for the enthalpy solution");
     2990                        else _error2_("temperature and waterfraction required for the enthalpy solution");
    29912991                        break;
    29922992
     
    30673067/*FUNCTION Penta::SmearFunction {{{*/
    30683068void  Penta::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
    3069         _error_("not implemented yet");
     3069        _error2_("not implemented yet");
    30703070}
    30713071/*}}}*/
     
    32853285                        *presponse=vel;
    32863286                default: 
    3287                         _error_("Response type %s not supported yet!",EnumToStringx(response_enum));
     3287                        _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
    32883288        }
    32893289
     
    43284328
    43294329                /*Check solution*/
    4330                 if(isnan(values[i])) _error_("NaN found in solution vector");
     4330                if(isnan(values[i])) _error2_("NaN found in solution vector");
    43314331                //if(values[i]<0)      printf("temperature < 0°K found in solution vector\n");
    43324332                //if(values[i]>275)    printf("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)\n");
     
    43624362                                break;
    43634363                        default:
    4364                                 _error_("Rheology law %s not supported yet",EnumToStringx(rheology_law));
     4364                                _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
    43654365
    43664366                }
     
    43984398
    43994399                /*Check solution*/
    4400                 if(isnan(values[i])) _error_("NaN found in solution vector");
     4400                if(isnan(values[i])) _error2_("NaN found in solution vector");
    44014401        }
    44024402
     
    44114411                for(i=0;i<numdof;i++){
    44124412                        matpar->EnthalpyToThermal(&temperatures[i],&waterfraction[i],values[i],pressure[i]);
    4413                         if(waterfraction[i]<0) _error_("Negative water fraction found in solution vector");
    4414                         //if(waterfraction[i]>1) _error_("Water fraction >1 found in solution vector");
     4413                        if(waterfraction[i]<0) _error2_("Negative water fraction found in solution vector");
     4414                        //if(waterfraction[i]>1) _error2_("Water fraction >1 found in solution vector");
    44154415                }
    44164416                       
     
    44404440                                break;
    44414441                        default:
    4442                                 _error_("Rheology law %s not supported yet",EnumToStringx(rheology_law));
     4442                                _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
    44434443
    44444444                }
     
    44684468                input=inputs->GetInput(enum_type);
    44694469        }
    4470         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    4471         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     4470        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     4471        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44724472
    44734473        GradientIndexing(&doflist1[0],control_index);
     
    44864486                input=inputs->GetInput(enum_type);
    44874487        }
    4488         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    4489         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     4488        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     4489        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44904490
    44914491        ((ControlInput*)input)->ScaleGradient(scale);
     
    45054505                input=inputs->GetInput(enum_type);
    45064506        }
    4507         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    4508         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     4507        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     4508        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    45094509
    45104510        GradientIndexing(&doflist1[0],control_index);
     
    45304530                        return NULL;
    45314531                default:
    4532                         _error_("Approximation %s not supported yet",EnumToStringx(approximation));
     4532                        _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    45334533        }
    45344534}
     
    47204720                        return CreatePVectorAdjointStokes();
    47214721                default:
    4722                         _error_("Approximation %s not supported yet",EnumToStringx(approximation));
     4722                        _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    47234723        }
    47244724}
     
    48094809                                        break;
    48104810                                default:
    4811                                         _error_("approximation %s not supported yet",EnumToStringx(approximation));
     4811                                        _error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
    48124812                        }
    48134813                        break;
     
    48294829                                        break;
    48304830                                default:
    4831                                         _error_("approximation %s not supported yet",EnumToStringx(approximation));
     4831                                        _error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
    48324832                        }
    48334833                        break;
    48344834
    48354835                default:
    4836                         _error_("control type %s not supported yet: ",EnumToStringx(control_type));
     4836                        _error2_("control type " << EnumToStringx(control_type) << " not supported yet: ");
    48374837        }
    48384838
     
    48664866                        break;
    48674867                default:
    4868                         _error_("response %s not supported yet",EnumToStringx(responses[resp]));
     4868                        _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    48694869        }
    48704870        xDelete<int>(responses);
     
    51205120                }
    51215121
    5122                 if (input->ObjectEnum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToStringx(control_type[i]));
     5122                if (input->ObjectEnum()!=ControlInputEnum) _error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
    51235123
    51245124                ((ControlInput*)input)->UpdateValue(scalar);
     
    51635163
    51645164                /*Check solution*/
    5165                 if(isnan(lambdax[i])) _error_("NaN found in solution vector");
    5166                 if(isnan(lambday[i])) _error_("NaN found in solution vector");
    5167                 if(isnan(lambdaz[i])) _error_("NaN found in solution vector");
    5168                 if(isnan(lambdap[i])) _error_("NaN found in solution vector");
     5165                if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
     5166                if(isnan(lambday[i])) _error2_("NaN found in solution vector");
     5167                if(isnan(lambdaz[i])) _error2_("NaN found in solution vector");
     5168                if(isnan(lambdap[i])) _error2_("NaN found in solution vector");
    51695169        }
    51705170
     
    52025202
    52035203                /*Check solution*/
    5204                 if(isnan(lambdax[i]))       _error_("NaN found in solution vector");
    5205                 if(isnan(lambday[i]))       _error_("NaN found in solution vector");
     5204                if(isnan(lambdax[i]))       _error2_("NaN found in solution vector");
     5205                if(isnan(lambday[i]))       _error2_("NaN found in solution vector");
    52065206        }
    52075207
     
    54045404IssmDouble Penta::ThicknessAbsGradient(bool process_units,int weight_index){
    54055405
    5406         _error_("Not implemented yet");
     5406        _error2_("Not implemented yet");
    54075407}
    54085408/*}}}*/
     
    54195419        /*If on water, return 0: */
    54205420        if(IsOnWater())return 0;
    5421         _error_("Not implemented yet");
     5421        _error2_("Not implemented yet");
    54225422
    54235423        tria=(Tria*)SpawnTria(0,1,2);
     
    54705470        /*Get input (either in element or material)*/
    54715471        Input* input=inputs->GetInput(control_enum);
    5472         if(!input) _error_("Input %s not found in element",EnumToStringx(control_enum));
     5472        if(!input) _error2_("Input " << EnumToStringx(control_enum) << " not found in element");
    54735473
    54745474        /*Check that it is a ControlInput*/
    54755475        if (input->ObjectEnum()!=ControlInputEnum){
    5476                 _error_("input %s is not a ControlInput",EnumToStringx(control_enum));
     5476                _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    54775477        }
    54785478
     
    55095509
    55105510        if (input->ObjectEnum()!=ControlInputEnum){
    5511                 _error_("input %s is not a ControlInput",EnumToStringx(control_enum));
     5511                _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    55125512        }
    55135513
     
    56155615
    56165616                default:
    5617                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     5617                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56185618        }
    56195619
     
    56225622/*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
    56235623void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
    5624         _error_(" not supported yet!");
     5624        _error2_(" not supported yet!");
    56255625}
    56265626/*}}}*/
    56275627/*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
    56285628void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
    5629         _error_(" not supported yet!");
     5629        _error2_(" not supported yet!");
    56305630}
    56315631/*}}}*/
     
    56705670
    56715671                default:
    5672                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     5672                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56735673        }
    56745674
     
    62296229                        return CreateKMatrixDiagnosticPattynStokes();
    62306230                default:
    6231                         _error_("Approximation %s not supported yet",EnumToStringx(approximation));
     6231                        _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    62326232        }
    62336233}
     
    63976397                        matice->GetViscosity3dStokes(&newviscosity,&epsilons[0]);
    63986398                }
    6399                 else _error_("approximation %i (%s) not supported yet",approximation,EnumToStringx(approximation));
     6399                else _error2_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet");
    64006400
    64016401                D_scalar=2*newviscosity*gauss->weight*Jdet;
     
    72207220                        return CreatePVectorDiagnosticPattynStokes();
    72217221                default:
    7222                         _error_("Approximation %s not supported yet",EnumToStringx(approximation));
     7222                        _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    72237223        }
    72247224}
     
    77337733                        return NULL;
    77347734                default:
    7735                         _error_("Approximation %s not supported yet",EnumToStringx(approximation));
     7735                        _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    77367736        }
    77377737}
     
    81288128
    81298129                /*Check solution*/
    8130                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    8131                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     8130                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     8131                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    81328132        }
    81338133
     
    82268226
    82278227                /*Check solution*/
    8228                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    8229                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     8228                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     8229                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    82308230        }
    82318231
     
    83148314
    83158315                /*Check solution*/
    8316                 if(isnan(vx[i]))       _error_("NaN found in solution vector");
    8317                 if(isnan(vy[i]))       _error_("NaN found in solution vector");
    8318                 if(isnan(vzstokes[i])) _error_("NaN found in solution vector");
    8319                 if(isnan(pressure[i])) _error_("NaN found in solution vector");
     8316                if(isnan(vx[i]))       _error2_("NaN found in solution vector");
     8317                if(isnan(vy[i]))       _error2_("NaN found in solution vector");
     8318                if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
     8319                if(isnan(pressure[i])) _error2_("NaN found in solution vector");
    83208320        }
    83218321
     
    83248324        if (vzmacayeal_input){
    83258325                if (vzmacayeal_input->ObjectEnum()!=PentaP1InputEnum){
    8326                         _error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToStringx(vzmacayeal_input->ObjectEnum()));
     8326                        _error2_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzmacayeal_input->ObjectEnum()));
    83278327                }
    83288328                GetInputListOnVertices(&vzmacayeal[0],VzMacAyealEnum);
    83298329        }
    83308330        else{
    8331                 _error_("Cannot update solution as VzMacAyeal is not present");
     8331                _error2_("Cannot update solution as VzMacAyeal is not present");
    83328332        }
    83338333
     
    83938393
    83948394                /*Check solution*/
    8395                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    8396                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     8395                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     8396                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    83978397        }
    83988398
     
    84828482
    84838483                /*Check solution*/
    8484                 if(isnan(vx[i]))       _error_("NaN found in solution vector");
    8485                 if(isnan(vy[i]))       _error_("NaN found in solution vector");
    8486                 if(isnan(vzstokes[i])) _error_("NaN found in solution vector");
    8487                 if(isnan(pressure[i])) _error_("NaN found in solution vector");
     8484                if(isnan(vx[i]))       _error2_("NaN found in solution vector");
     8485                if(isnan(vy[i]))       _error2_("NaN found in solution vector");
     8486                if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
     8487                if(isnan(pressure[i])) _error2_("NaN found in solution vector");
    84888488        }
    84898489
     
    84928492        if (vzpattyn_input){
    84938493                if (vzpattyn_input->ObjectEnum()!=PentaP1InputEnum){
    8494                         _error_("Cannot compute Vel as VzPattyn is of type %s",EnumToStringx(vzpattyn_input->ObjectEnum()));
     8494                        _error2_("Cannot compute Vel as VzPattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));
    84958495                }
    84968496                GetInputListOnVertices(&vzpattyn[0],VzPattynEnum);
    84978497        }
    84988498        else{
    8499                 _error_("Cannot update solution as VzPattyn is not present");
     8499                _error2_("Cannot update solution as VzPattyn is not present");
    85008500        }
    85018501
     
    85588558
    85598559                /*Check solution*/
    8560                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    8561                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     8560                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     8561                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    85628562        }
    85638563
     
    86278627
    86288628                /*Check solution*/
    8629                 if(isnan(vz[i])) _error_("NaN found in solution vector");
     8629                if(isnan(vz[i])) _error2_("NaN found in solution vector");
    86308630        }
    86318631
     
    86388638                Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    86398639                if (vzstokes_input){
    8640                         if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vzstokes_input->ObjectEnum()));
     8640                        if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    86418641                        GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    86428642                }
    8643                 else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
     8643                else _error2_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
    86448644                for(i=0;i<NUMVERTICES;i++){
    86458645                        vzpattyn[i]=vz[i];
     
    86508650                Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    86518651                if (vzstokes_input){
    8652                         if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vzstokes_input->ObjectEnum()));
     8652                        if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    86538653                        GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    86548654                }
    8655                 else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
     8655                else _error2_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
    86568656                for(i=0;i<NUMVERTICES;i++){
    86578657                        vzmacayeal[i]=vz[i];
     
    87258725
    87268726                /*Check solution*/
    8727                 if(isnan(vx[i]))       _error_("NaN found in solution vector");
    8728                 if(isnan(vy[i]))       _error_("NaN found in solution vector");
    8729                 if(isnan(vz[i]))       _error_("NaN found in solution vector");
    8730                 if(isnan(pressure[i])) _error_("NaN found in solution vector");
     8727                if(isnan(vx[i]))       _error2_("NaN found in solution vector");
     8728                if(isnan(vy[i]))       _error2_("NaN found in solution vector");
     8729                if(isnan(vz[i]))       _error2_("NaN found in solution vector");
     8730                if(isnan(pressure[i])) _error2_("NaN found in solution vector");
    87318731        }
    87328732
  • issm/trunk-jpl/src/c/objects/Elements/PentaRef.cpp

    r12471 r12493  
    949949        /*Get Determinant*/
    950950        Matrix3x3Determinant(Jdet,&J[0][0]);
    951         if(*Jdet<0) _error_("negative jacobian determinant!");
     951        if(*Jdet<0) _error2_("negative jacobian determinant!");
    952952
    953953}
     
    972972        /*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */
    973973        *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);
    974         if(*Jdet<0) _error_("negative jacobian determinant!");
     974        if(*Jdet<0) _error2_("negative jacobian determinant!");
    975975}
    976976/*}}}*/
     
    990990
    991991        *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.) + pow(z2-z1,2.));
    992         if(*Jdet<0) _error_("negative jacobian determinant!");
     992        if(*Jdet<0) _error2_("negative jacobian determinant!");
    993993
    994994}
     
    12261226        /*Area of a trabezoid = altitude * (base1 + base2)/2 */
    12271227        *Jdet= pow(pow(x2-x1,2.) + pow(y2-y1,2.),0.5) * (z4-z1 + z3-z2)/8;
    1228         if(*Jdet<0) _error_("negative jacobian determinant!");
     1228        if(*Jdet<0) _error2_("negative jacobian determinant!");
    12291229
    12301230}
  • issm/trunk-jpl/src/c/objects/Elements/Tria.cpp

    r12471 r12493  
    214214                #endif
    215215                default:
    216                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     216                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    217217        }
    218218
     
    277277                        return CreateKMatrixPrognostic_DG();
    278278                default:
    279                         _error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
     279                        _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    280280        }
    281281
     
    568568                #endif
    569569                default:
    570                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     570                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    571571        }
    572572
     
    587587                        return CreatePVectorPrognostic_DG();
    588588                default:
    589                         _error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
     589                        _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    590590        }
    591591}
     
    763763#endif
    764764                default:
    765                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     765                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    766766        }
    767767
     
    775775/*FUNCTION Tria::ComputeBasalStress {{{*/
    776776void  Tria::ComputeBasalStress(Vector* eps){
    777         _error_("Not Implemented yet");
     777        _error2_("Not Implemented yet");
    778778}
    779779/*}}}*/
    780780/*FUNCTION Tria::ComputeStrainRate {{{*/
    781781void  Tria::ComputeStrainRate(Vector* eps){
    782         _error_("Not Implemented yet");
     782        _error2_("Not Implemented yet");
    783783}
    784784/*}}}*/
     
    10191019                 return i;
    10201020        }
    1021         _error_("Node provided not found among element nodes");
     1021        _error2_("Node provided not found among element nodes");
    10221022}
    10231023/*}}}*/
     
    10311031        /*Recover input*/
    10321032        Input* input=inputs->GetInput(enumtype);
    1033         if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype));
     1033        if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
    10341034
    10351035        /*Checks in debugging mode*/
     
    11031103
    11041104        Input* input=inputs->GetInput(enumtype);
    1105         if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
     1105        if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
    11061106
    11071107        GaussTria* gauss=new GaussTria();
     
    11451145        #endif
    11461146        default:
    1147                 _error_("analysis: %s not supported yet",EnumToStringx(analysis_type));
     1147                _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
    11481148        }
    11491149
     
    11611161        /*Check that both inputs have been found*/
    11621162        if (!vx_input || !vy_input){
    1163                 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
     1163                _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
    11641164        }
    11651165
     
    11851185        /*Get input (either in element or material)*/
    11861186        Input* input=inputs->GetInput(input_enum);
    1187         if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum));
     1187        if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
    11881188
    11891189        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    12321232        /*Make a copy of the original input: */
    12331233        input=(Input*)this->inputs->GetInput(enum_type);
    1234         if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
     1234        if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
    12351235
    12361236        /*ArtificialNoise: */
     
    12521252                new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
    12531253                old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
    1254                 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
    1255                 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
     1254                if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1255                if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
    12561256        }
    12571257
     
    12811281         oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
    12821282        else
    1283          _error_("object %s not supported yet",EnumToStringx(object_enum));
    1284         if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToStringx(enum_type));
     1283         _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
     1284        if(!oldinput)_error2_("" << " could not find old input with enum: " << EnumToStringx(enum_type));
    12851285        newinput=(Input*)oldinput->copy();
    12861286
     
    12941294         this->matice->inputs->AddInput((Input*)newinput);
    12951295        else
    1296          _error_("object %s not supported yet",EnumToStringx(object_enum));
     1296         _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
    12971297}
    12981298/*}}}*/
     
    13121312        /*Make a copy of the original input: */
    13131313        input=(Input*)this->inputs->GetInput(enum_type);
    1314         if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
     1314        if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
    13151315
    13161316        /*Scale: */
     
    13271327        if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type);
    13281328        else input=this->inputs->GetInput(enum_type);
    1329         //if (!input) _error_("Input %s not found in tria->inputs",EnumToStringx(enum_type));
     1329        //if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in tria->inputs");
    13301330        if(!input)return;
    13311331
     
    14331433                                        /*Matice will take care of it*/ break;
    14341434                                default:
    1435                                         _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
     1435                                        _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
    14361436                        }
    14371437                }
     
    15051505                        break;
    15061506                default:
    1507                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     1507                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    15081508        }
    15091509}
     
    15231523        for(int i=0;i<numdof;i++){
    15241524                values[i]=solution[doflist[i]];
    1525                 if(isnan(values[i])) _error_("NaN found in solution vector");
     1525                if(isnan(values[i])) _error2_("NaN found in solution vector");
    15261526        }
    15271527
     
    15561556        for(i=0;i<numdof;i++){
    15571557                newthickness[i]=solution[doflist[i]];
    1558                 if(isnan(newthickness[i])) _error_("NaN found in solution vector");
     1558                if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
    15591559                /*Constrain thickness to be at least 1m*/
    15601560                if(newthickness[i]<minthickness) newthickness[i]=minthickness;
     
    15871587                                newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
    15881588                        }
    1589                         else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));
     1589                        else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
    15901590                }
    15911591        }
     
    16281628
    16291629                default:
    1630                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     1630                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    16311631        }
    16321632}
     
    16341634/*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/
    16351635void  Tria::InputUpdateFromVector(int* vector, int name, int type){
    1636         _error_(" not supported yet!");
     1636        _error2_(" not supported yet!");
    16371637}
    16381638/*}}}*/
    16391639/*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
    16401640void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
    1641         _error_(" not supported yet!");
     1641        _error2_(" not supported yet!");
    16421642}
    16431643/*}}}*/
     
    16571657                this->inputs->AddInput(new DoubleInput(name,(int)scalar));
    16581658        }
    1659         else _error_("%s%i"," could not recognize nature of vector from code ",code);
     1659        else _error2_("" << " could not recognize nature of vector from code " << code);
    16601660
    16611661}
     
    17221722                        this->inputs->AddInput(transientinput);
    17231723                }
    1724                 else _error_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (%s) is %i long",EnumToStringx(vector_enum),M);
     1724                else _error2_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (" << EnumToStringx(vector_enum) << ") is " << M << " long");
    17251725        }
    17261726        else if(vector_type==2){ //element vector
     
    17391739                                this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
    17401740                        }
    1741                         else _error_("%s%i"," could not recognize nature of vector from code ",code);
     1741                        else _error2_("" << " could not recognize nature of vector from code " << code);
    17421742                }
    17431743                else {
    1744                         _error_("transient elementary inputs not supported yet!");
     1744                        _error2_("transient elementary inputs not supported yet!");
    17451745                }
    17461746        }
    17471747        else{
    1748                 _error_("Cannot add input for vector type %i (not supported)",vector_type);
     1748                _error2_("Cannot add input for vector type " << vector_type << " (not supported)");
    17491749        }
    17501750
     
    23602360void  Tria::SetClone(int* minranks){
    23612361
    2362         _error_("not implemented yet");
     2362        _error2_("not implemented yet");
    23632363}
    23642364/*}}}*/
    23652365/*FUNCTION Tria::SmearFunction {{{*/
    23662366void  Tria::SmearFunction(Vector*  smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
    2367         _error_("not implemented yet");
     2367        _error2_("not implemented yet");
    23682368
    23692369}
     
    24582458        this->MaxAbsVy(&maxabsvy,false);
    24592459        #else
    2460                 _error_("ISSM was not compiled with responses compiled in, exiting!");
     2460                _error2_("ISSM was not compiled with responses compiled in, exiting!");
    24612461        #endif
    24622462
     
    26512651
    26522652        /*First off, check that this segment belongs to this element: */
    2653         if ((int)*(segment+4)!=this->id)_error_("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id);
     2653        if ((int)*(segment+4)!=this->id)_error2_("" << "error message: segment with id " << (int)*(segment+4) << " does not belong to element with id:" << this->id);
    26542654
    26552655        /*Recover segment node locations: */
     
    28702870                        *presponse=vel;
    28712871                default: 
    2872                         _error_("Response type %s not supported yet!",EnumToStringx(response_enum));
     2872                        _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
    28732873        }
    28742874
     
    33253325
    33263326                /*Check solution*/
    3327                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    3328                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     3327                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     3328                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    33293329        }
    33303330
     
    33853385
    33863386                /*Check solution*/
    3387                 if(isnan(vx[i])) _error_("NaN found in solution vector");
    3388                 if(isnan(vy[i])) _error_("NaN found in solution vector");
     3387                if(isnan(vx[i])) _error2_("NaN found in solution vector");
     3388                if(isnan(vy[i])) _error2_("NaN found in solution vector");
    33893389        }
    33903390
     
    34413441
    34423442                if (input->ObjectEnum()!=ControlInputEnum){
    3443                         _error_("input %s is not a ControlInput",EnumToStringx(control_type[i]));
     3443                        _error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
    34443444                }
    34453445
     
    34663466                input=inputs->GetInput(enum_type);
    34673467        }
    3468         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    3469         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     3468        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     3469        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34703470
    34713471        GradientIndexing(&doflist1[0],control_index);
     
    34843484                input=inputs->GetInput(enum_type);
    34853485        }
    3486         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    3487         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     3486        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     3487        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34883488
    34893489        ((ControlInput*)input)->ScaleGradient(scale);
     
    35033503                input=inputs->GetInput(enum_type);
    35043504        }
    3505         if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
    3506         if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
     3505        if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
     3506        if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    35073507
    35083508        GradientIndexing(&doflist1[0],control_index);
     
    35383538                        break;
    35393539                default:
    3540                         _error_("%s%i","control type not supported yet: ",control_type);
     3540                        _error2_("" << "control type not supported yet: " << control_type);
    35413541        }
    35423542
     
    35663566                        break;
    35673567                default:
    3568                         _error_("response %s not supported yet",EnumToStringx(responses[resp]));
     3568                        _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    35693569        }
    35703570
     
    44224422                                break;
    44234423                        default:
    4424                                 _error_("response %s not supported yet",EnumToStringx(responses[resp]));
     4424                                _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    44254425                }
    44264426        }
     
    46004600                                        break;
    46014601                                default:
    4602                                         _error_("response %s not supported yet",EnumToStringx(responses[resp]));
     4602                                        _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    46034603                        }
    46044604                }
     
    47774777                                        break;
    47784778                                default:
    4779                                         _error_("response %s not supported yet",EnumToStringx(responses[resp]));
     4779                                        _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    47804780                        }
    47814781                }
     
    48464846                        break;
    48474847                default:
    4848                         _error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
     4848                        _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    48494849        }
    48504850
     
    49474947
    49484948                /*Check solution*/
    4949                 if(isnan(lambdax[i])) _error_("NaN found in solution vector");
    4950                 if(isnan(lambday[i])) _error_("NaN found in solution vector");
     4949                if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
     4950                if(isnan(lambday[i])) _error2_("NaN found in solution vector");
    49514951        }
    49524952
     
    49784978        for(i=0;i<numdof;i++){
    49794979                lambda[i]=values[i];
    4980                 if(isnan(lambda[i])) _error_("NaN found in solution vector");
     4980                if(isnan(lambda[i])) _error2_("NaN found in solution vector");
    49814981        }
    49824982
     
    50105010        /*Check that it is a ControlInput*/
    50115011        if (input->ObjectEnum()!=ControlInputEnum){
    5012                 _error_("input %s is not a ControlInput",EnumToStringx(control_enum));
     5012                _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    50135013        }
    50145014
     
    50445044
    50455045        if (input->ObjectEnum()!=ControlInputEnum){
    5046                 _error_("input %s is not a ControlInput",EnumToStringx(control_enum));
     5046                _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    50475047        }
    50485048
     
    53145314        for(i=0;i<numdof;i++){
    53155315                values[i]=solution[doflist[i]];
    5316                 if(isnan(values[i])) _error_("NaN found in solution vector");
     5316                if(isnan(values[i])) _error2_("NaN found in solution vector");
    53175317                if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values
    53185318 
     
    54265426
    54275427                default:
    5428                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     5428                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    54295429        }
    54305430
     
    54335433/*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
    54345434void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
    5435         _error_(" not supported yet!");
     5435        _error2_(" not supported yet!");
    54365436}
    54375437/*}}}*/
    54385438/*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
    54395439void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
    5440         _error_(" not supported yet!");
     5440        _error2_(" not supported yet!");
    54415441}
    54425442/*}}}*/
     
    54805480
    54815481                default:
    5482                         _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     5482                        _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    54835483        }
    54845484
     
    54975497                        return CreateKMatrixBalancethickness_DG();
    54985498                default:
    5499                         _error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
     5499                        _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    55005500        }
    55015501
     
    56765676                        return CreatePVectorBalancethickness_DG();
    56775677                default:
    5678                         _error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
     5678                        _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    56795679        }
    56805680}
  • issm/trunk-jpl/src/c/objects/Elements/TriaRef.cpp

    r12471 r12493  
    338338
    339339        *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.));
    340         if(*Jdet<0) _error_("negative jacobian determinant!");
     340        if(*Jdet<0) _error2_("negative jacobian determinant!");
    341341
    342342}
     
    353353        /*Get Determinant*/
    354354        Matrix2x2Determinant(Jdet,&J[0][0]);
    355         if(*Jdet<0) _error_("negative jacobian determinant!");
     355        if(*Jdet<0) _error2_("negative jacobian determinant!");
    356356
    357357}
     
    375375
    376376        *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);
    377         if(*Jdet<0) _error_("negative jacobian determinant!");
     377        if(*Jdet<0) _error2_("negative jacobian determinant!");
    378378
    379379}
  • issm/trunk-jpl/src/c/objects/FemModel.cpp

    r12457 r12493  
    129129        }
    130130        if(found!=-1) analysis_counter=found;
    131         else _error_("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToStringx(configuration_type));
     131        else _error2_("Could not find alias for analysis_type " << EnumToStringx(configuration_type) << " in list of FemModel analyses");
    132132
    133133        /*Now, plug analysis_counter and analysis_type inside the parameters: */
  • issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp

    r12455 r12493  
    121121        }
    122122        else{
    123                 _error_("Penta not supported yet");
     123                _error2_("Penta not supported yet");
    124124        }
    125125
     
    161161        }
    162162        else{
    163                 _error_("Tria not supported yet");
     163                _error2_("Tria not supported yet");
    164164        }
    165165
     
    223223        }
    224224        else{
    225                 _error_("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4);
     225                _error2_("Tria not supported yet (user provided indices " << index1 << " " << index2 << " " << index3 << " " << index4 << ")");
    226226        }
    227227
     
    342342                        break;
    343343                default:
    344                         _error_("vertex index should be in [0 5]");
     344                        _error2_("vertex index should be in [0 5]");
    345345
    346346        }
     
    361361        }
    362362        else{
    363                 _error_("Tria not supported yet");
     363                _error2_("Tria not supported yet");
    364364        }
    365365
  • issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp

    r12481 r12493  
    8282        }
    8383        else
    84          _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
     84         _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
    8585
    8686        /*Initialize static fields as undefined*/
     
    180180        }
    181181        else
    182          _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
     182         _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
    183183
    184184}
     
    243243                        break;
    244244                default:
    245                         _error_("vertex index should be in [0 2]");
     245                        _error2_("vertex index should be in [0 2]");
    246246
    247247        }
  • issm/trunk-jpl/src/c/objects/Hook.cpp

    r12457 r12493  
    185185                        this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
    186186                        /*check the id is correct!: */
    187                         if (this->objects[i]->Id()!=this->ids[i]) _error_("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i],"  in resolved pointer!");
     187                        if (this->objects[i]->Id()!=this->ids[i]) _error2_("" << " wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
    188188                }
    189189        }
     
    194194       
    195195        /*first, check that we only have one T object in our object list: */
    196         if (this->num!=1) _error_("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects");
     196        if (this->num!=1) _error2_("" << " trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
    197197
    198198        /*check NULL: */
    199         if (this->objects==NULL) _error_("hook is not pointing to any object, objects pointer is NULL");
     199        if (this->objects==NULL) _error2_("hook is not pointing to any object, objects pointer is NULL");
    200200
    201201        return *objects;
     
    246246
    247247        /*Else, check that we are requesting a half of num*/
    248         if (numindices>this->num) _error_("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);
     248        if (numindices>this->num) _error2_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
    249249
    250250        /*go pickup the correct objects, ids and offsets :*/
    251251        output->num=numindices;
    252         if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
     252        if(output->num<1) _error2_("Trying to spawn an empty ElementProperties!");
    253253
    254254        output->objects=xNew<Object*>(output->num);
  • issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp

    r12426 r12493  
    112112/*}}}*/
    113113/*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
    114 void BoolInput::GetInputValue(int* pvalue){_error_(" not supported yet!");}
     114void BoolInput::GetInputValue(int* pvalue){_error2_(" not supported yet!");}
    115115/*}}}*/
    116116/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/
    117 void BoolInput::GetInputValue(IssmPDouble* pvalue){_error_(" not supported yet!");}
     117void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_(" not supported yet!");}
    118118/*}}}*/
    119119/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
    120 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
     120void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
    121121/*}}}*/
    122122/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
    123 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
     123void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
    124124/*}}}*/
    125125/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
    126 void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
     126void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
    127127/*}}}*/
    128128/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
    129 void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
     129void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
    130130/*}}}*/
    131131/*FUNCTION BoolInput::ChangeEnum{{{*/
     
    161161
    162162                default:
    163                         _error_("not implemented yet");
     163                        _error2_("not implemented yet");
    164164        }
    165165
     
    184184void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){
    185185
    186         _error_(" not supporte yet!");
     186        _error2_(" not supporte yet!");
    187187
    188188}
     
    191191void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
    192192
    193         _error_(" not supported yet!");
     193        _error2_(" not supported yet!");
    194194
    195195}
  • issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp

    r12426 r12493  
    4848                        break;
    4949                default:
    50                         _error_("Input of Enum %s not supported yet by ControlInput",EnumToStringx(enum_input));
     50                        _error2_("Input of Enum " << EnumToStringx(enum_input) << " not supported yet by ControlInput");
    5151        }
    5252        gradient   =NULL;
     
    152152/*FUNCTION ControlInput::ScaleGradient{{{*/
    153153void ControlInput::ScaleGradient(IssmPDouble scaling_factor){
    154         if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToStringx(enum_type));
     154        if(!gradient) _error2_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found");
    155155        gradient->Scale(scaling_factor);
    156156}/*}}}*/
     
    170170                        break;
    171171                default:
    172                         _error_("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id);
     172                        _error2_("more than 3 controls not implemented yet (Gradient " << this->control_id << " was requested). EnumDefinitions.h needs to be updated.");
    173173        }
    174174
     
    221221         }
    222222         else{
    223                  _error_("Data %s not supported yet",data);
     223                 _error2_("Data " << data << " not supported yet");
    224224         }
    225225}/*}}}*/
     
    258258/*FUNCTION ControlInput::SaveValue{{{*/
    259259void ControlInput::SaveValue(void){
    260         if(!values) _error_("Values of %s not found",EnumToStringx(this->enum_type));
     260        if(!values) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
    261261
    262262        if(savedvalues) delete this->savedvalues;
     
    265265/*FUNCTION ControlInput::UpdateValue{{{*/
    266266void ControlInput::UpdateValue(IssmPDouble scalar){
    267         if(!gradient)    _error_("Gradient of %s not found",EnumToStringx(this->enum_type));
    268         if(!savedvalues) _error_("Values of %s not found",EnumToStringx(this->enum_type));
     267        if(!gradient)    _error2_("Gradient of " << EnumToStringx(this->enum_type) << " not found");
     268        if(!savedvalues) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
    269269
    270270        if(values) delete this->values;
  • issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp

    r12426 r12493  
    115115
    116116        /*Get requested input within dataset*/
    117         if(index<0 || index > inputs->Size()-1) _error_("index requested (%i) exceeds dataset size (%i)",index,inputs->Size());
     117        if(index<0 || index > inputs->Size()-1) _error2_("index requested (" << index << ") exceeds dataset size (" << inputs->Size() << ")");
    118118        Input* input=(Input*)this->inputs->GetObjectByOffset(index);
    119119       
  • issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp

    r12426 r12493  
    108108/*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/
    109109void DoubleInput::GetInputValue(bool* pvalue){
    110         _error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type));
     110        _error2_("Double input of enum " << EnumToStringx(enum_type) << " cannot return a boolean");
    111111
    112112}
     
    114114/*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/
    115115void DoubleInput::GetInputValue(int* pvalue){
    116         _error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
     116        _error2_("Double input of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
    117117
    118118}
     
    132132/*}}}*/
    133133/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
    134 void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
     134void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
    135135/*}}}*/
    136136/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
    137 void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
     137void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
    138138/*}}}*/
    139139/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
     
    217217
    218218                default:
    219                         _error_("not implemented yet");
     219                        _error2_("not implemented yet");
    220220        }
    221221
     
    253253void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){
    254254
    255         _error_(" not supporte yet!");
     255        _error2_(" not supporte yet!");
    256256
    257257}
     
    260260void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
    261261
    262         _error_(" not supported yet!");
     262        _error2_(" not supported yet!");
    263263
    264264}
     
    276276
    277277        /*Check that input provided is a thickness*/
    278         if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
     278        if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
    279279
    280280        /*vertically integrate depending on type:*/
     
    287287
    288288                default:
    289                         _error_("not implemented yet");
     289                        _error2_("not implemented yet");
    290290        }
    291291}
  • issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp

    r12426 r12493  
    9999ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){
    100100       
    101         _error_(" not supported yet!");
     101        _error2_(" not supported yet!");
    102102
    103103}
     
    106106/*Object functions*/
    107107/*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/
    108 void IntInput::GetInputValue(bool* pvalue){_error_(" not supported yet!");}
     108void IntInput::GetInputValue(bool* pvalue){_error2_(" not supported yet!");}
    109109/*}}}*/
    110110/*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/
     
    115115/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue){{{*/
    116116void IntInput::GetInputValue(IssmPDouble* pvalue){
    117         _error_("IntInput cannot return a IssmPDouble in parallel");
     117        _error2_("IntInput cannot return a IssmPDouble in parallel");
    118118}
    119119/*}}}*/
    120120/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
    121 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
     121void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
    122122/*}}}*/
    123123/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
    124 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
     124void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
    125125/*}}}*/
    126126/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
    127 void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
     127void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
    128128/*}}}*/
    129129/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
    130 void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
     130void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
    131131/*}}}*/
    132132/*FUNCTION IntInput::ChangeEnum{{{*/
     
    166166
    167167                default:
    168                         _error_("not implemented yet");
     168                        _error2_("not implemented yet");
    169169        }
    170170
     
    182182void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){
    183183
    184         _error_(" not supporte yet!");
     184        _error2_(" not supporte yet!");
    185185
    186186}
     
    189189void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
    190190
    191         _error_(" not supported yet!");
     191        _error2_(" not supported yet!");
    192192
    193193}
  • issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp

    r12426 r12493  
    455455                case ControlInputEnum:{
    456456                        ControlInput* cont_input=(ControlInput*)xinput;
    457                         if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error_("not supported yet");
     457                        if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error2_("not supported yet");
    458458                        PentaP1Input* cast_input=(PentaP1Input*)cont_input->values;
    459459                        for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
    460460                        return;
    461461                default:
    462                         _error_("not implemented yet");
     462                        _error2_("not implemented yet");
    463463        }
    464464
     
    495495
    496496        /*Check that input provided is a thickness*/
    497         if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
     497        if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
    498498
    499499        /*Get Thickness value pointer*/
     
    511511
    512512                default:
    513                         _error_("not implemented yet");
     513                        _error2_("not implemented yet");
    514514        }
    515515}
     
    529529
    530530        /*Check that inputB is of the same type*/
    531         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
     531        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    532532        xinputB=(PentaP1Input*)inputB;
    533533
     
    560560
    561561        /*Check that inputB is of the same type*/
    562         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
     562        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    563563        xinputB=(PentaP1Input*)inputB;
    564564
     
    591591
    592592        /*Check that inputB is of the same type*/
    593         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
     593        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    594594        xinputB=(PentaP1Input*)inputB;
    595595
  • issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp

    r12455 r12493  
    446446                }
    447447        }
    448         if(!found)_error_("did not find time interval on which to interpolate forcing values!");
     448        if(!found)_error2_("did not find time interval on which to interpolate forcing values!");
    449449
    450450        /*Assign output pointer*/
  • issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp

    r12426 r12493  
    323323
    324324                default :
    325                         _error_("not implemented yet");
     325                        _error2_("not implemented yet");
    326326        }
    327327
     
    368368
    369369        /*Check that inputB is of the same type*/
    370         if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
     370        if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    371371        xinputB=(TriaP1Input*)inputB;
    372372
     
    399399
    400400        /*Check that inputB is of the same type*/
    401         if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
     401        if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    402402        xinputB=(TriaP1Input*)inputB;
    403403
  • issm/trunk-jpl/src/c/objects/IoModel.cpp

    r12457 r12493  
    110110                /*Get first Enum*/
    111111                if(fread(&record_enum,sizeof(int),1,this->fid)==0){
    112                         _error_("Marshalled file is empty");
     112                        _error2_("Marshalled file is empty");
    113113                }
    114114                else{
     
    128128                                printf("=========================================================================\n");
    129129                                printf("\n");
    130                                 _error_("Enums not consistent (See error message above)");
     130                                _error2_("Enums not consistent (See error message above)");
    131131                        }
    132132                }
     
    177177        /*Find constant*/
    178178        Param* param=(Param*)this->constants->FindParamObject(constant_enum);
    179         if(!param) _error_("Constant %s not found in iomodel",EnumToStringx(constant_enum));
     179        if(!param) _error2_("Constant " << EnumToStringx(constant_enum) << " not found in iomodel");
    180180
    181181        return (Param*)param->copy();
     
    266266                                        case 1:
    267267                                                /*Read the boolean and broadcast it to other cpus:*/
    268                                                 if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error_(" could not read boolean ");
     268                                                if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error2_(" could not read boolean ");
    269269                                                #ifdef _HAVE_MPI_
    270270                                                MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD);
     
    277277                                        case 2:
    278278                                                /*Read the integer and broadcast it to other cpus:*/
    279                                                 if(fread(&integer,sizeof(int),1,this->fid)!=1) _error_(" could not read integer ");
     279                                                if(fread(&integer,sizeof(int),1,this->fid)!=1) _error2_(" could not read integer ");
    280280                                                #ifdef _HAVE_MPI_
    281281                                                MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD);
     
    288288                                        case 3:
    289289                                                /*Read the scalar and broadcast it to other cpus:*/
    290                                                 if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error_(" could not read scalar ");
     290                                                if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error2_(" could not read scalar ");
    291291                                                #ifdef _HAVE_MPI_
    292292                                                MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
     
    299299                                        case 4:
    300300                                                /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    301                                                 if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error_(" could not read length of string ");
     301                                                if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error2_(" could not read length of string ");
    302302                                                #ifdef _HAVE_MPI_
    303303                                                MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD);
     
    309309
    310310                                                        /*Read string, then broadcast: */
    311                                                         if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error_("  could not read string ");
     311                                                        if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error2_("  could not read string ");
    312312                                                        #ifdef _HAVE_MPI_
    313313                                                        MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD);
     
    360360
    361361                                        default:
    362                                                 _error_("%s%i","unknown record type:",record_code);
     362                                                _error2_("" << "unknown record type:" << record_code);
    363363                                                break;;
    364364                                }
     
    428428
    429429                                default:
    430                                         _error_("%s%i","unknown record type:",record_code);
     430                                        _error2_("" << "unknown record type:" << record_code);
    431431                                        break;;
    432432                                }
     
    453453        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    454454
    455         if(code!=1)_error_("expecting a boolean for enum %s",EnumToStringx(data_enum));
     455        if(code!=1)_error2_("expecting a boolean for enum " << EnumToStringx(data_enum));
    456456       
    457457        /*We have to read a boolean from disk. */
    458458        if(my_rank==0){ 
    459                 if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean ");
     459                if(fread(&booleanint,sizeof(int),1,fid)!=1) _error2_(" could not read boolean ");
    460460        }
    461461        #ifdef _HAVE_MPI_
     
    483483        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    484484       
    485         if(code!=2)_error_("expecting an integer for enum %s",EnumToStringx(data_enum));
     485        if(code!=2)_error2_("expecting an integer for enum " << EnumToStringx(data_enum));
    486486       
    487487        /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
    488488        if(my_rank==0){ 
    489                 if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
     489                if(fread(&integer,sizeof(int),1,fid)!=1) _error2_(" could not read integer ");
    490490        }
    491491
     
    514514        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    515515       
    516         if(code!=3)_error_("expecting a IssmPDouble for enum %s",EnumToStringx(data_enum));
     516        if(code!=3)_error2_("expecting a IssmPDouble for enum " << EnumToStringx(data_enum));
    517517       
    518518        /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
    519519        if(my_rank==0){
    520                 if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_(" could not read scalar ");
     520                if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error2_(" could not read scalar ");
    521521        }
    522522        #ifdef _HAVE_MPI_
     
    544544        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    545545       
    546         if(code!=4)_error_("expecting a string for enum %s",EnumToStringx(data_enum));
     546        if(code!=4)_error2_("expecting a string for enum " << EnumToStringx(data_enum));
    547547       
    548548        /*Now fetch: */
     
    550550        /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    551551        if(my_rank==0){ 
    552                 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
     552                if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
    553553        }
    554554
     
    564564                /*Read string on node 0, then broadcast: */
    565565                if(my_rank==0){ 
    566                         if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
     566                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
    567567                }
    568568                #ifdef _HAVE_MPI_
     
    598598        fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
    599599
    600         if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
     600        if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    601601       
    602602        /*Now fetch: */
     
    605605        /*numberofelements: */
    606606        if(my_rank==0){ 
    607                 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
     607                if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows for matrix ");
    608608        }
    609609
     
    613613
    614614        if(my_rank==0){ 
    615                 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
     615                if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
    616616        }
    617617        #ifdef _HAVE_MPI_
     
    625625                /*Read matrix on node 0, then broadcast: */
    626626                if(my_rank==0){ 
    627                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
     627                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
    628628                }
    629629               
     
    669669        /*Set file pointer to beginning of the data: */
    670670        fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
    671         if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
     671        if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    672672       
    673673        /*Now fetch: */
     
    676676        /*numberofelements: */
    677677        if(my_rank==0){ 
    678                 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
     678                if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows for matrix ");
    679679        }
    680680        #ifdef _HAVE_MPI_
     
    683683
    684684        if(my_rank==0){ 
    685                 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
     685                if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
    686686        }
    687687        #ifdef _HAVE_MPI_
     
    695695                /*Read matrix on node 0, then broadcast: */
    696696                if(my_rank==0){ 
    697                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
     697                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
    698698                }
    699699                #ifdef _HAVE_MPI_
     
    728728        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    729729       
    730         if(code!=9)_error_("expecting a string array for enum %s",EnumToStringx(data_enum));
     730        if(code!=9)_error2_("expecting a string array for enum " << EnumToStringx(data_enum));
    731731       
    732732        /*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
    733733        if(my_rank==0){ 
    734                 if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
     734                if(fread(&numstrings,sizeof(int),1,fid)!=1) _error2_(" could not read length of string array");
    735735        }
    736736        #ifdef _HAVE_MPI_
     
    747747                       
    748748                        if(my_rank==0){ 
    749                                 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
     749                                if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
    750750                        }
    751751                        #ifdef _HAVE_MPI_
     
    758758                                /*Read string on node 0, then broadcast: */
    759759                                if(my_rank==0){ 
    760                                         if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
     760                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
    761761                                }
    762762                                #ifdef _HAVE_MPI_
     
    799799        /*Set file pointer to beginning of the data: */
    800800        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    801         if(code!=8)_error_("expecting a IssmPDouble mat array for enum %s",EnumToStringx(data_enum));
     801        if(code!=8)_error2_("expecting a IssmPDouble mat array for enum " << EnumToStringx(data_enum));
    802802       
    803803        /*Now fetch: */
    804804        if(my_rank==0){ 
    805                 if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
     805                if(fread(&numrecords,sizeof(int),1,fid)!=1) _error2_("could not read number of records in matrix array ");
    806806        }
    807807        #ifdef _HAVE_MPI_
     
    826826
    827827                        if(my_rank==0){ 
    828                                 if(fread(&M,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of rows in ",i,"th matrix of matrix array");
     828                                if(fread(&M,sizeof(int),1,fid)!=1) _error2_("" << "could not read number of rows in " << i << "th matrix of matrix array");
    829829                        }
    830830                        #ifdef _HAVE_MPI_
     
    833833
    834834                        if(my_rank==0){ 
    835                                 if(fread(&N,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of columns in ",i,"th matrix of matrix array");
     835                                if(fread(&N,sizeof(int),1,fid)!=1) _error2_("" << "could not read number of columns in " << i << "th matrix of matrix array");
    836836                        }
    837837                        #ifdef _HAVE_MPI_
     
    845845                                /*Read matrix on node 0, then broadcast: */
    846846                                if(my_rank==0){ 
    847                                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
     847                                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
    848848                                }
    849849
     
    908908                          }
    909909                default:
    910                           _error_("Option of format %i not supported yet",code);
     910                          _error2_("Option of format " << code << " not supported yet");
    911911        }
    912912
     
    937937                _assert_(dataenum<MaximumNumberOfEnums);
    938938                if(this->data[dataenum]){
    939                         _error_("Info: trying to fetch %s but previous pointer has not been freed (DeleteData has not been called)",EnumToStringx(dataenum));
     939                        _error2_("Info: trying to fetch " << EnumToStringx(dataenum) << " but previous pointer has not been freed (DeleteData has not been called)");
    940940                }
    941941                #endif
     
    11371137                        break; /*}}}*/
    11381138                default: /*{{{*/
    1139                         _error_("%s%i%s","data code ",code," not supported yet!");
     1139                        _error2_("" << "data code " << code << " not supported yet!");
    11401140                        break;
    11411141                        /*}}}*/
     
    12281228#ifdef _HAVE_MPI_
    12291229        MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD);
    1230         if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum));
     1230        if(!found)_error2_("" << "could not find data with name" << " " << EnumToStringx(data_enum) << " ");
    12311231#endif
    12321232
  • issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp

    r12365 r12493  
    138138}
    139139/*}}}*/
    140 
    141140/*FUNCTION  KMLFileTokenComment(FILE* fid) {{{*/
    142141char* KMLFileTokenComment(FILE* fid){
     
    203202}
    204203/*}}}*/
    205 
    206204/*FUNCTION  KMLFileTokenBuffer {{{*/
    207205void KMLFileTokenBuffer(char** pbuffer,int* pibuf,int* pbuflen,
     
    228226}
    229227/*}}}*/
    230 
    231228/*FUNCTION  KMLFileTagName {{{*/
    232229char* KMLFileTagName(char* pname,
     
    237234}
    238235/*}}}*/
    239 
    240236/*FUNCTION  KMLFileTagName {{{*/
    241237char* KMLFileTagName(char* pname,int *m,int maxlen,
     
    248244
    249245        if (strncmp(&ktag[0],"<"        ,1) || strncmp(&ktag[strlen(ktag)-1],">",1))
    250                 _error_("KMLFileTagName -- Missing tag delimiters in %s.\n",ktag);
     246                _error2_("KMLFileTagName -- Missing tag delimiters in " << ktag << ".\n");
    251247
    252248/*  strtok modifies ktag, so work on copy  */
     
    283279}
    284280/*}}}*/
    285 
    286281/*FUNCTION  KMLFileTagAttrib {{{*/
    287282int KMLFileTagAttrib(KML_Object* kobj,
     
    333328}
    334329/*}}}*/
    335 
    336330/*FUNCTION  KMLFileTokenParse {{{*/
    337331int KMLFileTokenParse(int* pival,
     
    346340                                                        NULL,NULL)) ||
    347341                (kstr[0] == '<'))
    348                 _error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
     342                _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
    349343
    350344        sscanf(kstr,"%d",pival);
     
    359353                        (kstr[1] != '/') ||
    360354                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    361                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     355                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    362356                else
    363357                        xfree((void**)&kstr);
     
    368362}
    369363/*}}}*/
    370 
    371364/*FUNCTION  KMLFileTokenParse {{{*/
    372 int KMLFileTokenParse(bool* pbval,
    373                                           char* ktag,
    374                                           FILE* fid){
     365int KMLFileTokenParse(bool* pbval, char* ktag, FILE* fid){
    375366
    376367        int     ival;
     
    382373                                                        NULL,NULL)) ||
    383374                (kstr[0] == '<'))
    384                 _error_("KMLFileTokenParse -- Missing bool field for %s.\n",ktag);
     375          {_error2_("KMLFileTokenParse -- Missing bool field for " << ktag << ".\n");}
    385376
    386377        sscanf(kstr,"%d",&ival);
     
    396387                        (kstr[1] != '/') ||
    397388                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    398                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     389                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    399390                else
    400391                        xfree((void**)&kstr);
     
    405396}
    406397/*}}}*/
    407 
    408398/*FUNCTION  KMLFileTokenParse {{{*/
    409399char* KMLFileTokenParse(char* pstr,
     
    416406}
    417407/*}}}*/
    418 
    419408/*FUNCTION  KMLFileTokenParse {{{*/
    420409char* KMLFileTokenParse(char* pstr,int *m,int maxlen,
     
    429418                                                        NULL,NULL)) ||
    430419                (kstr[0] == '<'))
    431                 _error_("KMLFileTokenParse -- Missing string field for %s.\n",ktag);
     420                _error2_("KMLFileTokenParse -- Missing string field for " << ktag << ".\n");
    432421
    433422        if (!pstr) {
     
    459448                        (kstr[1] != '/') ||
    460449                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    461                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     450                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    462451                else
    463452                        xfree((void**)&kstr);
     
    468457}
    469458/*}}}*/
    470 
    471459/*FUNCTION  KMLFileTokenParse {{{*/
    472460int KMLFileTokenParse(float* pfval,
     
    481469                                                        NULL,NULL)) ||
    482470                (kstr[0] == '<'))
    483                 _error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
     471          {_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");}
    484472
    485473        sscanf(kstr,"%g",pfval);
     
    494482                        (kstr[1] != '/') ||
    495483                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    496                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     484                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    497485                else
    498486                        xfree((void**)&kstr);
     
    503491}
    504492/*}}}*/
    505 
    506493/*FUNCTION  KMLFileTokenParse {{{*/
    507494int KMLFileTokenParse(double* pdval,
     
    516503                                                        NULL,NULL)) ||
    517504                (kstr[0] == '<'))
    518                 _error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
     505                _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
    519506
    520507        sscanf(kstr,"%lg",pdval);
     
    529516                        (kstr[1] != '/') ||
    530517                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    531                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     518                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    532519                else
    533520                        xfree((void**)&kstr);
     
    538525}
    539526/*}}}*/
    540 
    541527/*FUNCTION  KMLFileTokenParse {{{*/
    542528int KMLFileTokenParse(double **pdval,int* m,int maxlen,
     
    554540                                                        NULL,NULL)) ||
    555541                (kstr[0] == '<'))
    556                 _error_("KMLFileTokenParse -- Missing double [m] field for %s.\n",ktag);
     542                _error2_("KMLFileTokenParse -- Missing double [m] field for " << ktag << ".\n");
    557543
    558544        if (!*pdval)
     
    568554                i++;
    569555                if (maxlen && (maxlen < i+1))
    570                         _error_("KMLFileTokenParse -- Double [m] field too short for %s.\n",ktag);
     556                        _error2_("KMLFileTokenParse -- Double [m] field too short for " << ktag << ".\n");
    571557                sscanf(ktok,"%lg",&((*pdval)[i]));
    572558                ktok=strtok(NULL,delim);
     
    588574                        (kstr[1] != '/') ||
    589575                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    590                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     576                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    591577                else
    592578                        xfree((void**)&kstr);
     
    599585}
    600586/*}}}*/
    601 
    602587/*FUNCTION  KMLFileTokenParse {{{*/
    603588int KMLFileTokenParse(double (**pdval3)[3],int* m,int maxlen,
     
    615600                                                        NULL,NULL)) ||
    616601                (kstr[0] == '<'))
    617                 _error_("KMLFileTokenParse -- Missing double [m x 3] field for %s.\n",ktag);
     602                _error2_("KMLFileTokenParse -- Missing double [m x 3] field for " << ktag << ".\n");
    618603
    619604        if (!*pdval3)
     
    632617                        j=0;
    633618                        if (maxlen && (maxlen < i+1))
    634                                 _error_("KMLFileTokenParse -- Double [m x 3] field too short for %s.\n",ktag);
     619                                _error2_("KMLFileTokenParse -- Double [m x 3] field too short for " << ktag << ".\n");
    635620                }
    636621                sscanf(ktok,"%lg",&((*pdval3)[i][j]));
     
    656641                        (kstr[1] != '/') ||
    657642                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    658                         _error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
     643                  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    659644                else
    660645                        xfree((void**)&kstr);
     
    667652}
    668653/*}}}*/
    669 
    670654/*FUNCTION  KMLFileTagSkip {{{*/
    671655int KMLFileTagSkip(char* ktag,
     
    704688                else if ((kstr[0] == '<') &&
    705689                                 (kstr[1] == '/')) {
    706                         _error_("KMLFileTagSkip -- Unexpected closing tag %s.\n",kstr);
     690                        _error2_("KMLFileTagSkip -- Unexpected closing tag " << kstr << ".\n");
    707691                }
    708692
     
    710694        }
    711695
    712         _error_("KMLFileTokenParse -- Corresponding closing tag for %s not found.\n",ktag);
     696        _error2_("KMLFileTokenParse -- Corresponding closing tag for " << ktag << " not found.\n");
    713697
    714698        return(0);
    715699}
    716700/*}}}*/
    717 
  • issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp

    r12365 r12493  
    9595                return;
    9696        else if (!strncmp(kstr,"</",2))
    97                 _error_("KML_ColorStyle::Read -- Unexpected closing tag %s.\n",kstr);
     97          {_error2_("KML_ColorStyle::Read -- Unexpected closing tag " << kstr);}
    9898        else if (strncmp(kstr,"<",1))
    99                 _error_("KML_ColorStyle::Read -- Unexpected field \"%s\".\n",kstr);
     99          {_error2_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");}
    100100
    101101        else if (!strcmp(kstr,"<color>"))
    102                 KMLFileTokenParse( color     ,NULL,KML_COLORSTYLE_COLOR_LENGTH,
    103                                                   kstr,
    104                                                   fid);
     102                KMLFileTokenParse( color     ,NULL,KML_COLORSTYLE_COLOR_LENGTH, kstr, fid);
    105103        else if (!strcmp(kstr,"<colorMode>"))
    106                 KMLFileTokenParse( colormode ,NULL,KML_COLORSTYLE_COLORMODE_LENGTH,
    107                                                   kstr,
    108                                                   fid);
     104                KMLFileTokenParse( colormode ,NULL,KML_COLORSTYLE_COLORMODE_LENGTH, kstr, fid);
    109105
    110106        else if (!strncmp(kstr,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp

    r12365 r12493  
    120120        }
    121121        else if (!strncmp(kstr,"</",2))
    122                 _error_("KML_Container::Read -- Unexpected closing tag %s.\n",kstr);
     122          {_error2_("KML_Container::Read -- Unexpected closing tag " << kstr );}
    123123        else if (strncmp(kstr,"<",1))
    124                 _error_("KML_Container::Read -- Unexpected field \"%s\".\n",kstr);
     124          {_error2_("KML_Container::Read -- Unexpected field \"" << kstr << "\"");}
    125125
    126126        else if (!strncmp(kstr,"<Placemark",10)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp

    r12365 r12493  
    110110                }
    111111                else if (!strncmp(kstri,"</",2))
    112                         _error_("KML_Document::Read -- Unexpected closing tag %s.\n",kstri);
     112                  {_error2_("KML_Document::Read -- Unexpected closing tag " << kstri << ".\n");}
    113113                else if (strncmp(kstri,"<",1))
    114                         _error_("KML_Document::Read -- Unexpected field \"%s\".\n",kstri);
     114                  {_error2_("KML_Document::Read -- Unexpected field \"" << kstri << "\".\n");}
    115115
    116116                else if (!strncmp(kstri,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp

    r12365 r12493  
    153153                return;
    154154        else if (!strncmp(kstr,"</",2))
    155                 _error_("KML_Feature::Read -- Unexpected closing tag %s.\n",kstr);
     155          {_error2_("KML_Feature::Read -- Unexpected closing tag " << kstr);}
    156156        else if (strncmp(kstr,"<",1))
    157                 _error_("KML_Feature::Read -- Unexpected field \"%s\".\n",kstr);
     157          {_error2_("KML_Feature::Read -- Unexpected field \"" << kstr << "\"");}
    158158
    159159        else if (!strncmp(kstr,"<Style", 6)) {
     
    164164
    165165        else if (!strcmp(kstr,"<name>"))
    166                 KMLFileTokenParse( name      ,NULL,KML_FEATURE_NAME_LENGTH,
    167                                                   kstr,
    168                                                   fid);
     166                KMLFileTokenParse( name      ,NULL,KML_FEATURE_NAME_LENGTH, kstr, fid);
    169167        else if (!strcmp(kstr,"<visibility>"))
    170                 KMLFileTokenParse(&visibility,
    171                                                   kstr,
    172                                                   fid);
     168                KMLFileTokenParse(&visibility, kstr, fid);
    173169        else if (!strcmp(kstr,"<open>"))
    174                 KMLFileTokenParse(&open      ,
    175                                                   kstr,
    176                                                   fid);
     170                KMLFileTokenParse(&open      , kstr, fid);
    177171        else if (!strncmp(kstr,"<snippet", 8))
    178                 KMLFileTokenParse( snippet   ,NULL,KML_FEATURE_SNIPPET_LENGTH,
    179                                                   kstr,
    180                                                   fid);
     172                KMLFileTokenParse( snippet   ,NULL,KML_FEATURE_SNIPPET_LENGTH, kstr, fid);
    181173        else if (!strcmp(kstr,"<description>"))
    182                 KMLFileTokenParse( descript  ,NULL,KML_FEATURE_DESCRIPT_LENGTH,
    183                                                   kstr,
    184                                                   fid);
     174                KMLFileTokenParse( descript  ,NULL,KML_FEATURE_DESCRIPT_LENGTH, kstr, fid);
    185175        else if (!strcmp(kstr,"<styleUrl>"))
    186                 KMLFileTokenParse( styleurl  ,NULL,KML_FEATURE_STYLEURL_LENGTH,
    187                                                   kstr,
    188                                                   fid);
     176                KMLFileTokenParse( styleurl  ,NULL,KML_FEATURE_STYLEURL_LENGTH, kstr, fid);
    189177
    190178        else if (!strncmp(kstr,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_File.cpp

    r12365 r12493  
    107107                }
    108108                else if (!strncmp(kstri,"</",2))
    109                         _error_("KML_File::Read -- Unexpected closing tag %s.\n",kstri);
     109                  {_error2_("KML_File::Read -- Unexpected closing tag " << kstri << ".");}
    110110                else if (strncmp(kstri,"<",1))
    111                         _error_("KML_File::Read -- Unexpected field \"%s\".\n",kstri);
     111                  {_error2_("KML_File::Read -- Unexpected field \"" << kstri << "\"");}
    112112
    113113                else if (!strncmp(kstri,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp

    r12365 r12493  
    110110                }
    111111                else if (!strncmp(kstri,"</",2))
    112                         _error_("KML_Folder::Read -- Unexpected closing tag %s.\n",kstri);
     112                  {_error2_("KML_Folder::Read -- Unexpected closing tag " << kstri << ".\n");}
    113113                else if (strncmp(kstri,"<",1))
    114                         _error_("KML_Folder::Read -- Unexpected field \"%s\".\n",kstri);
     114                  {_error2_("KML_Folder::Read -- Unexpected field \"" << kstri << "\".\n");}
    115115
    116116                else if (!strncmp(kstri,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_Geometry.cpp

    r12365 r12493  
    8282                return;
    8383        else if (!strncmp(kstr,"</",2))
    84                 _error_("KML_Geometry::Read -- Unexpected closing tag %s.\n",kstr);
     84          {_error2_("KML_Geometry::Read -- Unexpected closing tag " << kstr << ".\n");}
    8585        else if (strncmp(kstr,"<",1))
    86                 _error_("KML_Geometry::Read -- Unexpected field \"%s\".\n",kstr);
     86          {_error2_("KML_Geometry::Read -- Unexpected field \"" << kstr << "\".\n");}
    8787
    8888        else if (!strncmp(kstr,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp

    r12365 r12493  
    142142                }
    143143                else if (!strncmp(kstri,"</",2))
    144                         _error_("KML_GroundOverlay::Read -- Unexpected closing tag %s.\n",kstri);
     144                  {_error2_("KML_GroundOverlay::Read -- Unexpected closing tag " << kstri << ".\n");}
    145145                else if (strncmp(kstri,"<",1))
    146                         _error_("KML_GroundOverlay::Read -- Unexpected field \"%s\".\n",kstri);
     146                  {_error2_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");}
    147147
    148148                else if (!strcmp(kstri,"<altitude>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp

    r12365 r12493  
    149149                }
    150150                else if (!strncmp(kstri,"</",2))
    151                         _error_("KML_Icon::Read -- Unexpected closing tag %s.\n",kstri);
     151                  {_error2_("KML_Icon::Read -- Unexpected closing tag " << kstri << ".\n");}
    152152                else if (strncmp(kstri,"<",1))
    153                         _error_("KML_Icon::Read -- Unexpected field \"%s\".\n",kstri);
     153                  {_error2_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");}
    154154
    155155                else if (!strcmp(kstri,"<href>"))
    156                         KMLFileTokenParse( href      ,NULL,KML_ICON_HREF_LENGTH,
    157                                                           kstri,
    158                                                           fid);
     156                        KMLFileTokenParse( href      ,NULL,KML_ICON_HREF_LENGTH, kstri, fid);
    159157                else if (!strcmp(kstri,"<refreshMode>"))
    160                         KMLFileTokenParse( refmode   ,NULL,KML_ICON_REFMODE_LENGTH,
    161                                                           kstri,
    162                                                           fid);
     158                        KMLFileTokenParse( refmode   ,NULL,KML_ICON_REFMODE_LENGTH, kstri, fid);
    163159                else if (!strcmp(kstri,"<refreshInterval>"))
    164                         KMLFileTokenParse(&refint    ,
    165                                                           kstri,
    166                                                           fid);
     160                        KMLFileTokenParse(&refint    , kstri, fid);
    167161                else if (!strcmp(kstri,"<viewRefreshMode>"))
    168                         KMLFileTokenParse( vrefmode  ,NULL,KML_ICON_VREFMODE_LENGTH,
    169                                                           kstri,
    170                                                           fid);
     162                        KMLFileTokenParse( vrefmode  ,NULL,KML_ICON_VREFMODE_LENGTH, kstri, fid);
    171163                else if (!strcmp(kstri,"<viewRefreshTime>"))
    172                         KMLFileTokenParse(&vreftime  ,
    173                                                           kstri,
    174                                                           fid);
     164                        KMLFileTokenParse(&vreftime  , kstri, fid);
    175165                else if (!strcmp(kstri,"<viewBoundScale>"))
    176                         KMLFileTokenParse(&vboundsc  ,
    177                                                           kstri,
    178                                                           fid);
     166                        KMLFileTokenParse(&vboundsc  , kstri, fid);
    179167                else if (!strcmp(kstri,"<viewFormat>"))
    180                         KMLFileTokenParse( vformat   ,NULL,KML_ICON_VFORMAT_LENGTH,
    181                                                           kstri,
    182                                                           fid);
     168                        KMLFileTokenParse( vformat   ,NULL,KML_ICON_VFORMAT_LENGTH, kstri, fid);
    183169                else if (!strcmp(kstri,"<httpQuery>"))
    184                         KMLFileTokenParse( hquery    ,NULL,KML_ICON_HQUERY_LENGTH,
    185                                                           kstri,
    186                                                           fid);
     170                        KMLFileTokenParse( hquery    ,NULL,KML_ICON_HQUERY_LENGTH, kstri, fid);
    187171
    188172                else if (!strncmp(kstri,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp

    r12365 r12493  
    132132                }
    133133                else if (!strncmp(kstri,"</",2))
    134                         _error_("KML_LatLonBox::Read -- Unexpected closing tag %s.\n",kstri);
     134                  {_error2_("KML_LatLonBox::Read -- Unexpected closing tag " << kstri << ".\n");}
    135135                else if (strncmp(kstri,"<",1))
    136                         _error_("KML_LatLonBox::Read -- Unexpected field \"%s\".\n",kstri);
     136                  {_error2_("KML_LatLonBox::Read -- Unexpected field \"" << kstri << "\".\n");}
    137137
    138138                else if (!strcmp(kstri,"<north>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp

    r12442 r12493  
    141141                }
    142142                else if (!strncmp(kstri,"</",2))
    143                         _error_("KML_LineString::Read -- Unexpected closing tag %s.\n",kstri);
     143                  {_error2_("KML_LineString::Read -- Unexpected closing tag " << kstri << ".\n");}
    144144                else if (strncmp(kstri,"<",1))
    145                         _error_("KML_LineString::Read -- Unexpected field \"%s\".\n",kstri);
     145                  {_error2_("KML_LineString::Read -- Unexpected field \"" << kstri << "\".\n");}
    146146
    147147                else if (!strcmp(kstri,"<extrude>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp

    r12365 r12493  
    5050}
    5151/*}}}*/
    52 
    5352/*FUNCTION KML_LineStyle::DeepEcho {{{*/
    5453void  KML_LineStyle::DeepEcho(){
     
    6160}
    6261/*}}}*/
    63 
    6462/*FUNCTION KML_LineStyle::DeepEcho {{{*/
    6563void  KML_LineStyle::DeepEcho(const char* indent){
     
    7674}
    7775/*}}}*/
    78 
    7976/*FUNCTION KML_LineStyle::Write {{{*/
    8077void  KML_LineStyle::Write(FILE* filout,const char* indent){
     
    9491}
    9592/*}}}*/
    96 
    9793/*FUNCTION KML_LineStyle::Read {{{*/
    9894void  KML_LineStyle::Read(FILE* fid,char* kstr){
     
    117113                }
    118114                else if (!strncmp(kstri,"</",2))
    119                         _error_("KML_LineStyle::Read -- Unexpected closing tag %s.\n",kstri);
     115                  {_error2_("KML_LineStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
    120116                else if (strncmp(kstri,"<",1))
    121                         _error_("KML_LineStyle::Read -- Unexpected field \"%s\".\n",kstri);
     117                  {_error2_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
    122118
    123119                else if (!strcmp(kstri,"<width>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp

    r12442 r12493  
    139139                }
    140140                else if (!strncmp(kstri,"</",2))
    141                         _error_("KML_LinearRing::Read -- Unexpected closing tag %s.\n",kstri);
     141                  {_error2_("KML_LinearRing::Read -- Unexpected closing tag " << kstri << ".\n");}
    142142                else if (strncmp(kstri,"<",1))
    143                         _error_("KML_LinearRing::Read -- Unexpected field \"%s\".\n",kstri);
     143                  {_error2_("KML_LinearRing::Read -- Unexpected field \"" << kstri << "\".\n");}
    144144
    145145                else if (!strcmp(kstri,"<extrude>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp

    r12365 r12493  
    144144                }
    145145                else if (!strncmp(kstri,"</",2))
    146                         _error_("KML_MultiGeometry::Read -- Unexpected closing tag %s.\n",kstri);
     146                  {_error2_("KML_MultiGeometry::Read -- Unexpected closing tag " << kstri << ".\n");}
    147147                else if (strncmp(kstri,"<",1))
    148                         _error_("KML_MultiGeometry::Read -- Unexpected field \"%s\".\n",kstri);
     148                  {_error2_("KML_MultiGeometry::Read -- Unexpected field \"" << kstri << "\".\n");}
    149149
    150150                else if (!strncmp(kstri,"<Point", 6)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp

    r12365 r12493  
    146146                return;
    147147        else if (!strncmp(kstr,"</",2))
    148                 _error_("KML_Object::Read -- Unexpected closing tag %s.\n",kstr);
     148          {_error2_("KML_Object::Read -- Unexpected closing tag " << kstr << ".\n");}
    149149        else if (strncmp(kstr,"<",1))
    150                 _error_("KML_Object::Read -- Unexpected field \"%s\".\n",kstr);
     150          {_error2_("KML_Object::Read -- Unexpected field \"" << kstr << "\".\n");}
    151151
    152152        else if (!strncmp(kstr,"<Placemark",10)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp

    r12365 r12493  
    123123        }
    124124        else if (!strncmp(kstr,"</",2))
    125                 _error_("KML_Overlay::Read -- Unexpected closing tag %s.\n",kstr);
     125          {_error2_("KML_Overlay::Read -- Unexpected closing tag " << kstr << ".\n");}
    126126        else if (strncmp(kstr,"<",1))
    127                 _error_("KML_Overlay::Read -- Unexpected field \"%s\".\n",kstr);
     127          {_error2_("KML_Overlay::Read -- Unexpected field \"" << kstr << "\".\n");}
    128128
    129129        else if (!strcmp(kstr,"<color>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp

    r12365 r12493  
    140140                }
    141141                else if (!strncmp(kstri,"</",2))
    142                         _error_("KML_Placemark::Read -- Unexpected closing tag %s.\n",kstri);
     142                  {_error2_("KML_Placemark::Read -- Unexpected closing tag " << kstri << ".\n");}
    143143                else if (strncmp(kstri,"<",1))
    144                         _error_("KML_Placemark::Read -- Unexpected field \"%s\".\n",kstri);
     144                  {_error2_("KML_Placemark::Read -- Unexpected field \"" << kstri << "\".\n");}
    145145
    146146                else if (!strncmp(kstri,"<Point", 6)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp

    r12365 r12493  
    126126                }
    127127                else if (!strncmp(kstri,"</",2))
    128                         _error_("KML_Point::Read -- Unexpected closing tag %s.\n",kstri);
     128                  {_error2_("KML_Point::Read -- Unexpected closing tag " << kstri << ".\n");}
    129129                else if (strncmp(kstri,"<",1))
    130                         _error_("KML_Point::Read -- Unexpected field \"%s\".\n",kstri);
     130                  {_error2_("KML_Point::Read -- Unexpected field \"" << kstri << "\".\n");}
    131131
    132132                else if (!strcmp(kstri,"<extrude>"))
    133                         KMLFileTokenParse(&extrude   ,
    134                                                           kstri,
    135                                                           fid);
     133                        KMLFileTokenParse(&extrude   , kstri, fid);
    136134                else if (!strcmp(kstri,"<altitudeMode>"))
    137                         KMLFileTokenParse( altmode   ,NULL,KML_POINT_ALTMODE_LENGTH,
    138                                                           kstri,
    139                                                           fid);
     135                        KMLFileTokenParse( altmode   ,NULL,KML_POINT_ALTMODE_LENGTH, kstri, fid);
    140136                else if (!strcmp(kstri,"<coordinates>"))
    141                         KMLFileTokenParse(&pcoords   ,NULL,3,
    142                                                           kstri,
    143                                                           fid);
     137                        KMLFileTokenParse(&pcoords   ,NULL,3, kstri, fid);
    144138
    145139                else if (!strncmp(kstri,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp

    r12365 r12493  
    121121                }
    122122                else if (!strncmp(kstri,"</",2))
    123                         _error_("KML_PolyStyle::Read -- Unexpected closing tag %s.\n",kstri);
     123                  {_error2_("KML_PolyStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
    124124                else if (strncmp(kstri,"<",1))
    125                         _error_("KML_PolyStyle::Read -- Unexpected field \"%s\".\n",kstri);
     125                  {_error2_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
    126126
    127127                else if (!strcmp(kstri,"<fill>"))
  • issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp

    r12365 r12493  
    179179                }
    180180                else if (!strncmp(kstri,"</",2))
    181                         _error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstri);
     181                  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstri << ".\n");}
    182182                else if (strncmp(kstri,"<",1))
    183                         _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstri);
     183                  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstri << "\".\n");}
    184184
    185185                else if (!strcmp(kstri,"<extrude>"))
     
    207207                                }
    208208                                else if (!strncmp(kstrj,"</",2))
    209                                         _error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstrj);
     209                                  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
    210210                                else if (strncmp(kstrj,"<",1))
    211                                         _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);
     211                                  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
    212212
    213213                                else if (!strncmp(kstrj,"<LinearRing",11)) {
     
    234234                                }
    235235                                else if (!strncmp(kstrj,"</",2))
    236                                         _error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstrj);
     236                                  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
    237237                                else if (strncmp(kstrj,"<",1))
    238                                         _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);
     238                                  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
    239239
    240240                                else if (!strncmp(kstrj,"<LinearRing",11)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp

    r12365 r12493  
    197197                }
    198198                else if (!strncmp(kstri,"</",2))
    199                         _error_("KML_Style::Read -- Unexpected closing tag %s.\n",kstri);
     199                  {_error2_("KML_Style::Read -- Unexpected closing tag " << kstri << ".\n");}
    200200                else if (strncmp(kstri,"<",1))
    201                         _error_("KML_Style::Read -- Unexpected field \"%s\".\n",kstri);
     201                  {_error2_("KML_Style::Read -- Unexpected field \"" << kstri << "\".\n");}
    202202
    203203//              else if (!strncmp(kstri,"<IconStyle",10)) {
  • issm/trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp

    r12365 r12493  
    8282                return;
    8383        else if (!strncmp(kstr,"</",2))
    84                 _error_("KML_StyleSelector::Read -- Unexpected closing tag %s.\n",kstr);
     84          {_error2_("KML_StyleSelector::Read -- Unexpected closing tag " << kstr << ".\n");}
    8585        else if (strncmp(kstr,"<",1))
    86                 _error_("KML_StyleSelector::Read -- Unexpected field \"%s\".\n",kstr);
     86          {_error2_("KML_StyleSelector::Read -- Unexpected field \"" << kstr << "\".\n");}
    8787
    8888        else if (!strncmp(kstr,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp

    r12365 r12493  
    8282                return;
    8383        else if (!strncmp(kstr,"</",2))
    84                 _error_("KML_SubStyle::Read -- Unexpected closing tag %s.\n",kstr);
     84          {_error2_("KML_SubStyle::Read -- Unexpected closing tag " << kstr << ".\n");}
    8585        else if (strncmp(kstr,"<",1))
    86                 _error_("KML_SubStyle::Read -- Unexpected field \"%s\".\n",kstr);
     86          {_error2_("KML_SubStyle::Read -- Unexpected field \"" << kstr << "\".\n");}
    8787
    8888        else if (!strncmp(kstr,"<",1))
  • issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp

    r12365 r12493  
    159159                }
    160160                else if (!strncmp(kstri,"</",2))
    161                         _error_("KML_Unknown::Read -- Unexpected closing tag %s.\n",kstri);
     161                  {_error2_("KML_Unknown::Read -- Unexpected closing tag " << kstri << ".\n");}
    162162
    163163                else if (strncmp(kstri,"<",1)) {
  • issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp

    r12367 r12493  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp

    r12367 r12493  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp

    r12365 r12493  
    3939
    4040        /*Checks*/
    41         if(power<=0 || power>=2) _error_("power must be betwwen 0 and 2 (0 < power < 2)");
    42         if(slope<=0) _error_("slope must be positive");
     41        if(power<=0 || power>=2) _error2_("power must be betwwen 0 and 2 (0 < power < 2)");
     42        if(slope<=0) _error2_("slope must be positive");
    4343}
    4444/*}}}*/
  • issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp

    r12455 r12493  
    11#include "../objects.h"
     2
    23/*DOCUMENTATION What is a Quadtree? {{{
    34 * A Quadtree is a very simple way to group vertices according
     
    8283/*FUNCTION Quadtree::Quadtree(){{{*/
    8384Quadtree::Quadtree(){
    84         _error_("Constructor not supported");
     85        _error2_("Constructor not supported");
    8586
    8687}
     
    247248        }
    248249        else{
    249                 _error_("Box is not full");
     250                _error2_("Box is not full");
    250251        }
    251252}/*}}}*/
     
    396397                        break;
    397398                default:
    398                         _error_("Case %i not supported",index);
     399                        _error2_("Case " << index << " not supported");
    399400        }
    400401        newbox->length=master->length/2;
     
    573574                        break;
    574575                default:
    575                         _error_("Case %i not supported",this->IsWithinRange(x,y,range));
     576                        _error2_("Case " << this->IsWithinRange(x,y,range) << " not supported");
    576577        }
    577578
  • issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp

    r12365 r12493  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp

    r12472 r12493  
    8181                icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3);
    8282        }
    83         else _error_("in_icefront_type %s not supported yet!",EnumToStringx(in_icefront_type));
     83        else _error2_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
    8484
    8585        if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum)
     
    263263                #endif
    264264                default:
    265                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     265                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    266266        }
    267267
     
    379379            #endif
    380380                default:
    381                         _error_("Icefront type %s not supported yet",EnumToStringx(type));
     381                        _error2_("Icefront type " << EnumToStringx(type) << " not supported yet");
    382382        }
    383383}
     
    441441                                break;
    442442                        default:
    443                                 _error_("fill type %s not supported yet",EnumToStringx(fill));
     443                                _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
    444444                }
    445445                ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2);
     
    564564                                break;
    565565                        default:
    566                                 _error_("fill type %s not supported yet",EnumToStringx(fill));
     566                                _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
    567567                }
    568568                ice_pressure=rho_ice*gravity*(surface-z_g);
     
    638638                                break;
    639639                        default:
    640                                 _error_("fill type %s not supported yet",EnumToStringx(fill));
     640                                _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
    641641                }
    642642                air_pressure=0;
  • issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp

    r12472 r12493  
    270270                        break;
    271271                default:
    272                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     272                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    273273        }
    274274
     
    300300                        break;
    301301                default:
    302                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     302                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    303303        }
    304304
     
    347347                        return CreateKMatrixPrognosticBoundary();
    348348                default:
    349                         _error_("type not supported yet");
     349                        _error2_("type not supported yet");
    350350        }
    351351}
     
    500500                        return CreateKMatrixBalancethicknessBoundary();
    501501                default:
    502                         _error_("type not supported yet");
     502                        _error2_("type not supported yet");
    503503        }
    504504}
     
    651651                        return CreateKMatrixAdjointBalancethicknessBoundary();
    652652                default:
    653                         _error_("type not supported yet");
     653                        _error2_("type not supported yet");
    654654        }
    655655}
     
    683683                        return CreatePVectorPrognosticBoundary();
    684684                default:
    685                         _error_("type not supported yet");
     685                        _error2_("type not supported yet");
    686686        }
    687687}
     
    751751                vyaverage_input->GetInputValue(&vy,gauss);
    752752                spcthickness_input->GetInputValue(&thickness,gauss);
    753                 if(isnan(thickness)) _error_("Cannot weakly apply constraint because NaN was provided");
     753                if(isnan(thickness)) _error2_("Cannot weakly apply constraint because NaN was provided");
    754754
    755755                UdotN=vx*normal[0]+vy*normal[1];
     
    777777                        return CreatePVectorBalancethicknessBoundary();
    778778                default:
    779                         _error_("type not supported yet");
     779                        _error2_("type not supported yet");
    780780        }
    781781}
  • issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp

    r12472 r12493  
    239239                #endif
    240240                default:
    241                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     241                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    242242        }
    243243
     
    271271                #endif
    272272                default:
    273                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     273                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    274274        }
    275275
     
    379379        }
    380380        else{
    381                 _error_("analysis: %s not supported yet",EnumToStringx(analysis_type));
     381                _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
    382382        }
    383383
     
    616616/*FUNCTION Pengrid::UpdateInputs {{{*/
    617617void  Pengrid::UpdateInputs(IssmDouble* solution){
    618         _error_("not supported yet!");
    619 }
    620 /*}}}*/
     618        _error2_("not supported yet!");
     619}
     620/*}}}*/
  • issm/trunk-jpl/src/c/objects/Loads/Penpair.cpp

    r12472 r12493  
    172172                        break;
    173173                default:
    174                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     174                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    175175        }
    176176
     
    244244                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    245245                                case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    246                                 default: _error_("not supported yet");
     246                                default: _error2_("not supported yet");
    247247                        }
    248248                case PattynApproximationEnum:
     
    250250                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    251251                                case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    252                                 default: _error_("not supported yet");
     252                                default: _error2_("not supported yet");
    253253                        }
    254254                case StokesApproximationEnum:
     
    256256                                case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    257257                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
    258                                 default: _error_("not supported yet");
     258                                default: _error2_("not supported yet");
    259259                        }
    260260                case NoneApproximationEnum:
     
    262262                                case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    263263                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
    264                                 default: _error_("not supported yet");
     264                                default: _error2_("not supported yet");
    265265                        }
    266                 default: _error_("not supported yet");
     266                default: _error2_("not supported yet");
    267267        }
    268268}
  • issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp

    r12472 r12493  
    276276
    277277        /*update input*/
    278         _error_("not implemented yet");
     278        _error2_("not implemented yet");
    279279        //this->inputs->AddInput(new DoubleInput(name,constant));
    280280
     
    324324                        break;
    325325                default:
    326                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     326                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    327327        }
    328328
     
    350350                        break;
    351351                default:
    352                         _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
     352                        _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    353353        }
    354354
     
    397397
    398398        /*enum of element? */
    399         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     399        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    400400        tria1=(Tria*)elements[0];
    401401        tria2=(Tria*)elements[1];
     
    410410        tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
    411411        tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
    412         if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
     412        if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
    413413        thickness=h[0];
    414414
     
    488488
    489489        /*enum of element? */
    490         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     490        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    491491        tria1=(Tria*)elements[0];
    492492        tria2=(Tria*)elements[1];
     
    504504        tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
    505505        tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
    506         if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
     506        if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
    507507        thickness=h[0];
    508508        tria1->GetInputValue(&b[0],nodes[0],BedEnum);
    509509        tria2->GetInputValue(&b[1],nodes[1],BedEnum);
    510         if (b[0]!=b[1])_error_(" different beds not supported for rift fronts");
     510        if (b[0]!=b[1])_error2_(" different beds not supported for rift fronts");
    511511        bed=b[0];
    512512
     
    536536        else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
    537537
    538                 if(!shelf) _error_("%s%i%s","fill type ",fill," not supported on ice sheets yet.");
     538                if(!shelf) _error2_("" << "fill type " << fill << " not supported on ice sheets yet.");
    539539
    540540                pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;
     
    546546        }
    547547        else{
    548                 _error_("%s%i%s","fill type ",fill," not supported yet.");
     548                _error2_("" << "fill type " << fill << " not supported yet.");
    549549        }
    550550
     
    585585
    586586        /*enum of element? */
    587         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     587        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    588588
    589589        /*recover elements on both side of rift: */
     
    706706
    707707        /*enum of element? */
    708         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     708        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    709709
    710710        /*recover elements on both side of rift: */
     
    751751
    752752        /*enum of element? */
    753         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     753        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    754754
    755755        /*recover elements on both side of rift: */
     
    794794
    795795        /*enum of element? */
    796         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     796        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    797797
    798798        /*recover elements on both side of rift: */
     
    844844
    845845        /*enum of element? */
    846         if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
     846        if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
    847847
    848848        /*recover elements on both side of rift: */
  • issm/trunk-jpl/src/c/objects/Materials/Matice.cpp

    r12472 r12493  
    180180                        /*Get input (either in element or material)*/
    181181                        Input* input=inputs->GetInput(input_enum);
    182                         if(!input) _error_("Input %s not found in material",EnumToStringx(input_enum));
     182                        if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in material");
    183183
    184184                        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    186186                        break;
    187187
    188                 default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
     188                default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
    189189        }
    190190}
     
    246246
    247247        /*Checks in debugging mode*/
    248         if(viscosity<=0) _error_("Negative viscosity");
     248        if(viscosity<=0) _error2_("Negative viscosity");
    249249        _assert_(B>0);
    250250        _assert_(n>0);
     
    317317
    318318        /*Checks in debugging mode*/
    319         if(viscosity3d<=0) _error_("Negative viscosity");
     319        if(viscosity3d<=0) _error2_("Negative viscosity");
    320320        _assert_(B>0);
    321321        _assert_(n>0);
     
    389389
    390390        /*Checks in debugging mode*/
    391         if(viscosity3d<=0) _error_("Negative viscosity");
     391        if(viscosity3d<=0) _error2_("Negative viscosity");
    392392        _assert_(B>0);
    393393        _assert_(n>0);
     
    550550                                        return;
    551551
    552                                 default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
    553                         }
    554                 default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     552                                default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
     553                        }
     554                default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    555555        }
    556556}
     
    608608                                        return;
    609609
    610                                 default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
    611                         }
    612                 default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     610                                default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
     611                        }
     612                default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    613613        }
    614614
     
    750750        #endif
    751751        else{
    752                 _error_(" Mesh type not supported yet!");
     752                _error2_(" Mesh type not supported yet!");
    753753        }
    754754
  • issm/trunk-jpl/src/c/objects/Node.cpp

    r12457 r12493  
    7171
    7272        /*spc all nodes on water*/
    73         if (!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL");
     73        if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
    7474        if (iomodel->Data(MaskVertexonwaterEnum)[io_index]){
    7575                for(k=1;k<=gsize;k++){
     
    115115        /*Diagnostic Hutter*/
    116116        if (analysis_type==DiagnosticHutterAnalysisEnum){
    117                 if (!iomodel->Data(FlowequationVertexEquationEnum)) _error_("iomodel->vertices_type is NULL");
     117                if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
    118118                /*Constrain all nodes that are not Hutter*/
    119119                if (!iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){
     
    231231                return indexing.sdoflist[dofindex];
    232232        }
    233         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     233        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    234234
    235235}
     
    303303                        else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i];
    304304                }
    305                 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     305                else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    306306        }
    307307}
     
    343343                        }
    344344                }
    345                 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     345                else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    346346        }
    347347        else{
     
    412412                        }
    413413                }
    414                 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     414                else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    415415        }
    416416}
     
    598598                else if (setenum==FsetEnum) numdofs=this->indexing.fsize;
    599599                else if (setenum==SsetEnum) numdofs=this->indexing.ssize;
    600                 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     600                else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    601601        }
    602602        else{
     
    628628                        else numdofs=this->indexing.ssize;
    629629                }
    630                 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     630                else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    631631        }
    632632        return numdofs;
     
    835835                }
    836836        }
    837         else _error_("VecMerge can only merge from the s or f-set onto the g-set!");
     837        else _error2_("VecMerge can only merge from the s or f-set onto the g-set!");
    838838
    839839        /*Free ressources:*/
     
    881881                }
    882882        }
    883         else _error_("VecReduce can only merge from the s or f-set onto the g-set!");
     883        else _error2_("VecReduce can only merge from the s or f-set onto the g-set!");
    884884
    885885        /*Free ressources:*/
     
    928928                dofcount+=this->indexing.ssize;
    929929        }
    930         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     930        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    931931
    932932
     
    957957                for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount;
    958958        }
    959         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     959        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    960960}
    961961/*}}}*/
     
    973973        else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++)  *(truedofs+ncols*sid+j)=indexing.fdoflist[j];
    974974        else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++)  *(truedofs+ncols*sid+j)=indexing.sdoflist[j];
    975         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     975        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    976976
    977977}
     
    992992        else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j);
    993993        else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j);
    994         else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
     994        else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    995995
    996996}
  • issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp

    r12472 r12493  
    4747ElementMatrix::ElementMatrix(ElementMatrix* Ke){
    4848
    49         if(!Ke) _error_("Input Element Matrix is a NULL pointer");
     49        if(!Ke) _error2_("Input Element Matrix is a NULL pointer");
    5050        this->Init(Ke);
    5151        return;
     
    6363        /*If one of the two matrix is NULL, we copy the other one*/
    6464        if(!Ke1 && !Ke2){
    65                 _error_("Two input element matrices are NULL");
     65                _error2_("Two input element matrices are NULL");
    6666        }
    6767        else if(!Ke1){
     
    7575
    7676        /*General Case: Ke1 and Ke2 are not empty*/
    77         if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet");
     77        if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error2_("merging 2 non dofsymmetrical matrices not implemented yet");
    7878
    7979        /*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/
     
    295295        }
    296296        else{
    297                 _error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
     297                _error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
    298298        }
    299299
     
    332332        }
    333333        else{
    334                 _error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
     334                _error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
    335335        }
    336336
     
    343343        for (int i=0;i<this->nrows;i++){
    344344                for(int j=0;j<this->ncols;j++){
    345                         if (isnan(this->values[i*this->ncols+j])) _error_("NaN found in Element Matrix");
    346                         if (fabs(this->values[i*this->ncols+j])>1.e+50) _error_("Element Matrix values exceeds 1.e+50");
     345                        if (isnan(this->values[i*this->ncols+j])) _error2_("NaN found in Element Matrix");
     346                        if (fabs(this->values[i*this->ncols+j])>1.e+50) _error2_("Element Matrix values exceeds 1.e+50");
    347347                }
    348348        }
     
    365365        /*Transpose indices*/
    366366        if(!dofsymmetrical){
    367                 _error_("not supported yet");
     367                _error2_("not supported yet");
    368368        }
    369369
     
    488488        int i;
    489489
    490         if(this->nrows!=this->ncols)_error_("need square matrix in input!");
     490        if(this->nrows!=this->ncols)_error2_("need square matrix in input!");
    491491
    492492        for(i=0;i<this->nrows;i++){
  • issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp

    r12472 r12493  
    4242        /*If one of the two matrix is NULL, we copy the other one*/
    4343        if(!pe1 && !pe2){
    44                 _error_("Two input element matrices are NULL");
     44                _error2_("Two input element matrices are NULL");
    4545        }
    4646        else if(!pe1){
     
    210210#ifdef _ISSM_DEBUG_
    211211        for (int i=0;i<this->nrows;i++){
    212                 if (isnan(this->values[i])) _error_("NaN found in Element Vector");
    213                 if (fabs( this->values[i])>1.e+50) _error_("Element Vector values exceeds 1.e+50");
     212                if (isnan(this->values[i])) _error2_("NaN found in Element Vector");
     213                if (fabs( this->values[i])>1.e+50) _error2_("Element Vector values exceeds 1.e+50");
    214214        }
    215215#endif
  • issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp

    r12473 r12493  
    153153        /*We should first check that the size is at least one*/
    154154        if(this->NumEl()<=0){
    155                 _error_("option \"%s\" is empty and cannot return a string vector",this->name);
     155                _error2_("option \"" << this->name << "\" is empty and cannot return a string vector");
    156156        }
    157157
  • issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp

    r12473 r12493  
    125125        /*We should first check that the size is one*/
    126126        if(this->NumEl()!=1){
    127                 _error_("option \"%s\" has %i elements and cannot return a single int",this->name,this->NumEl());
     127                _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single int");
    128128        }
    129129
     
    137137        /*We should first check that the size is one*/
    138138        if(this->NumEl()!=1){
    139                 _error_("option \"%s\" has %i elements and cannot return a single IssmPDouble",this->name,this->NumEl());
     139                _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmPDouble");
    140140        }
    141141
     
    149149        /*We should first check that the size is at least one*/
    150150        if(this->NumEl()<=0){
    151                 _error_("option \"%s\" is empty and cannot return a IssmPDouble vector",this->name);
     151                _error2_("option \"" << this->name << "\" is empty and cannot return a IssmPDouble vector");
    152152        }
    153153
  • issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp

    r12473 r12493  
    125125        /*We should first check that the size is one*/
    126126        if(this->NumEl()!=1){
    127                 _error_("option \"%s\" has %i elements and cannot return a single bool",this->name,this->NumEl());
     127                _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single bool");
    128128        }
    129129
  • issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp

    r12473 r12493  
    132132        /*We should first check that the size is one*/
    133133        if(this->NumEl()!=1){
    134                 _error_("option \"%s\" has %i elements and cannot return a single options dataset",this->name,this->NumEl());
     134                _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single options dataset");
    135135        }
    136136
     
    144144        /*We should first check that the size is at least one*/
    145145        if(this->NumEl()<=0){
    146                 _error_("option \"%s\" is empty and cannot return an options dataset vector",this->name);
     146                _error2_("option \"" << this->name << "\" is empty and cannot return an options dataset vector");
    147147        }
    148148
  • issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp

    r12473 r12493  
    2727        /*check for index too large  */
    2828        for (i=0;i<ndims;i++) aprod*=size[i];
    29         if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
     29        if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
    3030
    3131        /*calculate the dimensions (being careful of integer division)  */
     
    4646        /*check for any dimension too large  */
    4747        for (i=0;i<ndims;i++){
    48                 if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
     48                if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
    4949        }
    5050
     
    6565        /*check for index too large  */
    6666        for (i=0; i<ndims; i++) aprod*=size[i];
    67         if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
     67        if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
    6868
    6969        /*calculate the dimensions (being careful of integer division)  */
     
    8484        /*check for any dimension too large  */
    8585        for (i=0; i<ndims; i++){
    86                 if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
     86                if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
    8787        }
    8888
  • issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp

    r12474 r12493  
    109109/*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
    110110void  DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
    111         _error_("DoubleMat of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
     111        _error2_("DoubleMat of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
    112112}
    113113/*}}}*/
  • issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp

    r12474 r12493  
    8282/*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/
    8383void DoubleParam::GetParameterValue(int* pinteger){
    84         _error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
     84        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
    8585}
    8686/*}}}*/
    8787/*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/
    8888void DoubleParam::GetParameterValue(bool* pbool){
    89         _error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToStringx(enum_type));
     89        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool");
    9090}
    9191/*}}}*/
    9292/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/
    9393void DoubleParam::GetParameterValue(int** pintarray,int* pM){
    94         _error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
     94        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
    9595}
    9696/*}}}*/
    9797/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
    9898void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){
    99         _error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
     99        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
    100100}
    101101/*}}}*/
    102102/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
    103103void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
    104         _error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
     104        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
    105105}
    106106/*}}}*/
    107107/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
    108108void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
    109         _error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
     109        _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
    110110}
    111111/*}}}*/
  • issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp

    r12474 r12493  
    124124/*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/
    125125void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
    126         _error_("DoubleVec param of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
     126        _error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
    127127}
    128128/*}}}*/
  • issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp

    r12017 r12493  
    2727        if (size==0){
    2828                function();
    29                 _error_("usage: see above");
     29                _error2_("usage: see above");
    3030        }
    3131        else if (size!=NRHS ) {
    3232                function();
    33                 _error_("usage error.");
     33                _error2_("usage error.");
    3434        }
    3535        return 1;
  • issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp

    r12365 r12493  
    4747       
    4848        /*check this is indeed a subtype of long type: */
    49         if(!PyBool_Check(py_boolean))_error_("expecting a boolean in input!");
     49        if(!PyBool_Check(py_boolean))_error2_("expecting a boolean in input!");
    5050
    5151        /*extract boolean: */
     
    6868        /*retrive dimensions: */
    6969        ndim=PyArray_NDIM((const PyArrayObject*)py_matrix);
    70         if(ndim!=2)_error_("expecting an MxN matrix in input!");
     70        if(ndim!=2)_error2_("expecting an MxN matrix in input!");
    7171        dims=PyArray_DIMS((PyArrayObject*)py_matrix);
    7272        M=dims[0]; N=dims[1];
     
    9292        /*retrive dimensions: */
    9393        ndim=PyArray_NDIM((const PyArrayObject*)py_vector);
    94         if(ndim!=1)_error_("expecting an Mx1 vector in input!");
     94        if(ndim!=1)_error2_("expecting an Mx1 vector in input!");
    9595        dims=PyArray_DIMS((PyArrayObject*)py_vector);
    9696        M=dims[0];
  • issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp

    r12436 r12493  
    3131        void* memptr=NULL;
    3232
    33         if(!size)_error_(" attempting to 0 size allocation!");
     33        if(!size)_error2_(" attempting to 0 size allocation!");
    3434
    3535        /* Use the c library to do the allocation: */
    3636        memptr=malloc(size);
    37         if(!memptr) _error_("memory allocation failed!");
     37        if(!memptr) _error2_("memory allocation failed!");
    3838
    3939        return memptr;
     
    4444        void* memptr=NULL;
    4545       
    46         if(!size)_error_("attempting to 0 size allocation!");
     46        if(!size)_error2_("attempting to 0 size allocation!");
    4747
    4848        /* Use the c library to do the allocation: */
    4949        memptr=calloc(n,size);
    50         if(!memptr) _error_("memory allocation failed!");
     50        if(!memptr) _error2_("memory allocation failed!");
    5151
    5252        return memptr;
     
    8888        register void* value=NULL;
    8989       
    90         if(!size)_error_("attempting to realloc to zero");
     90        if(!size)_error2_("attempting to realloc to zero");
    9191        value = (void*)realloc(pv,size);
    9292
    9393        if (value == NULL) {
    94                 _error_("virtual memory exhausted");
     94                _error2_("virtual memory exhausted");
    9595        }
    9696        return value;
  • issm/trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp

    r12475 r12493  
    2222                        case XYEnum:   numdofs+=2; break;
    2323                        case XYZPEnum: numdofs+=4; break;
    24                         default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     24                        default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    2525                }
    2626        }
     
    6767                                break;
    6868                        default:
    69                                 _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     69                                _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    7070                }
    7171        }
  • issm/trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp

    r12475 r12493  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     33                        default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp

    r12475 r12493  
    3030                        case XYEnum:   numdofs+=2; break;
    3131                        case XYZPEnum: numdofs+=4; break;
    32                         default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     32                        default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3333                }
    3434        }
  • issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp

    r12475 r12493  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     33                        default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp

    r12475 r12493  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
     33                        default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp

    r12437 r12493  
    3838        /*open domain outline file for reading: */
    3939        if ((fid=fopen(domainname,"r"))==NULL){
    40                 _error_("%s%s","could not find domain file ",domainname);
     40                _error2_("" << "could not find domain file " << domainname);
    4141        }
    4242
  • issm/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp

    r12098 r12493  
    2323        /*open domain outline file for writing: */
    2424        if ((fid=fopen(domainname,"w"))==NULL){
    25                 _error_("%s%s","could not open domain file ",domainname);
     25                _error2_("" << "could not open domain file " << domainname);
    2626                noerr=0; goto cleanupandreturn;
    2727        }
  • issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp

    r12475 r12493  
    3636        if (!itrnb) {
    3737                if (nrowb != idimb) {
    38                         _error_("Matrix A and B inner vectors not equal size.");
     38                        _error2_("Matrix A and B inner vectors not equal size.");
    3939                }
    4040                idimc=ncolb;
     
    4242        else {
    4343                if (ncolb != idimb) {
    44                         _error_("Matrix A and B inner vectors not equal size.");
     44                        _error2_("Matrix A and B inner vectors not equal size.");
    4545                }
    4646                idimc=nrowb;
     
    4949        if (!itrnc) {
    5050                if (nrowc != idimc) {
    51                         _error_("Matrix B and C inner vectors not equal size.");
     51                        _error2_("Matrix B and C inner vectors not equal size.");
    5252                }
    5353                idimd=ncolc;
     
    5555        else {
    5656                if (ncolc != idimc) {
    57                         _error_("Matrix B and C inner vectors not equal size.");
     57                        _error2_("Matrix B and C inner vectors not equal size.");
    5858                }
    5959                idimd=nrowc;
     
    124124
    125125        if (ntrma != ntrmb) {
    126                 _error_("Matrix A and B inner vectors not equal size");
     126                _error2_("Matrix A and B inner vectors not equal size");
    127127            noerr=0;   
    128128                return noerr;
     
    175175
    176176        if (!b && nvec) {
    177                 _error_("No right-hand side for nvec=%d.",nvec);
     177                _error2_("No right-hand side for nvec=" << nvec << ".");
    178178                noerr=0;
    179179                return noerr;
     
    214214                        xDelete<int>(pivrc2);
    215215                        xDelete<int>(pindx);
    216                         _error_("Pivot %f less than machine epsilon",pivot);
     216                        _error2_("Pivot " << pivot << " less than machine epsilon");
    217217                        noerr=0;
    218218                        return noerr;
     
    349349        /*Compute determinant*/
    350350        Matrix2x2Determinant(&det,A);
    351         if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
     351        if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
    352352
    353353        /*Compute invert*/
     
    374374        /*Compute determinant*/
    375375        Matrix3x3Determinant(&det,A);
    376         if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
     376        if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
    377377
    378378        /*Compute invert*/
  • issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp

    r12476 r12493  
    4343        iter=0;
    4444        fxmin = (*f)(xmin,optargs);
    45         if (isnan(fxmin)) _error_("Function evaluation returned NaN");
     45        if (isnan(fxmin)) _error2_("Function evaluation returned NaN");
    4646        _printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
    4747        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
    4848        fxmax = (*f)(xmax,optargs);
    49         if (isnan(fxmax)) _error_("Function evaluation returned NaN");
     49        if (isnan(fxmax)) _error2_("Function evaluation returned NaN");
    5050        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
    5151
     
    7171        /*2: call the function to be evaluated*/
    7272        fxbest = (*f)(x,optargs);
    73         if(isnan(fxbest)) _error_("Function evaluation returned NaN");
     73        if(isnan(fxbest)) _error2_("Function evaluation returned NaN");
    7474        iter=iter+1;
    7575
     
    154154                //evaluate function on x
    155155                fx = (*f)(x,optargs);
    156                 if(isnan(fx)) _error_("Function evaluation returned NaN");
     156                if(isnan(fx)) _error2_("Function evaluation returned NaN");
    157157                iter=iter+1;
    158158
  • issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp

    r12436 r12493  
    16701670                if (iter >= MAX_GAUS_ITER) {
    16711671                        xDelete<IssmPDouble>(work);
    1672                         _error_("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);
     1672                        _error2_("" << " Max iterations exceeded for l=" << MAX_GAUS_ITER);
    16731673                }
    16741674        }
  • issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp

    r12476 r12493  
    5353                else eps=0;
    5454        }
    55         else _error_("%s%s%s"," convergence criterion ",EnumToStringx(criterion_enum)," not supported yet!");
     55        else _error2_("" << " convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
    5656
    5757        /*Assign output pointers:*/
  • issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp

    r12476 r12493  
    4141        //get the value of the function at the first boundary
    4242        fx1= (*f)(x1,optargs);
    43         if (isnan(fx1)) _error_("Function evaluation returned NaN");
     43        if (isnan(fx1)) _error2_("Function evaluation returned NaN");
    4444        _printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
    4545        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
     
    5454                iter++;
    5555                fx2 = (*f)(x2,optargs);
    56                 if (isnan(fx2)) _error_("Function evaluation returned NaN");
     56                if (isnan(fx2)) _error2_("Function evaluation returned NaN");
    5757                _printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));
    5858
  • issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp

    r12476 r12493  
    5757        if (found==-1){
    5858                /*ok, we did not find anything, this is not good! error out: */
    59                 _error_("%s%s","could find neither a default analysis  nor analysis ",EnumToStringx(analysis_type));
     59                _error2_("" << "could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
    6060        }
    6161
  • issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp

    r12476 r12493  
    2929        if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale;
    3030        else if(direction_enum==ExtToIuEnum) for(i=0;i<numvalues;i++)values[i]=values[i]/scale;
    31         else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
     31        else _error2_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
    3232
    3333}
  • issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp

    r12018 r12493  
    3434void SetVerbosityLevel(int level){
    3535
    36         if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
     36        if(level<0) _error2_("vebosity level should be a positive integer (user provided " << level << ")");
    3737
    3838        verbositylevel = level;
  • issm/trunk-jpl/src/c/shared/String/DescriptorIndex.cpp

    r9336 r12493  
    2323        /*retrieve first token, separated by underscore: */
    2424        pch = strtok (descriptor,"_");
    25         if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
     25        if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
    2626
    2727        if (strncmp(pch,"scaled",6)==0){
    2828                /*we have a scaled variable. recover the root: */
    2929                pch = strtok (NULL, "_");
    30                 if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
     30                if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
    3131                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    3232
     
    4444                /*we have an indexed variable. recover the root: */
    4545                pch = strtok (NULL, "_");
    46                 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
     46                if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
    4747                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    4848                /*now recover  the index: */
    4949                pch = strtok (NULL, "_");
    50                 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
     50                if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
    5151                sscanf(pch,"%i",pindex);
    5252                return IndexedEnum;
     
    5555                /*we have an indexed variable. recover the root: */
    5656                pch = strtok (NULL, "_");
    57                 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
     57                if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
    5858                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    5959                /*now recover  the index: */
    6060                pch = strtok (NULL, "_");
    61                 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
     61                if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
    6262                sscanf(pch,"%i",pindex);
    6363                return NodalEnum;
  • issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp

    r12435 r12493  
    4444
    4545                if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
    46                         _error_(" pthread_create error");
     46                        _error2_(" pthread_create error");
    4747                }
    4848        }
    4949        for(i=0;i<num_threads;i++){
    5050                if(pthread_join(threads[i],(void**)&status)){
    51                         _error_(" pthread_join error");
     51                        _error2_(" pthread_join error");
    5252                }
    5353        }
  • issm/trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp

    r9320 r12493  
    3535                        break;
    3636                default:
    37                         _error_("No adjoint has been implemented for solution %s yet",EnumToStringx(solutiontype));
     37                        _error2_("No adjoint has been implemented for solution " << EnumToStringx(solutiontype) << " yet");
    3838                        break;
    3939        }
  • issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp

    r12439 r12493  
    110110               
    111111                default:
    112                         _error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");
     112                        _error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
    113113                        break;
    114114        }
  • issm/trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp

    r10287 r12493  
    2929                        solutioncore=&diagnostic_core;
    3030                        #else
    31                         _error_("ISSM was not compiled with diagnostic capabilities. Exiting");
     31                        _error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
    3232                        #endif
    3333                        break;
     
    3636                        solutioncore=&steadystate_core;
    3737                        #else
    38                         _error_("ISSM was not compiled with steady state capabilities. Exiting");
     38                        _error2_("ISSM was not compiled with steady state capabilities. Exiting");
    3939                        #endif
    4040                        break;
     
    4343                        solutioncore=&thermal_core;
    4444                        #else
    45                         _error_("ISSM was not compiled with thermal capabilities. Exiting");
     45                        _error2_("ISSM was not compiled with thermal capabilities. Exiting");
    4646                        #endif
    4747                        break;
     
    5050                        solutioncore=&enthalpy_core;
    5151                        #else
    52                         _error_("ISSM was not compiled with thermal capabilities. Exiting");
     52                        _error2_("ISSM was not compiled with thermal capabilities. Exiting");
    5353                        #endif
    5454                        break;
     
    5757                        solutioncore=&balancethickness_core;
    5858                        #else
    59                         _error_("ISSM was not compiled with balanced capabilities. Exiting");
     59                        _error2_("ISSM was not compiled with balanced capabilities. Exiting");
    6060                        #endif
    6161                        break;
     
    6464                        solutioncore=&hydrology_core;
    6565                        #else
    66                         _error_("ISSM was not compiled with hydrology capabilities. Exiting");
     66                        _error2_("ISSM was not compiled with hydrology capabilities. Exiting");
    6767                        #endif
    6868                        break;
     
    7171                        solutioncore=&surfaceslope_core;
    7272                        #else
    73                         _error_("ISSM was not compiled with slope capabilities. Exiting");
     73                        _error2_("ISSM was not compiled with slope capabilities. Exiting");
    7474                        #endif
    7575                        break;
     
    7878                        solutioncore=&bedslope_core;
    7979                        #else
    80                         _error_("ISSM was not compiled with slope capabilities. Exiting");
     80                        _error2_("ISSM was not compiled with slope capabilities. Exiting");
    8181                        #endif
    8282                        break;
     
    8585                        solutioncore=&transient_core;
    8686                        #else
    87                         _error_("ISSM was not compiled with transient capabilities. Exiting");
     87                        _error2_("ISSM was not compiled with transient capabilities. Exiting");
    8888                        #endif
    8989                        break;
     
    9292                        solutioncore=&prognostic_core;
    9393                        #else
    94                         _error_("ISSM was not compiled with prognostic capabilities. Exiting");
     94                        _error2_("ISSM was not compiled with prognostic capabilities. Exiting");
    9595                        #endif
    9696                        break;
    9797                default:
    98                         _error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");
     98                        _error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
    9999                        break;
    100100        }
  • issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp

    r12439 r12493  
    1717        char *lockfilename   = NULL;
    1818
    19         if(argc<2)_error_("Usage error: no solution requested");
     19        if(argc<2)_error2_("Usage error: no solution requested");
    2020        *solution_type=StringToEnumx(argv[1]);
    21         if(argc<3)_error_("Usage error: missing model name");
     21        if(argc<3)_error2_("Usage error: missing model name");
    2222        modelname=argv[3];
    2323        binfilename    = xNew<char>(strlen(modelname)+strlen(".bin")   +1); sprintf(binfilename,   "%s%s",modelname,".bin");
  • issm/trunk-jpl/src/c/solutions/WriteLockFile.cpp

    r9320 r12493  
    1717        if(my_rank==0){
    1818                fid=fopen(filename,"w");
    19                 if(fid==NULL) _error_("%s%s","error message: could not open lock file ",filename);
     19                if(fid==NULL) _error2_("" << "error message: could not open lock file " << filename);
    2020
    2121                /*Close file: */
    22                 if(fclose(fid)!=0) _error_("%s%s","could not close lock file ",filename);
     22                if(fclose(fid)!=0) _error2_("" << "could not close lock file " << filename);
    2323        }
    2424
  • issm/trunk-jpl/src/c/solutions/controltao_core.cpp

    r12477 r12493  
    4141        PetscGetArgs(&argc,&args);
    4242        ierr = TaoInitialize(&argc,&args,(char*)0,"");
    43         if(ierr) _error_("Could not initialize Tao");
     43        if(ierr) _error2_("Could not initialize Tao");
    4444
    4545        /*Recover some parameters*/
     
    181181#else
    182182void controltao_core(FemModel* femmodel){
    183         _error_("TAO not installed or PETSc version not supported");
     183        _error2_("TAO not installed or PETSc version not supported");
    184184}
    185185#endif //_HAVE_TAO_
  • issm/trunk-jpl/src/c/solutions/convergence.cpp

    r12477 r12493  
    7272        if (isnan(res)){
    7373                _printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
    74                 _error_("mechanical equilibrium convergence criterion is NaN!");
     74                _error2_("mechanical equilibrium convergence criterion is NaN!");
    7575        }
    7676
     
    9696                ndu=duf->Norm(NORM_TWO); nu=old_uf->Norm(NORM_TWO);
    9797
    98                 if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
     98                if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
    9999
    100100                //clean up
     
    121121                duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
    122122                ndu=duf->Norm(NORM_TWO); nduinf=duf->Norm(NORM_INF);
    123                 if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
     123                if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
    124124
    125125                //clean up
  • issm/trunk-jpl/src/c/solutions/gradient_core.cpp

    r12477 r12493  
    3737        /*Check that gradient is clean*/
    3838        norm_inf=new_gradient->Norm(NORM_INF);
    39         if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
    40         if(isnan(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
     39        if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
     40        if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
    4141
    4242        /*plug back into inputs: */
  • issm/trunk-jpl/src/c/solutions/issm.cpp

    r12477 r12493  
    4040        #ifdef _HAVE_PETSC_
    4141        ierr=PetscInitialize(&argc,&argv,(char*)0,""); 
    42         if(ierr) _error_("Could not initialize Petsc");
     42        if(ierr) _error2_("Could not initialize Petsc");
    4343        #else
    4444        #ifdef _HAVE_MPI_
     
    111111                Dakotax(femmodel);
    112112                #else
    113                 _error_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
     113                _error2_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
    114114                #endif
    115115        }
     
    121121                 control_core(femmodel);
    122122                #else
    123                 _error_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
     123                _error2_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
    124124                #endif
    125125        }
  • issm/trunk-jpl/src/c/solutions/kriging.cpp

    r12477 r12493  
    4040#ifdef _HAVE_PETSC_
    4141        int ierr=PetscInitialize(&argc,&argv,(char*)0,""); 
    42         if(ierr) _error_("Could not initialize Petsc");
     42        if(ierr) _error2_("Could not initialize Petsc");
    4343#else
    4444#ifdef _HAVE_MPI_
     
    122122        char *lockfilename   = NULL;
    123123
    124         if(argc<2)_error_("Usage error: missing model name");
     124        if(argc<2)_error2_("Usage error: missing model name");
    125125        modelname=argv[2];
    126126        binfilename    = xNew<char>((strlen(modelname)+strlen(".bin")   +1)); sprintf(binfilename,   "%s%s",modelname,".bin");
  • issm/trunk-jpl/src/c/solutions/objectivefunction.cpp

    r12477 r12493  
    4949        }
    5050        else{
    51                 _error_("Solution %s not implemented yet",EnumToStringx(solution_type));
     51                _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
    5252        }
    5353
     
    6666        }
    6767        else{
    68                 _error_("Solution %s not implemented yet",EnumToStringx(solution_type));
     68                _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
    6969        }
    7070
  • issm/trunk-jpl/src/c/solutions/steadystate_core.cpp

    r12439 r12493  
    5252                }
    5353                #else
    54                 _error_("ISSM was not compiled with thermal capabilities. Exiting");
     54                _error2_("ISSM was not compiled with thermal capabilities. Exiting");
    5555                #endif
    5656
  • issm/trunk-jpl/src/c/solutions/transient_core.cpp

    r12477 r12493  
    103103                        }
    104104                        #else
    105                         _error_("ISSM was not compiled with thermal capabilities. Exiting");
     105                        _error2_("ISSM was not compiled with thermal capabilities. Exiting");
    106106                        #endif
    107107                }
     
    112112                        diagnostic_core(femmodel);
    113113                        #else
    114                         _error_("ISSM was not compiled with diagnostic capabilities. Exiting");
     114                        _error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
    115115                        #endif
    116116                }
     
    128128                        GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
    129129                        #else
    130                         _error_("ISSM was not compiled with grounding line migration capabilities. Exiting");
     130                        _error2_("ISSM was not compiled with grounding line migration capabilities. Exiting");
    131131                        #endif
    132132                }
  • issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp

    r12477 r12493  
    119119                        break;
    120120                default:
    121                         _error_("unknown norm !");
     121                        _error2_("unknown norm !");
    122122                        break;
    123123        }
     
    150150        AX->GetSize(&AXM);
    151151
    152         if(M!=AXM)_error_("A and AX should have the same number of rows!");
    153         if(N!=XM)_error_("A and X should have the same number of columns!");
     152        if(M!=AXM)_error2_("A and AX should have the same number of rows!");
     153        if(N!=XM)_error2_("A and X should have the same number of columns!");
    154154
    155155        for(i=0;i<M;i++){
     
    197197                        break;
    198198                default:
    199                         _error_("unknown insert mode!");
     199                        _error2_("unknown insert mode!");
    200200                        break;
    201201        }
  • issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp

    r12477 r12493  
    8585                        break;
    8686                default:
    87                         _error_("unknown insert mode!");
     87                        _error2_("unknown insert mode!");
    8888                        break;
    8989        }
     
    102102                        break;
    103103                default:
    104                         _error_("unknown insert mode!");
     104                        _error2_("unknown insert mode!");
    105105                        break;
    106106        }
     
    204204                        break;
    205205                default:
    206                         _error_("unknown norm !");
     206                        _error2_("unknown norm !");
    207207                        break;
    208208        }
  • issm/trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp

    r12429 r12493  
    5656
    5757        #else
    58         _error_("METIS version not supported yet");
     58        _error2_("METIS version not supported yet");
    5959        #endif
    6060}
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp

    r11695 r12493  
    3030                        break;
    3131                default:
    32                         _error_("unknown insert mode!");
     32                        _error2_("unknown insert mode!");
    3333                        break;
    3434        }
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp

    r11941 r12493  
    3030                        break;
    3131                default:
    32                         _error_("unknown matrix type !");
     32                        _error2_("unknown matrix type !");
    3333                        break;
    3434        }
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp

    r11695 r12493  
    3030                        break;
    3131                default:
    32                         _error_("unknown norm !");
     32                        _error2_("unknown norm !");
    3333                        break;
    3434        }
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp

    r12018 r12493  
    2929        /*Some checks: */
    3030        MatGetSize(matrix,&M,&N);
    31         if(M!=N) _error_("trying to invert a non square matrix!");
     31        if(M!=N) _error2_("trying to invert a non square matrix!");
    3232
    3333        /*Create identitiy matrix: */
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp

    r12431 r12493  
    6262                }
    6363                else{
    64                         _error_("MatType %s not supported yet",type);
     64                        _error2_("MatType " << type << " not supported yet");
    6565                }
    6666                /*Assemble*/
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp

    r11910 r12493  
    5555                        if(first[0]!='-'){
    5656                                /*This is not good, the option does not have '-'! Get out*/
    57                                 _error_("%s%s%s","Option ",first," should be preceded by '-'!");
     57                                _error2_("" << "Option " << first << " should be preceded by '-'!");
    5858                        }
    5959                        /*Reduce first to bare option value*/
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp

    r12431 r12493  
    3535        /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
    3636        if ( (row_partition_size !=MB) ){
    37                 _error_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
     37                _error2_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
    3838        }
    3939
  • issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp

    r12431 r12493  
    5151
    5252        /*Some dimensions checks: */
    53         if (mA!=nA) _error_(" trying to take the invert of a non-square matrix!");
     53        if (mA!=nA) _error2_(" trying to take the invert of a non-square matrix!");
    5454
    5555        /* Set default Plapack parameters */
Note: See TracChangeset for help on using the changeset viewer.