Changeset 12493
- Timestamp:
- 06/21/12 10:02:29 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 181 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Container/DataSet.cpp
r12466 r12493 133 133 vector<Object*>::iterator object; 134 134 135 if(this==NULL)_error _(" trying to echo a NULL dataset");135 if(this==NULL)_error2_(" trying to echo a NULL dataset"); 136 136 137 137 _printf_(true,"DataSet echo: %i objects\n",objects.size()); … … 150 150 vector<Object*>::iterator object; 151 151 152 if(this==NULL)_error _(" trying to echo a NULL dataset");152 if(this==NULL)_error2_(" trying to echo a NULL dataset"); 153 153 154 154 _printf_(true,"DataSet echo: %i objects\n",objects.size()); … … 194 194 195 195 _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!"); 197 197 198 198 /*Carry out a binary search on the sorted_ids: */ 199 199 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)); 201 201 } 202 202 … … 259 259 /*Only sort if we are not already sorted: */ 260 260 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 203 203 /*see what the first element of this partition has in stock (this is common to all partitions)*/ 204 204 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??"); 206 206 Element* element=(Element*)this->GetObjectByOffset(0); 207 207 element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults); … … 232 232 if(resultssizes[i]==P1Enum) vectorsize=numberofvertices; 233 233 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])); 235 235 vector=new Vector(vectorsize); 236 236 -
issm/trunk-jpl/src/c/Container/Inputs.cpp
r12466 r12493 57 57 /*we could not find an input with the correct enum type. No defaults values were provided, 58 58 * 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) << ")"); 60 60 } 61 61 … … 85 85 /*we could not find an input with the correct enum type. No defaults values were provided, 86 86 * 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) << ")"); 88 88 } 89 89 … … 113 113 /*we could not find an input with the correct enum type. No defaults values were provided, 114 114 * 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) << ")"); 116 116 } 117 117 … … 141 141 /*we could not find an input with the correct enum type. No defaults values were provided, 142 142 * 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) << ")"); 144 144 } 145 145 … … 213 213 214 214 /*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!"); 216 216 217 217 /*Apply ContrainMin: */ … … 254 254 } 255 255 else{ 256 _error _("Input %s not found",EnumToStringx(enumtype));256 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 257 257 } 258 258 … … 275 275 } 276 276 else{ 277 _error _("Input %s not found",EnumToStringx(enumtype));277 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 278 278 } 279 279 … … 296 296 } 297 297 else{ 298 _error _("Input %s not found",EnumToStringx(enumtype));298 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 299 299 } 300 300 … … 317 317 } 318 318 else{ 319 _error _("Input %s not found",EnumToStringx(enumtype));319 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 320 320 } 321 321 … … 369 369 /*Make a copy of the original input: */ 370 370 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)); 372 372 copy=(Input*)original->copy(); 373 373 … … 416 416 417 417 /*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!"); 420 420 421 421 /*Apply AXPY: */ -
issm/trunk-jpl/src/c/Container/Observations.cpp
r12466 r12493 59 59 options->Get(&maxtrimming,"maxtrimming",+1.e+21); 60 60 options->Get(&minspacing,"minspacing",0.01); 61 if(minspacing<=0) _error _("minspacing must > 0");61 if(minspacing<=0) _error2_("minspacing must > 0"); 62 62 63 63 /*Get Minimum box size*/ 64 64 if(options->GetOption("boxlength")){ 65 65 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"); 67 67 maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0)); 68 68 } … … 384 384 SolverxGsl(&GinvZ, Gamma,obs,n_obs); // Gamma^-1 Z 385 385 #else 386 _error _("GSL is required");386 _error2_("GSL is required"); 387 387 #endif 388 388 -
issm/trunk-jpl/src/c/Container/Options.cpp
r12466 r12493 47 47 48 48 /*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 \"]\""); 53 53 54 54 /*Finally, check that no option of the same name already exists in the dataset*/ … … 57 57 option=(Option*)(*object); 58 58 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"); 60 60 break; 61 61 } … … 83 83 /*Else, the Option does not exist, no default provided*/ 84 84 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"); 86 86 } 87 87 } … … 121 121 /*Else, the Option does not exist, no default provided*/ 122 122 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"); 124 124 } 125 125 } … … 159 159 /*Else, the Option does not exist, no default provided*/ 160 160 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"); 162 162 } 163 163 } … … 199 199 /*Else, the Option does not exist, no default provided*/ 200 200 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"); 202 202 } 203 203 … … 264 264 /*Else: not supported*/ 265 265 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())); 267 267 } 268 268 } … … 290 290 /*Else, the Option does not exist, no default provided*/ 291 291 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"); 293 293 } 294 294 } … … 324 324 /*Else: not supported*/ 325 325 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())); 327 327 } 328 328 } -
issm/trunk-jpl/src/c/Container/Parameters.cpp
r12466 r12493 65 65 } 66 66 } 67 _error _("could not find parameter %s",EnumToStringx(enum_type));67 _error2_("could not find parameter " << EnumToStringx(enum_type)); 68 68 } 69 69 /*}}}*/ … … 82 82 } 83 83 } 84 _error _("could not find parameter %s",EnumToStringx(enum_type));84 _error2_("could not find parameter " << EnumToStringx(enum_type)); 85 85 } 86 86 /*}}}*/ … … 99 99 } 100 100 } 101 _error _("could not find parameter %s",EnumToStringx(enum_type));101 _error2_("could not find parameter " << EnumToStringx(enum_type)); 102 102 } 103 103 /*}}}*/ … … 116 116 } 117 117 } 118 _error _("could not find parameter %s",EnumToStringx(enum_type));118 _error2_("could not find parameter " << EnumToStringx(enum_type)); 119 119 120 120 } … … 134 134 } 135 135 } 136 _error _("could not find parameter %s",EnumToStringx(enum_type));136 _error2_("could not find parameter " << EnumToStringx(enum_type)); 137 137 138 138 } … … 152 152 } 153 153 } 154 _error _("could not find parameter %s",EnumToStringx(enum_type));154 _error2_("could not find parameter " << EnumToStringx(enum_type)); 155 155 156 156 } … … 170 170 } 171 171 } 172 _error _("could not find parameter %s",EnumToStringx(enum_type));172 _error2_("could not find parameter " << EnumToStringx(enum_type)); 173 173 174 174 } … … 188 188 } 189 189 } 190 _error _("could not find parameter %s",EnumToStringx(enum_type));190 _error2_("could not find parameter " << EnumToStringx(enum_type)); 191 191 192 192 } … … 206 206 } 207 207 } 208 _error _("could not find parameter %s",EnumToStringx(enum_type));208 _error2_("could not find parameter " << EnumToStringx(enum_type)); 209 209 210 210 } … … 224 224 } 225 225 } 226 _error _("could not find parameter %s",EnumToStringx(enum_type));226 _error2_("could not find parameter " << EnumToStringx(enum_type)); 227 227 } 228 228 /*}}}*/ … … 241 241 } 242 242 } 243 _error _("could not find parameter %s",EnumToStringx(enum_type));243 _error2_("could not find parameter " << EnumToStringx(enum_type)); 244 244 245 245 } … … 259 259 } 260 260 } 261 _error _("could not find parameter %s",EnumToStringx(enum_type));261 _error2_("could not find parameter " << EnumToStringx(enum_type)); 262 262 263 263 } … … 277 277 } 278 278 } 279 _error _("could not find parameter %s",EnumToStringx(enum_type));279 _error2_("could not find parameter " << EnumToStringx(enum_type)); 280 280 } 281 281 /*}}}*/ -
issm/trunk-jpl/src/c/include/macros.h
r12490 r12493 9 9 #include <iostream> 10 10 #include <sstream> 11 12 11 #include "./typedefs.h" 13 12 … … 42 41 #else 43 42 #define _error2_(StreamArgs)\ 44 43 {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \ 45 44 aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \ 46 45 throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());} -
issm/trunk-jpl/src/c/io/Disk/pfclose.cpp
r9320 r12493 18 18 extern int my_rank; 19 19 _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); 21 21 } -
issm/trunk-jpl/src/c/io/Disk/pfopen.cpp
r11202 r12493 20 20 /*Open handle to data on disk: */ 21 21 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"); 23 23 24 24 return fid; -
issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp
r12013 r12493 22 22 /* special case: */ 23 23 function(); 24 _error _("usage: see above");24 _error2_("usage: see above"); 25 25 } 26 26 else if (nlhs!=NLHS || nrhs!=NRHS ) { 27 27 function(); 28 _error _("usage error.");28 _error2_("usage error."); 29 29 } 30 30 return 1; -
issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
r12434 r12493 44 44 else{ 45 45 /*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"); 47 47 } 48 48 … … 85 85 else{ 86 86 /*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"); 88 88 } 89 89 … … 130 130 else{ 131 131 /*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"); 133 133 } 134 134 … … 172 172 else{ 173 173 /*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"); 175 175 } 176 176 … … 234 234 else{ 235 235 /*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"); 237 237 } 238 238 … … 265 265 else{ 266 266 /*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"); 268 268 } 269 269 … … 297 297 else{ 298 298 /*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"); 300 300 } 301 301 … … 329 329 else{ 330 330 /*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"); 332 332 } 333 333 … … 361 361 else{ 362 362 /*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"); 364 364 } 365 365 … … 377 377 /*Ok, the string should be coming directly from the matlab workspace: */ 378 378 if (!mxIsClass(dataref,"char")){ 379 _error _("input data_type is not a string!");379 _error2_("input data_type is not a string!"); 380 380 } 381 381 else{ … … 412 412 else{ 413 413 /*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"); 415 415 } 416 416 … … 430 430 431 431 if (!mxIsClass(dataref,"double")){ 432 _error _("input data_type is not a double!");432 _error2_("input data_type is not a double!"); 433 433 } 434 434 else{ … … 447 447 448 448 if (!mxIsClass(dataref,"double")){ 449 _error _("input data_type is not a scalar!");449 _error2_("input data_type is not a scalar!"); 450 450 } 451 451 else{ … … 464 464 465 465 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"); 468 468 mxbool_ptr=mxGetLogicals(dataref); 469 469 } 470 470 else{ 471 _error _("input data_type is not a bool!");471 _error2_("input data_type is not a bool!"); 472 472 } 473 473 … … 491 491 else{ 492 492 /*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"); 494 494 } 495 495 … … 515 515 else{ 516 516 /*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"); 518 518 } 519 519 … … 616 616 /*Fetch all options*/ 617 617 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"); 619 619 620 620 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 << "\"."); 622 622 623 623 option=(Option*)OptionParse(name,&pdataref[i+1]); -
issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
r12446 r12493 108 108 } 109 109 else{ 110 _error _("Matlab matrix type Not implemented yet");110 _error2_("Matlab matrix type Not implemented yet"); 111 111 } 112 112 -
issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp
r12446 r12493 46 46 47 47 /*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"); 49 49 50 50 nz=(int)((double)nnz/(double)rows); … … 77 77 78 78 /*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"); 80 80 81 81 /*allocate and memcpy*/ -
issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp
r12434 r12493 27 27 /*check and parse the value */ 28 28 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]) <<"\"."); 30 30 } 31 31 FetchData(&odouble->values,&odouble->numel,&odouble->ndims,&odouble->size,prhs[0]); … … 45 45 /*check and parse the value */ 46 46 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]) <<"\"."); 48 48 } 49 49 FetchData(&ological->values,&ological->numel,&ological->ndims,&ological->size,prhs[0]); … … 63 63 /*check and parse the value */ 64 64 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]) <<"\"."); 66 66 } 67 67 FetchData(&ochar->values,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]); … … 87 87 /*check and parse the value */ 88 88 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]) <<"\"."); 90 90 } 91 91 ostruct->numel=mxGetNumberOfElements(prhs[0]); … … 133 133 /*check and parse the value */ 134 134 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]) <<"\"."); 136 136 } 137 137 … … 181 181 mxDestroyArray(lhs[0]); 182 182 } 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]) <<"\"."); 184 184 } 185 185 -
issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
r12450 r12493 86 86 } 87 87 else if (flag==NodalEnum){ 88 _error _(" nodal response functions not supported yet!");88 _error2_(" nodal response functions not supported yet!"); 89 89 90 90 /*increment response_pointer :*/ … … 104 104 } 105 105 } 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"); 107 107 } 108 108 -
issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp
r9761 r12493 23 23 /*retrieve first token, separated by underscore: */ 24 24 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!"); 26 26 27 27 if (strncmp(pch,"scaled",6)==0){ 28 28 /*we have a scaled variable. recover the root: */ 29 29 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!"); 31 31 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 32 32 … … 44 44 /*we have an indexed variable. recover the root: */ 45 45 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!"); 47 47 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 48 48 /*now recover the index: */ 49 49 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!"); 51 51 sscanf(pch,"%i",pindex); 52 52 return IndexedEnum; … … 55 55 /*we have an indexed variable. recover the root: */ 56 56 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!"); 58 58 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 59 59 /*now recover the index: */ 60 60 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!"); 62 62 sscanf(pch,"%i",pindex); 63 63 return NodalEnum; -
issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
r9775 r12493 72 72 if(control_analysis)solutioncore=&control_core; 73 73 #else 74 _error _("ISSM was not compiled with control capabilities, exiting!");74 _error2_("ISSM was not compiled with control capabilities, exiting!"); 75 75 #endif 76 76 -
issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp
r12102 r12493 39 39 #ifdef _HAVE_MPI_ 40 40 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"); 42 42 #endif 43 43 -
issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
r12442 r12493 55 55 56 56 if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp)) 57 _error _("Error reading exp file.");57 _error2_("Error reading exp file."); 58 58 _printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp); 59 59 // for (i=0; i<nprof; i++) -
issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp
r11679 r12493 26 26 /*Get size of vector: */ 27 27 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)); 29 29 30 30 /*Initialize solution: */ -
issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
r12470 r12493 32 32 } 33 33 else{ 34 _error _("%s%s%s"," vector type: ",EnumToStringx(type)," not supported yet!");34 _error2_("" << " vector type: " << EnumToStringx(type) << " not supported yet!"); 35 35 } 36 36 -
issm/trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp
r12450 r12493 54 54 /*Check that gradient is clean*/ 55 55 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"); 58 58 59 59 /*Clean-up and assign output pointer*/ -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r12450 r12493 27 27 28 28 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!"); 30 30 31 31 if(migration_style==SoftMigrationEnum){ -
issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r12450 r12493 95 95 } 96 96 else if (strncmp(descriptor,"indexed_",8)==0){ 97 _error _(" indexed variables not supported yet!");97 _error2_(" indexed variables not supported yet!"); 98 98 } 99 99 else if (strncmp(descriptor,"nodal_",8)==0){ 100 _error _(" nodal variables not supported yet!");100 _error2_(" nodal variables not supported yet!"); 101 101 } 102 102 else{ -
issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
r12450 r12493 36 36 /*Some checks on arguments: */ 37 37 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."); 39 39 } 40 40 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)"); 42 42 } 43 43 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)"); 45 45 } 46 46 … … 68 68 } 69 69 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."); 71 71 } 72 72 -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
r12442 r12493 41 41 /*some checks*/ 42 42 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"); 44 44 } 45 45 … … 55 55 } 56 56 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)!"); 58 58 } 59 59 60 60 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!"); 62 62 } 63 63 -
issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
r12450 r12493 30 30 /*some checks*/ 31 31 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"); 33 33 } 34 34 … … 41 41 } 42 42 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)!"); 44 44 } 45 45 -
issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
r12450 r12493 38 38 /*Checks*/ 39 39 if (data_cols<=0){ 40 _error _("data provided has a negative number of columns");40 _error2_("data provided has a negative number of columns"); 41 41 } 42 42 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 << ")"); 44 44 } 45 45 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"); 47 47 } 48 48 … … 125 125 for (j=0;j<data_cols;j++){ 126 126 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"); 128 128 } 129 129 data_interp[i*data_cols+j]=data[data_cols*it+j]; -
issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
r11695 r12493 27 27 /*some checks*/ 28 28 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"); 30 30 } 31 31 … … 41 41 } 42 42 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)!"); 44 44 } 45 45 -
issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
r12470 r12493 38 38 fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum); 39 39 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)); 42 42 43 43 /*Fetch vector:*/ … … 99 99 } 100 100 else{ 101 _error _("Size of field %s not supported",EnumToStringx(vector_enum));101 _error2_("Size of field " << EnumToStringx(vector_enum) << " not supported"); 102 102 } 103 103 -
issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
r12450 r12493 133 133 } 134 134 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"); 136 136 } 137 137 jpt++; … … 173 173 174 174 else 175 _error _("Data matrix has incorrect number of %d rows.\n",mdata);175 _error2_("Data matrix has incorrect number of " << mdata << " rows.\n"); 176 176 } 177 177 -
issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
r9761 r12493 44 44 fidi=fopen(filkml,"r"); 45 45 if (!(kobj=KMLFileReadx(fidi))) 46 _error _("Error reading kml file.");46 _error2_("Error reading kml file."); 47 47 fclose(fidi); 48 48 -
issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
r12450 r12493 139 139 } 140 140 else{ 141 _error _("output '%s' not supported yet",output);141 _error2_("output '" << output << "' not supported yet"); 142 142 } 143 143 … … 306 306 else if(strcmp(model,"spherical")==0) variogram = new SphericalVariogram(options); 307 307 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)"); 309 309 } 310 310 else variogram = new GaussianVariogram(options); -
issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
r12446 r12493 103 103 } 104 104 else{ 105 _error _("output '%s' not supported yet",output);105 _error2_("output '" << output << "' not supported yet"); 106 106 } 107 107 … … 126 126 else if(strcmp(model,"spherical")==0) variogram = new SphericalVariogram(options); 127 127 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)"); 129 129 } 130 130 else variogram = new GaussianVariogram(options); -
issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp
r9761 r12493 52 52 double T,rho,sl,tc,mc; 53 53 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"); 55 55 56 56 delta = central_meridian; … … 123 123 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n"); 124 124 } 125 else _error _("Sign should be either +1 or -1.\n");125 else _error2_("Sign should be either +1 or -1.\n"); 126 126 127 127 return; -
issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
r12470 r12493 51 51 for (i=0;i<numberofnodes;i++) npart[i]=0; 52 52 } 53 else _error _("At least one processor is required");53 else _error2_("At least one processor is required"); 54 54 } 55 55 else{ … … 78 78 for (i=0;i<numberofnodes2d;i++) npart2d[i]=0; 79 79 } 80 else _error _("At least one processor is required");80 else _error2_("At least one processor is required"); 81 81 82 82 /*Extrude epart2d to epart, using numlayers: */ -
issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp
r8303 r12493 38 38 if( (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum) ){ 39 39 /*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!"); 41 41 } 42 42 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 46 46 47 47 /*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"); 49 49 50 50 /*First fetch data: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
r10970 r12493 48 48 case FrictionCoefficientEnum: iomodel->FetchData(1,FrictionCoefficientEnum); break; 49 49 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"); 51 51 } 52 52 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp
r9775 r12493 124 124 125 125 default: 126 _error _("%s%s%s"," analysis_type: ",EnumToStringx(analysis_type)," not supported yet!");126 _error2_("" << " analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!"); 127 127 } 128 128 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
r12451 r12493 153 153 /*Fetch the mass flux segments necessary to compute the mass fluxes. Build a DoubleMatArrayParam object out of them: */ 154 154 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!"); 156 156 157 157 /*Go through segments, and extract those that belong to this cpu: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r12450 r12493 145 145 146 146 } 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"); 148 148 } 149 149 /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/ … … 185 185 } 186 186 } 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"); 188 188 } 189 189 /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/ … … 225 225 } 226 226 } 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"); 228 228 } 229 229 /*Now add the regular spcs*/ … … 318 318 count++; 319 319 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"); 321 321 } 322 322 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r12470 r12493 61 61 doftype[5]=StokesApproximationEnum; 62 62 } 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"); 64 64 } 65 65 else if (analysis_type==DiagnosticVertAnalysisEnum){ … … 90 90 numdofs=1; 91 91 } 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"); 93 93 94 94 /*Now initialize the index*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r10522 r12493 26 26 27 27 /*if 2d: Error*/ 28 if (dim==2) _error _("2d meshes not supported yet");28 if (dim==2) _error2_("2d meshes not supported yet"); 29 29 30 30 /*Recover pointer: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
r12470 r12493 103 103 } 104 104 else{ 105 _error _("not implemented yet");105 _error2_("not implemented yet"); 106 106 } 107 107 … … 111 111 iomodel->FetchData(&edges,&numberofedges,&cols,MeshEdgesEnum); 112 112 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"); 114 114 115 115 /*!All elements have been partitioned above, only create elements for this CPU: */ … … 152 152 } 153 153 else{ 154 _error _("Problem in edges creation");154 _error2_("Problem in edges creation"); 155 155 } 156 156 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r10522 r12493 46 46 47 47 /*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"); 49 49 50 50 /*First fetch data: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r10522 r12493 33 33 34 34 /*return if 2d mesh*/ 35 if (dim==2) _error _("2d meshes not supported yet");35 if (dim==2) _error2_("2d meshes not supported yet"); 36 36 37 37 //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 38 38 #ifdef _HAVE_MPI_ 39 39 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)); 41 41 #endif 42 42 -
issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
r12450 r12493 71 71 * warn the user to increase the connectivity width: */ 72 72 for(i=0;i<nods;i++){ 73 if (*(connectivity+width*i+maxels)>maxels)_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"); 74 74 } 75 75 -
issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
r12470 r12493 106 106 char* string=strings[i]; 107 107 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"); 109 109 } 110 110 if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char); -
issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
r9761 r12493 30 30 * management routine, otherwise, skip : */ 31 31 if (RiftIsPresent(loads,analysis_type)){ 32 _error _("rift constraints reset not supported yet!");32 _error2_("rift constraints reset not supported yet!"); 33 33 } 34 34 else if(ThermalIsPresent(loads,analysis_type)){ -
issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp
r12470 r12493 46 46 case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break; 47 47 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; 49 49 #else 50 default: _error _(" ISSM was not compiled with responses capabilities, exiting!");50 default: _error2_(" ISSM was not compiled with responses capabilities, exiting!"); 51 51 #endif 52 52 } -
issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
r12442 r12493 75 75 76 76 hSHP = SHPOpen( filshp, "rb" ); 77 if (!hSHP) _error _("Error opening shp/shx files.");77 if (!hSHP) _error2_("Error opening shp/shx files."); 78 78 79 79 /* read header and print out file bounds */ -
issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp
r12018 r12493 55 55 56 56 #else 57 _error _("GSL support not compiled in!");57 _error2_("GSL support not compiled in!"); 58 58 #endif 59 59 #endif -
issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
r12470 r12493 26 26 pf->GetSize(&N2); 27 27 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!"); 30 30 31 31 SolverxGsl(&x,Kff->matrix,pf->vector,N); -
issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
r12021 r12493 81 81 #if _PETSC_MAJOR_ >=3 82 82 #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"); 84 84 #endif 85 85 #endif … … 105 105 if (solver_type==StokesSolverEnum){ 106 106 /*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"); 108 108 DofTypesToIndexSet(&isv,&isp,df,StokesSolverEnum); 109 109 … … 136 136 /*Check convergence*/ 137 137 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); 139 139 140 140 /*Free resources:*/ -
issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
r12342 r12493 470 470 } 471 471 /*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"); 473 473 } -
issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp
r9761 r12493 53 53 double sl,rho,cm,T,chi; 54 54 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"); 56 56 57 57 delta = central_meridian; … … 131 131 _printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n"); 132 132 } 133 else _error _("Sign should be either +1 or -1.\n");133 else _error2_("Sign should be either +1 or -1.\n"); 134 134 135 135 return; -
issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp
r12456 r12493 60 60 int i; 61 61 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"); 72 72 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"); 76 76 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."); 83 83 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");}; 86 86 } 87 87 -
issm/trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp
r12365 r12493 76 76 } 77 77 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))"); 79 79 } 80 80 … … 146 146 j = NextEdge[jc]; 147 147 if (k>=2000){ 148 _error _("k>=2000 (Maximum number of iterations reached)");148 _error2_("k>=2000 (Maximum number of iterations reached)"); 149 149 } 150 150 } while ( tbegin != tria); … … 213 213 j = NextEdge[jc]; 214 214 if (k>=2000){ 215 _error _("k>=2000");215 _error2_("k>=2000"); 216 216 } 217 217 }while ( tbegin != tria); -
issm/trunk-jpl/src/c/objects/Bamg/Edge.cpp
r12365 r12493 45 45 46 46 /*some shecks*/ 47 if (!(adj[0]==&e || adj[1]==&e)){ _error _("Intersection bug"); }47 if (!(adj[0]==&e || adj[1]==&e)){ _error2_("Intersection bug"); } 48 48 _assert_(adj[0]==&e || adj[1]==&e); 49 49 -
issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp
r12456 r12493 76 76 77 77 //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"); 80 80 81 81 //Vertices 82 82 if (bamggeom->Vertices){ 83 83 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"); 85 85 vertices = new GeomVertex[nbv]; 86 86 for (i=0;i<nbv;i++) { … … 115 115 */ 116 116 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"); 118 118 } 119 119 else{ 120 _error _("No BamgVertex provided");120 _error2_("No BamgVertex provided"); 121 121 } 122 122 … … 127 127 128 128 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"); 130 130 edges = new GeomEdge[nbe]; 131 131 … … 176 176 } 177 177 else{ 178 _error _("No edges provided");178 _error2_("No edges provided"); 179 179 } 180 180 … … 206 206 if (bamggeom->TangentAtEdges){ 207 207 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"); 209 209 int n,i,j,k; 210 210 R2 tg; … … 216 216 tg.x=bamggeom->TangentAtEdges[k*4+2]; 217 217 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"); 220 220 edges[i].tg[j] = tg; 221 221 } … … 225 225 if(bamggeom->Corners){ 226 226 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"); 228 228 n=bamggeom->CornersSize[0]; 229 229 for (i=0;i<n;i++) { 230 230 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 << "]"); 232 232 /*Required => at the same time SetRequired and SetCorner*/ 233 233 vertices[j].SetCorner(); … … 239 239 if(bamggeom->RequiredVertices){ 240 240 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"); 242 242 n=bamggeom->RequiredVerticesSize[0]; 243 243 for (i=0;i<n;i++) { 244 244 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 << "]"); 246 246 vertices[j].SetRequired(); 247 247 } … … 251 251 if(bamggeom->RequiredEdges){ 252 252 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"); 254 254 n=bamggeom->RequiredEdgesSize[0]; 255 255 for (i=0;i<n;i++) { 256 256 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 << "]"); 258 258 edges[j].SetRequired(); 259 259 } … … 263 263 if(bamggeom->SubDomains){ 264 264 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"); 266 266 nbsubdomains=bamggeom->SubDomainsSize[0]; 267 267 subdomains = new GeomSubDomain[nbsubdomains]; … … 271 271 i2=(int)bamggeom->SubDomains[i*4+2]; 272 272 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)"); 275 275 subdomains[i].edge=edges + (i1-1); 276 276 subdomains[i].direction = (int) i2; … … 532 532 delete [] head_v; 533 533 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)"); 535 535 } 536 536 … … 610 610 delete [] head_v; 611 611 delete [] eangle; 612 _error _("Length of edge %i is 0",i);612 _error2_("Length of edge " << i << " is 0"); 613 613 } 614 614 //compute angle in [-Pi Pi] … … 704 704 long i1 = n1/2 ,j1=n1%2; 705 705 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"); 707 707 708 708 edges[i1].Adj[j1] = edges + i; … … 831 831 GeomEdge* on=e.GeomEdgeHook; 832 832 if (!on){ 833 _error _("ProjectOnCurve error message: edge provided should be on geometry");833 _error2_("ProjectOnCurve error message: edge provided should be on geometry"); 834 834 } 835 835 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"); 837 837 } 838 838 … … 875 875 printf(" 2) code bug : be sure that we call Mesh::SetVertexFieldOn() before\n"); 876 876 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"); 878 878 } 879 879 NbTry++; … … 895 895 printf(" 2) code bug : be sure that we call Mesh::SetVertexFieldOn() before\n"); 896 896 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"); 898 898 } 899 899 GeomEdge* tmpge = eg1; -
issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp
r12365 r12493 38 38 // check Size 39 39 if (Size<=0){ 40 _error _("Size<=0");40 _error2_("Size<=0"); 41 41 } 42 42 … … 268 268 k=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 269 269 if (k<0){ 270 _error _("k<0");270 _error2_("k<0"); 271 271 } 272 272 ocut = OppositeEdge[k]; … … 312 312 double dij = detj-deti; 313 313 if (i+j+k != 0 + 1 +2){ 314 _error _("i+j+k != 0 + 1 +2");314 _error2_("i+j+k != 0 + 1 +2"); 315 315 } 316 316 ba[j] = detj/dij; … … 384 384 } 385 385 else { 386 _error _("Bug Split Edge");386 _error2_("Bug Split Edge"); 387 387 } 388 388 } -
issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp
r12456 r12493 117 117 delete [] kk; 118 118 delete [] refv; 119 _error _("imaxnbv != nbv");119 _error2_("imaxnbv != nbv"); 120 120 } 121 121 for (i=0;i<Tho.nbt;i++) … … 128 128 if (i0<0 || i1<0 || i2<0){ 129 129 delete [] refv; 130 _error _("i0<0 || i1<0 || i2< 0");130 _error2_("i0<0 || i1<0 || i2< 0"); 131 131 } 132 132 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"); 134 134 } 135 135 triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]); … … 138 138 } 139 139 if (kt!=nbt){ 140 _error _("kt!=nbt");140 _error2_("kt!=nbt"); 141 141 } 142 142 if (nbt==0 && nbv==0) { 143 _error _("All triangles have been removed");143 _error2_("All triangles have been removed"); 144 144 } 145 145 delete [] kk; … … 153 153 154 154 if (!nbsubdomains){ 155 _error _("nbsubdomains==0");155 _error2_("nbsubdomains==0"); 156 156 } 157 157 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"); 159 159 } 160 160 … … 323 323 } 324 324 } 325 if(isorphan) _error _("Orphan found in mesh, see ids above");325 if(isorphan) _error2_("Orphan found in mesh, see ids above"); 326 326 327 327 /*Clean up*/ … … 362 362 } 363 363 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"); 365 365 } 366 366 … … 380 380 } 381 381 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"); 383 383 } 384 384 … … 506 506 //Check value 507 507 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 << "]"); 509 509 } 510 510 edges[i].GeomEdgeHook=Gh.edges+j; … … 522 522 head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing 523 523 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)"); 526 526 subdomains[i].head = triangles+head; 527 527 } … … 567 567 for (j=0;j<3;j++){ 568 568 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); 570 570 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); 572 572 head_1[v]=k++; 573 573 connectivitysize_1[v]+=1; … … 707 707 } 708 708 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..."); 710 710 } 711 711 } … … 805 805 const VertexOnGeom &v=VerticesOnGeomEdge[i]; 806 806 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"); 808 808 } 809 809 bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing … … 888 888 for (j=0;j<2;j++){ 889 889 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 << "]"); 891 891 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 << "])"); 893 893 head_2[v]=k++; 894 894 connectivitysize_2[v]+=1; … … 1061 1061 //check that hmax is positive 1062 1062 if (hmax<=0){ 1063 _error _("hmax<=0");1063 _error2_("hmax<=0"); 1064 1064 } 1065 1065 … … 1090 1090 1091 1091 if (ht<=0 || hn<=0){ 1092 _error _("ht<=0 || hn<=0");1092 _error2_("ht<=0 || hn<=0"); 1093 1093 } 1094 1094 EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg); … … 1115 1115 } 1116 1116 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)"); 1118 1118 } 1119 1119 } … … 1159 1159 //some checks 1160 1160 if (( infvertexindex <0 ) && (detOld <0) || ( infvertexindex >=0 ) && (detOld >0) ){ 1161 _error _("inconsistent configuration (Contact ISSM developers)");1161 _error2_("inconsistent configuration (Contact ISSM developers)"); 1162 1162 } 1163 1163 … … 1201 1201 } 1202 1202 else{ 1203 _error _("Cannot add a vertex more than once. Check duplicates");1203 _error2_("Cannot add a vertex more than once. Check duplicates"); 1204 1204 } 1205 1205 } … … 1214 1214 tt[2]= &triangles[nbt++]; 1215 1215 1216 if (nbt>maxnbt) _error _("Not enough triangles");1216 if (nbt>maxnbt) _error2_("Not enough triangles"); 1217 1217 1218 1218 *tt[1]=*tt[2]=*t; … … 1251 1251 1252 1252 if (!rswap) { 1253 _error _("swap the point s is on a edge");1253 _error2_("swap the point s is on a edge"); 1254 1254 } 1255 1255 } … … 1318 1318 //check that the mesh is not empty 1319 1319 if (nbt<=0 || nbv <=0 ) { 1320 _error _("nbt or nbv is negative (Mesh empty?)");1320 _error2_("nbt or nbv is negative (Mesh empty?)"); 1321 1321 } 1322 1322 … … 1340 1340 if (nbe != edge4->nb()){ 1341 1341 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()); 1343 1343 } 1344 1344 //keep nbe in nbeold … … 1360 1360 //check that it is not an edge on boundary (should not already exist) 1361 1361 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?)"); 1363 1363 } 1364 1364 //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list … … 1378 1378 printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3); 1379 1379 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"); 1381 1381 } 1382 1382 } … … 1460 1460 //check that we have been through all edges 1461 1461 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)"); 1463 1463 } 1464 1464 //delete edgessave … … 1505 1505 //check that we have the correct vertex 1506 1506 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"); 1508 1508 } 1509 1509 … … 1522 1522 //check that nbsubdomains is empty 1523 1523 if (nbsubdomains){ 1524 _error _("nbsubdomains should be 0");1524 _error2_("nbsubdomains should be 0"); 1525 1525 } 1526 1526 nbsubdomains=0; … … 1591 1591 if (k!= nbsubdomains){ 1592 1592 delete [] colorT; 1593 _error _("k!= nbsubdomains");1593 _error2_("k!= nbsubdomains"); 1594 1594 } 1595 1595 //delete colorT and st … … 1652 1652 if (Gh.coefIcoor<=0){ 1653 1653 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)"); 1655 1655 } 1656 1656 … … 1705 1705 delete [] len; 1706 1706 delete [] colorV; 1707 _error _("problem in Edge4 construction: k != i");1707 _error2_("problem in Edge4 construction: k != i"); 1708 1708 } 1709 1709 } … … 1734 1734 } 1735 1735 else 1736 _error _("%i should be >=0");1736 _error2_("%i should be >=0"); 1737 1737 } 1738 1738 … … 1768 1768 1769 1769 /*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"); 1771 1771 1772 1772 //initialization of some variables … … 1973 1973 1974 1974 /*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"); 1976 1976 1977 1977 //initialization of some variables … … 2298 2298 if (splitvertex[i1]==3 || splitvertex[i2]==3){ 2299 2299 delete [] splitvertex; 2300 _error _("Crossing rifts not supported yet");2300 _error2_("Crossing rifts not supported yet"); 2301 2301 } 2302 2302 } … … 2376 2376 //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); 2377 2377 ta = Next(ta).Adj(); 2378 if (count++>50) _error _("Maximum number of iteration exceeded");2378 if (count++>50) _error2_("Maximum number of iteration exceeded"); 2379 2379 }while ((tbegin != ta)); 2380 2380 } … … 2383 2383 for(i=0;i<NbCrackedEdges;i++){ 2384 2384 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"); 2386 2386 } 2387 2387 } … … 2433 2433 } 2434 2434 if (k!=0) { 2435 _error _("there is %i triangles of mes = 0",k);2435 _error2_("there is " << k << " triangles of mes = 0"); 2436 2436 } 2437 2437 … … 2447 2447 if (nbswp) nbfe++; 2448 2448 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])); 2450 2450 } 2451 2451 } 2452 2452 2453 2453 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"); 2455 2455 } 2456 2456 for (int j=0;j<nbv;j++){ … … 2534 2534 if (nbt == nbtout || !NbSubDomTot) { 2535 2535 delete [] HeapArete; 2536 _error _("The boundary is not close: all triangles are outside");2536 _error2_("The boundary is not close: all triangles are outside"); 2537 2537 } 2538 2538 … … 2572 2572 if (k!=nbsubdomains){ 2573 2573 delete [] mark; 2574 _error _("k!=nbsubdomains");2574 _error2_("k!=nbsubdomains"); 2575 2575 } 2576 2576 if(OutSide) … … 2662 2662 subdomains[i].head=t=ta; 2663 2663 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); 2665 2665 } 2666 2666 long it = GetId(t); … … 2677 2677 kkk++; 2678 2678 if (mark[GetId(tt)]>=0){ 2679 _error _("mark[GetId(tt)]>=0");2679 _error2_("mark[GetId(tt)]>=0"); 2680 2680 } 2681 2681 mark[GetId(tt)]=i; … … 2686 2686 ta = Previous(Adj(ta)); 2687 2687 if(t == (Triangle *) ta) { 2688 _error _("bad definition of SubSomain %i",i);2688 _error2_("bad definition of SubSomain " << i); 2689 2689 } 2690 2690 } … … 2848 2848 //if i is higher than nbv, it means that all the determinants are 0, 2849 2849 //all vertices are aligned! 2850 if (++i>=nbv) _error _("all the vertices are aligned");2850 if (++i>=nbv) _error2_("all the vertices are aligned"); 2851 2851 } 2852 2852 // exchange i et 2 in "orderedvertices" so that … … 2984 2984 long j=vj.ReferenceNumber; 2985 2985 if (&vj!=orderedvertices[j]){ 2986 _error _("&vj!= orderedvertices[j]");2986 _error2_("&vj!= orderedvertices[j]"); 2987 2987 } 2988 2988 if(i!=j){ … … 2994 2994 if (tcvj && !tcvj->link){ 2995 2995 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 << ")"); 2997 2997 } 2998 2998 quadtree->Add(vj); … … 3026 3026 3027 3027 if (!Gh.nbe){ 3028 _error _("!Gh.nbe");3028 _error2_("!Gh.nbe"); 3029 3029 } 3030 3030 Edge **e= new (Edge* [Gh.nbe]); … … 3059 3059 } 3060 3060 } 3061 if(kk) _error _("See above");3061 if(kk) _error2_("See above"); 3062 3062 3063 3063 return e; … … 3258 3258 //check i 3259 3259 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 << "])"); 3261 3261 } 3262 3262 //change first_np_or_next_t[i] … … 3309 3309 } 3310 3310 if (ta.EdgeVertex(0)!=s){ 3311 _error _("ta.EdgeVertex(0)!=s");3311 _error2_("ta.EdgeVertex(0)!=s"); 3312 3312 } 3313 3313 ta = Next(Adj(ta)); … … 3344 3344 } 3345 3345 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"); 3347 3347 } 3348 3348 … … 3355 3355 } 3356 3356 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"); 3358 3358 } 3359 3359 Edge * e = &BhAB; 3360 3360 if (!pA || !pB || !e){ 3361 _error _("!pA || !pB || !e");3361 _error2_("!pA || !pB || !e"); 3362 3362 } 3363 3363 // be carefull the back ground edge e is on same geom edge … … 3365 3365 //check Is a background Mesh; 3366 3366 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"); 3368 3368 } 3369 3369 // walk on BTh edge … … 3388 3388 } 3389 3389 else{ // do the search by walking 3390 _error _("case not supported yet");3390 _error2_("case not supported yet"); 3391 3391 } 3392 3392 … … 3452 3452 3453 3453 } 3454 _error _("Big bug...");3454 _error2_("Big bug..."); 3455 3455 return 0; // just for the compiler 3456 3456 } … … 3493 3493 } 3494 3494 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"); 3496 3496 } 3497 3497 … … 3525 3525 //An edge belongs to 2 triangles 3526 3526 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"); 3528 3528 } 3529 3529 } … … 3563 3563 } 3564 3564 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"); 3566 3566 } 3567 3567 … … 3590 3590 for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 3591 3591 if (++i>=nbvb) { 3592 _error _("ReconstructExistingMesh: All the vertices are aligned");3592 _error2_("ReconstructExistingMesh: All the vertices are aligned"); 3593 3593 } 3594 3594 //Move this vertex (i) to the 2d position in orderedvertices … … 3650 3650 } 3651 3651 if(nbloss) { 3652 _error _("we lost %i existing edges other %i",nbloss,knbe);3652 _error2_("we lost " << nbloss << " existing edges other " << knbe); 3653 3653 } 3654 3654 … … 3725 3725 subdomains = savesubdomains; 3726 3726 if (k) { 3727 _error _("number of triangles edges alone = %i",k);3727 _error2_("number of triangles edges alone = " << k); 3728 3728 } 3729 3729 FindSubDomain(); … … 3755 3755 3756 3756 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...)"); 3758 3758 } 3759 3759 } … … 3778 3778 t=t0=subdomains[i].head; 3779 3779 if (!t0){ // not empty sub domain 3780 _error _("!t0");3780 _error2_("!t0"); 3781 3781 } 3782 3782 do { 3783 3783 long kt = GetId(t); 3784 3784 if (kt<0 || kt >= nbt ){ 3785 _error _("kt<0 || kt >= nbt");3785 _error2_("kt<0 || kt >= nbt"); 3786 3786 } 3787 3787 if (renu[kt]!=-1){ 3788 _error _("renu[kt]!=-1");3788 _error2_("renu[kt]!=-1"); 3789 3789 } 3790 3790 renu[kt]=k++; … … 3803 3803 } 3804 3804 if (k != nbt){ 3805 _error _("k != nbt");3805 _error2_("k != nbt"); 3806 3806 } 3807 3807 // do the change on all the pointeur … … 3929 3929 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 3930 3930 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"); 3932 3932 } 3933 3933 … … 3965 3965 } 3966 3966 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"); 3968 3968 } 3969 3969 /*}}}*/ … … 4146 4146 register Triangle* t= vertices[i].t; 4147 4147 if (!t){ 4148 _error _("!t");4148 _error2_("!t"); 4149 4149 } 4150 4150 BamgVertex & vi = vertices[i]; … … 4154 4154 ta=Previous(Adj(ta)); 4155 4155 if (vertices+i != ta.EdgeVertex(1)){ 4156 _error _("vertices+i != ta.EdgeVertex(1)");4156 _error2_("vertices+i != ta.EdgeVertex(1)"); 4157 4157 } 4158 4158 BamgVertex & vj = *(ta.EdgeVertex(0)); … … 4160 4160 j= &vj-vertices; 4161 4161 if (j<0 || j >= nbv){ 4162 _error _("j<0 || j >= nbv");4162 _error2_("j<0 || j >= nbv"); 4163 4163 } 4164 4164 R2 Aij = (R2) vj - (R2) vi; … … 4284 4284 // the first PB is to now a background edge between the 2 vertices 4285 4285 if (!edgesGtoB){ 4286 _error _("!edgesGtoB");4286 _error2_("!edgesGtoB"); 4287 4287 } 4288 4288 ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)], … … 4356 4356 Triangle & t = triangles[i]; 4357 4357 if (!t.link){ 4358 _error _("!t.link");4358 _error2_("!t.link"); 4359 4359 } 4360 4360 for(int j=0;j<3;j++) … … 4383 4383 || (cc=Area2( t[0].r , t[1].r , A.r )) < 0.0)){ 4384 4384 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"); 4386 4386 } 4387 4387 } … … 4391 4391 || (cc=Area2( tt[0].r , tt[1].r , A.r )) < 0)){ 4392 4392 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"); 4394 4394 } 4395 4395 } … … 4439 4439 } // tt 4440 4440 else 4441 _error _("Bug...");4441 _error2_("Bug..."); 4442 4442 } // ke<0 4443 4443 else … … 4452 4452 } 4453 4453 if (nbinvisible>=2){ 4454 _error _("nbinvisible>=2");4454 _error2_("nbinvisible>=2"); 4455 4455 } 4456 4456 switch (nbsplitedge) { … … 4464 4464 } 4465 4465 if (ksplit[i]<40){ 4466 _error _("ksplit[i]<40");4466 _error2_("ksplit[i]<40"); 4467 4467 } 4468 4468 } … … 4481 4481 int ke=(int) (ksplit[i]%10); 4482 4482 if (kk>=7 || kk<=0){ 4483 _error _("kk>=7 || kk<=0");4483 _error2_("kk>=7 || kk<=0"); 4484 4484 } 4485 4485 … … 4498 4498 4499 4499 if (nbmkadj>=10){ 4500 _error _("nbmkadj>=10");4500 _error2_("nbmkadj>=10"); 4501 4501 } 4502 4502 // -------------------------- … … 4516 4516 t1=t0; 4517 4517 if (kedge[3*i+i0]<0){ 4518 _error _("kedge[3*i+i0]<0");4518 _error2_("kedge[3*i+i0]<0"); 4519 4519 } 4520 4520 BamgVertex * v3 = vertices + kedge[3*i+k0]; … … 4532 4532 t2=t1=t0; 4533 4533 if (kedge[3*i+k1]<0){ 4534 _error _("kedge[3*i+k1]<0");4534 _error2_("kedge[3*i+k1]<0"); 4535 4535 } 4536 4536 if (kedge[3*i+k2]<0){ 4537 _error _("kedge[3*i+k2]<0");4537 _error2_("kedge[3*i+k2]<0"); 4538 4538 } 4539 4539 … … 4559 4559 t3=t2=t1=t0; 4560 4560 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"); 4562 4562 } 4563 4563 BamgVertex * v12 = vertices + kedge[3*i+k0]; … … 4633 4633 } 4634 4634 if (nbmkadj>13){// 13 = 6 + 4 + 4635 _error _("nbmkadj>13");4635 _error2_("nbmkadj>13"); 4636 4636 } 4637 4637 … … 4759 4759 quadtree->Add(vi); 4760 4760 if (!tcvi || tcvi->det<0){// internal 4761 _error _("!tcvi || tcvi->det < 0");4761 _error2_("!tcvi || tcvi->det < 0"); 4762 4762 } 4763 4763 AddVertex(vi,tcvi,det3); … … 4803 4803 4804 4804 /*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"); 4806 4806 4807 4807 /*Call NearestVertex*/ … … 4809 4809 4810 4810 /*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?)"); 4813 4813 _assert_(a>=vertices && a<vertices+nbv); 4814 4814 … … 4845 4845 4846 4846 /*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 << ")."); 4848 4848 4849 4849 j= OppositeVertex[jj]; … … 4909 4909 4910 4910 //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");} 4912 4912 4913 4913 //loop … … 4992 4992 //allocate 4993 4993 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); 4995 4995 _assert_(nbv==0); 4996 4996 //Build VerticesOnGeomVertex … … 5081 5081 NbNewPoints=0; 5082 5082 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"); 5084 5084 lcurve =0; 5085 5085 s = lstep; //-1 initially, then length of each sub edge … … 5323 5323 if(NbVerticesOnGeomVertex >= maxnbv){ 5324 5324 delete [] bcurve; 5325 _error _("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);5325 _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv); 5326 5326 } 5327 5327 … … 5394 5394 if (bfind!=Gh.nbcurves){ 5395 5395 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)"); 5397 5397 } 5398 5398 … … 5493 5493 double se= (sNew-L0)/LAB; 5494 5494 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]"); 5496 5496 } 5497 5497 se = abscisseInterpole(v0.m,v1.m,AB,se,1); 5498 5498 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]"); 5500 5500 } 5501 5501 se = k1 ? se : 1. - se; … … 5529 5529 } 5530 5530 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); 5532 5532 } 5533 5533 pe = ee.adj[k1]; // next edge … … 5567 5567 if(step==0){ 5568 5568 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); 5570 5570 } 5571 5571 edges = new Edge[NbOfNewEdge]; … … 5612 5612 int dir=0; 5613 5613 if (k<0){ 5614 _error _("k<0");5614 _error2_("k<0"); 5615 5615 } 5616 5616 int kkk=0; … … 5620 5620 kkk++; 5621 5621 if (kkk>=1000){ 5622 _error _("kkk>=1000");5622 _error2_("kkk>=1000"); 5623 5623 } 5624 5624 BamgVertex &vI = *edge.EdgeVertex(0); … … 5637 5637 double IJ2 = IJ_IA + IJ_AJ; 5638 5638 if (IJ2==0){ 5639 _error _("IJ2==0");5639 _error2_("IJ2==0"); 5640 5640 } 5641 5641 a= IJ_AJ/IJ2; … … 5655 5655 // int dir=0; 5656 5656 if (t->link != 0){ 5657 _error _("t->link != 0");5657 _error2_("t->link != 0"); 5658 5658 } 5659 5659 // to have a starting edges … … 5727 5727 } 5728 5728 if (cas ==-2){ 5729 _error _("cas==-2");5729 _error2_("cas==-2"); 5730 5730 } 5731 5731 // l1 = ||C s1|| , l0 = ||C s0|| … … 5744 5744 kkk++; 5745 5745 if (edge.EdgeVertex(0)!=s && kkk>=10000){ 5746 _error _("edge.EdgeVertex(0)!=s && kkk>=10000");5746 _error2_("edge.EdgeVertex(0)!=s && kkk>=10000"); 5747 5747 } 5748 5748 … … 5776 5776 5777 5777 if (!(Triangle *) er){ 5778 _error _("!(Triangle *) er");5778 _error2_("!(Triangle *) er"); 5779 5779 } 5780 5780 I2 A((I2)*er.EdgeVertex(0)); … … 5800 5800 int NbSwap =0; 5801 5801 if (!a.t || !b.t){ // the 2 vertex is in a mesh 5802 _error _("!a.t || !b.t");5802 _error2_("!a.t || !b.t"); 5803 5803 } 5804 5804 int k=0; … … 5817 5817 vbegin =v2; 5818 5818 if (!v2){ 5819 _error _("!v2");5819 _error2_("!v2"); 5820 5820 } 5821 5821 det2 = det(*v2,a,b); … … 5834 5834 tc = Previous(tc); 5835 5835 if (!v1 || !v2){ 5836 _error _("!v1 || !v2");5836 _error2_("!v1 || !v2"); 5837 5837 } 5838 5838 Icoor2 detss = 0,l=0,ks; 5839 5839 while ((ks=SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 5840 5840 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"); 5842 5842 } 5843 5843 BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); … … 5858 5858 k++; 5859 5859 if (k>=2000){ 5860 _error _("k>=2000");5860 _error2_("k>=2000"); 5861 5861 } 5862 5862 if ( vbegin == v2 ) return -1;// error … … 5930 5930 short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles 5931 5931 if ( a1<0 || a1>=3 ){ 5932 _error _("a1<0 || a1>=3");5932 _error2_("a1<0 || a1>=3"); 5933 5933 } 5934 5934 … … 5942 5942 Icoor2 detT = det1+det2; 5943 5943 if ((det1<=0 ) || (det2<=0)){ 5944 _error _("(det1<=0 ) || (det2<=0)");5944 _error2_("(det1<=0 ) || (det2<=0)"); 5945 5945 } 5946 5946 if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb 5947 _error _("(detsa>=0) || (detsb<=0)");5947 _error2_("(detsa>=0) || (detsb<=0)"); 5948 5948 } 5949 5949 Icoor2 ndet1 = bamg::det(s1,sa,s2); -
issm/trunk-jpl/src/c/objects/Bamg/Metric.cpp
r12365 r12493 197 197 // warning for optimisation S is in [0:0.5] not in [0:1] 198 198 if (i>=512){ 199 _error _("i>=512");199 _error2_("i>=512"); 200 200 } 201 201 LastMetricInterpole.lab=l; … … 345 345 } 346 346 if (r>1 || r<0){ 347 _error _("r>1 || r<0");347 _error2_("r>1 || r<0"); 348 348 } 349 349 return r ; -
issm/trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp
r12365 r12493 50 50 //check that nbax <=NbOfEdges 51 51 if (nbax <=NbOfEdges ) { 52 _error _("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);52 _error2_("SetOfEdges4::add overflow: NbOfEdges=" << NbOfEdges << " > nbax=" << nbax); 53 53 } 54 54 -
issm/trunk-jpl/src/c/objects/Bamg/SubDomain.cpp
r12365 r12493 16 16 *this = Th.subdomains[i]; 17 17 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"); 19 19 } 20 20 head = ThNew.triangles + Th.GetId(head) ; 21 21 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"); 23 23 } 24 24 edge = ThNew.edges+ Th.GetId(edge); -
issm/trunk-jpl/src/c/objects/Bamg/Triangle.cpp
r12365 r12493 19 19 long nbv = Th->nbv; 20 20 if (i<0 || j<0 || k<0){ 21 _error _("i<0 || j<0 || k<0");21 _error2_("i<0 || j<0 || k<0"); 22 22 } 23 23 if (i>=nbv || j>=nbv || k>=nbv){ 24 _error _("i>=nbv || j>=nbv || k>=nbv");24 _error2_("i>=nbv || j>=nbv || k>=nbv"); 25 25 } 26 26 vertices[0]=v+i; … … 173 173 //check number of iterations 174 174 if (k>=2000){ 175 _error _("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");175 _error2_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)"); 176 176 } 177 177 } while (this!= t); … … 213 213 do { 214 214 while (t->swap(j,koption)){ 215 if (k>=20000) _error _("k>=20000");215 if (k>=20000) _error2_("k>=20000"); 216 216 NbSwap++; 217 217 k++; -
issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
r12462 r12493 146 146 } 147 147 148 if(!found)_error _("could not find time segment for constraint");148 if(!found)_error2_("could not find time segment for constraint"); 149 149 150 150 /*Apply or relax constraint: */ -
issm/trunk-jpl/src/c/objects/DofIndexing.cpp
r12457 r12493 143 143 else this->sdoflist=NULL; 144 144 } 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!"); 146 146 } 147 147 /*}}}*/ -
issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
r12463 r12493 130 130 void BoolElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){ 131 131 132 _error _("cannot return vector on vertices");132 _error2_("cannot return vector on vertices"); 133 133 } /*}}}*/ 134 134 /*FUNCTION BoolElementResult::GetElementVectorFromResults{{{*/ -
issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
r12488 r12493 142 142 IssmDouble data[6]; 143 143 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"); 145 145 for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i]; 146 146 vector->SetValues(numdofs,doflist,&data[0],ADD_VAL); … … 150 150 void PentaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){ 151 151 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"); 153 153 } /*}}}*/ -
issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
r12463 r12493 130 130 IssmDouble data[3]; 131 131 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"); 133 133 for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i]; 134 134 vector->SetValues(numdofs,doflist,&data[0],ADD_VAL); … … 137 137 /*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{*/ 138 138 void 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"); 140 140 } /*}}}*/ -
issm/trunk-jpl/src/c/objects/Elements/Penta.cpp
r12471 r12493 146 146 /*FUNCTION Penta::AverageOntoPartition {{{*/ 147 147 void Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){ 148 _error _("Not supported yet!");148 _error2_("Not supported yet!"); 149 149 } 150 150 /*}}}*/ … … 252 252 253 253 /*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!"); 256 256 257 257 /*retrieve some parameters: */ … … 318 318 void Penta::ComputeStrainRate(Vector* eps){ 319 319 320 _error _("Not implemented yet");320 _error2_("Not implemented yet"); 321 321 322 322 } … … 464 464 #endif 465 465 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"); 467 467 } 468 468 … … 569 569 #endif 570 570 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"); 572 572 } 573 573 … … 638 638 #endif 639 639 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"); 641 641 } 642 642 … … 816 816 return i; 817 817 } 818 _error _("Node provided not found among element nodes");818 _error2_("Node provided not found among element nodes"); 819 819 820 820 } … … 829 829 /*Recover input*/ 830 830 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"); 832 832 833 833 /*Checks in debugging mode*/ … … 878 878 879 879 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"); 881 881 882 882 GaussPenta* gauss=new GaussPenta(); … … 973 973 #endif 974 974 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"); 976 976 } 977 977 } … … 1013 1013 /*Check that both inputs have been found*/ 1014 1014 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"); 1016 1016 } 1017 1017 … … 1038 1038 /*Check that both inputs have been found*/ 1039 1039 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"); 1041 1041 } 1042 1042 … … 1073 1073 /*Get input (either in element or material)*/ 1074 1074 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"); 1076 1076 1077 1077 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ … … 1133 1133 /*Make a copy of the original input: */ 1134 1134 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)); 1136 1136 1137 1137 /*ArtificialNoise: */ … … 1153 1153 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 1154 1154 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])); 1157 1157 } 1158 1158 … … 1186 1186 this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar)); 1187 1187 } 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); 1189 1189 1190 1190 } … … 1251 1251 this->inputs->AddInput(transientinput); 1252 1252 } 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)); 1254 1254 } 1255 1255 else if(vector_type==2){ //element vector … … 1268 1268 this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index])); 1269 1269 } 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); 1271 1271 } 1272 1272 else { 1273 _error _("transient elementary inputs not supported yet!");1273 _error2_("transient elementary inputs not supported yet!"); 1274 1274 } 1275 1275 } 1276 1276 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)"); 1278 1278 } 1279 1279 … … 1314 1314 original_input=(Input*)penta->matice->inputs->GetInput(enum_type); 1315 1315 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)); 1318 1318 1319 1319 /*If first time, initialize total_integrated_input*/ … … 1326 1326 total_integrated_input=new DoubleInput(average_enum_type,0.0); 1327 1327 else 1328 _error _("object %s not supported yet",EnumToStringx(original_input->ObjectEnum()));1328 _error2_("object " << EnumToStringx(original_input->ObjectEnum()) << " not supported yet"); 1329 1329 } 1330 1330 … … 1374 1374 this->matice->inputs->AddInput((Input*)depth_averaged_input); 1375 1375 else 1376 _error _("object %s not supported yet",EnumToStringx(object_enum));1376 _error2_("object " << EnumToStringx(object_enum) << " not supported yet"); 1377 1377 } 1378 1378 /*}}}*/ … … 1415 1415 } 1416 1416 else{ 1417 _error _("object of type %s not supported yet",EnumToStringx(object_type));1417 _error2_("object of type " << EnumToStringx(object_type) << " not supported yet"); 1418 1418 } 1419 1419 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)); 1421 1421 base_inputs[i]->Extrude(); 1422 1422 } … … 1445 1445 } 1446 1446 else{ 1447 _error _("object of type %s not supported yet",EnumToStringx(object_type));1447 _error2_("object of type " << EnumToStringx(object_type) << " not supported yet"); 1448 1448 } 1449 1449 } … … 1464 1464 /*Make a copy of the original input: */ 1465 1465 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)); 1467 1467 1468 1468 /*Scale: */ … … 1480 1480 if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum); 1481 1481 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 still1482 //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 1483 1483 //try and output whatever we can instead of just failing. 1484 1484 if(!input)return; … … 1594 1594 /*Matice will take care of it*/ break; 1595 1595 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"); 1597 1597 } 1598 1598 } … … 1627 1627 } 1628 1628 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"); 1630 1630 } 1631 1631 } … … 1711 1711 #endif 1712 1712 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"); 1714 1714 } 1715 1715 } … … 1742 1742 for(i=0;i<numdof2d;i++){ 1743 1743 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"); 1745 1745 /*Constrain thickness to be at least 1m*/ 1746 1746 if(newthickness[i]<minthickness) newthickness[i]=minthickness; … … 1775 1775 newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH 1776 1776 } 1777 else _error _("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));1777 else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet"); 1778 1778 } 1779 1779 } … … 1812 1812 for(int i=0;i<numdof;i++){ 1813 1813 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"); 1815 1815 } 1816 1816 … … 1842 1842 values[i] =solution[doflist[i]]; 1843 1843 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"); 1845 1845 } 1846 1846 … … 1888 1888 default: 1889 1889 1890 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));1890 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 1891 1891 } 1892 1892 } … … 1894 1894 /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/ 1895 1895 void Penta::InputUpdateFromVector(int* vector, int name, int type){ 1896 _error _(" not supported yet!");1896 _error2_(" not supported yet!"); 1897 1897 } 1898 1898 /*}}}*/ 1899 1899 /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/ 1900 1900 void Penta::InputUpdateFromVector(bool* vector, int name, int type){ 1901 _error _(" not supported yet!");1901 _error2_(" not supported yet!"); 1902 1902 } 1903 1903 /*}}}*/ … … 2676 2676 void Penta::SetClone(int* minranks){ 2677 2677 2678 _error _("not implemented yet");2678 _error2_("not implemented yet"); 2679 2679 } 2680 2680 /*}}}*/ … … 2988 2988 this->inputs->AddInput(new PentaP1Input(EnthalpyEnum,nodeinputs)); 2989 2989 } 2990 else _error _("temperature and waterfraction required for the enthalpy solution");2990 else _error2_("temperature and waterfraction required for the enthalpy solution"); 2991 2991 break; 2992 2992 … … 3067 3067 /*FUNCTION Penta::SmearFunction {{{*/ 3068 3068 void Penta::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){ 3069 _error _("not implemented yet");3069 _error2_("not implemented yet"); 3070 3070 } 3071 3071 /*}}}*/ … … 3285 3285 *presponse=vel; 3286 3286 default: 3287 _error _("Response type %s not supported yet!",EnumToStringx(response_enum));3287 _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!"); 3288 3288 } 3289 3289 … … 4328 4328 4329 4329 /*Check solution*/ 4330 if(isnan(values[i])) _error _("NaN found in solution vector");4330 if(isnan(values[i])) _error2_("NaN found in solution vector"); 4331 4331 //if(values[i]<0) printf("temperature < 0°K found in solution vector\n"); 4332 4332 //if(values[i]>275) printf("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)\n"); … … 4362 4362 break; 4363 4363 default: 4364 _error _("Rheology law %s not supported yet",EnumToStringx(rheology_law));4364 _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet"); 4365 4365 4366 4366 } … … 4398 4398 4399 4399 /*Check solution*/ 4400 if(isnan(values[i])) _error _("NaN found in solution vector");4400 if(isnan(values[i])) _error2_("NaN found in solution vector"); 4401 4401 } 4402 4402 … … 4411 4411 for(i=0;i<numdof;i++){ 4412 4412 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"); 4415 4415 } 4416 4416 … … 4440 4440 break; 4441 4441 default: 4442 _error _("Rheology law %s not supported yet",EnumToStringx(rheology_law));4442 _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet"); 4443 4443 4444 4444 } … … 4468 4468 input=inputs->GetInput(enum_type); 4469 4469 } 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"); 4472 4472 4473 4473 GradientIndexing(&doflist1[0],control_index); … … 4486 4486 input=inputs->GetInput(enum_type); 4487 4487 } 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"); 4490 4490 4491 4491 ((ControlInput*)input)->ScaleGradient(scale); … … 4505 4505 input=inputs->GetInput(enum_type); 4506 4506 } 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"); 4509 4509 4510 4510 GradientIndexing(&doflist1[0],control_index); … … 4530 4530 return NULL; 4531 4531 default: 4532 _error _("Approximation %s not supported yet",EnumToStringx(approximation));4532 _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet"); 4533 4533 } 4534 4534 } … … 4720 4720 return CreatePVectorAdjointStokes(); 4721 4721 default: 4722 _error _("Approximation %s not supported yet",EnumToStringx(approximation));4722 _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet"); 4723 4723 } 4724 4724 } … … 4809 4809 break; 4810 4810 default: 4811 _error _("approximation %s not supported yet",EnumToStringx(approximation));4811 _error2_("approximation " << EnumToStringx(approximation) << " not supported yet"); 4812 4812 } 4813 4813 break; … … 4829 4829 break; 4830 4830 default: 4831 _error _("approximation %s not supported yet",EnumToStringx(approximation));4831 _error2_("approximation " << EnumToStringx(approximation) << " not supported yet"); 4832 4832 } 4833 4833 break; 4834 4834 4835 4835 default: 4836 _error _("control type %s not supported yet: ",EnumToStringx(control_type));4836 _error2_("control type " << EnumToStringx(control_type) << " not supported yet: "); 4837 4837 } 4838 4838 … … 4866 4866 break; 4867 4867 default: 4868 _error _("response %s not supported yet",EnumToStringx(responses[resp]));4868 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet"); 4869 4869 } 4870 4870 xDelete<int>(responses); … … 5120 5120 } 5121 5121 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"); 5123 5123 5124 5124 ((ControlInput*)input)->UpdateValue(scalar); … … 5163 5163 5164 5164 /*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"); 5169 5169 } 5170 5170 … … 5202 5202 5203 5203 /*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"); 5206 5206 } 5207 5207 … … 5404 5404 IssmDouble Penta::ThicknessAbsGradient(bool process_units,int weight_index){ 5405 5405 5406 _error _("Not implemented yet");5406 _error2_("Not implemented yet"); 5407 5407 } 5408 5408 /*}}}*/ … … 5419 5419 /*If on water, return 0: */ 5420 5420 if(IsOnWater())return 0; 5421 _error _("Not implemented yet");5421 _error2_("Not implemented yet"); 5422 5422 5423 5423 tria=(Tria*)SpawnTria(0,1,2); … … 5470 5470 /*Get input (either in element or material)*/ 5471 5471 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"); 5473 5473 5474 5474 /*Check that it is a ControlInput*/ 5475 5475 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"); 5477 5477 } 5478 5478 … … 5509 5509 5510 5510 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"); 5512 5512 } 5513 5513 … … 5615 5615 5616 5616 default: 5617 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));5617 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 5618 5618 } 5619 5619 … … 5622 5622 /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/ 5623 5623 void Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){ 5624 _error _(" not supported yet!");5624 _error2_(" not supported yet!"); 5625 5625 } 5626 5626 /*}}}*/ 5627 5627 /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/ 5628 5628 void Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){ 5629 _error _(" not supported yet!");5629 _error2_(" not supported yet!"); 5630 5630 } 5631 5631 /*}}}*/ … … 5670 5670 5671 5671 default: 5672 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));5672 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 5673 5673 } 5674 5674 … … 6229 6229 return CreateKMatrixDiagnosticPattynStokes(); 6230 6230 default: 6231 _error _("Approximation %s not supported yet",EnumToStringx(approximation));6231 _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet"); 6232 6232 } 6233 6233 } … … 6397 6397 matice->GetViscosity3dStokes(&newviscosity,&epsilons[0]); 6398 6398 } 6399 else _error _("approximation %i (%s) not supported yet",approximation,EnumToStringx(approximation));6399 else _error2_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet"); 6400 6400 6401 6401 D_scalar=2*newviscosity*gauss->weight*Jdet; … … 7220 7220 return CreatePVectorDiagnosticPattynStokes(); 7221 7221 default: 7222 _error _("Approximation %s not supported yet",EnumToStringx(approximation));7222 _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet"); 7223 7223 } 7224 7224 } … … 7733 7733 return NULL; 7734 7734 default: 7735 _error _("Approximation %s not supported yet",EnumToStringx(approximation));7735 _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet"); 7736 7736 } 7737 7737 } … … 8128 8128 8129 8129 /*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"); 8132 8132 } 8133 8133 … … 8226 8226 8227 8227 /*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"); 8230 8230 } 8231 8231 … … 8314 8314 8315 8315 /*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"); 8320 8320 } 8321 8321 … … 8324 8324 if (vzmacayeal_input){ 8325 8325 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())); 8327 8327 } 8328 8328 GetInputListOnVertices(&vzmacayeal[0],VzMacAyealEnum); 8329 8329 } 8330 8330 else{ 8331 _error _("Cannot update solution as VzMacAyeal is not present");8331 _error2_("Cannot update solution as VzMacAyeal is not present"); 8332 8332 } 8333 8333 … … 8393 8393 8394 8394 /*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"); 8397 8397 } 8398 8398 … … 8482 8482 8483 8483 /*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"); 8488 8488 } 8489 8489 … … 8492 8492 if (vzpattyn_input){ 8493 8493 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())); 8495 8495 } 8496 8496 GetInputListOnVertices(&vzpattyn[0],VzPattynEnum); 8497 8497 } 8498 8498 else{ 8499 _error _("Cannot update solution as VzPattyn is not present");8499 _error2_("Cannot update solution as VzPattyn is not present"); 8500 8500 } 8501 8501 … … 8558 8558 8559 8559 /*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"); 8562 8562 } 8563 8563 … … 8627 8627 8628 8628 /*Check solution*/ 8629 if(isnan(vz[i])) _error _("NaN found in solution vector");8629 if(isnan(vz[i])) _error2_("NaN found in solution vector"); 8630 8630 } 8631 8631 … … 8638 8638 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 8639 8639 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())); 8641 8641 GetInputListOnVertices(&vzstokes[0],VzStokesEnum); 8642 8642 } 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"); 8644 8644 for(i=0;i<NUMVERTICES;i++){ 8645 8645 vzpattyn[i]=vz[i]; … … 8650 8650 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 8651 8651 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())); 8653 8653 GetInputListOnVertices(&vzstokes[0],VzStokesEnum); 8654 8654 } 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"); 8656 8656 for(i=0;i<NUMVERTICES;i++){ 8657 8657 vzmacayeal[i]=vz[i]; … … 8725 8725 8726 8726 /*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"); 8731 8731 } 8732 8732 -
issm/trunk-jpl/src/c/objects/Elements/PentaRef.cpp
r12471 r12493 949 949 /*Get Determinant*/ 950 950 Matrix3x3Determinant(Jdet,&J[0][0]); 951 if(*Jdet<0) _error _("negative jacobian determinant!");951 if(*Jdet<0) _error2_("negative jacobian determinant!"); 952 952 953 953 } … … 972 972 /*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */ 973 973 *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!"); 975 975 } 976 976 /*}}}*/ … … 990 990 991 991 *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!"); 993 993 994 994 } … … 1226 1226 /*Area of a trabezoid = altitude * (base1 + base2)/2 */ 1227 1227 *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!"); 1229 1229 1230 1230 } -
issm/trunk-jpl/src/c/objects/Elements/Tria.cpp
r12471 r12493 214 214 #endif 215 215 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"); 217 217 } 218 218 … … 277 277 return CreateKMatrixPrognostic_DG(); 278 278 default: 279 _error _("Element type %s not supported yet",EnumToStringx(GetElementType()));279 _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet"); 280 280 } 281 281 … … 568 568 #endif 569 569 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"); 571 571 } 572 572 … … 587 587 return CreatePVectorPrognostic_DG(); 588 588 default: 589 _error _("Element type %s not supported yet",EnumToStringx(GetElementType()));589 _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet"); 590 590 } 591 591 } … … 763 763 #endif 764 764 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"); 766 766 } 767 767 … … 775 775 /*FUNCTION Tria::ComputeBasalStress {{{*/ 776 776 void Tria::ComputeBasalStress(Vector* eps){ 777 _error _("Not Implemented yet");777 _error2_("Not Implemented yet"); 778 778 } 779 779 /*}}}*/ 780 780 /*FUNCTION Tria::ComputeStrainRate {{{*/ 781 781 void Tria::ComputeStrainRate(Vector* eps){ 782 _error _("Not Implemented yet");782 _error2_("Not Implemented yet"); 783 783 } 784 784 /*}}}*/ … … 1019 1019 return i; 1020 1020 } 1021 _error _("Node provided not found among element nodes");1021 _error2_("Node provided not found among element nodes"); 1022 1022 } 1023 1023 /*}}}*/ … … 1031 1031 /*Recover input*/ 1032 1032 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"); 1034 1034 1035 1035 /*Checks in debugging mode*/ … … 1103 1103 1104 1104 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"); 1106 1106 1107 1107 GaussTria* gauss=new GaussTria(); … … 1145 1145 #endif 1146 1146 default: 1147 _error _("analysis: %s not supported yet",EnumToStringx(analysis_type));1147 _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet"); 1148 1148 } 1149 1149 … … 1161 1161 /*Check that both inputs have been found*/ 1162 1162 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"); 1164 1164 } 1165 1165 … … 1185 1185 /*Get input (either in element or material)*/ 1186 1186 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"); 1188 1188 1189 1189 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ … … 1232 1232 /*Make a copy of the original input: */ 1233 1233 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)); 1235 1235 1236 1236 /*ArtificialNoise: */ … … 1252 1252 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 1253 1253 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])); 1256 1256 } 1257 1257 … … 1281 1281 oldinput=(Input*)this->matice->inputs->GetInput(enum_type); 1282 1282 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)); 1285 1285 newinput=(Input*)oldinput->copy(); 1286 1286 … … 1294 1294 this->matice->inputs->AddInput((Input*)newinput); 1295 1295 else 1296 _error _("object %s not supported yet",EnumToStringx(object_enum));1296 _error2_("object " << EnumToStringx(object_enum) << " not supported yet"); 1297 1297 } 1298 1298 /*}}}*/ … … 1312 1312 /*Make a copy of the original input: */ 1313 1313 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)); 1315 1315 1316 1316 /*Scale: */ … … 1327 1327 if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type); 1328 1328 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"); 1330 1330 if(!input)return; 1331 1331 … … 1433 1433 /*Matice will take care of it*/ break; 1434 1434 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"); 1436 1436 } 1437 1437 } … … 1505 1505 break; 1506 1506 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"); 1508 1508 } 1509 1509 } … … 1523 1523 for(int i=0;i<numdof;i++){ 1524 1524 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"); 1526 1526 } 1527 1527 … … 1556 1556 for(i=0;i<numdof;i++){ 1557 1557 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"); 1559 1559 /*Constrain thickness to be at least 1m*/ 1560 1560 if(newthickness[i]<minthickness) newthickness[i]=minthickness; … … 1587 1587 newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH 1588 1588 } 1589 else _error _("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));1589 else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet"); 1590 1590 } 1591 1591 } … … 1628 1628 1629 1629 default: 1630 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));1630 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 1631 1631 } 1632 1632 } … … 1634 1634 /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/ 1635 1635 void Tria::InputUpdateFromVector(int* vector, int name, int type){ 1636 _error _(" not supported yet!");1636 _error2_(" not supported yet!"); 1637 1637 } 1638 1638 /*}}}*/ 1639 1639 /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/ 1640 1640 void Tria::InputUpdateFromVector(bool* vector, int name, int type){ 1641 _error _(" not supported yet!");1641 _error2_(" not supported yet!"); 1642 1642 } 1643 1643 /*}}}*/ … … 1657 1657 this->inputs->AddInput(new DoubleInput(name,(int)scalar)); 1658 1658 } 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); 1660 1660 1661 1661 } … … 1722 1722 this->inputs->AddInput(transientinput); 1723 1723 } 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"); 1725 1725 } 1726 1726 else if(vector_type==2){ //element vector … … 1739 1739 this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index])); 1740 1740 } 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); 1742 1742 } 1743 1743 else { 1744 _error _("transient elementary inputs not supported yet!");1744 _error2_("transient elementary inputs not supported yet!"); 1745 1745 } 1746 1746 } 1747 1747 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)"); 1749 1749 } 1750 1750 … … 2360 2360 void Tria::SetClone(int* minranks){ 2361 2361 2362 _error _("not implemented yet");2362 _error2_("not implemented yet"); 2363 2363 } 2364 2364 /*}}}*/ 2365 2365 /*FUNCTION Tria::SmearFunction {{{*/ 2366 2366 void Tria::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){ 2367 _error _("not implemented yet");2367 _error2_("not implemented yet"); 2368 2368 2369 2369 } … … 2458 2458 this->MaxAbsVy(&maxabsvy,false); 2459 2459 #else 2460 _error _("ISSM was not compiled with responses compiled in, exiting!");2460 _error2_("ISSM was not compiled with responses compiled in, exiting!"); 2461 2461 #endif 2462 2462 … … 2651 2651 2652 2652 /*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); 2654 2654 2655 2655 /*Recover segment node locations: */ … … 2870 2870 *presponse=vel; 2871 2871 default: 2872 _error _("Response type %s not supported yet!",EnumToStringx(response_enum));2872 _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!"); 2873 2873 } 2874 2874 … … 3325 3325 3326 3326 /*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"); 3329 3329 } 3330 3330 … … 3385 3385 3386 3386 /*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"); 3389 3389 } 3390 3390 … … 3441 3441 3442 3442 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"); 3444 3444 } 3445 3445 … … 3466 3466 input=inputs->GetInput(enum_type); 3467 3467 } 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"); 3470 3470 3471 3471 GradientIndexing(&doflist1[0],control_index); … … 3484 3484 input=inputs->GetInput(enum_type); 3485 3485 } 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"); 3488 3488 3489 3489 ((ControlInput*)input)->ScaleGradient(scale); … … 3503 3503 input=inputs->GetInput(enum_type); 3504 3504 } 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"); 3507 3507 3508 3508 GradientIndexing(&doflist1[0],control_index); … … 3538 3538 break; 3539 3539 default: 3540 _error _("%s%i","control type not supported yet: ",control_type);3540 _error2_("" << "control type not supported yet: " << control_type); 3541 3541 } 3542 3542 … … 3566 3566 break; 3567 3567 default: 3568 _error _("response %s not supported yet",EnumToStringx(responses[resp]));3568 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet"); 3569 3569 } 3570 3570 … … 4422 4422 break; 4423 4423 default: 4424 _error _("response %s not supported yet",EnumToStringx(responses[resp]));4424 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet"); 4425 4425 } 4426 4426 } … … 4600 4600 break; 4601 4601 default: 4602 _error _("response %s not supported yet",EnumToStringx(responses[resp]));4602 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet"); 4603 4603 } 4604 4604 } … … 4777 4777 break; 4778 4778 default: 4779 _error _("response %s not supported yet",EnumToStringx(responses[resp]));4779 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet"); 4780 4780 } 4781 4781 } … … 4846 4846 break; 4847 4847 default: 4848 _error _("Element type %s not supported yet",EnumToStringx(GetElementType()));4848 _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet"); 4849 4849 } 4850 4850 … … 4947 4947 4948 4948 /*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"); 4951 4951 } 4952 4952 … … 4978 4978 for(i=0;i<numdof;i++){ 4979 4979 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"); 4981 4981 } 4982 4982 … … 5010 5010 /*Check that it is a ControlInput*/ 5011 5011 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"); 5013 5013 } 5014 5014 … … 5044 5044 5045 5045 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"); 5047 5047 } 5048 5048 … … 5314 5314 for(i=0;i<numdof;i++){ 5315 5315 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"); 5317 5317 if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values 5318 5318 … … 5426 5426 5427 5427 default: 5428 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));5428 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 5429 5429 } 5430 5430 … … 5433 5433 /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/ 5434 5434 void Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){ 5435 _error _(" not supported yet!");5435 _error2_(" not supported yet!"); 5436 5436 } 5437 5437 /*}}}*/ 5438 5438 /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/ 5439 5439 void Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){ 5440 _error _(" not supported yet!");5440 _error2_(" not supported yet!"); 5441 5441 } 5442 5442 /*}}}*/ … … 5480 5480 5481 5481 default: 5482 _error _("type %i (%s) not implemented yet",type,EnumToStringx(type));5482 _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 5483 5483 } 5484 5484 … … 5497 5497 return CreateKMatrixBalancethickness_DG(); 5498 5498 default: 5499 _error _("Element type %s not supported yet",EnumToStringx(GetElementType()));5499 _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet"); 5500 5500 } 5501 5501 … … 5676 5676 return CreatePVectorBalancethickness_DG(); 5677 5677 default: 5678 _error _("Element type %s not supported yet",EnumToStringx(GetElementType()));5678 _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet"); 5679 5679 } 5680 5680 } -
issm/trunk-jpl/src/c/objects/Elements/TriaRef.cpp
r12471 r12493 338 338 339 339 *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!"); 341 341 342 342 } … … 353 353 /*Get Determinant*/ 354 354 Matrix2x2Determinant(Jdet,&J[0][0]); 355 if(*Jdet<0) _error _("negative jacobian determinant!");355 if(*Jdet<0) _error2_("negative jacobian determinant!"); 356 356 357 357 } … … 375 375 376 376 *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!"); 378 378 379 379 } -
issm/trunk-jpl/src/c/objects/FemModel.cpp
r12457 r12493 129 129 } 130 130 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"); 132 132 133 133 /*Now, plug analysis_counter and analysis_type inside the parameters: */ -
issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp
r12455 r12493 121 121 } 122 122 else{ 123 _error _("Penta not supported yet");123 _error2_("Penta not supported yet"); 124 124 } 125 125 … … 161 161 } 162 162 else{ 163 _error _("Tria not supported yet");163 _error2_("Tria not supported yet"); 164 164 } 165 165 … … 223 223 } 224 224 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 << ")"); 226 226 } 227 227 … … 342 342 break; 343 343 default: 344 _error _("vertex index should be in [0 5]");344 _error2_("vertex index should be in [0 5]"); 345 345 346 346 } … … 361 361 } 362 362 else{ 363 _error _("Tria not supported yet");363 _error2_("Tria not supported yet"); 364 364 } 365 365 -
issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
r12481 r12493 82 82 } 83 83 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 << ")"); 85 85 86 86 /*Initialize static fields as undefined*/ … … 180 180 } 181 181 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 << ")"); 183 183 184 184 } … … 243 243 break; 244 244 default: 245 _error _("vertex index should be in [0 2]");245 _error2_("vertex index should be in [0 2]"); 246 246 247 247 } -
issm/trunk-jpl/src/c/objects/Hook.cpp
r12457 r12493 185 185 this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on. 186 186 /*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!"); 188 188 } 189 189 } … … 194 194 195 195 /*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"); 197 197 198 198 /*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"); 200 200 201 201 return *objects; … … 246 246 247 247 /*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"); 249 249 250 250 /*go pickup the correct objects, ids and offsets :*/ 251 251 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!"); 253 253 254 254 output->objects=xNew<Object*>(output->num); -
issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
r12426 r12493 112 112 /*}}}*/ 113 113 /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/ 114 void BoolInput::GetInputValue(int* pvalue){_error _(" not supported yet!");}114 void BoolInput::GetInputValue(int* pvalue){_error2_(" not supported yet!");} 115 115 /*}}}*/ 116 116 /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/ 117 void BoolInput::GetInputValue(IssmPDouble* pvalue){_error _(" not supported yet!");}117 void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_(" not supported yet!");} 118 118 /*}}}*/ 119 119 /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/ 120 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error _(" not supported yet!");}120 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");} 121 121 /*}}}*/ 122 122 /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/ 123 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error _(" not supported yet!");}123 void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");} 124 124 /*}}}*/ 125 125 /*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!");}126 void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");} 127 127 /*}}}*/ 128 128 /*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!");}129 void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");} 130 130 /*}}}*/ 131 131 /*FUNCTION BoolInput::ChangeEnum{{{*/ … … 161 161 162 162 default: 163 _error _("not implemented yet");163 _error2_("not implemented yet"); 164 164 } 165 165 … … 184 184 void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){ 185 185 186 _error _(" not supporte yet!");186 _error2_(" not supporte yet!"); 187 187 188 188 } … … 191 191 void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){ 192 192 193 _error _(" not supported yet!");193 _error2_(" not supported yet!"); 194 194 195 195 } -
issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
r12426 r12493 48 48 break; 49 49 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"); 51 51 } 52 52 gradient =NULL; … … 152 152 /*FUNCTION ControlInput::ScaleGradient{{{*/ 153 153 void 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"); 155 155 gradient->Scale(scaling_factor); 156 156 }/*}}}*/ … … 170 170 break; 171 171 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."); 173 173 } 174 174 … … 221 221 } 222 222 else{ 223 _error _("Data %s not supported yet",data);223 _error2_("Data " << data << " not supported yet"); 224 224 } 225 225 }/*}}}*/ … … 258 258 /*FUNCTION ControlInput::SaveValue{{{*/ 259 259 void 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"); 261 261 262 262 if(savedvalues) delete this->savedvalues; … … 265 265 /*FUNCTION ControlInput::UpdateValue{{{*/ 266 266 void 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"); 269 269 270 270 if(values) delete this->values; -
issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
r12426 r12493 115 115 116 116 /*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() << ")"); 118 118 Input* input=(Input*)this->inputs->GetObjectByOffset(index); 119 119 -
issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
r12426 r12493 108 108 /*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/ 109 109 void 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"); 111 111 112 112 } … … 114 114 /*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/ 115 115 void 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"); 117 117 118 118 } … … 132 132 /*}}}*/ 133 133 /*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!");}134 void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");} 135 135 /*}}}*/ 136 136 /*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!");}137 void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");} 138 138 /*}}}*/ 139 139 /*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/ … … 217 217 218 218 default: 219 _error _("not implemented yet");219 _error2_("not implemented yet"); 220 220 } 221 221 … … 253 253 void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){ 254 254 255 _error _(" not supporte yet!");255 _error2_(" not supporte yet!"); 256 256 257 257 } … … 260 260 void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){ 261 261 262 _error _(" not supported yet!");262 _error2_(" not supported yet!"); 263 263 264 264 } … … 276 276 277 277 /*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()) << ")"); 279 279 280 280 /*vertically integrate depending on type:*/ … … 287 287 288 288 default: 289 _error _("not implemented yet");289 _error2_("not implemented yet"); 290 290 } 291 291 } -
issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp
r12426 r12493 99 99 ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){ 100 100 101 _error _(" not supported yet!");101 _error2_(" not supported yet!"); 102 102 103 103 } … … 106 106 /*Object functions*/ 107 107 /*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/ 108 void IntInput::GetInputValue(bool* pvalue){_error _(" not supported yet!");}108 void IntInput::GetInputValue(bool* pvalue){_error2_(" not supported yet!");} 109 109 /*}}}*/ 110 110 /*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/ … … 115 115 /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue){{{*/ 116 116 void IntInput::GetInputValue(IssmPDouble* pvalue){ 117 _error _("IntInput cannot return a IssmPDouble in parallel");117 _error2_("IntInput cannot return a IssmPDouble in parallel"); 118 118 } 119 119 /*}}}*/ 120 120 /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/ 121 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error _(" not supported yet!");}121 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");} 122 122 /*}}}*/ 123 123 /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/ 124 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error _(" not supported yet!");}124 void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");} 125 125 /*}}}*/ 126 126 /*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!");}127 void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");} 128 128 /*}}}*/ 129 129 /*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!");}130 void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");} 131 131 /*}}}*/ 132 132 /*FUNCTION IntInput::ChangeEnum{{{*/ … … 166 166 167 167 default: 168 _error _("not implemented yet");168 _error2_("not implemented yet"); 169 169 } 170 170 … … 182 182 void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){ 183 183 184 _error _(" not supporte yet!");184 _error2_(" not supporte yet!"); 185 185 186 186 } … … 189 189 void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){ 190 190 191 _error _(" not supported yet!");191 _error2_(" not supported yet!"); 192 192 193 193 } -
issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
r12426 r12493 455 455 case ControlInputEnum:{ 456 456 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"); 458 458 PentaP1Input* cast_input=(PentaP1Input*)cont_input->values; 459 459 for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);} 460 460 return; 461 461 default: 462 _error _("not implemented yet");462 _error2_("not implemented yet"); 463 463 } 464 464 … … 495 495 496 496 /*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()) << ")"); 498 498 499 499 /*Get Thickness value pointer*/ … … 511 511 512 512 default: 513 _error _("not implemented yet");513 _error2_("not implemented yet"); 514 514 } 515 515 } … … 529 529 530 530 /*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())); 532 532 xinputB=(PentaP1Input*)inputB; 533 533 … … 560 560 561 561 /*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())); 563 563 xinputB=(PentaP1Input*)inputB; 564 564 … … 591 591 592 592 /*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())); 594 594 xinputB=(PentaP1Input*)inputB; 595 595 -
issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
r12455 r12493 446 446 } 447 447 } 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!"); 449 449 450 450 /*Assign output pointer*/ -
issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
r12426 r12493 323 323 324 324 default : 325 _error _("not implemented yet");325 _error2_("not implemented yet"); 326 326 } 327 327 … … 368 368 369 369 /*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())); 371 371 xinputB=(TriaP1Input*)inputB; 372 372 … … 399 399 400 400 /*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())); 402 402 xinputB=(TriaP1Input*)inputB; 403 403 -
issm/trunk-jpl/src/c/objects/IoModel.cpp
r12457 r12493 110 110 /*Get first Enum*/ 111 111 if(fread(&record_enum,sizeof(int),1,this->fid)==0){ 112 _error _("Marshalled file is empty");112 _error2_("Marshalled file is empty"); 113 113 } 114 114 else{ … … 128 128 printf("=========================================================================\n"); 129 129 printf("\n"); 130 _error _("Enums not consistent (See error message above)");130 _error2_("Enums not consistent (See error message above)"); 131 131 } 132 132 } … … 177 177 /*Find constant*/ 178 178 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"); 180 180 181 181 return (Param*)param->copy(); … … 266 266 case 1: 267 267 /*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 "); 269 269 #ifdef _HAVE_MPI_ 270 270 MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); … … 277 277 case 2: 278 278 /*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 "); 280 280 #ifdef _HAVE_MPI_ 281 281 MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); … … 288 288 case 3: 289 289 /*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 "); 291 291 #ifdef _HAVE_MPI_ 292 292 MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); … … 299 299 case 4: 300 300 /*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 "); 302 302 #ifdef _HAVE_MPI_ 303 303 MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); … … 309 309 310 310 /*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 "); 312 312 #ifdef _HAVE_MPI_ 313 313 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); … … 360 360 361 361 default: 362 _error _("%s%i","unknown record type:",record_code);362 _error2_("" << "unknown record type:" << record_code); 363 363 break;; 364 364 } … … 428 428 429 429 default: 430 _error _("%s%i","unknown record type:",record_code);430 _error2_("" << "unknown record type:" << record_code); 431 431 break;; 432 432 } … … 453 453 fid=this->SetFilePointerToData(&code,NULL,data_enum); 454 454 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)); 456 456 457 457 /*We have to read a boolean from disk. */ 458 458 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 "); 460 460 } 461 461 #ifdef _HAVE_MPI_ … … 483 483 fid=this->SetFilePointerToData(&code,NULL,data_enum); 484 484 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)); 486 486 487 487 /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */ 488 488 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 "); 490 490 } 491 491 … … 514 514 fid=this->SetFilePointerToData(&code,NULL,data_enum); 515 515 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)); 517 517 518 518 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ 519 519 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 "); 521 521 } 522 522 #ifdef _HAVE_MPI_ … … 544 544 fid=this->SetFilePointerToData(&code,NULL,data_enum); 545 545 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)); 547 547 548 548 /*Now fetch: */ … … 550 550 /*We have to read a string from disk. First read the dimensions of the string, then the string: */ 551 551 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 "); 553 553 } 554 554 … … 564 564 /*Read string on node 0, then broadcast: */ 565 565 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 "); 567 567 } 568 568 #ifdef _HAVE_MPI_ … … 598 598 fid=this->SetFilePointerToData(&code,&vector_type,data_enum); 599 599 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)); 601 601 602 602 /*Now fetch: */ … … 605 605 /*numberofelements: */ 606 606 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 "); 608 608 } 609 609 … … 613 613 614 614 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 "); 616 616 } 617 617 #ifdef _HAVE_MPI_ … … 625 625 /*Read matrix on node 0, then broadcast: */ 626 626 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 "); 628 628 } 629 629 … … 669 669 /*Set file pointer to beginning of the data: */ 670 670 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)); 672 672 673 673 /*Now fetch: */ … … 676 676 /*numberofelements: */ 677 677 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 "); 679 679 } 680 680 #ifdef _HAVE_MPI_ … … 683 683 684 684 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 "); 686 686 } 687 687 #ifdef _HAVE_MPI_ … … 695 695 /*Read matrix on node 0, then broadcast: */ 696 696 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 "); 698 698 } 699 699 #ifdef _HAVE_MPI_ … … 728 728 fid=this->SetFilePointerToData(&code,NULL,data_enum); 729 729 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)); 731 731 732 732 /*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */ 733 733 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"); 735 735 } 736 736 #ifdef _HAVE_MPI_ … … 747 747 748 748 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 "); 750 750 } 751 751 #ifdef _HAVE_MPI_ … … 758 758 /*Read string on node 0, then broadcast: */ 759 759 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 "); 761 761 } 762 762 #ifdef _HAVE_MPI_ … … 799 799 /*Set file pointer to beginning of the data: */ 800 800 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)); 802 802 803 803 /*Now fetch: */ 804 804 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 "); 806 806 } 807 807 #ifdef _HAVE_MPI_ … … 826 826 827 827 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"); 829 829 } 830 830 #ifdef _HAVE_MPI_ … … 833 833 834 834 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"); 836 836 } 837 837 #ifdef _HAVE_MPI_ … … 845 845 /*Read matrix on node 0, then broadcast: */ 846 846 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 "); 848 848 } 849 849 … … 908 908 } 909 909 default: 910 _error _("Option of format %i not supported yet",code);910 _error2_("Option of format " << code << " not supported yet"); 911 911 } 912 912 … … 937 937 _assert_(dataenum<MaximumNumberOfEnums); 938 938 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)"); 940 940 } 941 941 #endif … … 1137 1137 break; /*}}}*/ 1138 1138 default: /*{{{*/ 1139 _error _("%s%i%s","data code ",code," not supported yet!");1139 _error2_("" << "data code " << code << " not supported yet!"); 1140 1140 break; 1141 1141 /*}}}*/ … … 1228 1228 #ifdef _HAVE_MPI_ 1229 1229 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) << " "); 1231 1231 #endif 1232 1232 -
issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
r12365 r12493 138 138 } 139 139 /*}}}*/ 140 141 140 /*FUNCTION KMLFileTokenComment(FILE* fid) {{{*/ 142 141 char* KMLFileTokenComment(FILE* fid){ … … 203 202 } 204 203 /*}}}*/ 205 206 204 /*FUNCTION KMLFileTokenBuffer {{{*/ 207 205 void KMLFileTokenBuffer(char** pbuffer,int* pibuf,int* pbuflen, … … 228 226 } 229 227 /*}}}*/ 230 231 228 /*FUNCTION KMLFileTagName {{{*/ 232 229 char* KMLFileTagName(char* pname, … … 237 234 } 238 235 /*}}}*/ 239 240 236 /*FUNCTION KMLFileTagName {{{*/ 241 237 char* KMLFileTagName(char* pname,int *m,int maxlen, … … 248 244 249 245 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"); 251 247 252 248 /* strtok modifies ktag, so work on copy */ … … 283 279 } 284 280 /*}}}*/ 285 286 281 /*FUNCTION KMLFileTagAttrib {{{*/ 287 282 int KMLFileTagAttrib(KML_Object* kobj, … … 333 328 } 334 329 /*}}}*/ 335 336 330 /*FUNCTION KMLFileTokenParse {{{*/ 337 331 int KMLFileTokenParse(int* pival, … … 346 340 NULL,NULL)) || 347 341 (kstr[0] == '<')) 348 _error _("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);342 _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n"); 349 343 350 344 sscanf(kstr,"%d",pival); … … 359 353 (kstr[1] != '/') || 360 354 (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");} 362 356 else 363 357 xfree((void**)&kstr); … … 368 362 } 369 363 /*}}}*/ 370 371 364 /*FUNCTION KMLFileTokenParse {{{*/ 372 int KMLFileTokenParse(bool* pbval, 373 char* ktag, 374 FILE* fid){ 365 int KMLFileTokenParse(bool* pbval, char* ktag, FILE* fid){ 375 366 376 367 int ival; … … 382 373 NULL,NULL)) || 383 374 (kstr[0] == '<')) 384 _error_("KMLFileTokenParse -- Missing bool field for %s.\n",ktag);375 {_error2_("KMLFileTokenParse -- Missing bool field for " << ktag << ".\n");} 385 376 386 377 sscanf(kstr,"%d",&ival); … … 396 387 (kstr[1] != '/') || 397 388 (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");} 399 390 else 400 391 xfree((void**)&kstr); … … 405 396 } 406 397 /*}}}*/ 407 408 398 /*FUNCTION KMLFileTokenParse {{{*/ 409 399 char* KMLFileTokenParse(char* pstr, … … 416 406 } 417 407 /*}}}*/ 418 419 408 /*FUNCTION KMLFileTokenParse {{{*/ 420 409 char* KMLFileTokenParse(char* pstr,int *m,int maxlen, … … 429 418 NULL,NULL)) || 430 419 (kstr[0] == '<')) 431 _error _("KMLFileTokenParse -- Missing string field for %s.\n",ktag);420 _error2_("KMLFileTokenParse -- Missing string field for " << ktag << ".\n"); 432 421 433 422 if (!pstr) { … … 459 448 (kstr[1] != '/') || 460 449 (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");} 462 451 else 463 452 xfree((void**)&kstr); … … 468 457 } 469 458 /*}}}*/ 470 471 459 /*FUNCTION KMLFileTokenParse {{{*/ 472 460 int KMLFileTokenParse(float* pfval, … … 481 469 NULL,NULL)) || 482 470 (kstr[0] == '<')) 483 _error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);471 {_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");} 484 472 485 473 sscanf(kstr,"%g",pfval); … … 494 482 (kstr[1] != '/') || 495 483 (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");} 497 485 else 498 486 xfree((void**)&kstr); … … 503 491 } 504 492 /*}}}*/ 505 506 493 /*FUNCTION KMLFileTokenParse {{{*/ 507 494 int KMLFileTokenParse(double* pdval, … … 516 503 NULL,NULL)) || 517 504 (kstr[0] == '<')) 518 _error _("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);505 _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n"); 519 506 520 507 sscanf(kstr,"%lg",pdval); … … 529 516 (kstr[1] != '/') || 530 517 (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");} 532 519 else 533 520 xfree((void**)&kstr); … … 538 525 } 539 526 /*}}}*/ 540 541 527 /*FUNCTION KMLFileTokenParse {{{*/ 542 528 int KMLFileTokenParse(double **pdval,int* m,int maxlen, … … 554 540 NULL,NULL)) || 555 541 (kstr[0] == '<')) 556 _error _("KMLFileTokenParse -- Missing double [m] field for %s.\n",ktag);542 _error2_("KMLFileTokenParse -- Missing double [m] field for " << ktag << ".\n"); 557 543 558 544 if (!*pdval) … … 568 554 i++; 569 555 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"); 571 557 sscanf(ktok,"%lg",&((*pdval)[i])); 572 558 ktok=strtok(NULL,delim); … … 588 574 (kstr[1] != '/') || 589 575 (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");} 591 577 else 592 578 xfree((void**)&kstr); … … 599 585 } 600 586 /*}}}*/ 601 602 587 /*FUNCTION KMLFileTokenParse {{{*/ 603 588 int KMLFileTokenParse(double (**pdval3)[3],int* m,int maxlen, … … 615 600 NULL,NULL)) || 616 601 (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"); 618 603 619 604 if (!*pdval3) … … 632 617 j=0; 633 618 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"); 635 620 } 636 621 sscanf(ktok,"%lg",&((*pdval3)[i][j])); … … 656 641 (kstr[1] != '/') || 657 642 (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");} 659 644 else 660 645 xfree((void**)&kstr); … … 667 652 } 668 653 /*}}}*/ 669 670 654 /*FUNCTION KMLFileTagSkip {{{*/ 671 655 int KMLFileTagSkip(char* ktag, … … 704 688 else if ((kstr[0] == '<') && 705 689 (kstr[1] == '/')) { 706 _error _("KMLFileTagSkip -- Unexpected closing tag %s.\n",kstr);690 _error2_("KMLFileTagSkip -- Unexpected closing tag " << kstr << ".\n"); 707 691 } 708 692 … … 710 694 } 711 695 712 _error _("KMLFileTokenParse -- Corresponding closing tag for %s not found.\n",ktag);696 _error2_("KMLFileTokenParse -- Corresponding closing tag for " << ktag << " not found.\n"); 713 697 714 698 return(0); 715 699 } 716 700 /*}}}*/ 717 -
issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
r12365 r12493 95 95 return; 96 96 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);} 98 98 else if (strncmp(kstr,"<",1)) 99 _error_("KML_ColorStyle::Read -- Unexpected field \"%s\".\n",kstr);99 {_error2_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");} 100 100 101 101 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); 105 103 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); 109 105 110 106 else if (!strncmp(kstr,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp
r12365 r12493 120 120 } 121 121 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 );} 123 123 else if (strncmp(kstr,"<",1)) 124 _error_("KML_Container::Read -- Unexpected field \"%s\".\n",kstr);124 {_error2_("KML_Container::Read -- Unexpected field \"" << kstr << "\"");} 125 125 126 126 else if (!strncmp(kstr,"<Placemark",10)) { -
issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp
r12365 r12493 110 110 } 111 111 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");} 113 113 else if (strncmp(kstri,"<",1)) 114 _error_("KML_Document::Read -- Unexpected field \"%s\".\n",kstri);114 {_error2_("KML_Document::Read -- Unexpected field \"" << kstri << "\".\n");} 115 115 116 116 else if (!strncmp(kstri,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp
r12365 r12493 153 153 return; 154 154 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);} 156 156 else if (strncmp(kstr,"<",1)) 157 _error_("KML_Feature::Read -- Unexpected field \"%s\".\n",kstr);157 {_error2_("KML_Feature::Read -- Unexpected field \"" << kstr << "\"");} 158 158 159 159 else if (!strncmp(kstr,"<Style", 6)) { … … 164 164 165 165 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); 169 167 else if (!strcmp(kstr,"<visibility>")) 170 KMLFileTokenParse(&visibility, 171 kstr, 172 fid); 168 KMLFileTokenParse(&visibility, kstr, fid); 173 169 else if (!strcmp(kstr,"<open>")) 174 KMLFileTokenParse(&open , 175 kstr, 176 fid); 170 KMLFileTokenParse(&open , kstr, fid); 177 171 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); 181 173 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); 185 175 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); 189 177 190 178 else if (!strncmp(kstr,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_File.cpp
r12365 r12493 107 107 } 108 108 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 << ".");} 110 110 else if (strncmp(kstri,"<",1)) 111 _error_("KML_File::Read -- Unexpected field \"%s\".\n",kstri);111 {_error2_("KML_File::Read -- Unexpected field \"" << kstri << "\"");} 112 112 113 113 else if (!strncmp(kstri,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp
r12365 r12493 110 110 } 111 111 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");} 113 113 else if (strncmp(kstri,"<",1)) 114 _error_("KML_Folder::Read -- Unexpected field \"%s\".\n",kstri);114 {_error2_("KML_Folder::Read -- Unexpected field \"" << kstri << "\".\n");} 115 115 116 116 else if (!strncmp(kstri,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_Geometry.cpp
r12365 r12493 82 82 return; 83 83 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");} 85 85 else if (strncmp(kstr,"<",1)) 86 _error_("KML_Geometry::Read -- Unexpected field \"%s\".\n",kstr);86 {_error2_("KML_Geometry::Read -- Unexpected field \"" << kstr << "\".\n");} 87 87 88 88 else if (!strncmp(kstr,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp
r12365 r12493 142 142 } 143 143 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");} 145 145 else if (strncmp(kstri,"<",1)) 146 _error_("KML_GroundOverlay::Read -- Unexpected field \"%s\".\n",kstri);146 {_error2_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");} 147 147 148 148 else if (!strcmp(kstri,"<altitude>")) -
issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp
r12365 r12493 149 149 } 150 150 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");} 152 152 else if (strncmp(kstri,"<",1)) 153 _error_("KML_Icon::Read -- Unexpected field \"%s\".\n",kstri);153 {_error2_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");} 154 154 155 155 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); 159 157 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); 163 159 else if (!strcmp(kstri,"<refreshInterval>")) 164 KMLFileTokenParse(&refint , 165 kstri, 166 fid); 160 KMLFileTokenParse(&refint , kstri, fid); 167 161 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); 171 163 else if (!strcmp(kstri,"<viewRefreshTime>")) 172 KMLFileTokenParse(&vreftime , 173 kstri, 174 fid); 164 KMLFileTokenParse(&vreftime , kstri, fid); 175 165 else if (!strcmp(kstri,"<viewBoundScale>")) 176 KMLFileTokenParse(&vboundsc , 177 kstri, 178 fid); 166 KMLFileTokenParse(&vboundsc , kstri, fid); 179 167 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); 183 169 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); 187 171 188 172 else if (!strncmp(kstri,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp
r12365 r12493 132 132 } 133 133 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");} 135 135 else if (strncmp(kstri,"<",1)) 136 _error_("KML_LatLonBox::Read -- Unexpected field \"%s\".\n",kstri);136 {_error2_("KML_LatLonBox::Read -- Unexpected field \"" << kstri << "\".\n");} 137 137 138 138 else if (!strcmp(kstri,"<north>")) -
issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp
r12442 r12493 141 141 } 142 142 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");} 144 144 else if (strncmp(kstri,"<",1)) 145 _error_("KML_LineString::Read -- Unexpected field \"%s\".\n",kstri);145 {_error2_("KML_LineString::Read -- Unexpected field \"" << kstri << "\".\n");} 146 146 147 147 else if (!strcmp(kstri,"<extrude>")) -
issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
r12365 r12493 50 50 } 51 51 /*}}}*/ 52 53 52 /*FUNCTION KML_LineStyle::DeepEcho {{{*/ 54 53 void KML_LineStyle::DeepEcho(){ … … 61 60 } 62 61 /*}}}*/ 63 64 62 /*FUNCTION KML_LineStyle::DeepEcho {{{*/ 65 63 void KML_LineStyle::DeepEcho(const char* indent){ … … 76 74 } 77 75 /*}}}*/ 78 79 76 /*FUNCTION KML_LineStyle::Write {{{*/ 80 77 void KML_LineStyle::Write(FILE* filout,const char* indent){ … … 94 91 } 95 92 /*}}}*/ 96 97 93 /*FUNCTION KML_LineStyle::Read {{{*/ 98 94 void KML_LineStyle::Read(FILE* fid,char* kstr){ … … 117 113 } 118 114 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");} 120 116 else if (strncmp(kstri,"<",1)) 121 _error_("KML_LineStyle::Read -- Unexpected field \"%s\".\n",kstri);117 {_error2_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");} 122 118 123 119 else if (!strcmp(kstri,"<width>")) -
issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
r12442 r12493 139 139 } 140 140 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");} 142 142 else if (strncmp(kstri,"<",1)) 143 _error_("KML_LinearRing::Read -- Unexpected field \"%s\".\n",kstri);143 {_error2_("KML_LinearRing::Read -- Unexpected field \"" << kstri << "\".\n");} 144 144 145 145 else if (!strcmp(kstri,"<extrude>")) -
issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
r12365 r12493 144 144 } 145 145 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");} 147 147 else if (strncmp(kstri,"<",1)) 148 _error_("KML_MultiGeometry::Read -- Unexpected field \"%s\".\n",kstri);148 {_error2_("KML_MultiGeometry::Read -- Unexpected field \"" << kstri << "\".\n");} 149 149 150 150 else if (!strncmp(kstri,"<Point", 6)) { -
issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp
r12365 r12493 146 146 return; 147 147 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");} 149 149 else if (strncmp(kstr,"<",1)) 150 _error_("KML_Object::Read -- Unexpected field \"%s\".\n",kstr);150 {_error2_("KML_Object::Read -- Unexpected field \"" << kstr << "\".\n");} 151 151 152 152 else if (!strncmp(kstr,"<Placemark",10)) { -
issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
r12365 r12493 123 123 } 124 124 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");} 126 126 else if (strncmp(kstr,"<",1)) 127 _error_("KML_Overlay::Read -- Unexpected field \"%s\".\n",kstr);127 {_error2_("KML_Overlay::Read -- Unexpected field \"" << kstr << "\".\n");} 128 128 129 129 else if (!strcmp(kstr,"<color>")) -
issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
r12365 r12493 140 140 } 141 141 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");} 143 143 else if (strncmp(kstri,"<",1)) 144 _error_("KML_Placemark::Read -- Unexpected field \"%s\".\n",kstri);144 {_error2_("KML_Placemark::Read -- Unexpected field \"" << kstri << "\".\n");} 145 145 146 146 else if (!strncmp(kstri,"<Point", 6)) { -
issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp
r12365 r12493 126 126 } 127 127 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");} 129 129 else if (strncmp(kstri,"<",1)) 130 _error_("KML_Point::Read -- Unexpected field \"%s\".\n",kstri);130 {_error2_("KML_Point::Read -- Unexpected field \"" << kstri << "\".\n");} 131 131 132 132 else if (!strcmp(kstri,"<extrude>")) 133 KMLFileTokenParse(&extrude , 134 kstri, 135 fid); 133 KMLFileTokenParse(&extrude , kstri, fid); 136 134 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); 140 136 else if (!strcmp(kstri,"<coordinates>")) 141 KMLFileTokenParse(&pcoords ,NULL,3, 142 kstri, 143 fid); 137 KMLFileTokenParse(&pcoords ,NULL,3, kstri, fid); 144 138 145 139 else if (!strncmp(kstri,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
r12365 r12493 121 121 } 122 122 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");} 124 124 else if (strncmp(kstri,"<",1)) 125 _error_("KML_PolyStyle::Read -- Unexpected field \"%s\".\n",kstri);125 {_error2_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");} 126 126 127 127 else if (!strcmp(kstri,"<fill>")) -
issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
r12365 r12493 179 179 } 180 180 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");} 182 182 else if (strncmp(kstri,"<",1)) 183 _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstri);183 {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstri << "\".\n");} 184 184 185 185 else if (!strcmp(kstri,"<extrude>")) … … 207 207 } 208 208 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");} 210 210 else if (strncmp(kstrj,"<",1)) 211 _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);211 {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");} 212 212 213 213 else if (!strncmp(kstrj,"<LinearRing",11)) { … … 234 234 } 235 235 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");} 237 237 else if (strncmp(kstrj,"<",1)) 238 _error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);238 {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");} 239 239 240 240 else if (!strncmp(kstrj,"<LinearRing",11)) { -
issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp
r12365 r12493 197 197 } 198 198 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");} 200 200 else if (strncmp(kstri,"<",1)) 201 _error_("KML_Style::Read -- Unexpected field \"%s\".\n",kstri);201 {_error2_("KML_Style::Read -- Unexpected field \"" << kstri << "\".\n");} 202 202 203 203 // else if (!strncmp(kstri,"<IconStyle",10)) { -
issm/trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp
r12365 r12493 82 82 return; 83 83 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");} 85 85 else if (strncmp(kstr,"<",1)) 86 _error_("KML_StyleSelector::Read -- Unexpected field \"%s\".\n",kstr);86 {_error2_("KML_StyleSelector::Read -- Unexpected field \"" << kstr << "\".\n");} 87 87 88 88 else if (!strncmp(kstr,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp
r12365 r12493 82 82 return; 83 83 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");} 85 85 else if (strncmp(kstr,"<",1)) 86 _error_("KML_SubStyle::Read -- Unexpected field \"%s\".\n",kstr);86 {_error2_("KML_SubStyle::Read -- Unexpected field \"" << kstr << "\".\n");} 87 87 88 88 else if (!strncmp(kstr,"<",1)) -
issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
r12365 r12493 159 159 } 160 160 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");} 162 162 163 163 else if (strncmp(kstri,"<",1)) { -
issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
r12367 r12493 39 39 40 40 /*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)"); 42 42 } 43 43 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
r12367 r12493 39 39 40 40 /*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)"); 42 42 } 43 43 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
r12365 r12493 39 39 40 40 /*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"); 43 43 } 44 44 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
r12455 r12493 1 1 #include "../objects.h" 2 2 3 /*DOCUMENTATION What is a Quadtree? {{{ 3 4 * A Quadtree is a very simple way to group vertices according … … 82 83 /*FUNCTION Quadtree::Quadtree(){{{*/ 83 84 Quadtree::Quadtree(){ 84 _error _("Constructor not supported");85 _error2_("Constructor not supported"); 85 86 86 87 } … … 247 248 } 248 249 else{ 249 _error _("Box is not full");250 _error2_("Box is not full"); 250 251 } 251 252 }/*}}}*/ … … 396 397 break; 397 398 default: 398 _error _("Case %i not supported",index);399 _error2_("Case " << index << " not supported"); 399 400 } 400 401 newbox->length=master->length/2; … … 573 574 break; 574 575 default: 575 _error _("Case %i not supported",this->IsWithinRange(x,y,range));576 _error2_("Case " << this->IsWithinRange(x,y,range) << " not supported"); 576 577 } 577 578 -
issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
r12365 r12493 39 39 40 40 /*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)"); 42 42 } 43 43 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp
r12472 r12493 81 81 icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3); 82 82 } 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!"); 84 84 85 85 if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum) … … 263 263 #endif 264 264 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"); 266 266 } 267 267 … … 379 379 #endif 380 380 default: 381 _error _("Icefront type %s not supported yet",EnumToStringx(type));381 _error2_("Icefront type " << EnumToStringx(type) << " not supported yet"); 382 382 } 383 383 } … … 441 441 break; 442 442 default: 443 _error _("fill type %s not supported yet",EnumToStringx(fill));443 _error2_("fill type " << EnumToStringx(fill) << " not supported yet"); 444 444 } 445 445 ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2); … … 564 564 break; 565 565 default: 566 _error _("fill type %s not supported yet",EnumToStringx(fill));566 _error2_("fill type " << EnumToStringx(fill) << " not supported yet"); 567 567 } 568 568 ice_pressure=rho_ice*gravity*(surface-z_g); … … 638 638 break; 639 639 default: 640 _error _("fill type %s not supported yet",EnumToStringx(fill));640 _error2_("fill type " << EnumToStringx(fill) << " not supported yet"); 641 641 } 642 642 air_pressure=0; -
issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
r12472 r12493 270 270 break; 271 271 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"); 273 273 } 274 274 … … 300 300 break; 301 301 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"); 303 303 } 304 304 … … 347 347 return CreateKMatrixPrognosticBoundary(); 348 348 default: 349 _error _("type not supported yet");349 _error2_("type not supported yet"); 350 350 } 351 351 } … … 500 500 return CreateKMatrixBalancethicknessBoundary(); 501 501 default: 502 _error _("type not supported yet");502 _error2_("type not supported yet"); 503 503 } 504 504 } … … 651 651 return CreateKMatrixAdjointBalancethicknessBoundary(); 652 652 default: 653 _error _("type not supported yet");653 _error2_("type not supported yet"); 654 654 } 655 655 } … … 683 683 return CreatePVectorPrognosticBoundary(); 684 684 default: 685 _error _("type not supported yet");685 _error2_("type not supported yet"); 686 686 } 687 687 } … … 751 751 vyaverage_input->GetInputValue(&vy,gauss); 752 752 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"); 754 754 755 755 UdotN=vx*normal[0]+vy*normal[1]; … … 777 777 return CreatePVectorBalancethicknessBoundary(); 778 778 default: 779 _error _("type not supported yet");779 _error2_("type not supported yet"); 780 780 } 781 781 } -
issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp
r12472 r12493 239 239 #endif 240 240 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"); 242 242 } 243 243 … … 271 271 #endif 272 272 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"); 274 274 } 275 275 … … 379 379 } 380 380 else{ 381 _error _("analysis: %s not supported yet",EnumToStringx(analysis_type));381 _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet"); 382 382 } 383 383 … … 616 616 /*FUNCTION Pengrid::UpdateInputs {{{*/ 617 617 void 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 172 172 break; 173 173 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"); 175 175 } 176 176 … … 244 244 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 245 245 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 246 default: _error _("not supported yet");246 default: _error2_("not supported yet"); 247 247 } 248 248 case PattynApproximationEnum: … … 250 250 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 251 251 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 252 default: _error _("not supported yet");252 default: _error2_("not supported yet"); 253 253 } 254 254 case StokesApproximationEnum: … … 256 256 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 257 257 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 258 default: _error _("not supported yet");258 default: _error2_("not supported yet"); 259 259 } 260 260 case NoneApproximationEnum: … … 262 262 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 263 263 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 264 default: _error _("not supported yet");264 default: _error2_("not supported yet"); 265 265 } 266 default: _error _("not supported yet");266 default: _error2_("not supported yet"); 267 267 } 268 268 } -
issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp
r12472 r12493 276 276 277 277 /*update input*/ 278 _error _("not implemented yet");278 _error2_("not implemented yet"); 279 279 //this->inputs->AddInput(new DoubleInput(name,constant)); 280 280 … … 324 324 break; 325 325 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"); 327 327 } 328 328 … … 350 350 break; 351 351 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"); 353 353 } 354 354 … … 397 397 398 398 /*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!"); 400 400 tria1=(Tria*)elements[0]; 401 401 tria2=(Tria*)elements[1]; … … 410 410 tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum); 411 411 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"); 413 413 thickness=h[0]; 414 414 … … 488 488 489 489 /*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!"); 491 491 tria1=(Tria*)elements[0]; 492 492 tria2=(Tria*)elements[1]; … … 504 504 tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum); 505 505 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"); 507 507 thickness=h[0]; 508 508 tria1->GetInputValue(&b[0],nodes[0],BedEnum); 509 509 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"); 511 511 bed=b[0]; 512 512 … … 536 536 else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice) 537 537 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."); 539 539 540 540 pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2; … … 546 546 } 547 547 else{ 548 _error _("%s%i%s","fill type ",fill," not supported yet.");548 _error2_("" << "fill type " << fill << " not supported yet."); 549 549 } 550 550 … … 585 585 586 586 /*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!"); 588 588 589 589 /*recover elements on both side of rift: */ … … 706 706 707 707 /*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!"); 709 709 710 710 /*recover elements on both side of rift: */ … … 751 751 752 752 /*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!"); 754 754 755 755 /*recover elements on both side of rift: */ … … 794 794 795 795 /*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!"); 797 797 798 798 /*recover elements on both side of rift: */ … … 844 844 845 845 /*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!"); 847 847 848 848 /*recover elements on both side of rift: */ -
issm/trunk-jpl/src/c/objects/Materials/Matice.cpp
r12472 r12493 180 180 /*Get input (either in element or material)*/ 181 181 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"); 183 183 184 184 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ … … 186 186 break; 187 187 188 default: _error _("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));188 default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet"); 189 189 } 190 190 } … … 246 246 247 247 /*Checks in debugging mode*/ 248 if(viscosity<=0) _error _("Negative viscosity");248 if(viscosity<=0) _error2_("Negative viscosity"); 249 249 _assert_(B>0); 250 250 _assert_(n>0); … … 317 317 318 318 /*Checks in debugging mode*/ 319 if(viscosity3d<=0) _error _("Negative viscosity");319 if(viscosity3d<=0) _error2_("Negative viscosity"); 320 320 _assert_(B>0); 321 321 _assert_(n>0); … … 389 389 390 390 /*Checks in debugging mode*/ 391 if(viscosity3d<=0) _error _("Negative viscosity");391 if(viscosity3d<=0) _error2_("Negative viscosity"); 392 392 _assert_(B>0); 393 393 _assert_(n>0); … … 550 550 return; 551 551 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"); 555 555 } 556 556 } … … 608 608 return; 609 609 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"); 613 613 } 614 614 … … 750 750 #endif 751 751 else{ 752 _error _(" Mesh type not supported yet!");752 _error2_(" Mesh type not supported yet!"); 753 753 } 754 754 -
issm/trunk-jpl/src/c/objects/Node.cpp
r12457 r12493 71 71 72 72 /*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"); 74 74 if (iomodel->Data(MaskVertexonwaterEnum)[io_index]){ 75 75 for(k=1;k<=gsize;k++){ … … 115 115 /*Diagnostic Hutter*/ 116 116 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"); 118 118 /*Constrain all nodes that are not Hutter*/ 119 119 if (!iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){ … … 231 231 return indexing.sdoflist[dofindex]; 232 232 } 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!"); 234 234 235 235 } … … 303 303 else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i]; 304 304 } 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!"); 306 306 } 307 307 } … … 343 343 } 344 344 } 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!"); 346 346 } 347 347 else{ … … 412 412 } 413 413 } 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!"); 415 415 } 416 416 } … … 598 598 else if (setenum==FsetEnum) numdofs=this->indexing.fsize; 599 599 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!"); 601 601 } 602 602 else{ … … 628 628 else numdofs=this->indexing.ssize; 629 629 } 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!"); 631 631 } 632 632 return numdofs; … … 835 835 } 836 836 } 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!"); 838 838 839 839 /*Free ressources:*/ … … 881 881 } 882 882 } 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!"); 884 884 885 885 /*Free ressources:*/ … … 928 928 dofcount+=this->indexing.ssize; 929 929 } 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!"); 931 931 932 932 … … 957 957 for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount; 958 958 } 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!"); 960 960 } 961 961 /*}}}*/ … … 973 973 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) *(truedofs+ncols*sid+j)=indexing.fdoflist[j]; 974 974 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!"); 976 976 977 977 } … … 992 992 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j); 993 993 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!"); 995 995 996 996 } -
issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
r12472 r12493 47 47 ElementMatrix::ElementMatrix(ElementMatrix* Ke){ 48 48 49 if(!Ke) _error _("Input Element Matrix is a NULL pointer");49 if(!Ke) _error2_("Input Element Matrix is a NULL pointer"); 50 50 this->Init(Ke); 51 51 return; … … 63 63 /*If one of the two matrix is NULL, we copy the other one*/ 64 64 if(!Ke1 && !Ke2){ 65 _error _("Two input element matrices are NULL");65 _error2_("Two input element matrices are NULL"); 66 66 } 67 67 else if(!Ke1){ … … 75 75 76 76 /*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"); 78 78 79 79 /*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/ … … 295 295 } 296 296 else{ 297 _error _(" non dofsymmetrical matrix AddToGlobal routine not support yet!");297 _error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!"); 298 298 } 299 299 … … 332 332 } 333 333 else{ 334 _error _(" non dofsymmetrical matrix AddToGlobal routine not support yet!");334 _error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!"); 335 335 } 336 336 … … 343 343 for (int i=0;i<this->nrows;i++){ 344 344 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"); 347 347 } 348 348 } … … 365 365 /*Transpose indices*/ 366 366 if(!dofsymmetrical){ 367 _error _("not supported yet");367 _error2_("not supported yet"); 368 368 } 369 369 … … 488 488 int i; 489 489 490 if(this->nrows!=this->ncols)_error _("need square matrix in input!");490 if(this->nrows!=this->ncols)_error2_("need square matrix in input!"); 491 491 492 492 for(i=0;i<this->nrows;i++){ -
issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
r12472 r12493 42 42 /*If one of the two matrix is NULL, we copy the other one*/ 43 43 if(!pe1 && !pe2){ 44 _error _("Two input element matrices are NULL");44 _error2_("Two input element matrices are NULL"); 45 45 } 46 46 else if(!pe1){ … … 210 210 #ifdef _ISSM_DEBUG_ 211 211 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"); 214 214 } 215 215 #endif -
issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp
r12473 r12493 153 153 /*We should first check that the size is at least one*/ 154 154 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"); 156 156 } 157 157 -
issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp
r12473 r12493 125 125 /*We should first check that the size is one*/ 126 126 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"); 128 128 } 129 129 … … 137 137 /*We should first check that the size is one*/ 138 138 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"); 140 140 } 141 141 … … 149 149 /*We should first check that the size is at least one*/ 150 150 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"); 152 152 } 153 153 -
issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp
r12473 r12493 125 125 /*We should first check that the size is one*/ 126 126 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"); 128 128 } 129 129 -
issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp
r12473 r12493 132 132 /*We should first check that the size is one*/ 133 133 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"); 135 135 } 136 136 … … 144 144 /*We should first check that the size is at least one*/ 145 145 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"); 147 147 } 148 148 -
issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
r12473 r12493 27 27 /*check for index too large */ 28 28 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 << "."); 30 30 31 31 /*calculate the dimensions (being careful of integer division) */ … … 46 46 /*check for any dimension too large */ 47 47 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] << "."); 49 49 } 50 50 … … 65 65 /*check for index too large */ 66 66 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 << "."); 68 68 69 69 /*calculate the dimensions (being careful of integer division) */ … … 84 84 /*check for any dimension too large */ 85 85 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] << "."); 87 87 } 88 88 -
issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
r12474 r12493 109 109 /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/ 110 110 void 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"); 112 112 } 113 113 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp
r12474 r12493 82 82 /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/ 83 83 void 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"); 85 85 } 86 86 /*}}}*/ 87 87 /*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/ 88 88 void 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"); 90 90 } 91 91 /*}}}*/ 92 92 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/ 93 93 void 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"); 95 95 } 96 96 /*}}}*/ 97 97 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/ 98 98 void 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"); 100 100 } 101 101 /*}}}*/ 102 102 /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/ 103 103 void 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"); 105 105 } 106 106 /*}}}*/ 107 107 /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/ 108 108 void 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"); 110 110 } 111 111 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
r12474 r12493 124 124 /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/ 125 125 void 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"); 127 127 } 128 128 /*}}}*/ -
issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp
r12017 r12493 27 27 if (size==0){ 28 28 function(); 29 _error _("usage: see above");29 _error2_("usage: see above"); 30 30 } 31 31 else if (size!=NRHS ) { 32 32 function(); 33 _error _("usage error.");33 _error2_("usage error."); 34 34 } 35 35 return 1; -
issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp
r12365 r12493 47 47 48 48 /*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!"); 50 50 51 51 /*extract boolean: */ … … 68 68 /*retrive dimensions: */ 69 69 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!"); 71 71 dims=PyArray_DIMS((PyArrayObject*)py_matrix); 72 72 M=dims[0]; N=dims[1]; … … 92 92 /*retrive dimensions: */ 93 93 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!"); 95 95 dims=PyArray_DIMS((PyArrayObject*)py_vector); 96 96 M=dims[0]; -
issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp
r12436 r12493 31 31 void* memptr=NULL; 32 32 33 if(!size)_error _(" attempting to 0 size allocation!");33 if(!size)_error2_(" attempting to 0 size allocation!"); 34 34 35 35 /* Use the c library to do the allocation: */ 36 36 memptr=malloc(size); 37 if(!memptr) _error _("memory allocation failed!");37 if(!memptr) _error2_("memory allocation failed!"); 38 38 39 39 return memptr; … … 44 44 void* memptr=NULL; 45 45 46 if(!size)_error _("attempting to 0 size allocation!");46 if(!size)_error2_("attempting to 0 size allocation!"); 47 47 48 48 /* Use the c library to do the allocation: */ 49 49 memptr=calloc(n,size); 50 if(!memptr) _error _("memory allocation failed!");50 if(!memptr) _error2_("memory allocation failed!"); 51 51 52 52 return memptr; … … 88 88 register void* value=NULL; 89 89 90 if(!size)_error _("attempting to realloc to zero");90 if(!size)_error2_("attempting to realloc to zero"); 91 91 value = (void*)realloc(pv,size); 92 92 93 93 if (value == NULL) { 94 _error _("virtual memory exhausted");94 _error2_("virtual memory exhausted"); 95 95 } 96 96 return value; -
issm/trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp
r12475 r12493 22 22 case XYEnum: numdofs+=2; break; 23 23 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"); 25 25 } 26 26 } … … 67 67 break; 68 68 default: 69 _error _("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));69 _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet"); 70 70 } 71 71 } -
issm/trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp
r12475 r12493 31 31 case XYEnum: numdofs+=2; break; 32 32 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"); 34 34 } 35 35 } -
issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp
r12475 r12493 30 30 case XYEnum: numdofs+=2; break; 31 31 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"); 33 33 } 34 34 } -
issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp
r12475 r12493 31 31 case XYEnum: numdofs+=2; break; 32 32 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"); 34 34 } 35 35 } -
issm/trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp
r12475 r12493 31 31 case XYEnum: numdofs+=2; break; 32 32 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"); 34 34 } 35 35 } -
issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
r12437 r12493 38 38 /*open domain outline file for reading: */ 39 39 if ((fid=fopen(domainname,"r"))==NULL){ 40 _error _("%s%s","could not find domain file ",domainname);40 _error2_("" << "could not find domain file " << domainname); 41 41 } 42 42 -
issm/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp
r12098 r12493 23 23 /*open domain outline file for writing: */ 24 24 if ((fid=fopen(domainname,"w"))==NULL){ 25 _error _("%s%s","could not open domain file ",domainname);25 _error2_("" << "could not open domain file " << domainname); 26 26 noerr=0; goto cleanupandreturn; 27 27 } -
issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
r12475 r12493 36 36 if (!itrnb) { 37 37 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."); 39 39 } 40 40 idimc=ncolb; … … 42 42 else { 43 43 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."); 45 45 } 46 46 idimc=nrowb; … … 49 49 if (!itrnc) { 50 50 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."); 52 52 } 53 53 idimd=ncolc; … … 55 55 else { 56 56 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."); 58 58 } 59 59 idimd=nrowc; … … 124 124 125 125 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"); 127 127 noerr=0; 128 128 return noerr; … … 175 175 176 176 if (!b && nvec) { 177 _error _("No right-hand side for nvec=%d.",nvec);177 _error2_("No right-hand side for nvec=" << nvec << "."); 178 178 noerr=0; 179 179 return noerr; … … 214 214 xDelete<int>(pivrc2); 215 215 xDelete<int>(pindx); 216 _error _("Pivot %f less than machine epsilon",pivot);216 _error2_("Pivot " << pivot << " less than machine epsilon"); 217 217 noerr=0; 218 218 return noerr; … … 349 349 /*Compute determinant*/ 350 350 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"); 352 352 353 353 /*Compute invert*/ … … 374 374 /*Compute determinant*/ 375 375 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"); 377 377 378 378 /*Compute invert*/ -
issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
r12476 r12493 43 43 iter=0; 44 44 fxmin = (*f)(xmin,optargs); 45 if (isnan(fxmin)) _error _("Function evaluation returned NaN");45 if (isnan(fxmin)) _error2_("Function evaluation returned NaN"); 46 46 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance Procedure\n\n"); 47 47 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmin,fxmin," N/A boundary\n"); 48 48 fxmax = (*f)(xmax,optargs); 49 if (isnan(fxmax)) _error _("Function evaluation returned NaN");49 if (isnan(fxmax)) _error2_("Function evaluation returned NaN"); 50 50 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmax,fxmax," N/A boundary\n"); 51 51 … … 71 71 /*2: call the function to be evaluated*/ 72 72 fxbest = (*f)(x,optargs); 73 if(isnan(fxbest)) _error _("Function evaluation returned NaN");73 if(isnan(fxbest)) _error2_("Function evaluation returned NaN"); 74 74 iter=iter+1; 75 75 … … 154 154 //evaluate function on x 155 155 fx = (*f)(x,optargs); 156 if(isnan(fx)) _error _("Function evaluation returned NaN");156 if(isnan(fx)) _error2_("Function evaluation returned NaN"); 157 157 iter=iter+1; 158 158 -
issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
r12436 r12493 1670 1670 if (iter >= MAX_GAUS_ITER) { 1671 1671 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); 1673 1673 } 1674 1674 } -
issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
r12476 r12493 53 53 else eps=0; 54 54 } 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!"); 56 56 57 57 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
r12476 r12493 41 41 //get the value of the function at the first boundary 42 42 fx1= (*f)(x1,optargs); 43 if (isnan(fx1)) _error _("Function evaluation returned NaN");43 if (isnan(fx1)) _error2_("Function evaluation returned NaN"); 44 44 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance\n\n"); 45 45 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",x1,fx1," N/A\n"); … … 54 54 iter++; 55 55 fx2 = (*f)(x2,optargs); 56 if (isnan(fx2)) _error _("Function evaluation returned NaN");56 if (isnan(fx2)) _error2_("Function evaluation returned NaN"); 57 57 _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)); 58 58 -
issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
r12476 r12493 57 57 if (found==-1){ 58 58 /*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)); 60 60 } 61 61 -
issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
r12476 r12493 29 29 if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale; 30 30 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. "); 32 32 33 33 } -
issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp
r12018 r12493 34 34 void SetVerbosityLevel(int level){ 35 35 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 << ")"); 37 37 38 38 verbositylevel = level; -
issm/trunk-jpl/src/c/shared/String/DescriptorIndex.cpp
r9336 r12493 23 23 /*retrieve first token, separated by underscore: */ 24 24 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!"); 26 26 27 27 if (strncmp(pch,"scaled",6)==0){ 28 28 /*we have a scaled variable. recover the root: */ 29 29 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!"); 31 31 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 32 32 … … 44 44 /*we have an indexed variable. recover the root: */ 45 45 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!"); 47 47 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 48 48 /*now recover the index: */ 49 49 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!"); 51 51 sscanf(pch,"%i",pindex); 52 52 return IndexedEnum; … … 55 55 /*we have an indexed variable. recover the root: */ 56 56 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!"); 58 58 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 59 59 /*now recover the index: */ 60 60 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!"); 62 62 sscanf(pch,"%i",pindex); 63 63 return NodalEnum; -
issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp
r12435 r12493 44 44 45 45 if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){ 46 _error _(" pthread_create error");46 _error2_(" pthread_create error"); 47 47 } 48 48 } 49 49 for(i=0;i<num_threads;i++){ 50 50 if(pthread_join(threads[i],(void**)&status)){ 51 _error _(" pthread_join error");51 _error2_(" pthread_join error"); 52 52 } 53 53 } -
issm/trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp
r9320 r12493 35 35 break; 36 36 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"); 38 38 break; 39 39 } -
issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp
r12439 r12493 110 110 111 111 default: 112 _error _("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");112 _error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!"); 113 113 break; 114 114 } -
issm/trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp
r10287 r12493 29 29 solutioncore=&diagnostic_core; 30 30 #else 31 _error _("ISSM was not compiled with diagnostic capabilities. Exiting");31 _error2_("ISSM was not compiled with diagnostic capabilities. Exiting"); 32 32 #endif 33 33 break; … … 36 36 solutioncore=&steadystate_core; 37 37 #else 38 _error _("ISSM was not compiled with steady state capabilities. Exiting");38 _error2_("ISSM was not compiled with steady state capabilities. Exiting"); 39 39 #endif 40 40 break; … … 43 43 solutioncore=&thermal_core; 44 44 #else 45 _error _("ISSM was not compiled with thermal capabilities. Exiting");45 _error2_("ISSM was not compiled with thermal capabilities. Exiting"); 46 46 #endif 47 47 break; … … 50 50 solutioncore=&enthalpy_core; 51 51 #else 52 _error _("ISSM was not compiled with thermal capabilities. Exiting");52 _error2_("ISSM was not compiled with thermal capabilities. Exiting"); 53 53 #endif 54 54 break; … … 57 57 solutioncore=&balancethickness_core; 58 58 #else 59 _error _("ISSM was not compiled with balanced capabilities. Exiting");59 _error2_("ISSM was not compiled with balanced capabilities. Exiting"); 60 60 #endif 61 61 break; … … 64 64 solutioncore=&hydrology_core; 65 65 #else 66 _error _("ISSM was not compiled with hydrology capabilities. Exiting");66 _error2_("ISSM was not compiled with hydrology capabilities. Exiting"); 67 67 #endif 68 68 break; … … 71 71 solutioncore=&surfaceslope_core; 72 72 #else 73 _error _("ISSM was not compiled with slope capabilities. Exiting");73 _error2_("ISSM was not compiled with slope capabilities. Exiting"); 74 74 #endif 75 75 break; … … 78 78 solutioncore=&bedslope_core; 79 79 #else 80 _error _("ISSM was not compiled with slope capabilities. Exiting");80 _error2_("ISSM was not compiled with slope capabilities. Exiting"); 81 81 #endif 82 82 break; … … 85 85 solutioncore=&transient_core; 86 86 #else 87 _error _("ISSM was not compiled with transient capabilities. Exiting");87 _error2_("ISSM was not compiled with transient capabilities. Exiting"); 88 88 #endif 89 89 break; … … 92 92 solutioncore=&prognostic_core; 93 93 #else 94 _error _("ISSM was not compiled with prognostic capabilities. Exiting");94 _error2_("ISSM was not compiled with prognostic capabilities. Exiting"); 95 95 #endif 96 96 break; 97 97 default: 98 _error _("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");98 _error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!"); 99 99 break; 100 100 } -
issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp
r12439 r12493 17 17 char *lockfilename = NULL; 18 18 19 if(argc<2)_error _("Usage error: no solution requested");19 if(argc<2)_error2_("Usage error: no solution requested"); 20 20 *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"); 22 22 modelname=argv[3]; 23 23 binfilename = xNew<char>(strlen(modelname)+strlen(".bin") +1); sprintf(binfilename, "%s%s",modelname,".bin"); -
issm/trunk-jpl/src/c/solutions/WriteLockFile.cpp
r9320 r12493 17 17 if(my_rank==0){ 18 18 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); 20 20 21 21 /*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); 23 23 } 24 24 -
issm/trunk-jpl/src/c/solutions/controltao_core.cpp
r12477 r12493 41 41 PetscGetArgs(&argc,&args); 42 42 ierr = TaoInitialize(&argc,&args,(char*)0,""); 43 if(ierr) _error _("Could not initialize Tao");43 if(ierr) _error2_("Could not initialize Tao"); 44 44 45 45 /*Recover some parameters*/ … … 181 181 #else 182 182 void controltao_core(FemModel* femmodel){ 183 _error _("TAO not installed or PETSc version not supported");183 _error2_("TAO not installed or PETSc version not supported"); 184 184 } 185 185 #endif //_HAVE_TAO_ -
issm/trunk-jpl/src/c/solutions/convergence.cpp
r12477 r12493 72 72 if (isnan(res)){ 73 73 _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!"); 75 75 } 76 76 … … 96 96 ndu=duf->Norm(NORM_TWO); nu=old_uf->Norm(NORM_TWO); 97 97 98 if (isnan(ndu) || isnan(nu)) _error _("convergence criterion is NaN!");98 if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!"); 99 99 100 100 //clean up … … 121 121 duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0); 122 122 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!"); 124 124 125 125 //clean up -
issm/trunk-jpl/src/c/solutions/gradient_core.cpp
r12477 r12493 37 37 /*Check that gradient is clean*/ 38 38 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"); 41 41 42 42 /*plug back into inputs: */ -
issm/trunk-jpl/src/c/solutions/issm.cpp
r12477 r12493 40 40 #ifdef _HAVE_PETSC_ 41 41 ierr=PetscInitialize(&argc,&argv,(char*)0,""); 42 if(ierr) _error _("Could not initialize Petsc");42 if(ierr) _error2_("Could not initialize Petsc"); 43 43 #else 44 44 #ifdef _HAVE_MPI_ … … 111 111 Dakotax(femmodel); 112 112 #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!"); 114 114 #endif 115 115 } … … 121 121 control_core(femmodel); 122 122 #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!"); 124 124 #endif 125 125 } -
issm/trunk-jpl/src/c/solutions/kriging.cpp
r12477 r12493 40 40 #ifdef _HAVE_PETSC_ 41 41 int ierr=PetscInitialize(&argc,&argv,(char*)0,""); 42 if(ierr) _error _("Could not initialize Petsc");42 if(ierr) _error2_("Could not initialize Petsc"); 43 43 #else 44 44 #ifdef _HAVE_MPI_ … … 122 122 char *lockfilename = NULL; 123 123 124 if(argc<2)_error _("Usage error: missing model name");124 if(argc<2)_error2_("Usage error: missing model name"); 125 125 modelname=argv[2]; 126 126 binfilename = xNew<char>((strlen(modelname)+strlen(".bin") +1)); sprintf(binfilename, "%s%s",modelname,".bin"); -
issm/trunk-jpl/src/c/solutions/objectivefunction.cpp
r12477 r12493 49 49 } 50 50 else{ 51 _error _("Solution %s not implemented yet",EnumToStringx(solution_type));51 _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet"); 52 52 } 53 53 … … 66 66 } 67 67 else{ 68 _error _("Solution %s not implemented yet",EnumToStringx(solution_type));68 _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet"); 69 69 } 70 70 -
issm/trunk-jpl/src/c/solutions/steadystate_core.cpp
r12439 r12493 52 52 } 53 53 #else 54 _error _("ISSM was not compiled with thermal capabilities. Exiting");54 _error2_("ISSM was not compiled with thermal capabilities. Exiting"); 55 55 #endif 56 56 -
issm/trunk-jpl/src/c/solutions/transient_core.cpp
r12477 r12493 103 103 } 104 104 #else 105 _error _("ISSM was not compiled with thermal capabilities. Exiting");105 _error2_("ISSM was not compiled with thermal capabilities. Exiting"); 106 106 #endif 107 107 } … … 112 112 diagnostic_core(femmodel); 113 113 #else 114 _error _("ISSM was not compiled with diagnostic capabilities. Exiting");114 _error2_("ISSM was not compiled with diagnostic capabilities. Exiting"); 115 115 #endif 116 116 } … … 128 128 GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); 129 129 #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"); 131 131 #endif 132 132 } -
issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
r12477 r12493 119 119 break; 120 120 default: 121 _error _("unknown norm !");121 _error2_("unknown norm !"); 122 122 break; 123 123 } … … 150 150 AX->GetSize(&AXM); 151 151 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!"); 154 154 155 155 for(i=0;i<M;i++){ … … 197 197 break; 198 198 default: 199 _error _("unknown insert mode!");199 _error2_("unknown insert mode!"); 200 200 break; 201 201 } -
issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
r12477 r12493 85 85 break; 86 86 default: 87 _error _("unknown insert mode!");87 _error2_("unknown insert mode!"); 88 88 break; 89 89 } … … 102 102 break; 103 103 default: 104 _error _("unknown insert mode!");104 _error2_("unknown insert mode!"); 105 105 break; 106 106 } … … 204 204 break; 205 205 default: 206 _error _("unknown norm !");206 _error2_("unknown norm !"); 207 207 break; 208 208 } -
issm/trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
r12429 r12493 56 56 57 57 #else 58 _error _("METIS version not supported yet");58 _error2_("METIS version not supported yet"); 59 59 #endif 60 60 } -
issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp
r11695 r12493 30 30 break; 31 31 default: 32 _error _("unknown insert mode!");32 _error2_("unknown insert mode!"); 33 33 break; 34 34 } -
issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp
r11941 r12493 30 30 break; 31 31 default: 32 _error _("unknown matrix type !");32 _error2_("unknown matrix type !"); 33 33 break; 34 34 } -
issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp
r11695 r12493 30 30 break; 31 31 default: 32 _error _("unknown norm !");32 _error2_("unknown norm !"); 33 33 break; 34 34 } -
issm/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp
r12018 r12493 29 29 /*Some checks: */ 30 30 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!"); 32 32 33 33 /*Create identitiy matrix: */ -
issm/trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp
r12431 r12493 62 62 } 63 63 else{ 64 _error _("MatType %s not supported yet",type);64 _error2_("MatType " << type << " not supported yet"); 65 65 } 66 66 /*Assemble*/ -
issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r11910 r12493 55 55 if(first[0]!='-'){ 56 56 /*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 '-'!"); 58 58 } 59 59 /*Reduce first to bare option value*/ -
issm/trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp
r12431 r12493 35 35 /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */ 36 36 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"); 38 38 } 39 39 -
issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
r12431 r12493 51 51 52 52 /*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!"); 54 54 55 55 /* Set default Plapack parameters */
Note:
See TracChangeset
for help on using the changeset viewer.