Changeset 6412
- Timestamp:
- 10/25/10 08:57:04 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 241 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/Container/DataSet.cpp ¶
r6411 r6412 123 123 * because this is a nasty error: */ 124 124 if (marshalled_dataset!=old_marshalled_dataset){ 125 ISSMERROR("final marshalled dataset is different from initial one!");125 _error_("final marshalled dataset is different from initial one!"); 126 126 abort(); 127 127 } … … 355 355 break; 356 356 default: 357 ISSMERROR("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type));357 _error_("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type)); 358 358 } 359 359 … … 408 408 vector<Object*>::iterator object; 409 409 410 if(this==NULL) ISSMERROR(" trying to echo a NULL dataset");411 412 _printf_( "DataSet echo: %i objects\n",objects.size());410 if(this==NULL)_error_(" trying to echo a NULL dataset"); 411 412 _printf_(true,"DataSet echo: %i objects\n",objects.size()); 413 413 414 414 for ( object=objects.begin() ; object < objects.end(); object++ ){ … … 426 426 vector<Object*>::iterator object; 427 427 428 if(this==NULL) ISSMERROR(" trying to echo a NULL dataset");429 430 _printf_( "DataSet echo: %i objects\n",objects.size());428 if(this==NULL)_error_(" trying to echo a NULL dataset"); 429 430 _printf_(true,"DataSet echo: %i objects\n",objects.size()); 431 431 432 432 for ( object=objects.begin() ; object < objects.end(); object++ ){ … … 455 455 456 456 /*Check index in debugging mode*/ 457 ISSMASSERT(offset<this->Size());457 _assert_(offset<this->Size()); 458 458 459 459 return objects[offset]; … … 468 468 int i; 469 469 470 if(!sorted) ISSMERROR(" trying to binary search on a non-sorted dataset!");470 if(!sorted)_error_(" trying to binary search on a non-sorted dataset!"); 471 471 472 472 /*Carry out a binary search on the sorted_ids: */ 473 473 if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){ 474 ISSMERROR("could not find object with id %i in DataSet %s",eid,EnumToString(enum_type));474 _error_("could not find object with id %i in DataSet %s",eid,EnumToString(enum_type)); 475 475 } 476 476 … … 532 532 /*Only sort if we are not already sorted: */ 533 533 if(!sorted){ 534 ISSMERROR(" not implemented yet!");535 } 536 } 537 /*}}}*/ 534 _error_(" not implemented yet!"); 535 } 536 } 537 /*}}}*/ -
TabularUnified issm/trunk/src/c/Container/Inputs.cpp ¶
r5749 r6412 63 63 /*we could not find an input with the correct enum type. No defaults values were provided, 64 64 * error out: */ 65 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));65 _error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type)); 66 66 } 67 67 … … 91 91 /*we could not find an input with the correct enum type. No defaults values were provided, 92 92 * error out: */ 93 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));93 _error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type)); 94 94 } 95 95 … … 119 119 /*we could not find an input with the correct enum type. No defaults values were provided, 120 120 * error out: */ 121 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));121 _error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type)); 122 122 } 123 123 … … 147 147 /*we could not find an input with the correct enum type. No defaults values were provided, 148 148 * error out: */ 149 ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));149 _error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type)); 150 150 } 151 151 … … 165 165 166 166 /*In debugging mode, check that the input is not a NULL pointer*/ 167 ISSMASSERT(in_input);167 _assert_(in_input); 168 168 169 169 for ( object=objects.begin() ; object < objects.end(); object++ ){ … … 219 219 220 220 /*some checks: */ 221 if(!constrain_input) ISSMERROR(" input %s could not be found!",EnumToString(constrain_enum));221 if(!constrain_input) _error_(" input %s could not be found!",EnumToString(constrain_enum)); 222 222 223 223 /*Apply ContrainMin: */ … … 260 260 } 261 261 else{ 262 ISSMERROR("Input %s not found",EnumToString(enumtype));262 _error_("Input %s not found",EnumToString(enumtype)); 263 263 } 264 264 … … 281 281 } 282 282 else{ 283 ISSMERROR("Input %s not found",EnumToString(enumtype));283 _error_("Input %s not found",EnumToString(enumtype)); 284 284 } 285 285 … … 302 302 } 303 303 else{ 304 ISSMERROR("Input %s not found",EnumToString(enumtype));304 _error_("Input %s not found",EnumToString(enumtype)); 305 305 } 306 306 … … 323 323 } 324 324 else{ 325 ISSMERROR("Input %s not found",EnumToString(enumtype));325 _error_("Input %s not found",EnumToString(enumtype)); 326 326 } 327 327 … … 375 375 /*Make a copy of the original input: */ 376 376 original=(Input*)this->GetInput(original_enum); 377 if(!original) ISSMERROR("could not find input with enum: %s",EnumToString(original_enum));377 if(!original)_error_("could not find input with enum: %s",EnumToString(original_enum)); 378 378 copy=(Input*)original->copy(); 379 379 … … 422 422 423 423 /*some checks: */ 424 if(!xinput) ISSMERROR(" input %s could not be found!",EnumToString(XEnum));425 if(!yinput) ISSMERROR(" input %s could not be found!",EnumToString(YEnum));424 if(!xinput) _error_(" input %s could not be found!",EnumToString(XEnum)); 425 if(!yinput) _error_(" input %s could not be found!",EnumToString(YEnum)); 426 426 427 427 /*Apply AXPY: */ -
TabularUnified issm/trunk/src/c/Container/Nodes.cpp ¶
r6411 r6412 74 74 75 75 /*some check: */ 76 if ((setenum!=GsetEnum) && (setenum!=FsetEnum) && (setenum!=SsetEnum)) ISSMERROR("%s%s%s"," dof distribution for set of enum type ",EnumToString(setenum)," not supported yet!");76 if ((setenum!=GsetEnum) && (setenum!=FsetEnum) && (setenum!=SsetEnum))_error_("%s%s%s"," dof distribution for set of enum type ",EnumToString(setenum)," not supported yet!"); 77 77 78 78 /*Go through objects, and distribute dofs locally, from 0 to numberofdofs: */ -
TabularUnified issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp ¶
r6099 r6412 22 22 case VyEnum : return "vy"; 23 23 case VyObsEnum : return "vy_obs"; 24 default : ISSMERROR("No model field is associated to enum %s",EnumToString(en));24 default : _error_("No model field is associated to enum %s",EnumToString(en)); 25 25 } 26 26 } -
TabularUnified issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp ¶
r6374 r6412 344 344 else if (strcmp(name,"Sset")==0) return SsetEnum; 345 345 else if (strcmp(name,"Yts")==0) return YtsEnum; 346 else ISSMERROR("Enum %s not found",name);346 else _error_("Enum %s not found",name); 347 347 348 348 } -
TabularUnified issm/trunk/src/c/EnumDefinitions/Synchronize.sh ¶
r6311 r6412 202 202 #Add footer of of StringToEnum.cpp{{{1 203 203 cat <<END >> StringToEnum.cpp 204 else ISSMERROR("Enum %s not found",name);204 else _error_("Enum %s not found",name); 205 205 206 206 } -
TabularUnified issm/trunk/src/c/include/macros.h ¶
r6322 r6412 18 18 /* _printf_ {{{1*/ 19 19 /*Printing macro: only cpu number 0 */ 20 #define _printf_( ...) PrintfFunction(__VA_ARGS__)20 #define _printf_(flag,...) if(flag) PrintfFunction(__VA_ARGS__) 21 21 /*}}}*/ 22 /* ISSMPRINTF {{{1*/ 23 /*Printing macro with flag*/ 24 #define ISSMPRINTF(flag,...) if(flag) PrintfFunction(__VA_ARGS__) 25 /*}}}*/ 26 /* ISSMERROR {{{1*/ 22 /* _error_ {{{1*/ 27 23 /*Error exception macro*/ 28 24 #ifdef _INTEL_WIN_ 29 #define ISSMERROR(...)\25 #define _error_(...)\ 30 26 throw ErrorException(exprintf(__VA_ARGS__)) 31 27 #else 32 #define ISSMERROR(...)\28 #define _error_(...)\ 33 29 throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__)) 34 30 #endif 35 31 /*}}}*/ 36 /* ISSMASSERT{{{1*/32 /* _assert_ {{{1*/ 37 33 /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/ 38 34 #ifdef _ISSM_DEBUG_ 39 #define ISSMASSERT(statement)\40 if (!(statement)) ISSMERROR("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement)35 #define _assert_(statement)\ 36 if (!(statement)) _error_("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement) 41 37 #else 42 #define ISSMASSERT(ignore)\38 #define _assert_(ignore)\ 43 39 ((void) 0) 44 40 #endif … … 59 55 }\ 60 56 catch (exception& e) {\ 61 _printf_( "Standard exception: %s\n",e.what());\57 _printf_(true,"Standard exception: %s\n",e.what());\ 62 58 mexErrMsgTxt(" ");\ 63 59 } … … 74 70 }\ 75 71 catch (exception& e) {\ 76 _printf_( "Standard exception: %s\n",e.what());\72 _printf_(true,"Standard exception: %s\n",e.what());\ 77 73 return 1;\ 78 74 } -
TabularUnified issm/trunk/src/c/io/FetchData.cpp ¶
r6347 r6412 41 41 else{ 42 42 /*This is an error: we don't have the correct input!: */ 43 ISSMERROR(" wrong input parameter!");43 _error_(" wrong input parameter!"); 44 44 } 45 45 } … … 77 77 else{ 78 78 /*This is an error: we don't have the correct input!: */ 79 ISSMERROR("Input parameter of class %s not supported yet",mxGetClassName(dataref));79 _error_("Input parameter of class %s not supported yet",mxGetClassName(dataref)); 80 80 } 81 81 … … 113 113 else{ 114 114 /*This is an error: we don't have the correct input!: */ 115 ISSMERROR("wrong input parameter");115 _error_("wrong input parameter"); 116 116 } 117 117 … … 139 139 else{ 140 140 /*This is an error: we don't have the correct input!: */ 141 ISSMERROR("wrong input parameter");141 _error_("wrong input parameter"); 142 142 } 143 143 … … 171 171 else{ 172 172 /*This is an error: we don't have the correct input!: */ 173 ISSMERROR("wrong input parameter");173 _error_("wrong input parameter"); 174 174 } 175 175 … … 203 203 else{ 204 204 /*This is an error: we don't have the correct input!: */ 205 ISSMERROR("wrong input parameter");205 _error_("wrong input parameter"); 206 206 } 207 207 … … 228 228 else{ 229 229 /*This is an error: we don't have the correct input!: */ 230 ISSMERROR("wrong input parameter");230 _error_("wrong input parameter"); 231 231 } 232 232 … … 243 243 /*Ok, the string should be coming directly from the matlab workspace: */ 244 244 if (!mxIsChar(dataref)){ 245 ISSMERROR("input data_type is not a string!");245 _error_("input data_type is not a string!"); 246 246 } 247 247 else{ … … 264 264 265 265 if (!mxIsDouble(dataref)){ 266 ISSMERROR("input data_type is not a double!");266 _error_("input data_type is not a double!"); 267 267 } 268 268 else{ … … 281 281 282 282 if (!mxIsDouble(dataref)){ 283 ISSMERROR("input data_type is not a scalar!");283 _error_("input data_type is not a scalar!"); 284 284 } 285 285 else{ … … 298 298 299 299 if (mxIsClass(dataref,"logical")){ 300 if(mxGetM(dataref)!=1) ISSMERROR("input data is not of size 1x1");301 if(mxGetN(dataref)!=1) ISSMERROR("input data is not of size 1x1");300 if(mxGetM(dataref)!=1) _error_("input data is not of size 1x1"); 301 if(mxGetN(dataref)!=1) _error_("input data is not of size 1x1"); 302 302 mxbool_ptr=mxGetLogicals(dataref); 303 303 } 304 304 else{ 305 ISSMERROR("input data_type is not a bool!");305 _error_("input data_type is not a bool!"); 306 306 } 307 307 … … 325 325 /*numberofelements: */ 326 326 if(my_rank==0){ 327 if(fread(&M,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of rows for matrix ");327 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 328 328 } 329 329 … … 331 331 332 332 if(my_rank==0){ 333 if(fread(&N,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of columns for matrix ");333 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 334 334 } 335 335 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); … … 341 341 /*Read matrix on node 0, then broadcast: */ 342 342 if(my_rank==0){ 343 if(fread(matrix,M*N*sizeof(double),1,fid)!=1) ISSMERROR("could not read matrix ");343 if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix "); 344 344 } 345 345 … … 367 367 /*We have to read a string from disk. First read the dimensions of the string, then the string: */ 368 368 if(my_rank==0){ 369 if(fread(&string_size,sizeof(int),1,fid)!=1) ISSMERROR(" could not read length of string ");369 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string "); 370 370 } 371 371 … … 379 379 /*Read string on node 0, then broadcast: */ 380 380 if(my_rank==0){ 381 if(fread(string,string_size*sizeof(char),1,fid)!=1) ISSMERROR(" could not read string ");381 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 382 382 } 383 383 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); … … 404 404 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ 405 405 if(my_rank==0){ 406 if(fread(&scalar,sizeof(double),1,fid)!=1) ISSMERROR(" could not read scalar ");406 if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar "); 407 407 } 408 408 MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); … … 424 424 /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */ 425 425 if(my_rank==0){ 426 if(fread(&integer,sizeof(int),1,fid)!=1) ISSMERROR(" could not read integer ");426 if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer "); 427 427 } 428 428 -
TabularUnified issm/trunk/src/c/io/FetchParams.cpp ¶
r5103 r6412 55 55 enum_type=StringToEnum(name); 56 56 pfield=mxGetFieldByNumber(dataref,0,count); 57 ISSMASSERT(pfield);57 _assert_(pfield); 58 58 59 59 /*Check type of field: */ … … 65 65 66 66 if (M==0 | N==0){ 67 ISSMERROR("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")");67 _error_("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")"); 68 68 } 69 69 if (M==1 && N==1){ … … 175 175 } 176 176 } 177 else ISSMERROR("%s%i","unknow type in parameters structure field ",i);177 else _error_("%s%i","unknow type in parameters structure field ",i); 178 178 } 179 179 -
TabularUnified issm/trunk/src/c/io/IoModelFetchData.cpp ¶
r3961 r6412 135 135 MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 136 136 137 if(!found) ISSMERROR("%s %s ","could not find data with name",data_name);137 if(!found)_error_("%s %s ","could not find data with name",data_name); 138 138 139 139 return fid; -
TabularUnified issm/trunk/src/c/io/WriteDataToDisk.cpp ¶
r3775 r6412 65 65 } 66 66 else{ 67 ISSMERROR("data type not supported yet!");67 _error_("data type not supported yet!"); 68 68 } 69 69 } -
TabularUnified issm/trunk/src/c/io/pfclose.cpp ¶
r6389 r6412 17 17 /*Close file handle: */ 18 18 extern int my_rank; 19 if(fclose(fid)!=0) ISSMERROR("%s%s","could not close file ",filename);19 if(fclose(fid)!=0)_error_("%s%s","could not close file ",filename); 20 20 } -
TabularUnified issm/trunk/src/c/io/pfopen.cpp ¶
r6389 r6412 20 20 /*Open handle to data on disk: */ 21 21 fid=fopen(filename,format); 22 if(fid==NULL) ISSMERROR("%s%s%s","could not open file ",filename," for binary reading or writing");22 if(fid==NULL) _error_("%s%s%s","could not open file ",filename," for binary reading or writing"); 23 23 24 24 return fid; -
TabularUnified issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp ¶
r6231 r6412 35 35 36 36 /*First, recover qmu partition of vertices: */ 37 if(!parameters->FindParam(&qmu_part,&dummy,QmuPartEnum)) ISSMERROR(" could not find qmu partition vector");37 if(!parameters->FindParam(&qmu_part,&dummy,QmuPartEnum))_error_(" could not find qmu partition vector"); 38 38 39 39 /*Some parameters: */ -
TabularUnified issm/trunk/src/c/modules/BuildNodeSetsx/PartitionSets.cpp ¶
r3913 r6412 79 79 ccount++; 80 80 } 81 if (flags_b_local[i] && flags_c_local[i]) ISSMERROR("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets");81 if (flags_b_local[i] && flags_c_local[i]) _error_("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets"); 82 82 83 83 acount++; -
TabularUnified issm/trunk/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp ¶
r4573 r6412 23 23 /*Recover numberofelements: */ 24 24 found= parameters->FindParam(&numberofelements,NumberOfElementsEnum); 25 if (!found) ISSMERROR("numberofelements not provided in parameters");25 if (!found) _error_("numberofelements not provided in parameters"); 26 26 27 27 /*Allocate sigma on numberofelements: */ -
TabularUnified issm/trunk/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp ¶
r6323 r6412 24 24 parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 25 25 26 ISSMPRINTF(VerboseMProcessor()," Configuring elements...\n");26 _printf_(VerboseMProcessor()," Configuring elements...\n"); 27 27 for (i=0;i<elements->Size();i++){ 28 28 element=(Element*)elements->GetObjectByOffset(i); 29 29 element->Configure(elements,loads,nodes,materials,parameters); 30 30 } 31 ISSMPRINTF(VerboseMProcessor()," Configuring loads...\n");31 _printf_(VerboseMProcessor()," Configuring loads...\n"); 32 32 for (i=0;i<loads->Size();i++){ 33 33 load=(Load*)loads->GetObjectByOffset(i); … … 36 36 } 37 37 } 38 ISSMPRINTF(VerboseMProcessor()," Configuring nodes...\n");38 _printf_(VerboseMProcessor()," Configuring nodes...\n"); 39 39 for (i=0;i<nodes->Size();i++){ 40 40 node=(Node*)nodes->GetObjectByOffset(i); … … 44 44 } 45 45 46 ISSMPRINTF(VerboseMProcessor()," Configuring materials...\n");46 _printf_(VerboseMProcessor()," Configuring materials...\n"); 47 47 for (i=0;i<materials->Size();i++){ 48 48 material=(Material*)materials->GetObjectByOffset(i); -
TabularUnified issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp ¶
r6231 r6412 87 87 } 88 88 else if (flag==NodalEnum){ 89 ISSMERROR(" nodal response functions not supported yet!");89 _error_(" nodal response functions not supported yet!"); 90 90 91 91 /*increment response_pointer :*/ … … 105 105 } 106 106 } 107 else ISSMERROR("%s%i%s"," flag type ",flag," not supported yet for response analysis");107 else _error_("%s%i%s"," flag type ",flag," not supported yet for response analysis"); 108 108 } 109 109 -
TabularUnified issm/trunk/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp ¶
r5772 r6412 26 26 /*Get size of vector: */ 27 27 gsize=nodes->NumberOfDofs(configuration_type,GsetEnum); 28 if (gsize==0) ISSMERROR("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToString(configuration_type));28 if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToString(configuration_type)); 29 29 30 30 /*Initialize solution: */ -
TabularUnified issm/trunk/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp ¶
r5103 r6412 23 23 } 24 24 } 25 else ISSMERROR("%s%s%s"," vector type: ",EnumToString(TypeEnum)," not supported yet!");25 else _error_("%s%s%s"," vector type: ",EnumToString(TypeEnum)," not supported yet!"); 26 26 27 27 VecAssemblyBegin(vector); -
TabularUnified issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp ¶
r6323 r6412 33 33 num_notconverged=total_notconverged; 34 34 #endif 35 ISSMPRINTF(VerboseConvergence()," #elements above convergence criterion = %i\n",num_notconverged);35 _printf_(VerboseConvergence()," #elements above convergence criterion = %i\n",num_notconverged); 36 36 37 37 /*Free ressources:*/ -
TabularUnified issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp ¶
r6323 r6412 51 51 /*Now, pick up the parameter corresponding to root: */ 52 52 if(!parameters->FindParam(¶meter,NULL,StringToEnum(root))){ 53 ISSMERROR("%s%s"," could not find Qmu parameter: ",root);53 _error_("%s%s"," could not find Qmu parameter: ",root); 54 54 } 55 55 … … 82 82 } 83 83 else if (strncmp(descriptor,"indexed_",8)==0){ 84 ISSMERROR(" indexed variables not supported yet!");84 _error_(" indexed variables not supported yet!"); 85 85 } 86 86 else if (strncmp(descriptor,"nodal_",8)==0){ 87 ISSMERROR(" nodal variables not supported yet!");87 _error_(" nodal variables not supported yet!"); 88 88 } 89 89 else{ -
TabularUnified issm/trunk/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp ¶
r3913 r6412 35 35 /*Some checks on arguments: */ 36 36 if ((M<=2) || (N<=2) || (nods<=0)){ 37 ISSMERROR("nothing to be done according to the dimensions of input matrices and vectors.");37 _error_("nothing to be done according to the dimensions of input matrices and vectors."); 38 38 } 39 39 if (x_in[1]-x_in[0]<0){ 40 ISSMERROR("x coordinate vectore should be increasing.\n use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");40 _error_("x coordinate vectore should be increasing.\n use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)"); 41 41 } 42 42 if (y_in[1]-y_in[0]<0){ 43 ISSMERROR("y coordinate vectore should be increasing.\n use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");43 _error_("y coordinate vectore should be increasing.\n use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)"); 44 44 } 45 45 … … 67 67 } 68 68 else{ 69 ISSMERROR("x and y vectors length should be 1 or 0 more than data number of rows.");69 _error_("x and y vectors length should be 1 or 0 more than data number of rows."); 70 70 } 71 71 -
TabularUnified issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp ¶
r5032 r6412 33 33 /*some checks*/ 34 34 if (nels_data<1 || nods_data<3 || nods_prime==0){ 35 ISSMERROR("nothing to be done according to the mesh given in input");35 _error_("nothing to be done according to the mesh given in input"); 36 36 } 37 37 … … 47 47 } 48 48 else{ 49 ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");49 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!"); 50 50 } 51 51 52 52 if((numcontours) && (interpolation_type==2)){ 53 ISSMERROR(" element interpolation_type with contours not supported yet!");53 _error_(" element interpolation_type with contours not supported yet!"); 54 54 } 55 55 -
TabularUnified issm/trunk/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp ¶
r3913 r6412 33 33 /*some checks*/ 34 34 if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){ 35 ISSMERROR("nothing to be done according to the mesh given in input");35 _error_("nothing to be done according to the mesh given in input"); 36 36 } 37 37 … … 44 44 } 45 45 else{ 46 ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");46 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!"); 47 47 } 48 48 -
TabularUnified issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp ¶
r5607 r6412 39 39 /*Checks*/ 40 40 if (data_cols<=0){ 41 ISSMERROR("data provided has a negative number of columns");41 _error_("data provided has a negative number of columns"); 42 42 } 43 43 if (data_rows!=nods_data && data_rows!=nels_data){ 44 ISSMERROR("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows);44 _error_("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows); 45 45 } 46 46 if((num_default_values) && (data_cols>1)){ 47 ISSMERROR("data provided can only have 1 column if a default value is provided");47 _error_("data provided can only have 1 column if a default value is provided"); 48 48 } 49 49 … … 126 126 for (j=0;j<data_cols;j++){ 127 127 if (it<0 || it>=nels_data){ 128 ISSMERROR("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data);128 _error_("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data); 129 129 } 130 130 data_interp[i*data_cols+j]=data[data_cols*it+j]; -
TabularUnified issm/trunk/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp ¶
r3913 r6412 27 27 /*some checks*/ 28 28 if (nels_data<1 || nods_data<6 || nods_prime==0){ 29 ISSMERROR("nothing to be done according to the mesh given in input");29 _error_("nothing to be done according to the mesh given in input"); 30 30 } 31 31 … … 41 41 } 42 42 else{ 43 ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");43 _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!"); 44 44 } 45 45 -
TabularUnified issm/trunk/src/c/modules/MassFluxx/MassFluxx.cpp ¶
r5475 r6412 39 39 40 40 /*Retrieve index of segments being used for MassFlux computation: */ 41 if(!parameters->FindParam(&counter,IndexEnum)) ISSMERROR(" could not find IndexEnum");41 if(!parameters->FindParam(&counter,IndexEnum))_error_(" could not find IndexEnum"); 42 42 43 43 /*retrieve segments from array: */ -
TabularUnified issm/trunk/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp ¶
r6323 r6412 13 13 14 14 /*Display message*/ 15 ISSMPRINTF(VerboseModule()," Merging solution vector from fset to gset\n");15 _printf_(VerboseModule()," Merging solution vector from fset to gset\n"); 16 16 17 17 /*Merge f set back into g set: */ -
TabularUnified issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.cpp ¶
r4021 r6412 49 49 for (i=0;i<numberofgrids;i++) npart[i]=0; 50 50 } 51 else ISSMERROR("At least one processor is required");51 else _error_("At least one processor is required"); 52 52 } 53 53 else{ … … 74 74 for (i=0;i<numberofgrids2d;i++) npart2d[i]=0; 75 75 } 76 else ISSMERROR("At least one processor is required");76 else _error_("At least one processor is required"); 77 77 78 78 /*Extrude epart2d to epart, using numlayers: */ -
TabularUnified issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp ¶
r4994 r6412 38 38 if( (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum) ){ 39 39 /*This case is impossible: */ 40 ISSMERROR(" error: a line cannot go through 3 different vertices!");40 _error_(" 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)) ){ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp ¶
r5524 r6412 36 36 37 37 /*Check in 3d*/ 38 if(iomodel->prognostic_DG && iomodel->dim==3) ISSMERROR("DG 3d not implemented yet");38 if(iomodel->prognostic_DG && iomodel->dim==3) _error_("DG 3d not implemented yet"); 39 39 40 40 /*First fetch data: */ … … 70 70 vertex_id=(int)*(iomodel->elements+3*i+j); //(Matlab indexing) 71 71 io_index=vertex_id-1; //(C indexing) 72 ISSMASSERT(vertex_id>0 && vertex_id<=iomodel->numberofvertices);72 _assert_(vertex_id>0 && vertex_id<=iomodel->numberofvertices); 73 73 74 74 //Compute Node id -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp ¶
r6216 r6412 49 49 break; 50 50 default: 51 ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));51 _error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i])); 52 52 } 53 53 } -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp ¶
r6213 r6412 101 101 break; 102 102 default: 103 ISSMERROR("%s%s%s"," analysis_type: ",EnumToString(analysis_type)," not supported yet!");103 _error_("%s%s%s"," analysis_type: ",EnumToString(analysis_type)," not supported yet!"); 104 104 } 105 105 -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp ¶
r3984 r6412 25 25 26 26 /*Some checks if debugging*/ 27 ISSMASSERT(iomodel->numberofvertices);28 ISSMASSERT(iomodel->numberofelements);29 ISSMASSERT(iomodel->elements);27 _assert_(iomodel->numberofvertices); 28 _assert_(iomodel->numberofelements); 29 _assert_(iomodel->elements); 30 30 31 31 /*Allocate ouput*/ … … 44 44 for (j=0;j<elementswidth;j++){ 45 45 vertexid=(int)iomodel->elements[elementswidth*i+j]; 46 ISSMASSERT(vertexid>0 && vertexid-1<iomodel->numberofvertices);46 _assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices); 47 47 connectivity[vertexid-1]+=1; 48 48 } -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp ¶
r3984 r6412 25 25 26 26 /*Some checks if debugging*/ 27 ISSMASSERT(iomodel->numberofvertices);28 ISSMASSERT(iomodel->numberofelements);29 ISSMASSERT(iomodel->my_elements);30 ISSMASSERT(iomodel->elements);27 _assert_(iomodel->numberofvertices); 28 _assert_(iomodel->numberofelements); 29 _assert_(iomodel->my_elements); 30 _assert_(iomodel->elements); 31 31 32 32 /*Allocate ouput*/ … … 47 47 for (j=0;j<elementswidth;j++){ 48 48 vertexid=(int)iomodel->elements[elementswidth*i+j]; 49 ISSMASSERT(vertexid>0 && vertexid-1<iomodel->numberofvertices);49 _assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices); 50 50 connectivity[vertexid-1]=i+1; 51 51 } -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp ¶
r6141 r6412 81 81 82 82 } 83 else ISSMERROR("if vertices_type is MacAyealPattyn, you shoud have gridonpattyn or gridonmacayeal");83 else _error_("if vertices_type is MacAyealPattyn, you shoud have gridonpattyn or gridonmacayeal"); 84 84 } 85 85 /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/ … … 121 121 } 122 122 } 123 else ISSMERROR("if vertices_type is PattynStokes, you shoud have gridonpattyn or gridonstokes");123 else _error_("if vertices_type is PattynStokes, you shoud have gridonpattyn or gridonstokes"); 124 124 } 125 125 /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/ … … 161 161 } 162 162 } 163 else ISSMERROR("if vertices_type is MacAyealStokes, you shoud have gridonpattyn or gridonstokes");163 else _error_("if vertices_type is MacAyealStokes, you shoud have gridonpattyn or gridonstokes"); 164 164 } 165 165 /*Now add the regular spcs*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp ¶
r6149 r6412 139 139 140 140 /*In debugging mode, check that the second node is in the same cpu*/ 141 ISSMASSERT(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]);141 _assert_(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]); 142 142 143 143 /*Get node ids*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp ¶
r6141 r6412 61 61 doftype[5]=StokesApproximationEnum; 62 62 } 63 else ISSMERROR("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type));63 else _error_("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type)); 64 64 } 65 65 else if (analysis_type==DiagnosticVertAnalysisEnum){ … … 87 87 numdofs=1; 88 88 } 89 else ISSMERROR("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type));89 else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type)); 90 90 91 91 /*Now initialize the index*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp ¶
r4236 r6412 20 20 21 21 /*if 2d: Error*/ 22 if (iomodel->dim==2) ISSMERROR("2d meshes not supported yet");22 if (iomodel->dim==2) _error_("2d meshes not supported yet"); 23 23 24 24 /*Recover pointer: */ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp ¶
r6323 r6412 40 40 analysis_type=analysis_type_list[i]; 41 41 42 ISSMPRINTF(VerboseMProcessor()," create datasets for analysis %s\n",EnumToString(analysis_type));42 _printf_(VerboseMProcessor()," create datasets for analysis %s\n",EnumToString(analysis_type)); 43 43 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,¶meters,iomodel,IOMODEL,solution_type,analysis_type,nummodels,i); 44 44 } -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp ¶
r6235 r6412 87 87 } 88 88 else{ 89 ISSMERROR("not implemented yet");89 _error_("not implemented yet"); 90 90 } 91 91 … … 95 95 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle,"edges"); 96 96 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements"); 97 if (cols!=4) ISSMERROR("field edges should have 4 columns");97 if (cols!=4) _error_("field edges should have 4 columns"); 98 98 99 99 /*!All elements have been partitioned above, only create elements for this CPU: */ … … 136 136 } 137 137 else{ 138 ISSMERROR("Problem in edges creation");138 _error_("Problem in edges creation"); 139 139 } 140 140 } -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp ¶
r5524 r6412 36 36 37 37 /*Check in 3d*/ 38 if(iomodel->prognostic_DG && iomodel->dim==3) ISSMERROR("DG 3d not implemented yet");38 if(iomodel->prognostic_DG && iomodel->dim==3) _error_("DG 3d not implemented yet"); 39 39 40 40 /*First fetch data: */ … … 70 70 vertex_id=(int)*(iomodel->elements+3*i+j); //(Matlab indexing) 71 71 io_index=vertex_id-1; //(C indexing) 72 ISSMASSERT(vertex_id>0 && vertex_id<=iomodel->numberofvertices);72 _assert_(vertex_id>0 && vertex_id<=iomodel->numberofvertices); 73 73 74 74 //Compute Node id -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp ¶
r5529 r6412 180 180 *responses. Let's build a DoubleMatArrayParam object with the array of segments: */ 181 181 182 if(iomodel->qmu_mass_flux_num_profiles==0) ISSMERROR(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");182 if(iomodel->qmu_mass_flux_num_profiles==0)_error_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!"); 183 183 184 184 array=(double**)xmalloc(iomodel->qmu_mass_flux_num_profiles*sizeof(double*)); -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp ¶
r4236 r6412 27 27 28 28 /*return if 2d mesh*/ 29 if (iomodel->dim==2) ISSMERROR("2d meshes not supported yet");29 if (iomodel->dim==2) _error_("2d meshes not supported yet"); 30 30 31 31 //create penalties for grids: no grid can have a temperature over the melting point -
TabularUnified issm/trunk/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp ¶
r3913 r6412 71 71 * warn the user to increase the connectivity width: */ 72 72 for(i=0;i<nods;i++){ 73 if (*(connectivity+width*i+maxels)>maxels) ISSMERROR("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table");73 if (*(connectivity+width*i+maxels)>maxels)_error_("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table"); 74 74 } 75 75 -
TabularUnified issm/trunk/src/c/modules/PenaltyConstraintsx/PenaltyConstraintsx.cpp ¶
r6323 r6412 24 24 25 25 /*Display message*/ 26 ISSMPRINTF(VerboseModule()," Constraining penalties\n");26 _printf_(VerboseModule()," Constraining penalties\n"); 27 27 28 28 /*recover parameters: */ -
TabularUnified issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp ¶
r6323 r6412 55 55 } 56 56 else if(num_unstable_constraints<=min_mechanical_constraints){ 57 ISSMPRINTF(VerboseModule()," freezing constraints\n");57 _printf_(VerboseModule()," freezing constraints\n"); 58 58 RiftFreezeConstraints(loads,configuration_type); 59 59 } -
TabularUnified issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp ¶
r6323 r6412 52 52 /*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */ 53 53 MPI_Barrier(MPI_COMM_WORLD); 54 ISSMPRINTF(VerboseQmu(),"qmu iteration: %i\n",counter);54 _printf_(VerboseQmu(),"qmu iteration: %i\n",counter); 55 55 56 56 /*retrieve parameters: */ … … 66 66 67 67 /*Determine solution sequence: */ 68 ISSMPRINTF(VerboseQmu(),"%s%s%s\n","Starting ",EnumToString(solution_type)," core:");68 _printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToString(solution_type)," core:"); 69 69 SolutionConfiguration(NULL,NULL,&solutioncore,solution_type); 70 70 if(control_analysis)solutioncore=&control_core; … … 74 74 75 75 /*compute responses: */ 76 ISSMPRINTF(VerboseQmu(),"compute dakota responses:\n");76 _printf_(VerboseQmu(),"compute dakota responses:\n"); 77 77 DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses); 78 78 -
TabularUnified issm/trunk/src/c/modules/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp ¶
r6323 r6412 27 27 28 28 parameters->FindParam(&kffpartition,KffEnum); 29 ISSMPRINTF(VerboseModule()," Reducing Load vector from gset to fset\n");29 _printf_(VerboseModule()," Reducing Load vector from gset to fset\n"); 30 30 31 31 if(!pg){ -
TabularUnified issm/trunk/src/c/modules/Reduceloadx/Reduceloadx.cpp ¶
r6323 r6412 21 21 int verbose; 22 22 23 ISSMPRINTF(VerboseModule()," Dirichlet lifting applied to load vector\n");23 _printf_(VerboseModule()," Dirichlet lifting applied to load vector\n"); 24 24 25 25 if(pf && Kfs){ -
TabularUnified issm/trunk/src/c/modules/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp ¶
r6323 r6412 11 11 12 12 /*Display message*/ 13 ISSMPRINTF(VerboseModule()," Reducing Stiffness Matrix from gset to fset\n");13 _printf_(VerboseModule()," Reducing Stiffness Matrix from gset to fset\n"); 14 14 15 15 //Reduce matrix from g-size to f-size -
TabularUnified issm/trunk/src/c/modules/Responsex/Responsex.cpp ¶
r5473 r6412 38 38 case SurfaceAverageVelMisfitEnum: SurfaceAverageVelMisfitx( responses, elements,nodes, vertices, loads, materials, parameters,process_units); break; 39 39 case ThicknessAbsMisfitEnum: ThicknessAbsMisfitx( responses, elements,nodes, vertices, loads, materials, parameters,process_units); break; 40 default: ISSMERROR(" response descriptor \"%s\" not supported yet!",response_descriptor); break;40 default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break; 41 41 } 42 42 -
TabularUnified issm/trunk/src/c/modules/Solverx/Solverx.cpp ¶
r6323 r6412 33 33 34 34 /*Display message*/ 35 ISSMPRINTF(VerboseModule()," Solving\n");35 _printf_(VerboseModule()," Solving\n"); 36 36 if(VerboseSolver())PetscOptionsPrint(stdout); 37 37 … … 114 114 /*Check convergence*/ 115 115 KSPGetIterationNumber(ksp,&iteration_number); 116 if (iteration_number<0) ISSMERROR("%s%i"," Solver diverged at iteration number: ",-iteration_number);116 if (iteration_number<0) _error_("%s%i"," Solver diverged at iteration number: ",-iteration_number); 117 117 118 118 /*Free ressources:*/ -
TabularUnified issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp ¶
r6323 r6412 29 29 30 30 /*Display message*/ 31 ISSMPRINTF(VerboseModule()," Generating matrices\n");31 _printf_(VerboseModule()," Generating matrices\n"); 32 32 33 33 /*retrive parameters: */ … … 45 45 46 46 /*Checks in debugging mode {{{1*/ 47 if(penalty_kflag) ISSMASSERT(kflag);48 if(penalty_pflag) ISSMASSERT(pflag);47 if(penalty_kflag)_assert_(kflag); 48 if(penalty_pflag)_assert_(pflag); 49 49 /*}}}*/ 50 50 -
TabularUnified issm/trunk/src/c/objects/Bamg/BamgGeom.cpp ¶
r5187 r6412 71 71 fnames[i++] = "CrackedEdges"; 72 72 fnames[i++] = "SubDomains"; 73 ISSMASSERT(i==numfields);73 _assert_(i==numfields); 74 74 75 75 /*Initialize Matlab structure*/ … … 85 85 i++; SetMatlabStructureField(output,"CrackedEdges", this->CrackedEdgesSize[0], this->CrackedEdgesSize[1], this->CrackedEdges); 86 86 i++; SetMatlabStructureField(output,"SubDomains", this->SubDomainsSize[0], this->SubDomainsSize[1], this->SubDomains); 87 ISSMASSERT(i==numfields);87 _assert_(i==numfields); 88 88 89 89 /*Assign output*/ -
TabularUnified issm/trunk/src/c/objects/Bamg/BamgMesh.cpp ¶
r5573 r6412 120 120 fnames[i++] = "CrackedVertices"; 121 121 fnames[i++] = "CrackedEdges"; 122 ISSMASSERT(i==numfields);122 _assert_(i==numfields); 123 123 124 124 /*Initialize Matlab structure*/ … … 143 143 i++; SetMatlabStructureField(output,"CrackedVertices", this->CrackedVerticesSize[0], this->CrackedVerticesSize[1], this->CrackedVertices); 144 144 i++; SetMatlabStructureField(output,"CrackedEdges", this->CrackedEdgesSize[0], this->CrackedEdgesSize[1], this->CrackedEdges); 145 ISSMASSERT(i==numfields);145 _assert_(i==numfields); 146 146 147 147 /*Assign output*/ -
TabularUnified issm/trunk/src/c/objects/Bamg/BamgOpts.cpp ¶
r5187 r6412 100 100 int i; 101 101 102 if (this->anisomax<1) ISSMERROR("'anisomax' option should be >=1");103 if (this->coeff==0) ISSMERROR("'coeff' should be positive");104 if (this->errg<0) ISSMERROR("'errg' option should be >0");105 if (this->gradation<1) ISSMERROR("'gradation' option should be >=1");106 if (this->Hessiantype!=0 && this->Hessiantype!=1) ISSMERROR("'Hessiantype' supported options are 0 and 1");107 if (this->maxnbv<3) ISSMERROR("'maxnbv' option should be >3");108 if (this->maxsubdiv<=1) ISSMERROR("'maxsubdiv' should be >1");109 if (this->Metrictype!=0 && this->Metrictype!=1 && this->Metrictype!=2) ISSMERROR("'Metrictype' supported options are 0, 1 and 2");110 if (this->nbjacobi<=0) ISSMERROR("'nbjacobi' option should be >0");111 if (this->nbsmooth<=0) ISSMERROR("'nbsmooth' option should be >0");102 if (this->anisomax<1) _error_("'anisomax' option should be >=1"); 103 if (this->coeff==0) _error_("'coeff' should be positive"); 104 if (this->errg<0) _error_("'errg' option should be >0"); 105 if (this->gradation<1) _error_("'gradation' option should be >=1"); 106 if (this->Hessiantype!=0 && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1"); 107 if (this->maxnbv<3) _error_("'maxnbv' option should be >3"); 108 if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1"); 109 if (this->Metrictype!=0 && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2"); 110 if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0"); 111 if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0"); 112 112 113 if (this->Crack!=0 && this->Crack!=1) ISSMERROR("'Crack' supported options are 0 and 1");114 if (this->KeepVertices!=0 && this->KeepVertices!=1) ISSMERROR("'KeepVertices' supported options are 0 and 1");115 if (this->geometricalmetric!=0 && this->geometricalmetric!=1) ISSMERROR("'geometricalmetric' supported options are 0 and 1");113 if (this->Crack!=0 && this->Crack!=1) _error_("'Crack' supported options are 0 and 1"); 114 if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1"); 115 if (this->geometricalmetric!=0 && this->geometricalmetric!=1) _error_("'geometricalmetric' supported options are 0 and 1"); 116 116 117 if (this->hmin<=0) ISSMERROR("'hmin' option should be >0");118 if (this->hmax<=0 || this->hmax<this->hmin) ISSMERROR("'hmax' option should be between 0 and hmin=%g",this->hmin);119 if (this->hminVertices && this->hminVerticesSize[1]!=1) ISSMERROR("'hminVertices' should be a column");120 if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) ISSMERROR("'hmaxVertices' should be a column");121 if (this->hVertices && this->hVerticesSize[1]!=1) ISSMERROR("'hVertices' should be a column");122 if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) ISSMERROR("'metric' should have either 1 (iso) or 3 (aniso) columns.");117 if (this->hmin<=0) _error_("'hmin' option should be >0"); 118 if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=%g",this->hmin); 119 if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column"); 120 if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column"); 121 if (this->hVertices && this->hVerticesSize[1]!=1) _error_("'hVertices' should be a column"); 122 if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns."); 123 123 if (this->field){ 124 if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) ISSMERROR("'err' should be of size %i x %i",1,this->fieldSize[1]);125 for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) ISSMERROR("'err' option should be >0");};124 if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size %i x %i",1,this->fieldSize[1]); 125 for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");}; 126 126 } 127 127 -
TabularUnified issm/trunk/src/c/objects/Bamg/BamgVertex.cpp ¶
r5460 r6412 76 76 } 77 77 else{ 78 ISSMERROR("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);78 _error_("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype); 79 79 } 80 80 … … 146 146 j = NextEdge[jc]; 147 147 if (k>=2000){ 148 ISSMERROR("k>=2000 (Maximum number of iterations reached)");148 _error_("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 ISSMERROR("k>=2000");215 _error_("k>=2000"); 216 216 } 217 217 }while ( tbegin != tria); -
TabularUnified issm/trunk/src/c/objects/Bamg/Edge.cpp ¶
r5573 r6412 45 45 46 46 /*some shecks*/ 47 if (!(adj[0]==&e || adj[1]==&e)){ ISSMERROR("Intersection bug"); }48 ISSMASSERT(adj[0]==&e || adj[1]==&e);47 if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); } 48 _assert_(adj[0]==&e || adj[1]==&e); 49 49 50 50 return adj[0]==&e?0:1; -
TabularUnified issm/trunk/src/c/objects/Bamg/GeomEdge.cpp ¶
r5573 r6412 29 29 30 30 //Check that theta is in [0 1] 31 ISSMASSERT(theta>-1e-12 && theta<1+1e-12);31 _assert_(theta>-1e-12 && theta<1+1e-12); 32 32 33 33 if (TgA()){ … … 78 78 79 79 //check theta 80 ISSMASSERT(theta>=0 && theta<=1);80 _assert_(theta>=0 && theta<=1); 81 81 82 82 if (TgA()){ -
TabularUnified issm/trunk/src/c/objects/Bamg/Geometry.cpp ¶
r5573 r6412 48 48 Geometry::~Geometry() { 49 49 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/ 50 if(NbRef>0) ISSMERROR("Trying to delete geometry and NbRef>0");50 if(NbRef>0) _error_("Trying to delete geometry and NbRef>0"); 51 51 if(vertices) delete [] vertices; vertices=0; 52 52 if(edges) delete [] edges; edges=0; … … 76 76 77 77 //some checks 78 if (bamggeom->Vertices==NULL) ISSMERROR("the domain provided does not contain any vertex");79 if (bamggeom->Edges==NULL) ISSMERROR("the domain provided does not contain any edge");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"); 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) ISSMERROR("Vertices should have 3 columns");84 if (bamggeom->VerticesSize[1]!=3) _error_("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) ISSMERROR("coefIcoor should be positive");117 if(coefIcoor<=0) _error_("coefIcoor should be positive"); 118 118 } 119 119 else{ 120 ISSMERROR("No BamgVertex provided");120 _error_("No BamgVertex provided"); 121 121 } 122 122 … … 127 127 128 128 if(verbose>5) printf(" processing Edges\n"); 129 if (bamggeom->EdgesSize[1]!=3) ISSMERROR("Edges should have 3 columns");129 if (bamggeom->EdgesSize[1]!=3) _error_("Edges should have 3 columns"); 130 130 edges = new GeomEdge[nbe]; 131 131 … … 176 176 } 177 177 else{ 178 ISSMERROR("No edges provided");178 _error_("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) ISSMERROR("TangentAtEdges should have 4 columns");208 if (bamggeom->TangentAtEdgesSize[1]!=4) _error_("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) ISSMERROR("TangentAtEdges first index exceeds matrix dimension");219 if (j!=0 && j!=1) ISSMERROR("TangentAtEdges second index should be 1 or 2 only");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"); 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) ISSMERROR("Corners should have 1 column");227 if (bamggeom->CornersSize[1]!=1) _error_("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) ISSMERROR("Bad corner definition: should in [0 %i]",nbv);231 if (j>nbv-1 || j<0) _error_("Bad corner definition: should in [0 %i]",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) ISSMERROR("RequiredVertices should have 1 column");241 if (bamggeom->RequiredVerticesSize[1]!=1) _error_("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) ISSMERROR("Bad RequiredVerticess definition: should in [0 %i]",nbv);245 if (j>nbv-1 || j<0) _error_("Bad RequiredVerticess definition: should in [0 %i]",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) ISSMERROR("RequiredEdges should have 1 column");253 if (bamggeom->RequiredEdgesSize[1]!=1) _error_("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) ISSMERROR("Bad RequiredEdges definition: should in [0 %i]",nbe);257 if (j>nbe-1 || j<0) _error_("Bad RequiredEdges definition: should in [0 %i]",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) ISSMERROR("SubDomains should have 4 columns");265 if (bamggeom->SubDomainsSize[1]!=4) _error_("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) ISSMERROR("Bad Subdomain definition: first number should be 2 (for Edges)");274 if (i1>nbe || i1<=0) ISSMERROR("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe);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); 275 275 subdomains[i].edge=edges + (i1-1); 276 276 subdomains[i].direction = (int) i2; … … 478 478 while(pon != on){ 479 479 counter++; 480 ISSMASSERT(counter<100);480 _assert_(counter<100); 481 481 pon = on; 482 482 R2 A= (*on)[0]; … … 527 527 /*if there is a vertex found that is to close to vertices[i] -> error*/ 528 528 if( v && Norme1(v->r - vertices[i].r) < eps ){ 529 ISSMERROR("two points of the geometry are very closed to each other");529 _error_("two points of the geometry are very closed to each other"); 530 530 } 531 531 … … 601 601 double lv10=Norme2(v10); 602 602 //check that its length is not 0 603 if(lv10==0) ISSMERROR("Length of edge %i is 0",i);603 if(lv10==0)_error_("Length of edge %i is 0",i); 604 604 //compute angle in [-Pi Pi] 605 605 eangle[i] = atan2(v10.y,v10.x); … … 694 694 long i1 = n1/2 ,j1=n1%2; 695 695 696 if( edges[i1].v[j1] != edges[i].v[j]) ISSMERROR("Problem while processing edges: check the edge list");696 if( edges[i1].v[j1] != edges[i].v[j]) _error_("Problem while processing edges: check the edge list"); 697 697 698 698 edges[i1].Adj[j1] = edges + i; … … 796 796 } 797 797 } 798 ISSMASSERT(nb_marked_edges && nbe);798 _assert_(nb_marked_edges && nbe); 799 799 //allocate if first step 800 800 if(step==0) curves=new Curve[nbcurves]; … … 821 821 GeomEdge* on=e.GeomEdgeHook; 822 822 if (!on){ 823 ISSMERROR("ProjectOnCurve error message: edge provided should be on geometry");823 _error_("ProjectOnCurve error message: edge provided should be on geometry"); 824 824 } 825 825 if (!e[0].GeomEdgeHook || !e[1].GeomEdgeHook){ 826 ISSMERROR("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");826 _error_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry"); 827 827 } 828 828 … … 865 865 printf(" 2) code bug : be sure that we call Mesh::SetVertexFieldOn() before\n"); 866 866 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 867 ISSMERROR("see above");867 _error_("see above"); 868 868 } 869 869 NbTry++; … … 872 872 GeomEdge* tmpge = eg0; 873 873 ge[--bge] =eg0 = eg0->Adj[direction0]; 874 ISSMASSERT(bge>=0 && bge<=mxe);874 _assert_(bge>=0 && bge<=mxe); 875 875 direction0 = 1-( directionge[bge] = tmpge->AdjVertexIndex[direction0]); 876 876 } … … 885 885 printf(" 2) code bug : be sure that we call Mesh::SetVertexFieldOn() before\n"); 886 886 printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n"); 887 ISSMERROR("see above");887 _error_("see above"); 888 888 } 889 889 GeomEdge* tmpge = eg1; 890 890 ge[++tge] =eg1 = eg1->Adj[direction1]; 891 891 directionge[tge]= direction1 = 1-tmpge->AdjVertexIndex[direction1]; 892 ISSMASSERT(tge>=0 && tge<=mxe);892 _assert_(tge>=0 && tge<=mxe); 893 893 } 894 894 … … 912 912 double ll=0; 913 913 for(i=bge;i<tge;i++){ 914 ISSMASSERT(i>=0 && i<=mxe);914 _assert_(i>=0 && i<=mxe); 915 915 BB = (*ge[i])[directionge[i]]; 916 916 lge[i]=ll += Norme2(AA-BB); … … 918 918 lge[tge]=ll+=Norme2(AA-V1); 919 919 // search the geometrical edge 920 ISSMASSERT(s<=1.0);920 _assert_(s<=1.0); 921 921 double ls= s*ll; 922 922 on =0; … … 926 926 i=bge; 927 927 while ( (l1=lge[i]) < ls ) { 928 ISSMASSERT(i>=0 && i<=mxe);928 _assert_(i>=0 && i<=mxe); 929 929 i++,s0=1-(s1=directionge[i]),l0=l1; 930 930 } … … 936 936 sg =s0*(1.0-s)+s*s1; 937 937 } 938 ISSMASSERT(on);938 _assert_(on); 939 939 V.r= on->F(sg); 940 940 GV=VertexOnGeom(V,*on,sg); -
TabularUnified issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.cpp ¶
r5573 r6412 38 38 // check Size 39 39 if (Size<=0){ 40 ISSMERROR("Size<=0");40 _error_("Size<=0"); 41 41 } 42 42 … … 190 190 SegInterpolation * lEn = new SegInterpolation[MaxNbSeg]; 191 191 if (!lSegsI || NbSeg>=MaxNbSeg){ 192 ISSMERROR("!lSegsI || NbSeg>=MaxNbSeg");192 _error_("!lSegsI || NbSeg>=MaxNbSeg"); 193 193 } 194 194 for (int i=0;i< NbSeg;i++) … … 209 209 register int newsize = MaxSize*2; 210 210 IntersectionTriangles* nw = new IntersectionTriangles[newsize]; 211 ISSMASSERT(nw);211 _assert_(nw); 212 212 213 213 // recopy … … 271 271 k=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0; 272 272 if (k<0){ 273 ISSMERROR("k<0");273 _error_("k<0"); 274 274 } 275 275 ocut = OppositeEdge[k]; … … 315 315 double dij = detj-deti; 316 316 if (i+j+k != 0 + 1 +2){ 317 ISSMERROR("i+j+k != 0 + 1 +2");317 _error_("i+j+k != 0 + 1 +2"); 318 318 } 319 319 ba[j] = detj/dij; … … 387 387 } 388 388 else { 389 ISSMERROR("Bug Split Edge");389 _error_("Bug Split Edge"); 390 390 } 391 391 } -
TabularUnified issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.h ¶
r5573 r6412 34 34 double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01; 35 35 if (lBegin>s || s>lEnd){ 36 ISSMERROR("lBegin>s || s>lEnd");36 _error_("lBegin>s || s>lEnd"); 37 37 } 38 38 return e->F(sBegin*c0+sEnd*c1); -
TabularUnified issm/trunk/src/c/objects/Bamg/Mesh.cpp ¶
r5623 r6412 110 110 } 111 111 if (imaxnbv != nbv){ 112 ISSMERROR("imaxnbv != nbv");112 _error_("imaxnbv != nbv"); 113 113 } 114 114 for (i=0;i<Tho.nbt;i++) … … 120 120 int i2 = Tho.GetId(t[2]); 121 121 if (i0<0 || i1<0 || i2<0){ 122 ISSMERROR("i0<0 || i1<0 || i2< 0");122 _error_("i0<0 || i1<0 || i2< 0"); 123 123 } 124 124 if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){ 125 ISSMERROR("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");125 _error_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv"); 126 126 } 127 127 triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]); … … 130 130 } 131 131 if (kt!=nbt){ 132 ISSMERROR("kt!=nbt");132 _error_("kt!=nbt"); 133 133 } 134 134 if (nbt==0 && nbv==0) { 135 ISSMERROR("All triangles have been removed");135 _error_("All triangles have been removed"); 136 136 } 137 137 delete [] kk; … … 145 145 146 146 if (!nbsubdomains){ 147 ISSMERROR("nbsubdomains==0");147 _error_("nbsubdomains==0"); 148 148 } 149 149 if (!subdomains[0].head || !subdomains[0].head->link){ 150 ISSMERROR("!subdomains[0].head || !subdomains[0].head->link");150 _error_("!subdomains[0].head || !subdomains[0].head->link"); 151 151 } 152 152 … … 337 337 } 338 338 else{ 339 if(verbose>5) ISSMERROR("no Vertices found in the initial mesh");339 if(verbose>5) _error_("no Vertices found in the initial mesh"); 340 340 } 341 341 … … 355 355 } 356 356 else{ 357 if(verbose>5) ISSMERROR("no Triangles found in the initial mesh");357 if(verbose>5) _error_("no Triangles found in the initial mesh"); 358 358 } 359 359 … … 462 462 j0 = i0%2; 463 463 i0 = i0/2; 464 ISSMASSERT(v==edges[i0 ].v[j0]);464 _assert_(v==edges[i0 ].v[j0]); 465 465 edges[i ].adj[j ] =edges +i0; 466 466 edges[i0].adj[j0] =edges +i ; … … 481 481 //Check value 482 482 if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) { 483 ISSMERROR("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);483 _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); 484 484 } 485 485 edges[i].GeomEdgeHook=Gh.edges+j; … … 497 497 head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing 498 498 direction=(int)bamgmesh->SubDomains[i*3+2]; 499 if (i3!=23) ISSMERROR("Bad Subdomain definition: first number should be 3");500 if (head<0 || head>=nbt) ISSMERROR("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt);499 if (i3!=23) _error_("Bad Subdomain definition: first number should be 3"); 500 if (head<0 || head>=nbt) _error_("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt); 501 501 subdomains[i].head = triangles+head; 502 502 } … … 542 542 for (j=0;j<3;j++){ 543 543 int v=GetId(triangles[i][j]); //jth vertex of the ith triangle 544 if (k>3*nbt-1 || k<0) ISSMERROR("k = %i, nbt = %i",k,nbt);544 if (k>3*nbt-1 || k<0) _error_("k = %i, nbt = %i",k,nbt); 545 545 next_1[k]=head_1[v]; 546 if (v>nbv-1 || v<0) ISSMERROR("v = %i, nbv = %i",v,nbv);546 if (v>nbv-1 || v<0) _error_("v = %i, nbv = %i",v,nbv); 547 547 head_1[v]=k++; 548 548 connectivitysize_1[v]+=1; … … 636 636 } 637 637 } 638 ISSMASSERT(found);638 _assert_(found); 639 639 bamgmesh->IssmEdges[i*4+2]=elemedge[2*i+0]+1; // back to M indexing 640 640 bamgmesh->IssmEdges[i*4+3]=elemedge[2*i+1]+1; // back to M indexing … … 682 682 } 683 683 if (!stop){ 684 ISSMERROR("Element holding segment [%i %i] not found...",i1+1,i2+1);684 _error_("Element holding segment [%i %i] not found...",i1+1,i2+1); 685 685 } 686 686 } … … 765 765 for (i=0;i<NbVerticesOnGeomVertex;i++){ 766 766 VertexOnGeom &v=VerticesOnGeomVertex[i]; 767 ISSMASSERT(v.OnGeomVertex());767 _assert_(v.OnGeomVertex()); 768 768 bamgmesh->VerticesOnGeomVertex[i*2+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing 769 769 bamgmesh->VerticesOnGeomVertex[i*2+1]=Gh.GetId((GeomVertex*)v)+1; //back to Matlab indexing … … 780 780 const VertexOnGeom &v=VerticesOnGeomEdge[i]; 781 781 if (!v.OnGeomEdge()){ 782 ISSMERROR("A vertices supposed to be OnGeomEdge is actually not");782 _error_("A vertices supposed to be OnGeomEdge is actually not"); 783 783 } 784 784 bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing … … 820 820 k=GetId(triangles[i].TriangleAdj(j)); 821 821 if (reft[k]>=0){ 822 ISSMASSERT(3*num+j<3*(nbt-nbtout));822 _assert_(3*num+j<3*(nbt-nbtout)); 823 823 bamgmesh->ElementConnectivity[3*num+j]=k+1; // back to Matlab indexing 824 824 } … … 837 837 k=0; 838 838 for(j=head_1[i];j!=-1;j=next_1[j]){ 839 ISSMASSERT(connectivitymax_1*i+k < connectivitymax_1*nbv);839 _assert_(connectivitymax_1*i+k < connectivitymax_1*nbv); 840 840 bamgmesh->NodalElementConnectivity[connectivitymax_1*i+k]=floor(j/3)+1; 841 841 k++; … … 863 863 for (j=0;j<2;j++){ 864 864 int v=(int)bamgmesh->IssmEdges[i*i2+j]-1; //back to C indexing 865 if (k>2*i1-1 || k<0) ISSMERROR("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1);865 if (k>2*i1-1 || k<0) _error_("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1); 866 866 next_2[k]=head_2[v]; 867 if (v>nbv-1 || v<0) ISSMERROR("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1);867 if (v>nbv-1 || v<0) _error_("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1); 868 868 head_2[v]=k++; 869 869 connectivitysize_2[v]+=1; … … 882 882 k=0; 883 883 for(j=head_2[i];j!=-1;j=next_2[j]){ 884 ISSMASSERT(connectivitymax_2*i+k < connectivitymax_2*nbv);884 _assert_(connectivitymax_2*i+k < connectivitymax_2*nbv); 885 885 num=(int)bamgmesh->IssmEdges[int(j/2)*i2+0]; 886 886 if (i+1==num){ //carefull, ElementEdge is in M indexing … … 998 998 //check that hmax is positive 999 999 if (hmax<=0){ 1000 ISSMERROR("hmax<=0");1000 _error_("hmax<=0"); 1001 1001 } 1002 1002 … … 1027 1027 1028 1028 if (ht<=0 || hn<=0){ 1029 ISSMERROR("ht<=0 || hn<=0");1029 _error_("ht<=0 || hn<=0"); 1030 1030 } 1031 1031 EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg); … … 1052 1052 } 1053 1053 else{ 1054 ISSMERROR("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype);1054 _error_("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype); 1055 1055 } 1056 1056 } … … 1096 1096 //some checks 1097 1097 if (( infvertexindex <0 ) && (detOld <0) || ( infvertexindex >=0 ) && (detOld >0) ){ 1098 ISSMERROR("inconsistent configuration (Contact ISSM developers)");1098 _error_("inconsistent configuration (Contact ISSM developers)"); 1099 1099 } 1100 1100 … … 1138 1138 } 1139 1139 else{ 1140 ISSMERROR("Cannot add a vertex more than once. Check duplicates");1140 _error_("Cannot add a vertex more than once. Check duplicates"); 1141 1141 } 1142 1142 } … … 1151 1151 tt[2]= &triangles[nbt++]; 1152 1152 1153 if (nbt>maxnbt) ISSMERROR("Not enough triangles");1153 if (nbt>maxnbt) _error_("Not enough triangles"); 1154 1154 1155 1155 *tt[1]=*tt[2]=*t; … … 1188 1188 1189 1189 if (!rswap) { 1190 ISSMERROR("swap the point s is on a edge");1190 _error_("swap the point s is on a edge"); 1191 1191 } 1192 1192 } … … 1255 1255 //check that the mesh is not empty 1256 1256 if (nbt<=0 || nbv <=0 ) { 1257 ISSMERROR("nbt or nbv is negative (Mesh empty?)");1257 _error_("nbt or nbv is negative (Mesh empty?)"); 1258 1258 } 1259 1259 … … 1276 1276 //check that there is no double edge 1277 1277 if (nbe != edge4->nb()){ 1278 ISSMERROR("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb());1278 _error_("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()); 1279 1279 } 1280 1280 //keep nbe in nbeold … … 1296 1296 //check that it is not an edge on boundary (should not already exist) 1297 1297 if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){ 1298 ISSMERROR("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");1298 _error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)"); 1299 1299 } 1300 1300 //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list … … 1314 1314 printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3); 1315 1315 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)))); 1316 ISSMERROR("An edge belongs to more than 2 triangles");1316 _error_("An edge belongs to more than 2 triangles"); 1317 1317 } 1318 1318 } … … 1396 1396 //check that we have been through all edges 1397 1397 if (k!=nbe){ 1398 ISSMERROR("problem in edge construction process: k!=nbe (should not happen)");1398 _error_("problem in edge construction process: k!=nbe (should not happen)"); 1399 1399 } 1400 1400 //delete edgessave … … 1441 1441 //check that we have the correct vertex 1442 1442 if (v!=edges[i0 ].v[j0]){ 1443 ISSMERROR("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");1443 _error_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge"); 1444 1444 } 1445 1445 … … 1458 1458 //check that nbsubdomains is empty 1459 1459 if (nbsubdomains){ 1460 ISSMERROR("nbsubdomains should be 0");1460 _error_("nbsubdomains should be 0"); 1461 1461 } 1462 1462 nbsubdomains=0; … … 1526 1526 //check that we have been through all subdomains 1527 1527 if (k!= nbsubdomains){ 1528 ISSMERROR("k!= nbsubdomains");1528 _error_("k!= nbsubdomains"); 1529 1529 } 1530 1530 //delete colorT and st … … 1586 1586 Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y)); 1587 1587 if (Gh.coefIcoor<=0){ 1588 ISSMERROR("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");1588 _error_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)"); 1589 1589 } 1590 1590 … … 1637 1637 k = edge4->SortAndAdd(i0,i1); 1638 1638 if (k != i){ 1639 ISSMERROR("problem in Edge4 construction: k != i");1639 _error_("problem in Edge4 construction: k != i"); 1640 1640 } 1641 1641 } … … 1666 1666 } 1667 1667 else 1668 ISSMERROR("%i should be >=0");1668 _error_("%i should be >=0"); 1669 1669 } 1670 1670 … … 1700 1700 1701 1701 /*Check size*/ 1702 if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);1702 if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv); 1703 1703 1704 1704 //initialization of some variables … … 1905 1905 1906 1906 /*Check size*/ 1907 if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);1907 if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv); 1908 1908 1909 1909 //initialization of some variables … … 2219 2219 i1=GetId(edges[i][0]); 2220 2220 i2=GetId(edges[i][1]); 2221 ISSMASSERT(i1>=0 && i1<nbv && i2>=0 && i2<nbv);2221 _assert_(i1>=0 && i1<nbv && i2>=0 && i2<nbv); 2222 2222 splitvertex[i1]++; 2223 2223 splitvertex[i2]++; … … 2229 2229 //The vertex cannot be marked more than twice 2230 2230 if (splitvertex[i1]==3 || splitvertex[i2]==3){ 2231 ISSMERROR("Crossing rifts not supported yet");2232 } 2233 } 2234 } 2235 ISSMASSERT(k==NbCrackedEdges);2231 _error_("Crossing rifts not supported yet"); 2232 } 2233 } 2234 } 2235 _assert_(k==NbCrackedEdges); 2236 2236 2237 2237 //Add new vertices … … 2247 2247 } 2248 2248 } 2249 ISSMASSERT(num==NbCrackedVertices);2249 _assert_(num==NbCrackedVertices); 2250 2250 } 2251 2251 delete [] splitvertex; … … 2265 2265 Triangle* tbegin=vertices[i1].t; 2266 2266 k=vertices[i1].IndexInTriangle;//local number of i in triangle tbegin 2267 ISSMASSERT(GetId((*tbegin)[k])==GetId(vertices[i1]));2267 _assert_(GetId((*tbegin)[k])==GetId(vertices[i1])); 2268 2268 2269 2269 //Now, we are going to go through the adjacent triangle that hold i1 till … … 2307 2307 //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); 2308 2308 ta = Next(ta).Adj(); 2309 if (count++>50) ISSMERROR("Maximum number of iteration exceeded");2309 if (count++>50) _error_("Maximum number of iteration exceeded"); 2310 2310 }while ((tbegin != ta)); 2311 2311 } … … 2314 2314 for(i=0;i<NbCrackedEdges;i++){ 2315 2315 if (Edgeflags[i]!=2){ 2316 ISSMERROR("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1);2316 _error_("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1); 2317 2317 } 2318 2318 } … … 2364 2364 } 2365 2365 if (k!=0) { 2366 ISSMERROR("there is %i triangles of mes = 0",k);2366 _error_("there is %i triangles of mes = 0",k); 2367 2367 } 2368 2368 … … 2378 2378 if (nbswp) nbfe++; 2379 2379 if ( nbswp < 0 && k < 5){ 2380 ISSMERROR("Missing Edge %i, v0=%i,v1=%i",i,GetId(edges[i][0]),GetId(edges[i][1]));2380 _error_("Missing Edge %i, v0=%i,v1=%i",i,GetId(edges[i][0]),GetId(edges[i][1])); 2381 2381 } 2382 2382 } 2383 2383 2384 2384 if (k!=0) { 2385 ISSMERROR("There are %i lost edges, the boundary might be crossing",k);2385 _error_("There are %i lost edges, the boundary might be crossing",k); 2386 2386 } 2387 2387 for (int j=0;j<nbv;j++){ … … 2464 2464 it++;} // end while (it<nbt) 2465 2465 if (nbt == nbtout || !NbSubDomTot) { 2466 ISSMERROR("The boundary is not close: all triangles are outside");2466 _error_("The boundary is not close: all triangles are outside"); 2467 2467 } 2468 2468 … … 2501 2501 it++;} // end white (it<nbt) 2502 2502 if (k!=nbsubdomains){ 2503 ISSMERROR("k!=nbsubdomains");2503 _error_("k!=nbsubdomains"); 2504 2504 } 2505 2505 if(OutSide) … … 2571 2571 // see routine MakeGeomEdgeToEdge 2572 2572 Edge &e = *GeomEdgetoEdge[Gh.GetId(eg)]; 2573 ISSMASSERT(&e);2573 _assert_(&e); 2574 2574 BamgVertex * v0 = e(0),*v1 = e(1); 2575 2575 Triangle *t = v0->t; … … 2579 2579 subdomains[i].direction = direction; 2580 2580 subdomains[i].edge = &e; 2581 ISSMASSERT(t && direction);2581 _assert_(t && direction); 2582 2582 2583 2583 AdjacentTriangle ta(t,EdgesVertexTriangle[v0->IndexInTriangle][0]);// previous edges 2584 2584 2585 2585 while (1) { 2586 ISSMASSERT(v0==ta.EdgeVertex(1));2586 _assert_(v0==ta.EdgeVertex(1)); 2587 2587 if (ta.EdgeVertex(0) == v1) { // ok we find the edge 2588 2588 if (direction>0) … … 2591 2591 subdomains[i].head=t=ta; 2592 2592 if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) { 2593 ISSMERROR("bad definition of SubSomain %i",i);2593 _error_("bad definition of SubSomain %i",i); 2594 2594 } 2595 2595 long it = GetId(t); … … 2606 2606 kkk++; 2607 2607 if (mark[GetId(tt)]>=0){ 2608 ISSMERROR("mark[GetId(tt)]>=0");2608 _error_("mark[GetId(tt)]>=0"); 2609 2609 } 2610 2610 mark[GetId(tt)]=i; … … 2615 2615 ta = Previous(Adj(ta)); 2616 2616 if(t == (Triangle *) ta) { 2617 ISSMERROR("bad definition of SubSomain %i",i);2617 _error_("bad definition of SubSomain %i",i); 2618 2618 } 2619 2619 } … … 2702 2702 if (maxnbv_in) { 2703 2703 vertices=new BamgVertex[maxnbv]; 2704 ISSMASSERT(vertices);2704 _assert_(vertices); 2705 2705 orderedvertices=new (BamgVertex* [maxnbv]); 2706 ISSMASSERT(orderedvertices);2706 _assert_(orderedvertices); 2707 2707 triangles=new Triangle[maxnbt]; 2708 ISSMASSERT(triangles);2708 _assert_(triangles); 2709 2709 } 2710 2710 else { … … 2777 2777 //if i is higher than nbv, it means that all the determinants are 0, 2778 2778 //all vertices are aligned! 2779 if (++i>=nbv) ISSMERROR("all the vertices are aligned");2779 if (++i>=nbv) _error_("all the vertices are aligned"); 2780 2780 } 2781 2781 // exchange i et 2 in "orderedvertices" so that … … 2913 2913 long j=vj.ReferenceNumber; 2914 2914 if (&vj!=orderedvertices[j]){ 2915 ISSMERROR("&vj!= orderedvertices[j]");2915 _error_("&vj!= orderedvertices[j]"); 2916 2916 } 2917 2917 if(i!=j){ … … 2923 2923 if (tcvj && !tcvj->link){ 2924 2924 tcvj->Echo(); 2925 ISSMERROR("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link);2925 _error_("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link); 2926 2926 } 2927 2927 quadtree->Add(vj); … … 2955 2955 2956 2956 if (!Gh.nbe){ 2957 ISSMERROR("!Gh.nbe");2957 _error_("!Gh.nbe"); 2958 2958 } 2959 2959 Edge **e= new (Edge* [Gh.nbe]); … … 2988 2988 } 2989 2989 } 2990 if(kk) ISSMERROR("See above");2990 if(kk) _error_("See above"); 2991 2991 2992 2992 return e; … … 3187 3187 //check i 3188 3188 if (i<0 || i>=nbt ){ 3189 ISSMERROR("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1);3189 _error_("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1); 3190 3190 } 3191 3191 //change first_np_or_next_t[i] … … 3238 3238 } 3239 3239 if (ta.EdgeVertex(0)!=s){ 3240 ISSMERROR("ta.EdgeVertex(0)!=s");3240 _error_("ta.EdgeVertex(0)!=s"); 3241 3241 } 3242 3242 ta = Next(Adj(ta)); … … 3278 3278 } 3279 3279 else { 3280 ISSMERROR("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vA));3280 _error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vA)); 3281 3281 } 3282 3282 … … 3289 3289 } 3290 3290 else { 3291 ISSMERROR("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vB));3291 _error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vB)); 3292 3292 } 3293 3293 Edge * e = &BhAB; 3294 3294 if (!pA || !pB || !e){ 3295 ISSMERROR("!pA || !pB || !e");3295 _error_("!pA || !pB || !e"); 3296 3296 } 3297 3297 // be carefull the back ground edge e is on same geom edge … … 3299 3299 //check Is a background Mesh; 3300 3300 if (e<BTh.edges || e>=BTh.edges+BTh.nbe){ 3301 ISSMERROR("e<BTh.edges || e>=BTh.edges+BTh.nbe");3301 _error_("e<BTh.edges || e>=BTh.edges+BTh.nbe"); 3302 3302 } 3303 3303 // walk on BTh edge … … 3322 3322 } 3323 3323 else{ // do the search by walking 3324 ISSMERROR("case not supported yet");3324 _error_("case not supported yet"); 3325 3325 } 3326 3326 … … 3350 3350 3351 3351 kkk=kkk+1; 3352 ISSMASSERT(kkk<100);3353 ISSMASSERT(eee);3352 _assert_(kkk<100); 3353 _assert_(eee); 3354 3354 double lg0 = lg; 3355 3355 double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0); … … 3358 3358 double sss = (abscisse-lg0)/dp; 3359 3359 double thetab = te0*(1-sss)+ sss*iii; 3360 ISSMASSERT(thetab>=0 && thetab<=1);3360 _assert_(thetab>=0 && thetab<=1); 3361 3361 BR = VertexOnEdge(&R,eee,thetab); 3362 3362 return Gh.ProjectOnCurve(*eee,thetab,R,GR); … … 3369 3369 3370 3370 double lg0 = lg; 3371 ISSMASSERT(eee);3371 _assert_(eee); 3372 3372 v1 = pvB; 3373 3373 double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0); … … 3378 3378 double sss = (abscisse-lg0)/dp; 3379 3379 double thetab = te0*(1-sss)+ sss*tB; 3380 ISSMASSERT(thetab>=0 && thetab<=1);3380 _assert_(thetab>=0 && thetab<=1); 3381 3381 BR = VertexOnEdge(&R,eee,thetab); 3382 3382 return Gh.ProjectOnCurve(*eee,thetab,R,GR); … … 3386 3386 3387 3387 } 3388 ISSMERROR("Big bug...");3388 _error_("Big bug..."); 3389 3389 return 0; // just for the compiler 3390 3390 } … … 3412 3412 3413 3413 //initialize orderedvertices 3414 ISSMASSERT(orderedvertices);3414 _assert_(orderedvertices); 3415 3415 for (i=0;i<nbv;i++) orderedvertices[i]=0; 3416 3416 … … 3427 3427 } 3428 3428 if (kk != nbe){ 3429 ISSMERROR("There are %i double edges in the mesh",kk-nbe);3429 _error_("There are %i double edges in the mesh",kk-nbe); 3430 3430 } 3431 3431 … … 3446 3446 //If the edge already exists, add adjacency 3447 3447 else if(st[k]>=0) { 3448 ISSMASSERT(!triangles[i].TriangleAdj(j));3449 ISSMASSERT(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3)));3448 _assert_(!triangles[i].TriangleAdj(j)); 3449 _assert_(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3))); 3450 3450 3451 3451 triangles[i].SetAdj2(j,triangles+st[k]/3,(int)(st[k]%3)); … … 3459 3459 //An edge belongs to 2 triangles 3460 3460 else { 3461 ISSMERROR("The edge (%i , %i) belongs to more than 2 triangles",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]]));3461 _error_("The edge (%i , %i) belongs to more than 2 triangles",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]])); 3462 3462 } 3463 3463 } … … 3497 3497 } 3498 3498 if(k) { 3499 ISSMERROR("%i boundary edges (from the geometry) are not defined as mesh edges",k);3499 _error_("%i boundary edges (from the geometry) are not defined as mesh edges",k); 3500 3500 } 3501 3501 … … 3524 3524 for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 3525 3525 if (++i>=nbvb) { 3526 ISSMERROR("ReconstructExistingMesh: All the vertices are aligned");3526 _error_("ReconstructExistingMesh: All the vertices are aligned"); 3527 3527 } 3528 3528 //Move this vertex (i) to the 2d position in orderedvertices … … 3584 3584 } 3585 3585 if(nbloss) { 3586 ISSMERROR("we lost %i existing edges other %i",nbloss,knbe);3586 _error_("we lost %i existing edges other %i",nbloss,knbe); 3587 3587 } 3588 3588 … … 3605 3605 long k =edge4->SortAndAdd(v0?GetId(v0):nbv,v1? GetId(v1):nbv); 3606 3606 3607 ISSMASSERT(st[k]>=0);3607 _assert_(st[k]>=0); 3608 3608 tta.SetAdj2(ja,savetriangles + st[k] / 3,(int) (st[k]%3)); 3609 3609 ta.SetLock(); … … 3623 3623 } 3624 3624 } 3625 ISSMASSERT(savenbt+NbTfillHoll<=savemaxnbt);3625 _assert_(savenbt+NbTfillHoll<=savemaxnbt); 3626 3626 3627 3627 // copy of the outside triangles in saveMesh … … 3659 3659 subdomains = savesubdomains; 3660 3660 if (k) { 3661 ISSMERROR("number of triangles edges alone = %i",k);3661 _error_("number of triangles edges alone = %i",k); 3662 3662 } 3663 3663 FindSubDomain(); … … 3689 3689 3690 3690 printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n"); 3691 ISSMERROR("See above (might be cryptic...)");3691 _error_("See above (might be cryptic...)"); 3692 3692 } 3693 3693 } … … 3712 3712 t=t0=subdomains[i].head; 3713 3713 if (!t0){ // not empty sub domain 3714 ISSMERROR("!t0");3714 _error_("!t0"); 3715 3715 } 3716 3716 do { 3717 3717 long kt = GetId(t); 3718 3718 if (kt<0 || kt >= nbt ){ 3719 ISSMERROR("kt<0 || kt >= nbt");3719 _error_("kt<0 || kt >= nbt"); 3720 3720 } 3721 3721 if (renu[kt]!=-1){ 3722 ISSMERROR("renu[kt]!=-1");3722 _error_("renu[kt]!=-1"); 3723 3723 } 3724 3724 renu[kt]=k++; … … 3737 3737 } 3738 3738 if (k != nbt){ 3739 ISSMERROR("k != nbt");3739 _error_("k != nbt"); 3740 3740 } 3741 3741 // do the change on all the pointeur … … 3863 3863 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 3864 3864 if (coefIcoor<=0){ 3865 ISSMERROR("coefIcoor should be positive, a problem in the geometry is likely");3865 _error_("coefIcoor should be positive, a problem in the geometry is likely"); 3866 3866 } 3867 3867 … … 3899 3899 } 3900 3900 3901 if (number_of_errors) ISSMERROR("Fatal error: some triangles have negative areas, see above");3901 if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above"); 3902 3902 } 3903 3903 /*}}}1*/ … … 4080 4080 register Triangle* t= vertices[i].t; 4081 4081 if (!t){ 4082 ISSMERROR("!t");4082 _error_("!t"); 4083 4083 } 4084 4084 BamgVertex & vi = vertices[i]; … … 4088 4088 ta=Previous(Adj(ta)); 4089 4089 if (vertices+i != ta.EdgeVertex(1)){ 4090 ISSMERROR("vertices+i != ta.EdgeVertex(1)");4090 _error_("vertices+i != ta.EdgeVertex(1)"); 4091 4091 } 4092 4092 BamgVertex & vj = *(ta.EdgeVertex(0)); … … 4094 4094 j= &vj-vertices; 4095 4095 if (j<0 || j >= nbv){ 4096 ISSMERROR("j<0 || j >= nbv");4096 _error_("j<0 || j >= nbv"); 4097 4097 } 4098 4098 R2 Aij = (R2) vj - (R2) vi; … … 4218 4218 // the first PB is to now a background edge between the 2 vertices 4219 4219 if (!edgesGtoB){ 4220 ISSMERROR("!edgesGtoB");4220 _error_("!edgesGtoB"); 4221 4221 } 4222 4222 ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)], … … 4290 4290 Triangle & t = triangles[i]; 4291 4291 if (!t.link){ 4292 ISSMERROR("!t.link");4292 _error_("!t.link"); 4293 4293 } 4294 4294 for(int j=0;j<3;j++) … … 4317 4317 || (cc=Area2( t[0].r , t[1].r , A.r )) < 0.0)){ 4318 4318 printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd); 4319 ISSMERROR("Number of triangles with P2 interpolation Problem");4319 _error_("Number of triangles with P2 interpolation Problem"); 4320 4320 } 4321 4321 } … … 4325 4325 || (cc=Area2( tt[0].r , tt[1].r , A.r )) < 0)){ 4326 4326 printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd); 4327 ISSMERROR("Number of triangles with P2 interpolation Problem");4327 _error_("Number of triangles with P2 interpolation Problem"); 4328 4328 } 4329 4329 } … … 4373 4373 } // tt 4374 4374 else 4375 ISSMERROR("Bug...");4375 _error_("Bug..."); 4376 4376 } // ke<0 4377 4377 else … … 4386 4386 } 4387 4387 if (nbinvisible>=2){ 4388 ISSMERROR("nbinvisible>=2");4388 _error_("nbinvisible>=2"); 4389 4389 } 4390 4390 switch (nbsplitedge) { … … 4398 4398 } 4399 4399 if (ksplit[i]<40){ 4400 ISSMERROR("ksplit[i]<40");4400 _error_("ksplit[i]<40"); 4401 4401 } 4402 4402 } … … 4415 4415 int ke=(int) (ksplit[i]%10); 4416 4416 if (kk>=7 || kk<=0){ 4417 ISSMERROR("kk>=7 || kk<=0");4417 _error_("kk>=7 || kk<=0"); 4418 4418 } 4419 4419 … … 4432 4432 4433 4433 if (nbmkadj>=10){ 4434 ISSMERROR("nbmkadj>=10");4434 _error_("nbmkadj>=10"); 4435 4435 } 4436 4436 // -------------------------- … … 4450 4450 t1=t0; 4451 4451 if (kedge[3*i+i0]<0){ 4452 ISSMERROR("kedge[3*i+i0]<0");4452 _error_("kedge[3*i+i0]<0"); 4453 4453 } 4454 4454 BamgVertex * v3 = vertices + kedge[3*i+k0]; … … 4466 4466 t2=t1=t0; 4467 4467 if (kedge[3*i+k1]<0){ 4468 ISSMERROR("kedge[3*i+k1]<0");4468 _error_("kedge[3*i+k1]<0"); 4469 4469 } 4470 4470 if (kedge[3*i+k2]<0){ 4471 ISSMERROR("kedge[3*i+k2]<0");4471 _error_("kedge[3*i+k2]<0"); 4472 4472 } 4473 4473 … … 4493 4493 t3=t2=t1=t0; 4494 4494 if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){ 4495 ISSMERROR("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");4495 _error_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0"); 4496 4496 } 4497 4497 BamgVertex * v12 = vertices + kedge[3*i+k0]; … … 4567 4567 } 4568 4568 if (nbmkadj>13){// 13 = 6 + 4 + 4569 ISSMERROR("nbmkadj>13");4569 _error_("nbmkadj>13"); 4570 4570 } 4571 4571 … … 4693 4693 quadtree->Add(vi); 4694 4694 if (!tcvi || tcvi->det<0){// internal 4695 ISSMERROR("!tcvi || tcvi->det < 0");4695 _error_("!tcvi || tcvi->det < 0"); 4696 4696 } 4697 4697 AddVertex(vi,tcvi,det3); … … 4737 4737 4738 4738 /*Check that the quadtree does exist*/ 4739 if (!quadtree) ISSMERROR("no starting triangle provided and no quadtree available");4739 if (!quadtree) _error_("no starting triangle provided and no quadtree available"); 4740 4740 4741 4741 /*Call NearestVertex*/ … … 4743 4743 4744 4744 /*Check output (Vertex a)*/ 4745 if (!a) ISSMERROR("problem while trying to find nearest vertex from a given point. No output found");4746 if (!a->t) ISSMERROR("no triangle is associated to vertex number %i (orphan?)",GetId(a)+1);4747 ISSMASSERT(a>=vertices && a<vertices+nbv);4745 if (!a) _error_("problem while trying to find nearest vertex from a given point. No output found"); 4746 if (!a->t) _error_("no triangle is associated to vertex number %i (orphan?)",GetId(a)+1); 4747 _assert_(a>=vertices && a<vertices+nbv); 4748 4748 4749 4749 /*Get starting triangle*/ 4750 4750 t = a->t; 4751 ISSMASSERT(t>=triangles && t<triangles+nbt);4751 _assert_(t>=triangles && t<triangles+nbt); 4752 4752 } 4753 4753 … … 4762 4762 /*Get a real vertex from this triangle (k0)*/ 4763 4763 int k0=(*t)(0)?(((*t)(1)?((*t)(2)?-1:2):1)):0; 4764 ISSMASSERT(k0>=0);// k0 the NULL vertex4764 _assert_(k0>=0);// k0 the NULL vertex 4765 4765 int k1=NextVertex[k0],k2=PreviousVertex[k0]; 4766 4766 det3[k0]=det(B,(*t)[k1],(*t)[k2]); … … 4770 4770 t = t->TriangleAdj(OppositeEdge[k0]); 4771 4771 counter++; 4772 ISSMASSERT(counter<2);4772 _assert_(counter<2); 4773 4773 } 4774 4774 … … 4779 4779 4780 4780 /*Increase counter*/ 4781 if (++counter>=10000) ISSMERROR("Maximum number of iteration reached (threshold = %i).",counter);4781 if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = %i).",counter); 4782 4782 4783 4783 j= OppositeVertex[jj]; … … 4799 4799 if (k==0) break; 4800 4800 if (k==2 && BinaryRand()) Exchange(ii[0],ii[1]); 4801 ISSMASSERT(k<3);4801 _assert_(k<3); 4802 4802 AdjacentTriangle t1 = t->Adj(jj=ii[0]); 4803 4803 if ((t1.det() < 0 ) && (k == 2)) … … 4843 4843 4844 4844 //check that the subdomain is not empty 4845 if (!t0){ ISSMERROR("At least one subdomain is empty");}4845 if (!t0){ _error_("At least one subdomain is empty");} 4846 4846 4847 4847 //loop … … 4853 4853 4854 4854 //check that num is in [0 nbt[ 4855 ISSMASSERT(num>=0 && num<nbt);4855 _assert_(num>=0 && num<nbt); 4856 4856 4857 4857 //reft of this triangle is the subdomain number … … 4899 4899 //allocate 4900 4900 VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 4901 if(NbVerticesOnGeomVertex >= maxnbv) ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);4902 ISSMASSERT(nbv==0);4901 if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv); 4902 _assert_(nbv==0); 4903 4903 //Build VerticesOnGeomVertex 4904 4904 for (i=0;i<Gh.nbv;i++){ … … 4907 4907 4908 4908 //Add the vertex 4909 ISSMASSERT(nbv<maxnbv);4909 _assert_(nbv<maxnbv); 4910 4910 vertices[nbv]=Gh[i]; 4911 4911 … … 4924 4924 4925 4925 //check that edges is still empty (Init) 4926 ISSMASSERT(!edges);4926 _assert_(!edges); 4927 4927 4928 4928 /* Now we are going to create the first edges corresponding … … 4968 4968 4969 4969 //check that edges has been allocated 4970 ISSMASSERT(edges);4970 _assert_(edges); 4971 4971 edges[nbe].v[0]=a->MeshVertexHook; 4972 4972 edges[nbe].v[1]=b->MeshVertexHook;; … … 4988 4988 NbNewPoints=0; 4989 4989 NbEdgeCurve=0; 4990 if (nbvend>=maxnbv) ISSMERROR("maximum number of vertices too low! Check the domain outline or increase maxnbv");4990 if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv"); 4991 4991 lcurve =0; 4992 4992 s = lstep; //-1 initially, then length of each sub edge … … 5071 5071 kk0=kkk,ll0=llk; 5072 5072 } 5073 ISSMASSERT(kk1!=kk0);5073 _assert_(kk1!=kk0); 5074 5074 5075 5075 /*Curvilinear coordinate in [0 1] of ss in current edge*/ … … 5115 5115 k = e->AdjVertexIndex[kprev];// next vertices 5116 5116 e = e->Adj[kprev]; 5117 ISSMASSERT(e);5117 _assert_(e); 5118 5118 }// for(;;) 5119 5119 vb = b->MeshVertexHook; … … 5146 5146 } // for (i=0;i<nbe;i++) 5147 5147 if(!step) { 5148 ISSMASSERT(!edges);5149 ISSMASSERT(!VerticesOnGeomEdge);5148 _assert_(!edges); 5149 _assert_(!VerticesOnGeomEdge); 5150 5150 5151 5151 edges = new Edge[nbex=nbe]; … … 5153 5153 5154 5154 // do the vertex on a geometrical vertex 5155 ISSMASSERT(VerticesOnGeomEdge || NbVerticesOnGeomEdge0==0);5155 _assert_(VerticesOnGeomEdge || NbVerticesOnGeomEdge0==0); 5156 5156 NbVerticesOnGeomEdge0 = NbVerticesOnGeomEdge; 5157 5157 } 5158 5158 else{ 5159 ISSMASSERT(NbVerticesOnGeomEdge==NbVerticesOnGeomEdge0);5159 _assert_(NbVerticesOnGeomEdge==NbVerticesOnGeomEdge0); 5160 5160 } 5161 5161 } … … 5207 5207 5208 5208 //Check that background mesh and current mesh do have the same geometry 5209 ISSMASSERT(&BTh.Gh==&Gh);5209 _assert_(&BTh.Gh==&Gh); 5210 5210 BTh.NbRef++; // add a ref to BackGround Mesh 5211 5211 … … 5228 5228 int i; 5229 5229 for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++; 5230 if(NbVerticesOnGeomVertex >= maxnbv) { ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);}5230 if(NbVerticesOnGeomVertex >= maxnbv) { _error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);} 5231 5231 5232 5232 VerticesOnGeomVertex = new VertexOnGeom[ NbVerticesOnGeomVertex]; … … 5234 5234 5235 5235 //At this point there is NO vertex but vertices should have been allocated by Init 5236 ISSMASSERT(vertices);5236 _assert_(vertices); 5237 5237 for (i=0;i<Gh.nbv;i++){ 5238 5238 if (Gh[i].Required()) {//Gh vertices Required … … 5250 5250 GeomVertex* gv=vog; 5251 5251 BamgVertex *bv = vog; 5252 ISSMASSERT(gv->MeshVertexHook); // use of Geom -> Th5252 _assert_(gv->MeshVertexHook); // use of Geom -> Th 5253 5253 VertexOnBThVertex[NbVertexOnBThVertex++]=VertexOnVertex(gv->MeshVertexHook,bv); 5254 5254 gv->MeshVertexHook->m = bv->m; // for taking the metrix of the background mesh 5255 5255 } 5256 5256 } 5257 ISSMASSERT(NbVertexOnBThVertex==NbVerticesOnGeomVertex);5257 _assert_(NbVertexOnBThVertex==NbVerticesOnGeomVertex); 5258 5258 5259 5259 /*STEP 2: reseed boundary edges*/ … … 5296 5296 } 5297 5297 } 5298 if (bfind!=Gh.nbcurves) ISSMERROR("problem generating number of curves (%i found in the geometry but %i curve found in the mesh)",Gh.nbcurves,bfind);5298 if (bfind!=Gh.nbcurves) _error_("problem generating number of curves (%i found in the geometry but %i curve found in the mesh)",Gh.nbcurves,bfind); 5299 5299 5300 5300 // method in 2 + 1 step … … 5358 5358 5359 5359 // New Curve phase 5360 ISSMASSERT(A0-vertices>=0 && A0-vertices<nbv);5360 _assert_(A0-vertices>=0 && A0-vertices<nbv); 5361 5361 if(ongequi->Required()){ 5362 5362 GeomVertex *GA1 = *(*peequi)[1-k0equi].GeomEdgeHook; … … 5369 5369 k1 = 1-k0; // next vertex of the edge 5370 5370 k1equi= 1 - k0equi; 5371 ISSMASSERT(pe && ee.GeomEdgeHook);5371 _assert_(pe && ee.GeomEdgeHook); 5372 5372 ee.GeomEdgeHook->SetMark(); 5373 5373 BamgVertex & v0=ee[0], & v1=ee[1]; … … 5382 5382 5383 5383 //some checks 5384 ISSMASSERT(sNew>=L0);5385 ISSMASSERT(LAB);5386 ISSMASSERT(vertices && nbv<maxnbv);5387 ISSMASSERT(edges && nbe<nbex);5388 ISSMASSERT(VerticesOnGeomEdge && NbVerticesOnGeomEdge<NbVerticesOnGeomEdgex);5384 _assert_(sNew>=L0); 5385 _assert_(LAB); 5386 _assert_(vertices && nbv<maxnbv); 5387 _assert_(edges && nbe<nbex); 5388 _assert_(VerticesOnGeomEdge && NbVerticesOnGeomEdge<NbVerticesOnGeomEdgex); 5389 5389 5390 5390 // new vertex on edge … … 5394 5394 double se= (sNew-L0)/LAB; 5395 5395 if (se<0 || se>=1.000000001){ 5396 ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se);5396 _error_("Problem creating point on a boundary: se=%g should be in [0 1]",se); 5397 5397 } 5398 5398 se = abscisseInterpole(v0.m,v1.m,AB,se,1); 5399 5399 if (se<0 || se>1){ 5400 ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se);5400 _error_("Problem creating point on a boundary: se=%g should be in [0 1]",se); 5401 5401 } 5402 5402 se = k1 ? se : 1. - se; … … 5421 5421 5422 5422 //some checks 5423 ISSMASSERT(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber);5423 _assert_(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber); 5424 5424 if (ee[k1].GeomEdgeHook->IsRequiredVertex()) { 5425 ISSMASSERT(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex());5425 _assert_(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex()); 5426 5426 register GeomVertex * GA1 = *eeequi[k1equi].GeomEdgeHook; 5427 5427 A1=GA1->MeshVertexHook;// the vertex in new mesh 5428 ISSMASSERT(A1-vertices>=0 && A1-vertices<nbv);5428 _assert_(A1-vertices>=0 && A1-vertices<nbv); 5429 5429 break; 5430 5430 } 5431 5431 if (!ee.adj[k1]) { 5432 ISSMERROR(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.GetId(ee),nbe,Gh.vertices);5432 _error_(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.GetId(ee),nbe,Gh.vertices); 5433 5433 } 5434 5434 pe = ee.adj[k1]; // next edge … … 5451 5451 PreviousNewEdge = e; 5452 5452 5453 ISSMASSERT(i==NbCreatePointOnCurve);5453 _assert_(i==NbCreatePointOnCurve); 5454 5454 } 5455 5455 … … 5468 5468 if(step==0){ 5469 5469 if(nbv+NbOfNewPoints > maxnbv) { 5470 ISSMERROR("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,maxnbv);5470 _error_("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,maxnbv); 5471 5471 } 5472 5472 edges = new Edge[NbOfNewEdge]; … … 5482 5482 } 5483 5483 } 5484 ISSMASSERT(nbe!=0);5484 _assert_(nbe!=0); 5485 5485 delete [] bcurve; 5486 5486 … … 5513 5513 int dir=0; 5514 5514 if (k<0){ 5515 ISSMERROR("k<0");5515 _error_("k<0"); 5516 5516 } 5517 5517 int kkk=0; … … 5521 5521 kkk++; 5522 5522 if (kkk>=1000){ 5523 ISSMERROR("kkk>=1000");5523 _error_("kkk>=1000"); 5524 5524 } 5525 5525 BamgVertex &vI = *edge.EdgeVertex(0); … … 5538 5538 double IJ2 = IJ_IA + IJ_AJ; 5539 5539 if (IJ2==0){ 5540 ISSMERROR("IJ2==0");5540 _error_("IJ2==0"); 5541 5541 } 5542 5542 a= IJ_AJ/IJ2; … … 5556 5556 // int dir=0; 5557 5557 if (t->link != 0){ 5558 ISSMERROR("t->link != 0");5558 _error_("t->link != 0"); 5559 5559 } 5560 5560 // to have a starting edges … … 5628 5628 } 5629 5629 if (cas ==-2){ 5630 ISSMERROR("cas==-2");5630 _error_("cas==-2"); 5631 5631 } 5632 5632 // l1 = ||C s1|| , l0 = ||C s0|| … … 5645 5645 kkk++; 5646 5646 if (edge.EdgeVertex(0)!=s && kkk>=10000){ 5647 ISSMERROR("edge.EdgeVertex(0)!=s && kkk>=10000");5647 _error_("edge.EdgeVertex(0)!=s && kkk>=10000"); 5648 5648 } 5649 5649 … … 5677 5677 5678 5678 if (!(Triangle *) er){ 5679 ISSMERROR("!(Triangle *) er");5679 _error_("!(Triangle *) er"); 5680 5680 } 5681 5681 I2 A((I2)*er.EdgeVertex(0)); … … 5701 5701 int NbSwap =0; 5702 5702 if (!a.t || !b.t){ // the 2 vertex is in a mesh 5703 ISSMERROR("!a.t || !b.t");5703 _error_("!a.t || !b.t"); 5704 5704 } 5705 5705 int k=0; … … 5718 5718 vbegin =v2; 5719 5719 if (!v2){ 5720 ISSMERROR("!v2");5720 _error_("!v2"); 5721 5721 } 5722 5722 det2 = det(*v2,a,b); … … 5735 5735 tc = Previous(tc); 5736 5736 if (!v1 || !v2){ 5737 ISSMERROR("!v1 || !v2");5737 _error_("!v1 || !v2"); 5738 5738 } 5739 5739 Icoor2 detss = 0,l=0,ks; 5740 5740 while ((ks=SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 5741 5741 if(l++ > 10000000) { 5742 ISSMERROR("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l);5742 _error_("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l); 5743 5743 } 5744 5744 BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); … … 5759 5759 k++; 5760 5760 if (k>=2000){ 5761 ISSMERROR("k>=2000");5761 _error_("k>=2000"); 5762 5762 } 5763 5763 if ( vbegin == v2 ) return -1;// error … … 5831 5831 short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles 5832 5832 if ( a1<0 || a1>=3 ){ 5833 ISSMERROR("a1<0 || a1>=3");5833 _error_("a1<0 || a1>=3"); 5834 5834 } 5835 5835 … … 5843 5843 Icoor2 detT = det1+det2; 5844 5844 if ((det1<=0 ) || (det2<=0)){ 5845 ISSMERROR("(det1<=0 ) || (det2<=0)");5845 _error_("(det1<=0 ) || (det2<=0)"); 5846 5846 } 5847 5847 if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb 5848 ISSMERROR("(detsa>=0) || (detsb<=0)");5848 _error_("(detsa>=0) || (detsb<=0)"); 5849 5849 } 5850 5850 Icoor2 ndet1 = bamg::det(s1,sa,s2); -
TabularUnified issm/trunk/src/c/objects/Bamg/Metric.cpp ¶
r5489 r6412 201 201 // warning for optimisation S is in [0:0.5] not in [0:1] 202 202 if (i>=512){ 203 ISSMERROR("i>=512");203 _error_("i>=512"); 204 204 } 205 205 LastMetricInterpole.lab=l; … … 345 345 } 346 346 if (r>1 || r<0){ 347 ISSMERROR("r>1 || r<0");347 _error_("r>1 || r<0"); 348 348 } 349 349 return r ; -
TabularUnified issm/trunk/src/c/objects/Bamg/QuadTree.cpp ¶
r5300 r6412 126 126 127 127 /*Check Sizes*/ 128 ISSMASSERT(MaxISize>MaxICoor);128 _assert_(MaxISize>MaxICoor); 129 129 130 130 /*Add all vertices of the mesh*/ … … 180 180 181 181 /*check that l is not 0 (this should not happen as MaxDeep = 30)*/ 182 ISSMASSERT(level>0);182 _assert_(level>0); 183 183 184 184 /*Now, try to add the vertex, if the subbox is full (nbitems=4), we have to divide it -
TabularUnified issm/trunk/src/c/objects/Bamg/QuadTree.h ¶
r5269 r6412 29 29 }; 30 30 /*Object functions*/ 31 void Echo(){ ISSMERROR("not implemented yet");};32 void DeepEcho(){ ISSMERROR("not implemented yet");};33 int Id(){ ISSMERROR("not implemented yet");};34 int MyRank(){ ISSMERROR("not implemented yet");};35 void Marshall(char** pmarshalled_dataset){ ISSMERROR("not implemented yet");};36 int MarshallSize(){ ISSMERROR("not implemented yet");};37 void Demarshall(char** pmarshalled_dataset){ ISSMERROR("not implemented yet");};38 int Enum(){ ISSMERROR("not implemented yet");};39 Object* copy(){ ISSMERROR("not implemented yet");};31 void Echo(){_error_("not implemented yet");}; 32 void DeepEcho(){_error_("not implemented yet");}; 33 int Id(){_error_("not implemented yet");}; 34 int MyRank(){_error_("not implemented yet");}; 35 void Marshall(char** pmarshalled_dataset){_error_("not implemented yet");}; 36 int MarshallSize(){_error_("not implemented yet");}; 37 void Demarshall(char** pmarshalled_dataset){_error_("not implemented yet");}; 38 int Enum(){_error_("not implemented yet");}; 39 Object* copy(){_error_("not implemented yet");}; 40 40 }; 41 41 -
TabularUnified issm/trunk/src/c/objects/Bamg/SetOfE4.cpp ¶
r5150 r6412 34 34 35 35 //get n from h (usually h=ii) 36 ISSMASSERT(head);36 _assert_(head); 37 37 n=head[h=Abs(ii)%nx]; 38 38 … … 50 50 //check that nbax <=NbOfEdges 51 51 if (nbax <=NbOfEdges ) { 52 ISSMERROR("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);52 _error_("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax); 53 53 } 54 54 … … 69 69 70 70 //check that head is not empty 71 ISSMASSERT(head);71 _assert_(head); 72 72 73 73 //get n from h (usually h=ii) -
TabularUnified issm/trunk/src/c/objects/Bamg/SubDomain.cpp ¶
r5149 r6412 16 16 *this = Th.subdomains[i]; 17 17 if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){ 18 ISSMERROR("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");18 _error_("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 ISSMERROR("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");22 _error_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe"); 23 23 } 24 24 edge = ThNew.edges+ Th.GetId(edge); -
TabularUnified issm/trunk/src/c/objects/Bamg/Triangle.cpp ¶
r5605 r6412 14 14 long nbv = Th->nbv; 15 15 if (i<0 || j<0 || k<0){ 16 ISSMERROR("i<0 || j<0 || k<0");16 _error_("i<0 || j<0 || k<0"); 17 17 } 18 18 if (i>=nbv || j>=nbv || k>=nbv){ 19 ISSMERROR("i>=nbv || j>=nbv || k>=nbv");19 _error_("i>=nbv || j>=nbv || k>=nbv"); 20 20 } 21 21 vertices[0]=v+i; … … 117 117 //check number of iterations 118 118 if (k>=2000){ 119 ISSMERROR("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");119 _error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)"); 120 120 } 121 121 } while (this!= t); … … 157 157 do { 158 158 while (t->swap(j,koption)){ 159 if (k>=20000) ISSMERROR("k>=20000");159 if (k>=20000) _error_("k>=20000"); 160 160 NbSwap++; 161 161 k++; -
TabularUnified issm/trunk/src/c/objects/Contour.cpp ¶
r3775 r6412 17 17 int i; 18 18 19 _printf_( "Number of grids in contour: %i\n",contour->nods);20 _printf_( "Grid coordinates: \n");19 _printf_(true,"Number of grids in contour: %i\n",contour->nods); 20 _printf_(true,"Grid coordinates: \n"); 21 21 for (i=0;i<contour->nods;i++){ 22 _printf_( "%lf %lf\n",*(contour->x+i),*(contour->y+i));22 _printf_(true,"%lf %lf\n",*(contour->x+i),*(contour->y+i)); 23 23 } 24 24 } -
TabularUnified issm/trunk/src/c/objects/DofIndexing.cpp ¶
r5792 r6412 141 141 else this->sdoflist=NULL; 142 142 } 143 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");143 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 144 144 145 145 -
TabularUnified issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp ¶
r5529 r6412 156 156 157 157 /*Check index value*/ 158 ISSMASSERT(indices[i]>=0 && indices[i]<6);158 _assert_(indices[i]>=0 && indices[i]<6); 159 159 160 160 /*Assign value to new result*/ -
TabularUnified issm/trunk/src/c/objects/Elements/Penta.cpp ¶
r6410 r6412 57 57 /*Checks in debugging mode*/ 58 58 /*{{{2*/ 59 ISSMASSERT(iomodel->upperelements);60 ISSMASSERT(iomodel->lowerelements);59 _assert_(iomodel->upperelements); 60 _assert_(iomodel->lowerelements); 61 61 /*}}}*/ 62 62 … … 282 282 /*FUNCTION Penta::AverageOntoPartition {{{1*/ 283 283 void Penta::AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part){ 284 ISSMERROR("Not supported yet!");284 _error_("Not supported yet!"); 285 285 } 286 286 /*}}}*/ … … 336 336 337 337 /*Check analysis_types*/ 338 if (analysis_type!=DiagnosticHorizAnalysisEnum) ISSMERROR("Not supported yet!");339 if (approximation!=StokesApproximationEnum) ISSMERROR("Not supported yet!");338 if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!"); 339 if (approximation!=StokesApproximationEnum) _error_("Not supported yet!"); 340 340 341 341 /*retrieve some parameters: */ … … 357 357 358 358 /*Retrieve all inputs we will be needing: */ 359 Input* pressure_input=inputs->GetInput(PressureEnum); ISSMASSERT(pressure_input);360 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);361 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);362 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);359 Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input); 360 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 361 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 362 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 363 363 364 364 /* Start looping on the number of gaussian points: */ … … 402 402 void Penta::ComputeStrainRate(Vec eps){ 403 403 404 ISSMERROR("Not implemented yet");404 _error_("Not implemented yet"); 405 405 406 406 } … … 448 448 input=inputs->GetInput(enum_type); 449 449 } 450 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));451 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));450 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 451 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 452 452 453 453 this->GetDofList1(&doflist1[0]); … … 466 466 input=inputs->GetInput(enum_type); 467 467 } 468 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));469 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));468 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 469 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 470 470 471 471 ((ControlInput*)input)->ScaleGradient(scale); … … 485 485 input=inputs->GetInput(enum_type); 486 486 } 487 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));488 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));487 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 488 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 489 489 490 490 this->GetDofList1(&doflist1[0]); … … 503 503 504 504 /*Checks in debugging {{{2*/ 505 ISSMASSERT(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);505 _assert_(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs); 506 506 /*}}}*/ 507 507 … … 536 536 break; 537 537 default: 538 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));538 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 539 539 } 540 540 … … 647 647 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 648 648 this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum); 649 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);650 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);651 Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);652 Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);649 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 650 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 651 Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input); 652 Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input); 653 653 654 654 /* Start looping on the number of gaussian points: */ … … 758 758 return CreateKMatrixDiagnosticPattynStokes(); 759 759 default: 760 ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));760 _error_("Approximation %s not supported yet",EnumToString(approximation)); 761 761 } 762 762 } … … 896 896 GetVerticesCoordinates(&xyz_list[0][0], nodes,NUMVERTICES); 897 897 this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum); 898 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);899 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);900 Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);901 Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);898 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 899 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 900 Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input); 901 Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input); 902 902 903 903 /* Start looping on the number of gaussian points: */ … … 1014 1014 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1015 1015 this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum); 1016 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1017 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1018 Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);1019 Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);1016 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1017 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1018 Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input); 1019 Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input); 1020 1020 1021 1021 /* Start looping on the number of gaussian points: */ … … 1122 1122 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1123 1123 parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum); 1124 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1125 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1126 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);1124 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1125 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1126 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 1127 1127 1128 1128 /* Start looping on the number of gaussian points: */ … … 1191 1191 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 1192 1192 parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum); 1193 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1194 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1195 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);1193 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1194 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1195 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 1196 1196 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; 1197 1197 … … 1427 1427 this->parameters->FindParam(&artdiff,ArtDiffEnum); 1428 1428 this->parameters->FindParam(&epsvel,EpsVelEnum); 1429 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1430 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1431 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);1429 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1430 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1431 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 1432 1432 if (artdiff==2) diameter=MinEdgeLength(xyz_list); 1433 1433 … … 1562 1562 1563 1563 /*if debugging mode, check that all pointers exist {{{2*/ 1564 ISSMASSERT(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);1564 _assert_(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs); 1565 1565 /*}}}*/ 1566 1566 … … 1598 1598 break; 1599 1599 default: 1600 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));1600 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 1601 1601 } 1602 1602 … … 1624 1624 return CreatePVectorAdjointStokes(); 1625 1625 default: 1626 ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));1626 _error_("Approximation %s not supported yet",EnumToString(approximation)); 1627 1627 } 1628 1628 } … … 1741 1741 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1742 1742 this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum); 1743 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1744 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1745 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);1746 Input* vzpattyn_input=inputs->GetInput(VzPattynEnum); ISSMASSERT(vzpattyn_input);1743 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1744 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1745 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 1746 Input* vzpattyn_input=inputs->GetInput(VzPattynEnum); _assert_(vzpattyn_input); 1747 1747 1748 1748 /* Start looping on the number of gaussian points: */ … … 1806 1806 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 1807 1807 this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum); 1808 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1809 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1810 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);1811 Input* vzpattyn_input=inputs->GetInput(VzPattynEnum); ISSMASSERT(vzpattyn_input);1808 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1809 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1810 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 1811 Input* vzpattyn_input=inputs->GetInput(VzPattynEnum); _assert_(vzpattyn_input); 1812 1812 1813 1813 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; … … 1867 1867 return CreatePVectorDiagnosticPattynStokes(); 1868 1868 default: 1869 ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));1869 _error_("Approximation %s not supported yet",EnumToString(approximation)); 1870 1870 } 1871 1871 } … … 1931 1931 n=matice->GetN(); 1932 1932 B=matice->GetB(); 1933 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);1934 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);1935 Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); ISSMASSERT(slopex_input);1936 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); ISSMASSERT(slopey_input);1933 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 1934 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 1935 Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input); 1936 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 1937 1937 for(i=0;i<NUMVERTICES;i++)z_list[i]=xyz_list[i][2]; 1938 1938 … … 2025 2025 /*Retrieve all inputs and parameters*/ 2026 2026 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2027 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);2028 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);2027 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2028 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 2029 2029 2030 2030 /* Start looping on the number of gaussian points: */ … … 2099 2099 gravity=matpar->GetG(); 2100 2100 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2101 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2102 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2103 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);2101 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2102 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2103 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 2104 2104 2105 2105 /* Start looping on the number of gaussian points: */ … … 2168 2168 gravity=matpar->GetG(); 2169 2169 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2170 Input* bed_input=inputs->GetInput(BedEnum); ISSMASSERT(bed_input);2170 Input* bed_input=inputs->GetInput(BedEnum); _assert_(bed_input); 2171 2171 2172 2172 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; … … 2244 2244 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2245 2245 inputs->GetParameterValue(&approximation,ApproximationEnum); 2246 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2247 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2246 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2247 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2248 2248 Input* vzstokes_input=NULL; 2249 2249 if(approximation==PattynStokesApproximationEnum){ 2250 vzstokes_input=inputs->GetInput(VzStokesEnum); ISSMASSERT(vzstokes_input);2250 vzstokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input); 2251 2251 } 2252 2252 … … 2383 2383 this->inputs->GetParameterValue(&dt,DtEnum); 2384 2384 this->parameters->FindParam(&artdiff,ArtDiffEnum); 2385 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2386 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2387 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);2385 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2386 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2387 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 2388 2388 Input* temperature_input=NULL; 2389 if (dt) temperature_input=inputs->GetInput(TemperatureEnum); ISSMASSERT(inputs);2389 if (dt) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs); 2390 2390 if (artdiff==2) diameter=MinEdgeLength(xyz_list); 2391 2391 … … 2525 2525 GradjB(gradient); 2526 2526 } 2527 else ISSMERROR("control type %s not supported yet: ",EnumToString(control_type));2527 else _error_("control type %s not supported yet: ",EnumToString(control_type)); 2528 2528 } 2529 2529 /*}}}*/ … … 2603 2603 return; 2604 2604 } 2605 else ISSMERROR("approximation %s not supported yet",EnumToString(approximation));2605 else _error_("approximation %s not supported yet",EnumToString(approximation)); 2606 2606 } 2607 2607 /*}}}*/ … … 2620 2620 /* get lower Penta*/ 2621 2621 penta=penta->GetLowerElement(); 2622 ISSMASSERT(penta->Id()!=this->id);2622 _assert_(penta->Id()!=this->id); 2623 2623 } 2624 2624 … … 2679 2679 int Penta::GetNodeIndex(Node* node){ 2680 2680 2681 ISSMASSERT(nodes);2681 _assert_(nodes); 2682 2682 for(int i=0;i<NUMVERTICES;i++){ 2683 2683 if(node==nodes[i]) 2684 2684 return i; 2685 2685 } 2686 ISSMERROR("Node provided not found among element nodes");2686 _error_("Node provided not found among element nodes"); 2687 2687 2688 2688 } … … 2697 2697 /*Recover input*/ 2698 2698 Input* input=inputs->GetInput(enumtype); 2699 if (!input) ISSMERROR("Input %s not found in element",EnumToString(enumtype));2699 if (!input) _error_("Input %s not found in element",EnumToString(enumtype)); 2700 2700 2701 2701 /*Checks in debugging mode*/ 2702 ISSMASSERT(pvalue);2702 _assert_(pvalue); 2703 2703 2704 2704 /* Start looping on the number of vertices: */ … … 2724 2724 2725 2725 /*Checks in debugging mode*/ 2726 ISSMASSERT(pvalue);2726 _assert_(pvalue); 2727 2727 2728 2728 /* Start looping on the number of vertices: */ … … 2746 2746 2747 2747 Input* input=inputs->GetInput(enumtype); 2748 if(!input) ISSMERROR("No input of type %s found in tria",EnumToString(enumtype));2748 if(!input) _error_("No input of type %s found in tria",EnumToString(enumtype)); 2749 2749 2750 2750 GaussPenta* gauss=new GaussPenta(); … … 2833 2833 } 2834 2834 else{ 2835 ISSMERROR("analysis: %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));2835 _error_("analysis: %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 2836 2836 } 2837 2837 } … … 2851 2851 /*Get approximation enum and dof list: */ 2852 2852 inputs->GetParameterValue(&approximation,ApproximationEnum); 2853 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2854 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2853 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2854 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2855 2855 2856 2856 /*If the element is a coupling, do nothing: every grid is also on an other elements … … 2892 2892 /*Get dof list: */ 2893 2893 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 2894 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2895 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2894 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2895 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2896 2896 2897 2897 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ … … 2928 2928 /*Get dof list: */ 2929 2929 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 2930 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);2930 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 2931 2931 2932 2932 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ … … 2962 2962 /*Get dof list: */ 2963 2963 GetDofList(&doflist,StokesApproximationEnum,GsetEnum); 2964 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2965 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2966 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);2967 Input* p_input =inputs->GetInput(PressureEnum); ISSMASSERT(p_input);2964 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2965 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2966 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 2967 Input* p_input =inputs->GetInput(PressureEnum); _assert_(p_input); 2968 2968 2969 2969 /*Recondition pressure: */ … … 3006 3006 /*Get dof list: */ 3007 3007 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 3008 Input* t_input=inputs->GetInput(TemperatureEnum); ISSMASSERT(t_input);3008 Input* t_input=inputs->GetInput(TemperatureEnum); _assert_(t_input); 3009 3009 3010 3010 gauss=new GaussPenta(); … … 3058 3058 /*Check that both inputs have been found*/ 3059 3059 if (!vx_input || !vy_input){ 3060 ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);3060 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input); 3061 3061 } 3062 3062 … … 3083 3083 /*Check that both inputs have been found*/ 3084 3084 if (!vx_input || !vy_input || !vz_input){ 3085 ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input);3085 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input); 3086 3086 } 3087 3087 … … 3150 3150 /*Make a copy of the original input: */ 3151 3151 input=(Input*)this->inputs->GetInput(enum_type); 3152 if(!input) ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));3152 if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type)); 3153 3153 3154 3154 /*ArtificialNoise: */ … … 3170 3170 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 3171 3171 old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]); 3172 if(!new_inputs[i]) ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));3173 if(!old_inputs[i]) ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));3172 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0])); 3173 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0])); 3174 3174 } 3175 3175 … … 3208 3208 if(control_type[i]==RheologyBbarEnum){ 3209 3209 if (!IsOnBed()) return; 3210 input=(Input*)matice->inputs->GetInput(RheologyBEnum); ISSMASSERT(input);3210 input=(Input*)matice->inputs->GetInput(RheologyBEnum); _assert_(input); 3211 3211 } 3212 3212 else{ 3213 input=(Input*)this->inputs->GetInput(control_type[i]); ISSMASSERT(input);3214 } 3215 3216 if (input->Enum()!=ControlInputEnum) ISSMERROR("input %s is not a ControlInput",EnumToString(control_type[i]));3213 input=(Input*)this->inputs->GetInput(control_type[i]); _assert_(input); 3214 } 3215 3216 if (input->Enum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToString(control_type[i])); 3217 3217 3218 3218 ((ControlInput*)input)->UpdateValue(scalar); … … 3265 3265 original_input=(Input*)penta->matice->inputs->GetInput(enum_type); 3266 3266 else 3267 ISSMERROR("object %s not supported yet",EnumToString(object_enum));3268 if(!original_input) ISSMERROR("could not find input with enum %s",EnumToString(enum_type));3267 _error_("object %s not supported yet",EnumToString(object_enum)); 3268 if(!original_input) _error_("could not find input with enum %s",EnumToString(enum_type)); 3269 3269 3270 3270 /*If first time, initialize total_integrated_input*/ … … 3277 3277 total_integrated_input=new DoubleInput(average_enum_type,0.0); 3278 3278 else 3279 ISSMERROR("object %s not supported yet",EnumToString(original_input->Enum()));3279 _error_("object %s not supported yet",EnumToString(original_input->Enum())); 3280 3280 } 3281 3281 … … 3305 3305 /* get upper Penta*/ 3306 3306 penta=penta->GetUpperElement(); 3307 ISSMASSERT(penta->Id()!=this->id);3307 _assert_(penta->Id()!=this->id); 3308 3308 3309 3309 /*increase couter*/ … … 3325 3325 this->matice->inputs->AddInput((Input*)depth_averaged_input); 3326 3326 else 3327 ISSMERROR("object %s not supported yet",EnumToString(object_enum));3327 _error_("object %s not supported yet",EnumToString(object_enum)); 3328 3328 } 3329 3329 /*}}}*/ … … 3355 3355 original_input=(Input*)matice->inputs->GetInput(enum_type); 3356 3356 else 3357 ISSMERROR("object of type %s not supported yet",EnumToString(object_type));3358 if(!original_input) ISSMERROR("%s%s"," could not find input with enum:",EnumToString(enum_type));3357 _error_("object of type %s not supported yet",EnumToString(object_type)); 3358 if(!original_input) _error_("%s%s"," could not find input with enum:",EnumToString(enum_type)); 3359 3359 original_input->Extrude(); 3360 3360 … … 3368 3368 /* get upper Penta*/ 3369 3369 penta=penta->GetUpperElement(); 3370 ISSMASSERT(penta->Id()!=this->id);3370 _assert_(penta->Id()!=this->id); 3371 3371 3372 3372 /*Add input of the basal element to penta->inputs*/ … … 3378 3378 penta->matice->inputs->AddInput((Input*)copy); 3379 3379 else 3380 ISSMERROR("object of type %s not supported yet",EnumToString(object_type));3380 _error_("object of type %s not supported yet",EnumToString(object_type)); 3381 3381 3382 3382 /*Stop if we have reached the surface*/ … … 3395 3395 /*Make a copy of the original input: */ 3396 3396 input=(Input*)this->inputs->GetInput(enum_type); 3397 if(!input) ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));3397 if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type)); 3398 3398 3399 3399 /*Scale: */ … … 3411 3411 if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(RheologyBEnum); 3412 3412 else input=this->inputs->GetInput(enum_type); 3413 if (!input) ISSMERROR("Input %s not found in penta->inputs",EnumToString(enum_type));3413 if (!input) _error_("Input %s not found in penta->inputs",EnumToString(enum_type)); 3414 3414 3415 3415 /*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result … … 3458 3458 /*Checks if debuging*/ 3459 3459 /*{{{2*/ 3460 ISSMASSERT(iomodel->elements);3460 _assert_(iomodel->elements); 3461 3461 /*}}}*/ 3462 3462 … … 3586 3586 /*Matice will take care of it*/ break; 3587 3587 default: 3588 ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));3588 _error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i])); 3589 3589 } 3590 3590 } … … 3615 3615 } 3616 3616 else{ 3617 ISSMERROR("Approximation type %s not supported yet",EnumToString((int)*(iomodel->elements_type+index)));3617 _error_("Approximation type %s not supported yet",EnumToString((int)*(iomodel->elements_type+index))); 3618 3618 } 3619 3619 } … … 3677 3677 } 3678 3678 else{ 3679 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));3679 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 3680 3680 } 3681 3681 } … … 3764 3764 Input* vz_input=inputs->GetInput(VzEnum); 3765 3765 if (vz_input){ 3766 if (vz_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));3766 if (vz_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum())); 3767 3767 vz_input->GetValuesPtr(&vz_ptr,&dummy); 3768 3768 for(i=0;i<NUMVERTICES;i++) vz[i]=vz_ptr[i]; … … 3791 3791 3792 3792 /* get upper Penta*/ 3793 penta=penta->GetUpperElement(); ISSMASSERT(penta->Id()!=this->id);3793 penta=penta->GetUpperElement(); _assert_(penta->Id()!=this->id); 3794 3794 } 3795 3795 … … 3851 3851 if (vz_input){ 3852 3852 if (vz_input->Enum()!=PentaVertexInputEnum){ 3853 ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));3853 _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum())); 3854 3854 } 3855 3855 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 3944 3944 if (vzmacayeal_input){ 3945 3945 if (vzmacayeal_input->Enum()!=PentaVertexInputEnum){ 3946 ISSMERROR("Cannot compute Vel as VzMacAyeal is of type %s",EnumToString(vzmacayeal_input->Enum()));3946 _error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToString(vzmacayeal_input->Enum())); 3947 3947 } 3948 3948 vzmacayeal_input->GetValuesPtr(&vzmacayeal_ptr,&dummy); … … 3950 3950 } 3951 3951 else{ 3952 ISSMERROR("Cannot update solution as VzMacAyeal is not present");3952 _error_("Cannot update solution as VzMacAyeal is not present"); 3953 3953 } 3954 3954 … … 4016 4016 if (vz_input){ 4017 4017 if (vz_input->Enum()!=PentaVertexInputEnum){ 4018 ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));4018 _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum())); 4019 4019 } 4020 4020 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4102 4102 if (vzpattyn_input){ 4103 4103 if (vzpattyn_input->Enum()!=PentaVertexInputEnum){ 4104 ISSMERROR("Cannot compute Vel as VzPattyn is of type %s",EnumToString(vzpattyn_input->Enum()));4104 _error_("Cannot compute Vel as VzPattyn is of type %s",EnumToString(vzpattyn_input->Enum())); 4105 4105 } 4106 4106 vzpattyn_input->GetValuesPtr(&vzpattyn_ptr,&dummy); … … 4108 4108 } 4109 4109 else{ 4110 ISSMERROR("Cannot update solution as VzPattyn is not present");4110 _error_("Cannot update solution as VzPattyn is not present"); 4111 4111 } 4112 4112 … … 4174 4174 if (vz_input){ 4175 4175 if (vz_input->Enum()!=PentaVertexInputEnum){ 4176 ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));4176 _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum())); 4177 4177 } 4178 4178 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4251 4251 Input* vx_input=inputs->GetInput(VxEnum); 4252 4252 if (vx_input){ 4253 if (vx_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vx is of type %s",EnumToString(vx_input->Enum()));4253 if (vx_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vx is of type %s",EnumToString(vx_input->Enum())); 4254 4254 vx_input->GetValuesPtr(&vx_ptr,&dummy); 4255 4255 for(i=0;i<NUMVERTICES;i++) vx[i]=vx_ptr[i]; … … 4259 4259 Input* vy_input=inputs->GetInput(VyEnum); 4260 4260 if (vy_input){ 4261 if (vy_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vy is of type %s",EnumToString(vy_input->Enum()));4261 if (vy_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vy is of type %s",EnumToString(vy_input->Enum())); 4262 4262 vy_input->GetValuesPtr(&vy_ptr,&dummy); 4263 4263 for(i=0;i<NUMVERTICES;i++) vy[i]=vy_ptr[i]; … … 4269 4269 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 4270 4270 if (vzstokes_input){ 4271 if (vzstokes_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));4271 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum())); 4272 4272 vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy); 4273 4273 for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i]; 4274 4274 } 4275 else ISSMERROR("Cannot compute Vz as VzStokes in not present in PattynStokes element");4275 else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element"); 4276 4276 for(i=0;i<NUMVERTICES;i++){ 4277 4277 vzpattyn[i]=vz[i]; … … 4282 4282 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 4283 4283 if (vzstokes_input){ 4284 if (vzstokes_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));4284 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum())); 4285 4285 vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy); 4286 4286 for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i]; 4287 4287 } 4288 else ISSMERROR("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");4288 else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element"); 4289 4289 for(i=0;i<NUMVERTICES;i++){ 4290 4290 vzmacayeal[i]=vz[i]; … … 4536 4536 4537 4537 /* get upper Penta*/ 4538 penta=penta->GetUpperElement(); ISSMASSERT(penta->Id()!=this->id);4538 penta=penta->GetUpperElement(); _assert_(penta->Id()!=this->id); 4539 4539 } 4540 4540 … … 4569 4569 default: 4570 4570 4571 ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));4571 _error_("type %i (%s) not implemented yet",type,EnumToString(type)); 4572 4572 } 4573 4573 } … … 4575 4575 /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{1*/ 4576 4576 void Penta::InputUpdateFromVector(int* vector, int name, int type){ 4577 ISSMERROR(" not supported yet!");4577 _error_(" not supported yet!"); 4578 4578 } 4579 4579 /*}}}*/ 4580 4580 /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/ 4581 4581 void Penta::InputUpdateFromVector(bool* vector, int name, int type){ 4582 ISSMERROR(" not supported yet!");4582 _error_(" not supported yet!"); 4583 4583 } 4584 4584 /*}}}*/ 4585 4585 /*FUNCTION Penta::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{1*/ 4586 4586 void Penta::InputUpdateFromVectorDakota(double* vector, int name, int type){ 4587 ISSMERROR(" not supported yet!");4587 _error_(" not supported yet!"); 4588 4588 } 4589 4589 /*}}}*/ 4590 4590 /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/ 4591 4591 void Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){ 4592 ISSMERROR(" not supported yet!");4592 _error_(" not supported yet!"); 4593 4593 } 4594 4594 /*}}}*/ 4595 4595 /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/ 4596 4596 void Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){ 4597 ISSMERROR(" not supported yet!");4597 _error_(" not supported yet!"); 4598 4598 } 4599 4599 /*}}}*/ … … 4664 4664 /*FUNCTION Penta::MassFlux {{{1*/ 4665 4665 double Penta::MassFlux( double* segment,bool process_units){ 4666 ISSMERROR(" not supported yet!");4666 _error_(" not supported yet!"); 4667 4667 } 4668 4668 /*}}}*/ … … 5036 5036 void Penta::SetClone(int* minranks){ 5037 5037 5038 ISSMERROR("not implemented yet");5038 _error_("not implemented yet"); 5039 5039 } 5040 5040 /*}}}1*/ … … 5402 5402 /*If on water, return 0: */ 5403 5403 if(IsOnWater())return 0; 5404 ISSMERROR("Not implemented yet");5404 _error_("Not implemented yet"); 5405 5405 5406 5406 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). … … 5422 5422 /*Checks if debuging*/ 5423 5423 /*{{{2*/ 5424 ISSMASSERT(iomodel->elements);5424 _assert_(iomodel->elements); 5425 5425 /*}}}*/ 5426 5426 -
TabularUnified issm/trunk/src/c/objects/Elements/PentaRef.cpp ¶
r5808 r6412 53 53 void PentaRef::SetElementType(int type,int type_counter){ 54 54 55 ISSMASSERT(type==P1Enum || type==P1DGEnum);55 _assert_(type==P1Enum || type==P1DGEnum); 56 56 57 57 /*initialize element type*/ … … 702 702 /*Get Determinant*/ 703 703 Matrix3x3Determinant(Jdet,&J[0][0]); 704 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");704 if(*Jdet<0) _error_("negative jacobian determinant!"); 705 705 706 706 } … … 725 725 /*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */ 726 726 *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); 727 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");727 if(*Jdet<0) _error_("negative jacobian determinant!"); 728 728 729 729 } … … 744 744 745 745 *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.) + pow(z2-z1,2.)); 746 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");746 if(*Jdet<0) _error_("negative jacobian determinant!"); 747 747 748 748 } … … 902 902 double A1,A2,A3,z; 903 903 904 A1=gauss->coord1; ISSMASSERT(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3);905 A2=gauss->coord2; ISSMASSERT(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3);906 A3=gauss->coord3; ISSMASSERT(A3>=0 && A3<=1);//third area coordinate value In term of xi and eta: A3=y/SQRT3;907 z =gauss->coord4; ISSMASSERT(z>=-1 && z<=1);//fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2904 A1=gauss->coord1; _assert_(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3); 905 A2=gauss->coord2; _assert_(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3); 906 A3=gauss->coord3; _assert_(A3>=0 && A3<=1);//third area coordinate value In term of xi and eta: A3=y/SQRT3; 907 z =gauss->coord4; _assert_(z>=-1 && z<=1);//fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2 908 908 909 909 /*First nodal function derivatives. The corresponding nodal function is N=A1*(1-z)/2. Its derivatives follow*/ … … 946 946 GetNodalFunctionsP1(&BasisFunctions[0],gauss); 947 947 948 ISSMASSERT(index1>=0 && index1<6);949 ISSMASSERT(index2>=0 && index2<6);950 ISSMASSERT(index3>=0 && index3<6);951 ISSMASSERT(index4>=0 && index4<6);948 _assert_(index1>=0 && index1<6); 949 _assert_(index2>=0 && index2<6); 950 _assert_(index3>=0 && index3<6); 951 _assert_(index4>=0 && index4<6); 952 952 953 953 l1l4[0]=BasisFunctions[index1]; … … 980 980 /*Area of a trabezoid = altitude * (base1 + base2)/2 */ 981 981 *Jdet= pow(pow(x2-x1,2.) + pow(y2-y1,2.),0.5) * (z4-z1 + z3-z2)/8; 982 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");982 if(*Jdet<0) _error_("negative jacobian determinant!"); 983 983 984 984 } -
TabularUnified issm/trunk/src/c/objects/Elements/PentaRef.h ¶
r5808 r6412 50 50 void GetLprimeStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss); 51 51 void GetParameterValue(double* pvalue,double* plist, GaussPenta* gauss); 52 void GetParameterValue(double* pvalue,double* plist,GaussTria* gauss){ ISSMERROR("only PentaGauss are supported");};52 void GetParameterValue(double* pvalue,double* plist,GaussTria* gauss){_error_("only PentaGauss are supported");}; 53 53 void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussPenta* gauss); 54 void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussTria* gauss){ ISSMERROR("only PentaGauss are supported");};54 void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");}; 55 55 56 56 }; -
TabularUnified issm/trunk/src/c/objects/Elements/Tria.cpp ¶
r6410 r6412 305 305 306 306 /*Checks in debugging mode{{{2*/ 307 ISSMASSERT(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);307 _assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs); 308 308 /*}}}*/ 309 309 … … 332 332 break; 333 333 default: 334 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));334 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 335 335 } 336 336 … … 356 356 break; 357 357 default: 358 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));358 _error_("Element type %s not supported yet",EnumToString(GetElementType())); 359 359 } 360 360 … … 373 373 return CreateKMatrixBalancedthickness_DG(); 374 374 default: 375 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));375 _error_("Element type %s not supported yet",EnumToString(GetElementType())); 376 376 } 377 377 … … 414 414 Input* vyaverage_input=NULL; 415 415 if(dim==2){ 416 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);417 vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);416 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 417 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); 418 418 } 419 419 else{ 420 vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);421 vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);420 vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input); 421 vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input); 422 422 } 423 423 … … 515 515 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 516 516 this->parameters->FindParam(&dim,DimEnum); 517 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);518 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);517 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 518 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 519 519 520 520 /*Start looping on the number of gaussian points:*/ … … 583 583 this->parameters->FindParam(&artdiff,ArtDiffEnum); 584 584 this->parameters->FindParam(&dim,DimEnum); 585 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);585 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 586 586 Input* vxaverage_input=NULL; 587 587 Input* vyaverage_input=NULL; 588 588 if(dim==2){ 589 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);590 vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);589 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 590 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); 591 591 } 592 592 else{ 593 vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);594 vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);593 vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input); 594 vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input); 595 595 } 596 596 … … 713 713 /*Retrieve all inputs and parameters*/ 714 714 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 715 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);716 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);717 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);718 Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);719 Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);715 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 716 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 717 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 718 Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input); 719 Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input); 720 720 this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum); 721 721 … … 781 781 /*Retrieve all inputs and parameters*/ 782 782 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 783 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);784 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);785 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);786 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);783 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 784 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 785 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 786 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 787 787 inputs->GetParameterValue(&drag_type,DragTypeEnum); 788 788 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 789 789 790 790 /*build friction object, used later on: */ 791 if (drag_type!=2) ISSMERROR(" non-viscous friction not supported yet!");791 if (drag_type!=2) _error_(" non-viscous friction not supported yet!"); 792 792 friction=new Friction("2d",inputs,matpar,analysis_type); 793 793 … … 857 857 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 858 858 inputs->GetParameterValue(&drag_type,DragTypeEnum); 859 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);860 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);861 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);862 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);859 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 860 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 861 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 862 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 863 863 864 864 /*build friction object, used later on: */ 865 if (drag_type!=2) ISSMERROR(" non-viscous friction not supported yet!");865 if (drag_type!=2)_error_(" non-viscous friction not supported yet!"); 866 866 friction=new Friction("2d",inputs,matpar,analysis_type); 867 867 … … 943 943 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 944 944 inputs->GetParameterValue(&drag_type,DragTypeEnum); 945 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);946 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);947 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);948 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);945 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 946 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 947 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 948 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 949 949 950 950 /*build friction object, used later on: */ 951 if (drag_type!=2) ISSMERROR(" non-viscous friction not supported yet!");951 if (drag_type!=2)_error_(" non-viscous friction not supported yet!"); 952 952 friction=new Friction("2d",inputs,matpar,analysis_type); 953 953 … … 1116 1116 return CreateKMatrixPrognostic_DG(); 1117 1117 default: 1118 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));1118 _error_("Element type %s not supported yet",EnumToString(GetElementType())); 1119 1119 } 1120 1120 … … 1159 1159 Input* vyaverage_input=NULL; 1160 1160 if(dim==2){ 1161 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);1162 vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);1161 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 1162 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); 1163 1163 } 1164 1164 else{ 1165 vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);1166 vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);1165 vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input); 1166 vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input); 1167 1167 } 1168 1168 … … 1277 1277 Input* vyaverage_input=NULL; 1278 1278 if(dim==2){ 1279 vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);1280 vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);1279 vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input); 1280 vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input); 1281 1281 } 1282 1282 else{ 1283 vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);1284 vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);1283 vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input); 1284 vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input); 1285 1285 } 1286 1286 … … 1436 1436 /*asserts: {{{*/ 1437 1437 /*if debugging mode, check that all pointers exist*/ 1438 ISSMASSERT(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);1438 _assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs); 1439 1439 /*}}}*/ 1440 1440 … … 1466 1466 break; 1467 1467 default: 1468 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));1468 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 1469 1469 } 1470 1470 … … 1486 1486 return CreatePVectorBalancedthickness_DG(); 1487 1487 default: 1488 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));1488 _error_("Element type %s not supported yet",EnumToString(GetElementType())); 1489 1489 } 1490 1490 } … … 1509 1509 /*Retrieve all inputs and parameters*/ 1510 1510 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1511 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);1512 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);1513 Input* dhdt_input=inputs->GetInput(DhDtEnum); ISSMASSERT(dhdt_input);1511 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 1512 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 1513 Input* dhdt_input=inputs->GetInput(DhDtEnum); _assert_(dhdt_input); 1514 1514 1515 1515 /* Start looping on the number of gaussian points: */ … … 1553 1553 /*Retrieve all inputs and parameters*/ 1554 1554 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1555 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);1556 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);1557 Input* dhdt_input=inputs->GetInput(DhDtEnum); ISSMASSERT(dhdt_input);1555 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 1556 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 1557 Input* dhdt_input=inputs->GetInput(DhDtEnum); _assert_(dhdt_input); 1558 1558 1559 1559 /* Start looping on the number of gaussian points: */ … … 1597 1597 /*Retrieve all inputs and parameters*/ 1598 1598 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1599 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);1600 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);1599 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 1600 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 1601 1601 1602 1602 /* Start looping on the number of gaussian points: */ … … 1643 1643 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1644 1644 inputs->GetParameterValue(&approximation,ApproximationEnum); 1645 Input* bed_input=inputs->GetInput(BedEnum); ISSMASSERT(bed_input);1646 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);1647 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);1648 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);1645 Input* bed_input=inputs->GetInput(BedEnum); _assert_(bed_input); 1646 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 1647 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1648 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 1649 1649 Input* vzstokes_input=NULL; 1650 1650 if(approximation==PattynStokesApproximationEnum){ 1651 vzstokes_input=inputs->GetInput(VzStokesEnum); ISSMASSERT(vzstokes_input);1651 vzstokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input); 1652 1652 } 1653 1653 … … 1704 1704 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1705 1705 inputs->GetParameterValue(&drag_type,DragTypeEnum); 1706 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);1707 Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);1708 Input* drag_input=inputs->GetInput(DragCoefficientEnum); ISSMASSERT(drag_input);1706 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 1707 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 1708 Input* drag_input=inputs->GetInput(DragCoefficientEnum);_assert_(drag_input); 1709 1709 1710 1710 /* Start looping on the number of gaussian points: */ … … 1768 1768 /*Retrieve all inputs and parameters*/ 1769 1769 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1770 Input* thickness_input =inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);1771 Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum); ISSMASSERT(thicknessobs_input);1772 Input* weights_input =inputs->GetInput(WeightsEnum); ISSMASSERT(weights_input);1770 Input* thickness_input =inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 1771 Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);_assert_(thicknessobs_input); 1772 Input* weights_input =inputs->GetInput(WeightsEnum); _assert_(weights_input); 1773 1773 1774 1774 /* Start looping on the number of gaussian points: */ … … 1943 1943 else{ 1944 1944 /*Not supported yet! : */ 1945 ISSMERROR("response %s not supported yet",EnumToString(response));1945 _error_("response %s not supported yet",EnumToString(response)); 1946 1946 } 1947 1947 … … 2124 2124 else{ 2125 2125 /*Not supported yet! : */ 2126 ISSMERROR("response %s not supported yet",EnumToString(response));2126 _error_("response %s not supported yet",EnumToString(response)); 2127 2127 } 2128 2128 … … 2176 2176 n=matice->GetN(); 2177 2177 B=matice->GetBbar(); 2178 Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); ISSMASSERT(slopex_input);2179 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); ISSMASSERT(slopey_input);2180 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);2178 Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input); 2179 Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 2180 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2181 2181 2182 2182 /*Spawn 3 sing elements: */ … … 2216 2216 return CreatePVectorPrognostic_DG(); 2217 2217 default: 2218 ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));2218 _error_("Element type %s not supported yet",EnumToString(GetElementType())); 2219 2219 } 2220 2220 } … … 2241 2241 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2242 2242 this->parameters->FindParam(&dt,DtEnum); 2243 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);2244 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);2245 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);2243 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 2244 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 2245 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2246 2246 2247 2247 /* Start looping on the number of gaussian points: */ … … 2287 2287 this->parameters->FindParam(&dt,DtEnum); 2288 2288 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2289 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);2290 Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);2291 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);2289 Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input); 2290 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 2291 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2292 2292 2293 2293 /* Start looping on the number of gaussian points: */ … … 2336 2336 Input* slope_input=NULL; 2337 2337 if ( (analysis_type==SurfaceSlopeXAnalysisEnum) || (analysis_type==SurfaceSlopeYAnalysisEnum)){ 2338 slope_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(slope_input);2338 slope_input=inputs->GetInput(SurfaceEnum); _assert_(slope_input); 2339 2339 } 2340 2340 if ( (analysis_type==BedSlopeXAnalysisEnum) || (analysis_type==BedSlopeYAnalysisEnum)){ 2341 slope_input=inputs->GetInput(BedEnum); ISSMASSERT(slope_input);2341 slope_input=inputs->GetInput(BedEnum); _assert_(slope_input); 2342 2342 } 2343 2343 … … 2396 2396 meltingpoint=matpar->GetMeltingPoint(); 2397 2397 this->parameters->FindParam(&dt,DtEnum); 2398 Input* pressure_input=inputs->GetInput(PressureEnum); ISSMASSERT(pressure_input);2398 Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input); 2399 2399 2400 2400 /* Start looping on the number of gauss 2d (nodes on the bedrock) */ … … 2450 2450 heatcapacity=matpar->GetHeatCapacity(); 2451 2451 this->inputs->GetParameterValue(&dt,DtEnum); 2452 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2453 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2454 Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);2455 Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); ISSMASSERT(geothermalflux_input);2452 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2453 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2454 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 2455 Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); _assert_(geothermalflux_input); 2456 2456 2457 2457 /*Build frictoin element, needed later: */ 2458 2458 inputs->GetParameterValue(&drag_type,DragTypeEnum); 2459 if (drag_type!=2) ISSMERROR(" non-viscous friction not supported yet!");2459 if (drag_type!=2)_error_(" non-viscous friction not supported yet!"); 2460 2460 friction=new Friction("3d",inputs,matpar,analysis_type); 2461 2461 … … 2489 2489 /*FUNCTION Tria::ComputeBasalStress {{{1*/ 2490 2490 void Tria::ComputeBasalStress(Vec eps){ 2491 ISSMERROR("Not Implemented yet");2491 _error_("Not Implemented yet"); 2492 2492 } 2493 2493 /*}}}*/ 2494 2494 /*FUNCTION Tria::ComputeStrainRate {{{1*/ 2495 2495 void Tria::ComputeStrainRate(Vec eps){ 2496 ISSMERROR("Not Implemented yet");2496 _error_("Not Implemented yet"); 2497 2497 } 2498 2498 /*}}}*/ … … 2536 2536 input=inputs->GetInput(enum_type); 2537 2537 } 2538 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));2539 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));2538 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 2539 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 2540 2540 2541 2541 this->GetDofList1(&doflist1[0]); … … 2554 2554 input=inputs->GetInput(enum_type); 2555 2555 } 2556 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));2557 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));2556 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 2557 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 2558 2558 2559 2559 ((ControlInput*)input)->ScaleGradient(scale); … … 2573 2573 input=inputs->GetInput(enum_type); 2574 2574 } 2575 if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));2576 if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));2575 if (!input) _error_("Input %s not found",EnumToString(enum_type)); 2576 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type)); 2577 2577 2578 2578 this->GetDofList1(&doflist1[0]); … … 2718 2718 int Tria::GetNodeIndex(Node* node){ 2719 2719 2720 ISSMASSERT(nodes);2720 _assert_(nodes); 2721 2721 for(int i=0;i<NUMVERTICES;i++){ 2722 2722 if(node==nodes[i]) 2723 2723 return i; 2724 2724 } 2725 ISSMERROR("Node provided not found among element nodes");2725 _error_("Node provided not found among element nodes"); 2726 2726 } 2727 2727 /*}}}*/ … … 2735 2735 /*Recover input*/ 2736 2736 Input* input=inputs->GetInput(enumtype); 2737 if (!input) ISSMERROR("Input %s not found in element",EnumToString(enumtype));2737 if (!input) _error_("Input %s not found in element",EnumToString(enumtype)); 2738 2738 2739 2739 /*Checks in debugging mode*/ 2740 ISSMASSERT(pvalue);2740 _assert_(pvalue); 2741 2741 2742 2742 /* Start looping on the number of vertices: */ … … 2759 2759 2760 2760 /*Checks in debugging mode*/ 2761 ISSMASSERT(pvalue);2761 _assert_(pvalue); 2762 2762 2763 2763 /* Start looping on the number of vertices: */ … … 2781 2781 2782 2782 Input* input=inputs->GetInput(enumtype); 2783 if(!input) ISSMERROR("No input of type %s found in tria",EnumToString(enumtype));2783 if(!input) _error_("No input of type %s found in tria",EnumToString(enumtype)); 2784 2784 2785 2785 GaussTria* gauss=new GaussTria(); … … 2811 2811 GetSolutionFromInputsDiagnosticHutter(solution); 2812 2812 else 2813 ISSMERROR("analysis: %s not supported yet",EnumToString(analysis_type));2813 _error_("analysis: %s not supported yet",EnumToString(analysis_type)); 2814 2814 2815 2815 } … … 2830 2830 2831 2831 /*Get inputs*/ 2832 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2833 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2832 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2833 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2834 2834 2835 2835 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ … … 2869 2869 2870 2870 /*Get inputs*/ 2871 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2872 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2871 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2872 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2873 2873 2874 2874 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ … … 2904 2904 /*Check that both inputs have been found*/ 2905 2905 if (!vx_input || !vy_input){ 2906 ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);2906 _error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input); 2907 2907 } 2908 2908 … … 2955 2955 break; 2956 2956 default: 2957 ISSMERROR("%s%i","control type not supported yet: ",control_type);2957 _error_("%s%i","control type not supported yet: ",control_type); 2958 2958 } 2959 2959 } … … 2983 2983 2984 2984 /*Retrieve all inputs*/ 2985 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);2986 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);2987 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);2988 Input* adjointx_input=inputs->GetInput(AdjointxEnum); ISSMASSERT(adjointx_input);2989 Input* adjointy_input=inputs->GetInput(AdjointyEnum); ISSMASSERT(adjointy_input);2990 Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); ISSMASSERT(rheologyb_input);2985 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 2986 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2987 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 2988 Input* adjointx_input=inputs->GetInput(AdjointxEnum); _assert_(adjointx_input); 2989 Input* adjointy_input=inputs->GetInput(AdjointyEnum); _assert_(adjointy_input); 2990 Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); _assert_(rheologyb_input); 2991 2991 2992 2992 /* Start looping on the number of gaussian points: */ … … 3057 3057 3058 3058 /*Retrieve all inputs we will be needing: */ 3059 Input* adjointx_input=inputs->GetInput(AdjointxEnum); ISSMASSERT(adjointx_input);3060 Input* adjointy_input=inputs->GetInput(AdjointyEnum); ISSMASSERT(adjointy_input);3061 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);3062 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);3063 Input* dragcoefficient_input=inputs->GetInput(DragCoefficientEnum); ISSMASSERT(dragcoefficient_input);3059 Input* adjointx_input=inputs->GetInput(AdjointxEnum); _assert_(adjointx_input); 3060 Input* adjointy_input=inputs->GetInput(AdjointyEnum); _assert_(adjointy_input); 3061 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 3062 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 3063 Input* dragcoefficient_input=inputs->GetInput(DragCoefficientEnum); _assert_(dragcoefficient_input); 3064 3064 3065 3065 /* Start looping on the number of gaussian points: */ … … 3130 3130 /*retrieve inputs :*/ 3131 3131 inputs->GetParameterValue(&drag_type,DragTypeEnum); 3132 Input* drag_input =inputs->GetInput(DragCoefficientEnum); ISSMASSERT(drag_input);3133 Input* vx_input =inputs->GetInput(VxEnum); ISSMASSERT(vx_input);3134 Input* vy_input =inputs->GetInput(VyEnum); ISSMASSERT(vy_input);3135 Input* vz_input =inputs->GetInput(VzEnum); ISSMASSERT(vz_input);3136 Input* adjointx_input=inputs->GetInput(AdjointxEnum); ISSMASSERT(adjointx_input);3137 Input* adjointy_input=inputs->GetInput(AdjointyEnum); ISSMASSERT(adjointy_input);3138 Input* adjointz_input=inputs->GetInput(AdjointzEnum); ISSMASSERT(adjointz_input);3132 Input* drag_input =inputs->GetInput(DragCoefficientEnum); _assert_(drag_input); 3133 Input* vx_input =inputs->GetInput(VxEnum); _assert_(vx_input); 3134 Input* vy_input =inputs->GetInput(VyEnum); _assert_(vy_input); 3135 Input* vz_input =inputs->GetInput(VzEnum); _assert_(vz_input); 3136 Input* adjointx_input=inputs->GetInput(AdjointxEnum); _assert_(adjointx_input); 3137 Input* adjointy_input=inputs->GetInput(AdjointyEnum); _assert_(adjointy_input); 3138 Input* adjointz_input=inputs->GetInput(AdjointzEnum); _assert_(adjointz_input); 3139 3139 3140 3140 /*retrieve some parameters: */ … … 3252 3252 /*Retrieve all inputs we will be needing: */ 3253 3253 this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum); 3254 Input* adjoint_input=inputs->GetInput(AdjointEnum); ISSMASSERT(adjoint_input);3255 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);3254 Input* adjoint_input=inputs->GetInput(AdjointEnum); _assert_(adjoint_input); 3255 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 3256 3256 3257 3257 /* Start looping on the number of gaussian points: */ … … 3301 3301 3302 3302 /*Retrieve all inputs we will be needing: */ 3303 Input* adjoint_input=inputs->GetInput(AdjointEnum); ISSMASSERT(adjoint_input);3304 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);3303 Input* adjoint_input=inputs->GetInput(AdjointEnum); _assert_(adjoint_input); 3304 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 3305 3305 3306 3306 /* Start looping on the number of gaussian points: */ … … 3344 3344 /*Make a copy of the original input: */ 3345 3345 input=(Input*)this->inputs->GetInput(enum_type); 3346 if(!input) ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));3346 if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type)); 3347 3347 3348 3348 /*ArtificialNoise: */ … … 3369 3369 3370 3370 if(control_type[i]==RheologyBbarEnum){ 3371 input=(Input*)matice->inputs->GetInput(control_type[i]); ISSMASSERT(input);3371 input=(Input*)matice->inputs->GetInput(control_type[i]); _assert_(input); 3372 3372 } 3373 3373 else{ 3374 input=(Input*)this->inputs->GetInput(control_type[i]); ISSMASSERT(input);3374 input=(Input*)this->inputs->GetInput(control_type[i]); _assert_(input); 3375 3375 } 3376 3376 3377 3377 if (input->Enum()!=ControlInputEnum){ 3378 ISSMERROR("input %s is not a ControlInput",EnumToString(control_type[i]));3378 _error_("input %s is not a ControlInput",EnumToString(control_type[i])); 3379 3379 } 3380 3380 … … 3405 3405 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 3406 3406 old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]); 3407 if(!new_inputs[i]) ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));3408 if(!old_inputs[i]) ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));3407 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0])); 3408 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0])); 3409 3409 } 3410 3410 … … 3434 3434 oldinput=(Input*)this->matice->inputs->GetInput(enum_type); 3435 3435 else 3436 ISSMERROR("object %s not supported yet",EnumToString(object_enum));3437 if(!oldinput) ISSMERROR("%s%s"," could not find old input with enum: ",EnumToString(enum_type));3436 _error_("object %s not supported yet",EnumToString(object_enum)); 3437 if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToString(enum_type)); 3438 3438 newinput=(Input*)oldinput->copy(); 3439 3439 … … 3447 3447 this->matice->inputs->AddInput((Input*)newinput); 3448 3448 else 3449 ISSMERROR("object %s not supported yet",EnumToString(object_enum));3449 _error_("object %s not supported yet",EnumToString(object_enum)); 3450 3450 } 3451 3451 /*}}}*/ … … 3465 3465 /*Make a copy of the original input: */ 3466 3466 input=(Input*)this->inputs->GetInput(enum_type); 3467 if(!input) ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));3467 if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type)); 3468 3468 3469 3469 /*Scale: */ … … 3480 3480 if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type); 3481 3481 else input=this->inputs->GetInput(enum_type); 3482 if (!input) ISSMERROR("Input %s not found in tria->inputs",EnumToString(enum_type));3482 if (!input) _error_("Input %s not found in tria->inputs",EnumToString(enum_type)); 3483 3483 3484 3484 /*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result … … 3525 3525 /*Checks if debuging*/ 3526 3526 /*{{{2*/ 3527 ISSMASSERT(iomodel->elements);3527 _assert_(iomodel->elements); 3528 3528 /*}}}*/ 3529 3529 … … 3656 3656 /*Matice will take care of it*/ break; 3657 3657 default: 3658 ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));3658 _error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i])); 3659 3659 } 3660 3660 } … … 3705 3705 break; 3706 3706 default: 3707 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));3707 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 3708 3708 } 3709 3709 } … … 3858 3858 if (vz_input){ 3859 3859 if (vz_input->Enum()!=TriaVertexInputEnum){ 3860 ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));3860 _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum())); 3861 3861 } 3862 3862 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 3942 3942 3943 3943 default: 3944 ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));3944 _error_("type %i (%s) not implemented yet",type,EnumToString(type)); 3945 3945 } 3946 3946 } … … 3948 3948 /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{1*/ 3949 3949 void Tria::InputUpdateFromVector(int* vector, int name, int type){ 3950 ISSMERROR(" not supported yet!");3950 _error_(" not supported yet!"); 3951 3951 } 3952 3952 /*}}}*/ 3953 3953 /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/ 3954 3954 void Tria::InputUpdateFromVector(bool* vector, int name, int type){ 3955 ISSMERROR(" not supported yet!");3955 _error_(" not supported yet!"); 3956 3956 } 3957 3957 /*}}}*/ … … 4023 4023 4024 4024 default: 4025 ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));4025 _error_("type %i (%s) not implemented yet",type,EnumToString(type)); 4026 4026 } 4027 4027 … … 4030 4030 /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/ 4031 4031 void Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){ 4032 ISSMERROR(" not supported yet!");4032 _error_(" not supported yet!"); 4033 4033 } 4034 4034 /*}}}*/ 4035 4035 /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/ 4036 4036 void Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){ 4037 ISSMERROR(" not supported yet!");4037 _error_(" not supported yet!"); 4038 4038 } 4039 4039 /*}}}*/ … … 4107 4107 4108 4108 /*First off, check that this segment belongs to this element: */ 4109 if ((int)*(segment+4)!=this->id) ISSMERROR("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id);4109 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); 4110 4110 4111 4111 /*Recover segment node locations: */ … … 4126 4126 length=sqrt(pow(x2-x1,2.0)+pow(y2-y1,2)); 4127 4127 4128 Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);4129 Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);4130 Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);4128 Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 4129 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 4130 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 4131 4131 4132 4132 thickness_input->GetParameterValue(&h1, gauss_1); … … 4404 4404 * */ 4405 4405 if (control_type[i]==DragCoefficientEnum){ 4406 Input* drag_input=inputs->GetInput(DragCoefficientEnum); ISSMASSERT(drag_input);4406 Input* drag_input=inputs->GetInput(DragCoefficientEnum); _assert_(drag_input); 4407 4407 drag_input->GetParameterDerivativeValue(&dk[0],&xyz_list[0][0],gauss); 4408 4408 //Jelem+=cm_noisedmp*1/2*(pow(dk[0],2)+pow(dk[1],2))*Jdet*gauss->weight; … … 4421 4421 } 4422 4422 else{ 4423 ISSMERROR("unsupported control type: %s",EnumToString(control_type[i]));4423 _error_("unsupported control type: %s",EnumToString(control_type[i])); 4424 4424 } 4425 4425 } … … 4436 4436 void Tria::SetClone(int* minranks){ 4437 4437 4438 ISSMERROR("not implemented yet");4438 _error_("not implemented yet"); 4439 4439 } 4440 4440 /*}}}1*/ … … 4938 4938 4939 4939 /*Retrieve all inputs we will be needing: */ 4940 Input* thickness_input =inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);4941 Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum); ISSMASSERT(thicknessobs_input);4942 Input* weights_input =inputs->GetInput(WeightsEnum); ISSMASSERT(weights_input);4940 Input* thickness_input =inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 4941 Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);_assert_(thicknessobs_input); 4942 Input* weights_input =inputs->GetInput(WeightsEnum); _assert_(weights_input); 4943 4943 4944 4944 /* Start looping on the number of gaussian points: */ … … 5019 5019 /*Checks if debuging*/ 5020 5020 /*{{{2*/ 5021 ISSMASSERT(iomodel->elements);5021 _assert_(iomodel->elements); 5022 5022 /*}}}*/ 5023 5023 -
TabularUnified issm/trunk/src/c/objects/Elements/Tria.h ¶
r6410 r6412 100 100 void InputToResult(int enum_type,int step,double time); 101 101 void DeleteResults(void); 102 void MaterialUpdateFromTemperature(void){ ISSMERROR("not implemented yet");};102 void MaterialUpdateFromTemperature(void){_error_("not implemented yet");}; 103 103 double MassFlux(double* segment,bool process_units); 104 104 void MaxAbsVx(double* pmaxabsvx, bool process_units); -
TabularUnified issm/trunk/src/c/objects/Elements/TriaRef.cpp ¶
r5808 r6412 52 52 void TriaRef::SetElementType(int type,int type_counter){ 53 53 54 ISSMASSERT(type==P1Enum || type==P1DGEnum);54 _assert_(type==P1Enum || type==P1DGEnum); 55 55 56 56 /*initialize element type*/ … … 277 277 278 278 *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.)); 279 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");279 if(*Jdet<0) _error_("negative jacobian determinant!"); 280 280 281 281 } … … 292 292 /*Get Determinant*/ 293 293 Matrix2x2Determinant(Jdet,&J[0][0]); 294 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");294 if(*Jdet<0) _error_("negative jacobian determinant!"); 295 295 296 296 } … … 314 314 315 315 *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); 316 if(*Jdet<0) ISSMERROR("negative jacobian determinant!");316 if(*Jdet<0) _error_("negative jacobian determinant!"); 317 317 318 318 } … … 350 350 GetNodalFunctions(&BasisFunctions[0],gauss); 351 351 352 ISSMASSERT(index1>=0 && index1<3);353 ISSMASSERT(index2>=0 && index2<3);352 _assert_(index1>=0 && index1<3); 353 _assert_(index2>=0 && index2<3); 354 354 l1l2[0]=BasisFunctions[index1]; 355 355 l1l2[1]=BasisFunctions[index2]; -
TabularUnified issm/trunk/src/c/objects/FemModel.cpp ¶
r6372 r6412 53 53 for(i=0;i<nummodels;i++){ 54 54 55 ISSMPRINTF(VerboseMProcessor()," Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i]));55 _printf_(VerboseMProcessor()," Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i])); 56 56 analysis_type=analysis_type_list[i]; 57 57 this->SetCurrentConfiguration(analysis_type); 58 58 59 59 if(i==0){ 60 ISSMPRINTF(VerboseMProcessor()," create vertex degrees of freedom\n");60 _printf_(VerboseMProcessor()," create vertex degrees of freedom\n"); 61 61 VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices 62 62 } 63 63 64 ISSMPRINTF(VerboseMProcessor()," resolve node constraints\n");64 _printf_(VerboseMProcessor()," resolve node constraints\n"); 65 65 SpcNodesx(nodes,constraints,analysis_type); 66 66 67 ISSMPRINTF(VerboseMProcessor()," create nodal degrees of freedom\n");67 _printf_(VerboseMProcessor()," create nodal degrees of freedom\n"); 68 68 NodesDofx(nodes,parameters,analysis_type); 69 69 70 ISSMPRINTF(VerboseMProcessor()," create nodal constraints vector\n");70 _printf_(VerboseMProcessor()," create nodal constraints vector\n"); 71 71 CreateNodalConstraintsx(&m_ys[i],nodes,analysis_type); 72 72 73 ISSMPRINTF(VerboseMProcessor()," create node sets\n");73 _printf_(VerboseMProcessor()," create node sets\n"); 74 74 BuildNodeSetsx(&m_nodesets[i], nodes,analysis_type); 75 75 76 ISSMPRINTF(VerboseMProcessor()," configuring element and loads\n");76 _printf_(VerboseMProcessor()," configuring element and loads\n"); 77 77 ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters); 78 78 } … … 152 152 } 153 153 if(found!=-1) analysis_counter=found; 154 else ISSMERROR("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToString(configuration_type));154 else _error_("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToString(configuration_type)); 155 155 156 156 /*activate matrices/vectors: */ … … 170 170 /*take care of petsc options, that depend on this analysis type: */ 171 171 PetscOptionsFromAnalysis(this->parameters,analysis_type); 172 ISSMPRINTF(VerboseSolver()," petsc Options set for analysis type: %s\n",EnumToString(analysis_type));172 _printf_(VerboseSolver()," petsc Options set for analysis type: %s\n",EnumToString(analysis_type)); 173 173 174 174 } -
TabularUnified issm/trunk/src/c/objects/Gauss/GaussPenta.cpp ¶
r5808 r6412 121 121 } 122 122 else{ 123 ISSMERROR("Penta not supported yet");123 _error_("Penta not supported yet"); 124 124 } 125 125 … … 151 151 } 152 152 else{ 153 ISSMERROR("Tria not supported yet");153 _error_("Tria not supported yet"); 154 154 } 155 155 … … 213 213 } 214 214 else{ 215 ISSMERROR("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4);215 _error_("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4); 216 216 } 217 217 … … 294 294 295 295 /*Check input in debugging mode*/ 296 ISSMASSERT(ig>=0 && ig< numgauss);296 _assert_(ig>=0 && ig< numgauss); 297 297 298 298 /*update static arrays*/ … … 309 309 310 310 /*in debugging mode: check that the default constructor has been called*/ 311 ISSMASSERT(numgauss==-1);311 _assert_(numgauss==-1); 312 312 313 313 /*update static arrays*/ … … 332 332 break; 333 333 default: 334 ISSMERROR("vertex index should be in [0 5]");334 _error_("vertex index should be in [0 5]"); 335 335 336 336 } … … 342 342 343 343 /*in debugging mode: check that the default constructor has been called*/ 344 ISSMASSERT(numgauss==-1);344 _assert_(numgauss==-1); 345 345 346 346 /*Basal Tria*/ … … 351 351 } 352 352 else{ 353 ISSMERROR("Tria not supported yet");353 _error_("Tria not supported yet"); 354 354 } 355 355 … … 360 360 361 361 /*Check that this has been initialized*/ 362 ISSMASSERT(numgauss>0);363 ISSMASSERT(weights);364 ISSMASSERT(coords1);365 ISSMASSERT(coords2);366 ISSMASSERT(coords3);367 ISSMASSERT(coords4);362 _assert_(numgauss>0); 363 _assert_(weights); 364 _assert_(coords1); 365 _assert_(coords2); 366 _assert_(coords3); 367 _assert_(coords4); 368 368 369 369 /*return first gauss index*/ … … 375 375 376 376 /*Check that this has been initialized*/ 377 ISSMASSERT(numgauss>0);378 ISSMASSERT(weights);379 ISSMASSERT(coords1);380 ISSMASSERT(coords2);381 ISSMASSERT(coords3);382 ISSMASSERT(coords4);377 _assert_(numgauss>0); 378 _assert_(weights); 379 _assert_(coords1); 380 _assert_(coords2); 381 _assert_(coords3); 382 _assert_(coords4); 383 383 384 384 /*return last gauss index +1*/ -
TabularUnified issm/trunk/src/c/objects/Gauss/GaussTria.cpp ¶
r5739 r6412 82 82 } 83 83 else 84 ISSMERROR("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);84 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2); 85 85 86 86 /*Initialize static fields as undefined*/ … … 180 180 } 181 181 else 182 ISSMERROR("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);182 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2); 183 183 184 184 } … … 188 188 189 189 /*Check input in debugging mode*/ 190 ISSMASSERT(ig>=0 && ig< numgauss);190 _assert_(ig>=0 && ig< numgauss); 191 191 192 192 /*update static arrays*/ … … 206 206 207 207 /*in debugging mode: check that the default constructor has been called*/ 208 ISSMASSERT(numgauss==-1);208 _assert_(numgauss==-1); 209 209 210 210 x1=*(xyz_list+3*0+0); y1=*(xyz_list+3*0+1); … … 229 229 230 230 /*in debugging mode: check that the default constructor has been called*/ 231 ISSMASSERT(numgauss==-1);231 _assert_(numgauss==-1); 232 232 233 233 /*update static arrays*/ … … 243 243 break; 244 244 default: 245 ISSMERROR("vertex index should be in [0 2]");245 _error_("vertex index should be in [0 2]"); 246 246 247 247 } … … 253 253 254 254 /*Check that this has been initialized*/ 255 ISSMASSERT(numgauss>0);256 ISSMASSERT(weights);257 ISSMASSERT(coords1);258 ISSMASSERT(coords2);259 ISSMASSERT(coords3);255 _assert_(numgauss>0); 256 _assert_(weights); 257 _assert_(coords1); 258 _assert_(coords2); 259 _assert_(coords3); 260 260 261 261 /*return first gauss index*/ … … 267 267 268 268 /*Check that this has been initialized*/ 269 ISSMASSERT(numgauss>0);270 ISSMASSERT(weights);271 ISSMASSERT(coords1);272 ISSMASSERT(coords2);273 ISSMASSERT(coords3);269 _assert_(numgauss>0); 270 _assert_(weights); 271 _assert_(coords1); 272 _assert_(coords2); 273 _assert_(coords3); 274 274 275 275 /*return last gauss index +1*/ -
TabularUnified issm/trunk/src/c/objects/Hook.cpp ¶
r5607 r6412 172 172 /*allocate: */ 173 173 if (num<0){ 174 ISSMERROR("cannot demarshall Hook as num<=0");174 _error_("cannot demarshall Hook as num<=0"); 175 175 } 176 176 else if (num==0){ … … 185 185 186 186 /*demarshall allocated ids and offsets: */ 187 ISSMASSERT(num<1000);187 _assert_(num<1000); 188 188 for (i=0;i<num;i++){ 189 189 memcpy(&this->ids[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int); … … 241 241 242 242 /*Checks if debugging mode*/ 243 ISSMASSERT(this->num==0 || this->ids!=NULL);243 _assert_(this->num==0 || this->ids!=NULL); 244 244 245 245 for(i=0;i<this->num;i++){ … … 270 270 this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on. 271 271 /*check the id is correct!: */ 272 if (this->objects[i]->Id()!=this->ids[i]) ISSMERROR("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i]," in resolved pointer!");272 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!"); 273 273 } 274 274 } … … 279 279 280 280 /*first, check that we only have one T object in our object list: */ 281 if (this->num!=1) ISSMERROR("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects");281 if (this->num!=1) _error_("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects"); 282 282 283 283 /*check NULL: */ 284 if (this->objects==NULL) ISSMERROR("hook is not pointing to any object, objects pointer is NULL");284 if (this->objects==NULL) _error_("hook is not pointing to any object, objects pointer is NULL"); 285 285 286 286 return *objects; … … 331 331 332 332 /*Else, check that we are requesting a half of num*/ 333 if (numindices>this->num) ISSMERROR("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);333 if (numindices>this->num) _error_("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num); 334 334 335 335 /*go pickup the correct objects, ids and offsets :*/ 336 336 output->num=numindices; 337 if(output->num<1) ISSMERROR("Trying to spawn an empty ElementProperties!");337 if(output->num<1) _error_("Trying to spawn an empty ElementProperties!"); 338 338 339 339 output->objects=(Object**)xmalloc(output->num*sizeof(Object*)); -
TabularUnified issm/trunk/src/c/objects/Inputs/BoolInput.cpp ¶
r5743 r6412 149 149 ElementResult* BoolInput::SpawnResult(int step, double time){ 150 150 151 ISSMERROR(" not supported yet!");151 _error_(" not supported yet!"); 152 152 153 153 } … … 161 161 /*}}}*/ 162 162 /*FUNCTION BoolInput::GetParameterValue(int* pvalue){{{1*/ 163 void BoolInput::GetParameterValue(int* pvalue){ ISSMERROR(" not supported yet!");}163 void BoolInput::GetParameterValue(int* pvalue){_error_(" not supported yet!");} 164 164 /*}}}*/ 165 165 /*FUNCTION BoolInput::GetParameterValue(double* pvalue){{{1*/ 166 void BoolInput::GetParameterValue(double* pvalue){ ISSMERROR(" not supported yet!");}166 void BoolInput::GetParameterValue(double* pvalue){_error_(" not supported yet!");} 167 167 /*}}}*/ 168 168 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/ 169 void BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){ ISSMERROR(" not supported yet!");}169 void BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");} 170 170 /*}}}*/ 171 171 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/ 172 void BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ ISSMERROR(" not supported yet!");}172 void BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");} 173 173 /*}}}*/ 174 174 /*FUNCTION BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/ 175 void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ ISSMERROR(" not supported yet!");}175 void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");} 176 176 /*}}}*/ 177 177 /*FUNCTION BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/ 178 void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ ISSMERROR(" not supported yet!");}178 void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");} 179 179 /*}}}*/ 180 180 /*FUNCTION BoolInput::ChangeEnum{{{1*/ … … 210 210 211 211 default: 212 ISSMERROR("not implemented yet");212 _error_("not implemented yet"); 213 213 } 214 214 … … 226 226 void BoolInput::GetVectorFromInputs(Vec vector,int* doflist){ 227 227 228 ISSMERROR(" not supporte yet!");228 _error_(" not supporte yet!"); 229 229 230 230 } … … 233 233 void BoolInput::GetValuesPtr(double** pvalues,int* pnum_values){ 234 234 235 ISSMERROR(" not supported yet!");236 237 } 238 /*}}}*/ 235 _error_(" not supported yet!"); 236 237 } 238 /*}}}*/ -
TabularUnified issm/trunk/src/c/objects/Inputs/BoolInput.h ¶
r5743 r6412 40 40 int EnumType(); 41 41 Input* SpawnTriaInput(int* indices); 42 Input* PointwiseDivide(Input* inputB){ ISSMERROR("not implemented yet");};42 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");}; 43 43 ElementResult* SpawnResult(int step, double time); 44 44 /*}}}*/ … … 51 51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss); 52 52 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss); 53 void GetParameterAverage(double* pvalue){ ISSMERROR("not implemented yet");};54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};53 void GetParameterAverage(double* pvalue){_error_("not implemented yet");}; 54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 61 61 void ChangeEnum(int newenumtype); 62 62 void SquareMin(double* psquaremin, bool process_units,Parameters* parameters); 63 void ConstrainMin(double minimum){ ISSMERROR("not implemented yet");};64 double InfinityNorm(void){ ISSMERROR("InfinityNorm not implemented for booleans");};65 double Max(void){ ISSMERROR("Max not implemented for booleans");};66 double MaxAbs(void){ ISSMERROR("Max not implemented for booleans");};67 double Min(void){ ISSMERROR("Min not implemented for booleans");};68 double MinAbs(void){ ISSMERROR("Min not implemented for booleans");};63 void ConstrainMin(double minimum){_error_("not implemented yet");}; 64 double InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");}; 65 double Max(void){_error_("Max not implemented for booleans");}; 66 double MaxAbs(void){_error_("Max not implemented for booleans");}; 67 double Min(void){_error_("Min not implemented for booleans");}; 68 double MinAbs(void){_error_("Min not implemented for booleans");}; 69 69 void Scale(double scale_factor); 70 void ArtificialNoise(double min,double max){ ISSMERROR("not implemented yet");};70 void ArtificialNoise(double min,double max){_error_("not implemented yet");}; 71 71 void AXPY(Input* xinput,double scalar); 72 72 void Constrain(double cm_min, double cm_max); 73 void Extrude(void){ ISSMERROR("not supported yet");};74 void VerticallyIntegrate(Input* thickness_input){ ISSMERROR("not supported yet");};73 void Extrude(void){_error_("not supported yet");}; 74 void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");}; 75 75 void GetVectorFromInputs(Vec vector,int* doflist); 76 76 void GetValuesPtr(double** pvalues,int* pnum_values); -
TabularUnified issm/trunk/src/c/objects/Inputs/ControlInput.cpp ¶
r6260 r6412 42 42 break; 43 43 default: 44 ISSMERROR("Input of Enum %s not supported yet by ControlInput",EnumToString(enum_input));44 _error_("Input of Enum %s not supported yet by ControlInput",EnumToString(enum_input)); 45 45 } 46 46 gradient =NULL; … … 179 179 values->Demarshall(&marshalled_dataset); 180 180 } 181 else ISSMERROR("Not supported yet");181 else _error_("Not supported yet"); 182 182 } 183 183 else{ … … 197 197 savedvalues->Demarshall(&marshalled_dataset); 198 198 } 199 else ISSMERROR("Not supported yet");199 else _error_("Not supported yet"); 200 200 } 201 201 else{ … … 215 215 gradient->Demarshall(&marshalled_dataset); 216 216 } 217 else ISSMERROR("Not supported yet");217 else _error_("Not supported yet"); 218 218 } 219 219 else{ … … 276 276 /*FUNCTION ControlInput::ScaleGradient{{{1*/ 277 277 void ControlInput::ScaleGradient(double scaling_factor){ 278 if(!gradient) ISSMERROR("Gradient of ControlInput %s not found",EnumToString(enum_type));278 if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToString(enum_type)); 279 279 gradient->Scale(scaling_factor); 280 280 }/*}}}*/ … … 294 294 break; 295 295 default: 296 ISSMERROR("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id);296 _error_("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id); 297 297 } 298 298 … … 348 348 /*FUNCTION ControlInput::SaveValue{{{1*/ 349 349 void ControlInput::SaveValue(void){ 350 if(!values) ISSMERROR("Values of %s not found",EnumToString(this->enum_type));350 if(!values) _error_("Values of %s not found",EnumToString(this->enum_type)); 351 351 352 352 if(savedvalues) delete this->savedvalues; … … 355 355 /*FUNCTION ControlInput::UpdateValue{{{1*/ 356 356 void ControlInput::UpdateValue(double scalar){ 357 if(!gradient) ISSMERROR("Gradient of %s not found",EnumToString(this->enum_type));358 if(!savedvalues) ISSMERROR("Values of %s not found",EnumToString(this->enum_type));357 if(!gradient) _error_("Gradient of %s not found",EnumToString(this->enum_type)); 358 if(!savedvalues) _error_("Values of %s not found",EnumToString(this->enum_type)); 359 359 360 360 if(values) delete this->values; -
TabularUnified issm/trunk/src/c/objects/Inputs/ControlInput.h ¶
r6260 r6412 42 42 int EnumType(); 43 43 Input* SpawnTriaInput(int* indices); 44 Input* PointwiseDivide(Input* inputB){ ISSMERROR("not implemented yet");};44 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");}; 45 45 ElementResult* SpawnResult(int step, double time); 46 46 /*}}}*/ … … 54 54 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss); 55 55 void GetParameterAverage(double* pvalue); 56 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};57 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};58 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};59 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};60 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};61 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};62 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};63 void ChangeEnum(int newenumtype){ ISSMERROR("not implemented yet");};64 void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){ ISSMERROR("not implemented yet");};65 void ConstrainMin(double minimum){ ISSMERROR("not implemented yet");};66 void Scale(double scale_factor){ ISSMERROR("not implemented yet");};67 void ArtificialNoise(double min,double max){ ISSMERROR("not implemented yet");};68 void AXPY(Input* xinput,double scalar){ ISSMERROR("not implemented yet");};56 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 57 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 58 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 59 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 60 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 61 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 62 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 63 void ChangeEnum(int newenumtype){_error_("not implemented yet");}; 64 void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");}; 65 void ConstrainMin(double minimum){_error_("not implemented yet");}; 66 void Scale(double scale_factor){_error_("not implemented yet");}; 67 void ArtificialNoise(double min,double max){_error_("not implemented yet");}; 68 void AXPY(Input* xinput,double scalar){_error_("not implemented yet");}; 69 69 void Constrain(double cm_min, double cm_max); 70 double InfinityNorm(void){ ISSMERROR("not implemented yet");};71 double Max(void){ ISSMERROR("not implemented yet");};72 double MaxAbs(void){ ISSMERROR("not implemented yet");};73 double Min(void){ ISSMERROR("not implemented yet");};74 double MinAbs(void){ ISSMERROR("not implemented yet");};70 double InfinityNorm(void){_error_("not implemented yet");}; 71 double Max(void){_error_("not implemented yet");}; 72 double MaxAbs(void){_error_("not implemented yet");}; 73 double Min(void){_error_("not implemented yet");}; 74 double MinAbs(void){_error_("not implemented yet");}; 75 75 void Extrude(void); 76 76 void VerticallyIntegrate(Input* thickness_input); 77 void GetVectorFromInputs(Vec vector,int* doflist){ ISSMERROR("not implemented yet");};78 void GetValuesPtr(double** pvalues,int* pnum_values){ ISSMERROR("not implemented yet");};77 void GetVectorFromInputs(Vec vector,int* doflist){_error_("not implemented yet");}; 78 void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");}; 79 79 ElementResult* SpawnGradient(int step, double time); 80 80 void GetGradient(Vec gradient_vec,int* doflist); -
TabularUnified issm/trunk/src/c/objects/Inputs/DoubleInput.cpp ¶
r5743 r6412 160 160 *pvalue=(bool)value; 161 161 #else 162 ISSMERROR("Double input of enum %s cannot return a boolean",EnumToString(enum_type));162 _error_("Double input of enum %s cannot return a boolean",EnumToString(enum_type)); 163 163 #endif 164 164 … … 170 170 *pvalue=(int)value; 171 171 #else 172 ISSMERROR("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));172 _error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type)); 173 173 #endif 174 174 … … 183 183 /*}}}*/ 184 184 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/ 185 void DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){ ISSMERROR(" not supported yet!");}185 void DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");} 186 186 /*}}}*/ 187 187 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/ 188 void DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ ISSMERROR(" not supported yet!");}188 void DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");} 189 189 /*}}}*/ 190 190 /*FUNCTION DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/ 191 void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ ISSMERROR(" not supported yet!");}191 void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");} 192 192 /*}}}*/ 193 193 /*FUNCTION DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/ 194 void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ ISSMERROR(" not supported yet!");}194 void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");} 195 195 /*}}}*/ 196 196 /*FUNCTION DoubleInput::ChangeEnum{{{1*/ … … 232 232 233 233 default: 234 ISSMERROR("not implemented yet");234 _error_("not implemented yet"); 235 235 } 236 236 … … 268 268 void DoubleInput::GetVectorFromInputs(Vec vector,int* doflist){ 269 269 270 ISSMERROR(" not supporte yet!");270 _error_(" not supporte yet!"); 271 271 272 272 } … … 275 275 void DoubleInput::GetValuesPtr(double** pvalues,int* pnum_values){ 276 276 277 ISSMERROR(" not supported yet!");277 _error_(" not supported yet!"); 278 278 279 279 } … … 291 291 292 292 /*Check that input provided is a thickness*/ 293 if (thickness_input->EnumType()!=ThicknessEnum) ISSMERROR("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));293 if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType())); 294 294 295 295 /*vertically integrate depending on type:*/ … … 302 302 303 303 default: 304 ISSMERROR("not implemented yet");304 _error_("not implemented yet"); 305 305 } 306 306 } -
TabularUnified issm/trunk/src/c/objects/Inputs/DoubleInput.h ¶
r5743 r6412 51 51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss); 52 52 void GetParameterAverage(double* pvalue); 53 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};54 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};55 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};56 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};57 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};58 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};59 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};53 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 54 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 55 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 56 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 57 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 58 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 59 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 60 60 void ChangeEnum(int newenumtype); 61 61 void SquareMin(double* psquaremin, bool process_units,Parameters* parameters); 62 62 void ConstrainMin(double minimum); 63 63 void Scale(double scale_factor); 64 void ArtificialNoise(double min,double max){ ISSMERROR("not implemented yet");};64 void ArtificialNoise(double min,double max){_error_("not implemented yet");}; 65 65 void AXPY(Input* xinput,double scalar); 66 66 void Constrain(double cm_min, double cm_max); 67 double InfinityNorm(void){ ISSMERROR("not implemented yet");};67 double InfinityNorm(void){_error_("not implemented yet");}; 68 68 double Max(void); 69 69 double MaxAbs(void); 70 70 double Min(void); 71 71 double MinAbs(void); 72 void Extrude(void){ ISSMERROR("not supported yet");};72 void Extrude(void){_error_("not supported yet");}; 73 73 void VerticallyIntegrate(Input* thickness_input); 74 74 void GetVectorFromInputs(Vec vector,int* doflist); -
TabularUnified issm/trunk/src/c/objects/Inputs/IntInput.cpp ¶
r5743 r6412 148 148 ElementResult* IntInput::SpawnResult(int step, double time){ 149 149 150 ISSMERROR(" not supported yet!");150 _error_(" not supported yet!"); 151 151 152 152 } … … 155 155 /*Object functions*/ 156 156 /*FUNCTION IntInput::GetParameterValue(bool* pvalue) {{{1*/ 157 void IntInput::GetParameterValue(bool* pvalue){ ISSMERROR(" not supported yet!");}157 void IntInput::GetParameterValue(bool* pvalue){_error_(" not supported yet!");} 158 158 /*}}}*/ 159 159 /*FUNCTION IntInput::GetParameterValue(int* pvalue){{{1*/ … … 164 164 /*FUNCTION IntInput::GetParameterValue(double* pvalue){{{1*/ 165 165 void IntInput::GetParameterValue(double* pvalue){ 166 ISSMERROR("IntInput cannot return a double in parallel");166 _error_("IntInput cannot return a double in parallel"); 167 167 } 168 168 /*}}}*/ 169 169 /*FUNCTION IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/ 170 void IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){ ISSMERROR(" not supported yet!");}170 void IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");} 171 171 /*}}}*/ 172 172 /*FUNCTION IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/ 173 void IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ ISSMERROR(" not supported yet!");}173 void IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");} 174 174 /*}}}*/ 175 175 /*FUNCTION IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/ 176 void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ ISSMERROR(" not supported yet!");}176 void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");} 177 177 /*}}}*/ 178 178 /*FUNCTION IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/ 179 void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ ISSMERROR(" not supported yet!");}179 void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");} 180 180 /*}}}*/ 181 181 /*FUNCTION IntInput::ChangeEnum{{{1*/ … … 215 215 216 216 default: 217 ISSMERROR("not implemented yet");217 _error_("not implemented yet"); 218 218 } 219 219 … … 231 231 void IntInput::GetVectorFromInputs(Vec vector,int* doflist){ 232 232 233 ISSMERROR(" not supporte yet!");233 _error_(" not supporte yet!"); 234 234 235 235 } … … 238 238 void IntInput::GetValuesPtr(double** pvalues,int* pnum_values){ 239 239 240 ISSMERROR(" not supported yet!");241 242 } 243 /*}}}*/ 240 _error_(" not supported yet!"); 241 242 } 243 /*}}}*/ -
TabularUnified issm/trunk/src/c/objects/Inputs/IntInput.h ¶
r5743 r6412 40 40 int EnumType(); 41 41 Input* SpawnTriaInput(int* indices); 42 Input* PointwiseDivide(Input* inputB){ ISSMERROR("not implemented yet");};42 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");}; 43 43 ElementResult* SpawnResult(int step, double time); 44 44 /*}}}*/ … … 51 51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss); 52 52 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss); 53 void GetParameterAverage(double* pvalue){ ISSMERROR("not implemented yet");};54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};53 void GetParameterAverage(double* pvalue){_error_("not implemented yet");}; 54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 61 61 void ChangeEnum(int newenumtype); 62 62 void SquareMin(double* psquaremin, bool process_units,Parameters* parameters); 63 void ConstrainMin(double minimum){ ISSMERROR("not implemented yet");};63 void ConstrainMin(double minimum){_error_("not implemented yet");}; 64 64 void Scale(double scale_factor); 65 void ArtificialNoise(double min,double max){ ISSMERROR("not implemented yet");};65 void ArtificialNoise(double min,double max){_error_("not implemented yet");}; 66 66 void AXPY(Input* xinput,double scalar); 67 67 void Constrain(double cm_min, double cm_max); 68 double InfinityNorm(void){ ISSMERROR("InfinityNorm not implemented for integers");};69 double Max(void){ ISSMERROR("Max not implemented for integers");};70 double MaxAbs(void){ ISSMERROR("Max not implemented for integers");};71 double Min(void){ ISSMERROR("Min not implemented for integers");};72 double MinAbs(void){ ISSMERROR("Min not implemented for integers");};73 void Extrude(void){ ISSMERROR("not supported yet");};74 void VerticallyIntegrate(Input* thickness_input){ ISSMERROR("not supported yet");};68 double InfinityNorm(void){_error_("InfinityNorm not implemented for integers");}; 69 double Max(void){_error_("Max not implemented for integers");}; 70 double MaxAbs(void){_error_("Max not implemented for integers");}; 71 double Min(void){_error_("Min not implemented for integers");}; 72 double MinAbs(void){_error_("Min not implemented for integers");}; 73 void Extrude(void){_error_("not supported yet");}; 74 void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");}; 75 75 void GetVectorFromInputs(Vec vector,int* doflist); 76 76 void GetValuesPtr(double** pvalues,int* pnum_values); -
TabularUnified issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp ¶
r6200 r6412 153 153 154 154 /*Check index value*/ 155 ISSMASSERT(indices[i]>=0 && indices[i]<6);155 _assert_(indices[i]>=0 && indices[i]<6); 156 156 157 157 /*Assign value to new input*/ … … 506 506 case ControlInputEnum:{ 507 507 ControlInput* cont_input=(ControlInput*)xinput; 508 if(cont_input->values->Enum()!=PentaVertexInputEnum) ISSMERROR("not supported yet");508 if(cont_input->values->Enum()!=PentaVertexInputEnum) _error_("not supported yet"); 509 509 PentaVertexInput* cast_input=(PentaVertexInput*)cont_input->values; 510 510 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);} 511 511 return; 512 512 default: 513 ISSMERROR("not implemented yet");513 _error_("not implemented yet"); 514 514 } 515 515 … … 547 547 548 548 /*Check that input provided is a thickness*/ 549 if (thickness_input->EnumType()!=ThicknessEnum) ISSMERROR("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));549 if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType())); 550 550 551 551 /*Get Thickness value pointer*/ … … 563 563 564 564 default: 565 ISSMERROR("not implemented yet");565 _error_("not implemented yet"); 566 566 } 567 567 } … … 582 582 583 583 /*Check that inputB is of the same type*/ 584 if (inputB->Enum()!=PentaVertexInputEnum) ISSMERROR("Operation not permitted because inputB is of type %s",EnumToString(inputB->Enum()));584 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString(inputB->Enum())); 585 585 xinputB=(PentaVertexInput*)inputB; 586 586 587 587 /*Create point wise sum*/ 588 588 for(i=0;i<numgrids;i++){ 589 ISSMASSERT(xinputB->values[i]!=0);589 _assert_(xinputB->values[i]!=0); 590 590 AdotBvalues[i]=this->values[i]/xinputB->values[i]; 591 591 } -
TabularUnified issm/trunk/src/c/objects/Inputs/PentaVertexInput.h ¶
r5743 r6412 44 44 /*}}}*/ 45 45 /*numerics: {{{1*/ 46 void GetParameterValue(bool* pvalue){ ISSMERROR("not implemented yet");};47 void GetParameterValue(int* pvalue){ ISSMERROR("not implemented yet");};48 void GetParameterValue(double* pvalue){ ISSMERROR("not implemented yet");};49 void GetParameterValue(double* pvalue,GaussTria* gauss){ ISSMERROR("not implemented yet");};46 void GetParameterValue(bool* pvalue){_error_("not implemented yet");}; 47 void GetParameterValue(int* pvalue){_error_("not implemented yet");}; 48 void GetParameterValue(double* pvalue){_error_("not implemented yet");}; 49 void GetParameterValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");}; 50 50 void GetParameterValue(double* pvalue,GaussPenta* gauss); 51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 52 52 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss); 53 53 void GetParameterAverage(double* pvalue); 54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ ISSMERROR("not implemented yet");};54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; 56 56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss); 57 57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss); … … 64 64 void ConstrainMin(double minimum); 65 65 void Scale(double scale_factor); 66 void ArtificialNoise(double min,double max){ ISSMERROR("not implemented yet");};66 void ArtificialNoise(double min,double max){_error_("not implemented yet");}; 67 67 void AXPY(Input* xinput,double scalar); 68 68 void Constrain(double cm_min, double cm_max); -
TabularUnified issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp ¶
r5743 r6412 374 374 375 375 default : 376 ISSMERROR("not implemented yet");376 _error_("not implemented yet"); 377 377 } 378 378 -
TabularUnified issm/trunk/src/c/objects/Inputs/TriaVertexInput.h ¶
r5743 r6412 40 40 int EnumType(); 41 41 Input* SpawnTriaInput(int* indices); 42 Input* PointwiseDivide(Input* inputB){ ISSMERROR("not implemented yet");};42 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");}; 43 43 ElementResult* SpawnResult(int step, double time); 44 44 /*}}}*/ 45 45 /*numerics: {{{1*/ 46 void GetParameterValue(bool* pvalue){ ISSMERROR("not implemented yet");}47 void GetParameterValue(int* pvalue){ ISSMERROR("not implemented yet");}48 void GetParameterValue(double* pvalue){ ISSMERROR("not implemented yet");}46 void GetParameterValue(bool* pvalue){_error_("not implemented yet");} 47 void GetParameterValue(int* pvalue){_error_("not implemented yet");} 48 void GetParameterValue(double* pvalue){_error_("not implemented yet");} 49 49 void GetParameterValue(double* pvalue,GaussTria* gauss); 50 void GetParameterValue(double* pvalue,GaussPenta* gauss){ ISSMERROR("not implemented yet");};50 void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");}; 51 51 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss); 52 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};52 void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 53 53 void GetParameterAverage(double* pvalue); 54 54 void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss); 55 55 void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss); 56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ ISSMERROR("not implemented yet");};56 void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 57 void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 58 void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 59 void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 60 void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 61 61 void ChangeEnum(int newenumtype); 62 62 … … 72 72 double Min(void); 73 73 double MinAbs(void); 74 void Extrude(void){ ISSMERROR("not supported yet");};75 void VerticallyIntegrate(Input* thickness_input){ ISSMERROR("not supported yet");};74 void Extrude(void){_error_("not supported yet");}; 75 void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");}; 76 76 void GetVectorFromInputs(Vec vector,int* doflist); 77 77 void GetValuesPtr(double** pvalues,int* pnum_values); -
TabularUnified issm/trunk/src/c/objects/Loads/Friction.cpp ¶
r5749 r6412 108 108 vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2)); 109 109 } 110 else ISSMERROR("element_type %s not supported yet",element_type);110 else _error_("element_type %s not supported yet",element_type); 111 111 112 112 alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1)); … … 169 169 vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2)); 170 170 } 171 else ISSMERROR("element_type %s not supported yet",element_type);171 else _error_("element_type %s not supported yet",element_type); 172 172 173 173 alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1)); … … 239 239 240 240 Input* input=inputs->GetInput(enum_type); 241 if(!input) ISSMERROR("input %s not found",EnumToString(enum_type));241 if(!input) _error_("input %s not found",EnumToString(enum_type)); 242 242 input->GetParameterValue(pvalue,gauss); 243 243 … … 248 248 249 249 Input* input=inputs->GetInput(enum_type); 250 if(!input) ISSMERROR("input %s not found",EnumToString(enum_type));250 if(!input) _error_("input %s not found",EnumToString(enum_type)); 251 251 input->GetParameterValue(pvalue,gauss); 252 252 -
TabularUnified issm/trunk/src/c/objects/Loads/Icefront.cpp ¶
r5986 r6412 78 78 icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3); 79 79 } 80 else ISSMERROR("in_icefront_type %s not supported yet!",EnumToString(in_icefront_type));80 else _error_("in_icefront_type %s not supported yet!",EnumToString(in_icefront_type)); 81 81 82 82 if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum) num_nodes=4; … … 319 319 /*Checks in debugging mode*/ 320 320 /*{{{2*/ 321 ISSMASSERT(nodes);322 ISSMASSERT(element);323 ISSMASSERT(matpar);321 _assert_(nodes); 322 _assert_(element); 323 _assert_(matpar); 324 324 /*}}}*/ 325 325 … … 338 338 break; 339 339 default: 340 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));340 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 341 341 } 342 342 … … 436 436 return CreatePVectorDiagnosticStokes(); 437 437 default: 438 ISSMERROR("Icefront type %s not supported yet",EnumToString(type));438 _error_("Icefront type %s not supported yet",EnumToString(type)); 439 439 } 440 440 } … … 472 472 /*Retrieve all inputs and parameters*/ 473 473 GetVerticesCoordinates(&xyz_list[0][0],nodes,numnodes); 474 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);475 Input* bed_input =tria->inputs->GetInput(BedEnum); ISSMASSERT(bed_input);474 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 475 Input* bed_input =tria->inputs->GetInput(BedEnum); _assert_(bed_input); 476 476 inputs->GetParameterValue(&fill,FillEnum); 477 477 rho_water=matpar->GetRhoWater(); … … 502 502 break; 503 503 default: 504 ISSMERROR("fill type %s not supported yet",EnumToString(fill));504 _error_("fill type %s not supported yet",EnumToString(fill)); 505 505 } 506 506 ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2); … … 575 575 /*Retrieve all inputs and parameters*/ 576 576 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICESQUA); 577 Input* surface_input =penta->inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);577 Input* surface_input =penta->inputs->GetInput(SurfaceEnum); _assert_(surface_input); 578 578 inputs->GetParameterValue(&fill,FillEnum); 579 579 rho_water=matpar->GetRhoWater(); … … 610 610 break; 611 611 default: 612 ISSMERROR("fill type %s not supported yet",EnumToString(fill));612 _error_("fill type %s not supported yet",EnumToString(fill)); 613 613 } 614 614 ice_pressure=rho_ice*gravity*(surface-z_g); … … 681 681 break; 682 682 default: 683 ISSMERROR("fill type %s not supported yet",EnumToString(fill));683 _error_("fill type %s not supported yet",EnumToString(fill)); 684 684 } 685 685 air_pressure=0; … … 716 716 717 717 /*Some checks for debugging*/ 718 ISSMASSERT(nodes);718 _assert_(nodes); 719 719 720 720 /*How many nodes? :*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Icefront.h ¶
r6216 r6412 66 66 void InputUpdateFromConstant(bool constant, int name); 67 67 void InputUpdateFromSolution(double* solution); 68 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};68 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 69 69 /*}}}*/ 70 70 /*Load virtual functions definitions: {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Numericalflux.cpp ¶
r6033 r6412 92 92 if (iomodel->elements[3*(e2-1)+j]==i2) pos4=j+1; 93 93 } 94 ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF);94 _assert_(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF); 95 95 96 96 /*3: We have the id of the elements and the position of the vertices in the index … … 109 109 if (iomodel->elements[3*(e1-1)+j]==i2) pos2=j+1; 110 110 } 111 ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF);111 _assert_(pos1!=UNDEF && pos2!=UNDEF); 112 112 113 113 /*3: We have the id of the elements and the position of the vertices in the index … … 347 347 break; 348 348 default: 349 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));349 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 350 350 } 351 351 … … 377 377 break; 378 378 default: 379 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));379 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 380 380 } 381 381 … … 424 424 return CreateKMatrixPrognosticBoundary(); 425 425 default: 426 ISSMERROR("type not supported yet");426 _error_("type not supported yet"); 427 427 } 428 428 } … … 577 577 return CreateKMatrixBalancedthicknessBoundary(); 578 578 default: 579 ISSMERROR("type not supported yet");579 _error_("type not supported yet"); 580 580 } 581 581 } … … 728 728 return CreateKMatrixAdjointBalancedthicknessBoundary(); 729 729 default: 730 ISSMERROR("type not supported yet");730 _error_("type not supported yet"); 731 731 } 732 732 } … … 760 760 return CreatePVectorPrognosticBoundary(); 761 761 default: 762 ISSMERROR("type not supported yet");762 _error_("type not supported yet"); 763 763 } 764 764 } … … 794 794 GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES_BOUNDARY); 795 795 parameters->FindParam(&dt,DtEnum); 796 Input* vxaverage_input=tria->inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);797 Input* vyaverage_input=tria->inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);798 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);796 Input* vxaverage_input=tria->inputs->GetInput(VxEnum); _assert_(vxaverage_input); 797 Input* vyaverage_input=tria->inputs->GetInput(VyEnum); _assert_(vyaverage_input); 798 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 799 799 GetNormal(&normal[0],xyz_list); 800 800 … … 852 852 return CreatePVectorBalancedthicknessBoundary(); 853 853 default: 854 ISSMERROR("type not supported yet");854 _error_("type not supported yet"); 855 855 } 856 856 } … … 885 885 /*Retrieve all inputs and parameters*/ 886 886 GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES_BOUNDARY); 887 Input* vxaverage_input=tria->inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);888 Input* vyaverage_input=tria->inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);889 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);887 Input* vxaverage_input=tria->inputs->GetInput(VxEnum); _assert_(vxaverage_input); 888 Input* vyaverage_input=tria->inputs->GetInput(VyEnum); _assert_(vyaverage_input); 889 Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 890 890 GetNormal(&normal[0],xyz_list); 891 891 -
TabularUnified issm/trunk/src/c/objects/Loads/Numericalflux.h ¶
r6216 r6412 53 53 /*Update virtual functions resolution: {{{1*/ 54 54 void InputUpdateFromVector(double* vector, int name, int type){/*Do nothing*/} 55 void InputUpdateFromVector(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}56 void InputUpdateFromVector(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}55 void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");} 56 void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");} 57 57 void InputUpdateFromVectorDakota(double* vector, int name, int type){/*Do nothing*/} 58 void InputUpdateFromVectorDakota(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}59 void InputUpdateFromVectorDakota(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}58 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");} 59 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");} 60 60 void InputUpdateFromConstant(double constant, int name){/*Do nothing*/}; 61 61 void InputUpdateFromConstant(int constant, int name){/*Do nothing*/}; 62 void InputUpdateFromConstant(bool constant, int name){ ISSMERROR("Not implemented yet!");}63 void InputUpdateFromSolution(double* solution){ ISSMERROR("Not implemented yet!");}64 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};62 void InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");} 63 void InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");} 64 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 65 65 /*}}}*/ 66 66 /*Load virtual functions definitions: {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Pengrid.cpp ¶
r6052 r6412 54 54 55 55 /*Some checks if debugging activated*/ 56 ISSMASSERT(iomodel->singlenodetoelementconnectivity);57 ISSMASSERT(index>=0 && index<iomodel->numberofvertices);58 ISSMASSERT(id);56 _assert_(iomodel->singlenodetoelementconnectivity); 57 _assert_(index>=0 && index<iomodel->numberofvertices); 58 _assert_(id); 59 59 60 60 /*id: */ … … 65 65 pengrid_node_id=iomodel->nodecounter+index+1; 66 66 pengrid_element_id=iomodel->singlenodetoelementconnectivity[index]; 67 ISSMASSERT(pengrid_element_id);67 _assert_(pengrid_element_id); 68 68 pengrid_matpar_id=iomodel->numberofelements+1; //refers to the constant material parameters object 69 69 … … 324 324 break; 325 325 default: 326 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));326 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 327 327 } 328 328 … … 352 352 break; 353 353 default: 354 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));354 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 355 355 } 356 356 … … 455 455 } 456 456 else{ 457 ISSMERROR("analysis: %s not supported yet",EnumToString(analysis_type));457 _error_("analysis: %s not supported yet",EnumToString(analysis_type)); 458 458 } 459 459 … … 682 682 /*FUNCTION Pengrid::UpdateInputs {{{1*/ 683 683 void Pengrid::UpdateInputs(double* solution){ 684 ISSMERROR("not supported yet!");685 } 686 /*}}}1*/ 684 _error_("not supported yet!"); 685 } 686 /*}}}1*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Pengrid.h ¶
r6216 r6412 67 67 void InputUpdateFromConstant(bool constant, int name); 68 68 void InputUpdateFromSolution(double* solution); 69 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};69 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 70 70 /*}}}*/ 71 71 /*Load virtual functions definitions: {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Penpair.cpp ¶
r5989 r6412 229 229 break; 230 230 default: 231 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));231 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 232 232 } 233 233 … … 281 281 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 282 282 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 283 default: ISSMERROR("not supported yet");283 default: _error_("not supported yet"); 284 284 } 285 285 case PattynApproximationEnum: … … 287 287 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 288 288 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 289 default: ISSMERROR("not supported yet");289 default: _error_("not supported yet"); 290 290 } 291 291 case StokesApproximationEnum: … … 293 293 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 294 294 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 295 default: ISSMERROR("not supported yet");295 default: _error_("not supported yet"); 296 296 } 297 297 case NoneApproximationEnum: … … 299 299 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 300 300 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 301 default: ISSMERROR("not supported yet");301 default: _error_("not supported yet"); 302 302 } 303 default: ISSMERROR("not supported yet");303 default: _error_("not supported yet"); 304 304 } 305 305 } -
TabularUnified issm/trunk/src/c/objects/Loads/Penpair.h ¶
r6216 r6412 44 44 /*}}}*/ 45 45 /*Update virtual functions resolution: {{{1*/ 46 void InputUpdateFromVector(double* vector, int name, int type){ ISSMERROR("Not implemented yet!");}47 void InputUpdateFromVector(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}48 void InputUpdateFromVector(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}49 void InputUpdateFromVectorDakota(double* vector, int name, int type){ ISSMERROR("Not implemented yet!");}50 void InputUpdateFromVectorDakota(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}51 void InputUpdateFromVectorDakota(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}46 void InputUpdateFromVector(double* vector, int name, int type){_error_("Not implemented yet!");} 47 void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");} 48 void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");} 49 void InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");} 50 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");} 51 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");} 52 52 void InputUpdateFromConstant(double constant, int name); 53 53 void InputUpdateFromConstant(int constant, int name); 54 54 void InputUpdateFromConstant(bool constant, int name); 55 void InputUpdateFromSolution(double* solution){ ISSMERROR("Not implemented yet!");}56 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};55 void InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");} 56 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 57 57 /*}}}*/ 58 58 /*Load virtual functions definitions: {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Riftfront.cpp ¶
r6207 r6412 385 385 386 386 /*update input*/ 387 ISSMERROR("not implemented yet");387 _error_("not implemented yet"); 388 388 //this->inputs->AddInput(new DoubleInput(name,constant)); 389 389 … … 433 433 break; 434 434 default: 435 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));435 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 436 436 } 437 437 … … 459 459 break; 460 460 default: 461 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));461 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type)); 462 462 } 463 463 … … 506 506 507 507 /*enum of element? */ 508 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");508 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 509 509 tria1=(Tria*)elements[0]; 510 510 tria2=(Tria*)elements[1]; … … 519 519 tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum); 520 520 tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum); 521 if (h[0]!=h[1]) ISSMERROR(" different thicknesses not supported for rift fronts");521 if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts"); 522 522 thickness=h[0]; 523 523 … … 597 597 598 598 /*enum of element? */ 599 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");599 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 600 600 tria1=(Tria*)elements[0]; 601 601 tria2=(Tria*)elements[1]; … … 613 613 tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum); 614 614 tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum); 615 if (h[0]!=h[1]) ISSMERROR(" different thicknesses not supported for rift fronts");615 if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts"); 616 616 thickness=h[0]; 617 617 tria1->GetParameterValue(&b[0],nodes[0],BedEnum); 618 618 tria2->GetParameterValue(&b[1],nodes[1],BedEnum); 619 if (b[0]!=b[1]) ISSMERROR(" different beds not supported for rift fronts");619 if (b[0]!=b[1])_error_(" different beds not supported for rift fronts"); 620 620 bed=b[0]; 621 621 … … 645 645 else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice) 646 646 647 if(!shelf) ISSMERROR("%s%i%s","fill type ",fill," not supported on ice sheets yet.");647 if(!shelf) _error_("%s%i%s","fill type ",fill," not supported on ice sheets yet."); 648 648 649 649 pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2; … … 655 655 } 656 656 else{ 657 ISSMERROR("%s%i%s","fill type ",fill," not supported yet.");657 _error_("%s%i%s","fill type ",fill," not supported yet."); 658 658 } 659 659 … … 694 694 695 695 /*enum of element? */ 696 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");696 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 697 697 698 698 /*recover elements on both side of rift: */ … … 802 802 803 803 /*enum of element? */ 804 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");804 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 805 805 806 806 /*recover elements on both side of rift: */ … … 861 861 862 862 /*enum of element? */ 863 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");863 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 864 864 865 865 /*recover elements on both side of rift: */ … … 904 904 905 905 /*enum of element? */ 906 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");906 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 907 907 908 908 /*recover elements on both side of rift: */ … … 953 953 954 954 /*enum of element? */ 955 if(elements[0]->Enum()!=TriaEnum) ISSMERROR(" only Tria element allowed for Riftfront load!");955 if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!"); 956 956 957 957 /*recover elements on both side of rift: */ -
TabularUnified issm/trunk/src/c/objects/Loads/Riftfront.h ¶
r6216 r6412 64 64 /*Update virtual functions resolution: {{{1*/ 65 65 void InputUpdateFromVector(double* vector, int name, int type); 66 void InputUpdateFromVector(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}67 void InputUpdateFromVector(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}68 void InputUpdateFromVectorDakota(double* vector, int name, int type){ ISSMERROR("Not implemented yet!");}69 void InputUpdateFromVectorDakota(int* vector, int name, int type){ ISSMERROR("Not implemented yet!");}70 void InputUpdateFromVectorDakota(bool* vector, int name, int type){ ISSMERROR("Not implemented yet!");}66 void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");} 67 void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");} 68 void InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");} 69 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");} 70 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");} 71 71 void InputUpdateFromConstant(double constant, int name); 72 72 void InputUpdateFromConstant(int constant, int name); 73 void InputUpdateFromConstant(bool constant, int name){ ISSMERROR("Not implemented yet!");}74 void InputUpdateFromSolution(double* solution){ ISSMERROR("Not implemented yet!");}75 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};73 void InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");} 74 void InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");} 75 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 76 76 /*}}}*/ 77 77 /*Load virtual functions definitions: {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Materials/Matice.cpp ¶
r6260 r6412 282 282 283 283 /*Checks in debugging mode*/ 284 if(viscosity<=0) ISSMERROR("Negative viscosity");285 ISSMASSERT(B>0);286 ISSMASSERT(n>0);284 if(viscosity<=0) _error_("Negative viscosity"); 285 _assert_(B>0); 286 _assert_(n>0); 287 287 288 288 /*Return: */ … … 353 353 354 354 /*Checks in debugging mode*/ 355 if(viscosity3d<=0) ISSMERROR("Negative viscosity");356 ISSMASSERT(B>0);357 ISSMASSERT(n>0);355 if(viscosity3d<=0) _error_("Negative viscosity"); 356 _assert_(B>0); 357 _assert_(n>0); 358 358 359 359 /*Assign output pointers:*/ … … 425 425 426 426 /*Checks in debugging mode*/ 427 if(viscosity3d<=0) ISSMERROR("Negative viscosity");428 ISSMASSERT(B>0);429 ISSMASSERT(n>0);427 if(viscosity3d<=0) _error_("Negative viscosity"); 428 _assert_(B>0); 429 _assert_(n>0); 430 430 431 431 /*Assign output pointers:*/ … … 481 481 482 482 /*Checks in debugging mode*/ 483 ISSMASSERT(B>0);484 ISSMASSERT(n>0);485 ISSMASSERT(viscosity_complement>0);483 _assert_(B>0); 484 _assert_(n>0); 485 _assert_(viscosity_complement>0); 486 486 487 487 /*Return: */ … … 521 521 return; 522 522 523 default: ISSMERROR("element %s not implemented yet",EnumToString(element->Enum()));524 } 525 default: ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));523 default: _error_("element %s not implemented yet",EnumToString(element->Enum())); 524 } 525 default: _error_("type %i (%s) not implemented yet",type,EnumToString(type)); 526 526 } 527 527 } … … 561 561 return; 562 562 563 default: ISSMERROR("element %s not implemented yet",EnumToString(element->Enum()));564 } 565 default: ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));563 default: _error_("element %s not implemented yet",EnumToString(element->Enum())); 564 } 565 default: _error_("type %i (%s) not implemented yet",type,EnumToString(type)); 566 566 } 567 567 } … … 670 670 } 671 671 else{ 672 ISSMERROR(" Mesh type not supported yet!");672 _error_(" Mesh type not supported yet!"); 673 673 } 674 674 -
TabularUnified issm/trunk/src/c/objects/Materials/Matpar.h ¶
r6216 r6412 56 56 void InputUpdateFromConstant(bool constant, int name); 57 57 void InputUpdateFromSolution(double* solution); 58 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("not implemented yet");};58 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; 59 59 /*}}}*/ 60 60 /*Material virtual functions resolution: {{{1*/ 61 void InputDuplicate(int original_enum,int new_enum){ ISSMERROR("not implemented yet");};61 void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");}; 62 62 void Configure(Elements* elements); 63 63 /*}}}*/ -
TabularUnified issm/trunk/src/c/objects/Node.cpp ¶
r6231 r6412 92 92 if (iomodel->dim==3){ 93 93 /*We have a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 94 if (!iomodel->gridonbed) ISSMERROR("iomodel->gridonbed is NULL");95 if (!iomodel->vertices_type) ISSMERROR("iomodel->vertices_type is NULL");94 if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL"); 95 if (!iomodel->vertices_type) _error_("iomodel->vertices_type is NULL"); 96 96 if (iomodel->vertices_type[io_index]==MacAyealApproximationEnum && !iomodel->gridonbed[io_index]){ 97 97 for(k=1;k<=gsize;k++) this->FreezeDof(k); … … 109 109 } 110 110 /*spc all nodes on hutter*/ 111 if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL");111 if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL"); 112 112 if (iomodel->gridonhutter[io_index]){ 113 113 for(k=1;k<=gsize;k++){ … … 120 120 if (analysis_type==DiagnosticHutterAnalysisEnum){ 121 121 /*Spc all nodes that are not Hutter*/ 122 if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL");122 if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL"); 123 123 if (!iomodel->gridonhutter[io_index]){ 124 124 for(k=1;k<=gsize;k++){ … … 139 139 if (iomodel->dim==3){ 140 140 /*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 141 if (!iomodel->gridonbed) ISSMERROR("iomodel->gridonbed is NULL");141 if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL"); 142 142 if (!iomodel->gridonbed[io_index]){ 143 143 for(k=1;k<=gsize;k++){ … … 319 319 return indexing.sdoflist[dofindex]; 320 320 } 321 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");321 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 322 322 323 323 } … … 355 355 } 356 356 } 357 ISSMASSERT(count); //at least one dof should be the approximation requested357 _assert_(count); //at least one dof should be the approximation requested 358 358 } 359 359 else for(i=0;i<this->indexing.gsize;i++) outdoflist[i]=indexing.gdoflist[i]; … … 391 391 else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i]; 392 392 } 393 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");393 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 394 394 } 395 395 } … … 431 431 } 432 432 } 433 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");433 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 434 434 } 435 435 else{ … … 444 444 } 445 445 } 446 ISSMASSERT(count);446 _assert_(count); 447 447 } 448 448 else for(i=0;i<this->indexing.gsize;i++) outdoflist[i]=i; … … 462 462 } 463 463 } 464 ISSMASSERT(count2);464 _assert_(count2); 465 465 } 466 466 else{ … … 488 488 } 489 489 } 490 ISSMASSERT(count2);490 _assert_(count2); 491 491 } 492 492 else{ … … 500 500 } 501 501 } 502 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");502 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 503 503 } 504 504 } … … 659 659 else if (setenum==FsetEnum) numdofs=this->indexing.fsize; 660 660 else if (setenum==SsetEnum) numdofs=this->indexing.ssize; 661 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");661 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 662 662 } 663 663 else{ … … 689 689 else numdofs=this->indexing.ssize; 690 690 } 691 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");691 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 692 692 } 693 693 return numdofs; … … 872 872 dofcount+=this->indexing.ssize; 873 873 } 874 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");874 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 875 875 876 876 … … 901 901 for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount; 902 902 } 903 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");903 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 904 904 } 905 905 /*}}}*/ … … 917 917 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) *(truedofs+ncols*sid+j)=indexing.fdoflist[j]; 918 918 else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) *(truedofs+ncols*sid+j)=indexing.sdoflist[j]; 919 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");919 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 920 920 921 921 } … … 936 936 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j); 937 937 else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j); 938 else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");938 else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!"); 939 939 940 940 } -
TabularUnified issm/trunk/src/c/objects/Node.h ¶
r6231 r6412 61 61 void InputUpdateFromConstant(int constant, int name); 62 62 void InputUpdateFromConstant(bool constant, int name); 63 void InputUpdateFromSolution(double* solution){ ISSMERROR("Not implemented yet!");}64 void InputUpdateFromIoModel(int index, IoModel* iomodel){ ISSMERROR("Not implemented yet!");}63 void InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");} 64 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");} 65 65 /*}}}*/ 66 66 /*Node numerical routines {{{1*/ -
TabularUnified issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp ¶
r6031 r6412 48 48 ElementMatrix::ElementMatrix(ElementMatrix* Ke){ 49 49 50 if(!Ke) ISSMERROR("Input Element Matrix is a NULL pointer");50 if(!Ke) _error_("Input Element Matrix is a NULL pointer"); 51 51 this->Init(Ke); 52 52 return; … … 64 64 /*If one of the two matrix is NULL, we copy the other one*/ 65 65 if(!Ke1 && !Ke2){ 66 ISSMERROR("Two input element matrices are NULL");66 _error_("Two input element matrices are NULL"); 67 67 } 68 68 else if(!Ke1){ … … 76 76 77 77 /*General Case: Ke1 and Ke2 are not empty*/ 78 if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) ISSMERROR("merging 2 non dofsymmetrical matrices not implemented yet");78 if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet"); 79 79 80 80 /*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/ … … 307 307 } 308 308 else{ 309 ISSMERROR(" non dofsymmetrical matrix AddToGlobal routine not support yet!");309 _error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!"); 310 310 } 311 311 … … 318 318 for (int i=0;i<this->nrows;i++){ 319 319 for(int j=0;j<this->ncols;j++){ 320 if (isnan(this->values[i*this->ncols+j])) ISSMERROR("NaN found in Element Matrix");321 if (fabs(this->values[i*this->ncols+j])>1.e+50) ISSMERROR("Element Matrix values exceeds 1.e+50");320 if (isnan(this->values[i*this->ncols+j])) _error_("NaN found in Element Matrix"); 321 if (fabs(this->values[i*this->ncols+j])>1.e+50) _error_("Element Matrix values exceeds 1.e+50"); 322 322 } 323 323 } … … 340 340 /*Transpose indices*/ 341 341 if(!dofsymmetrical){ 342 ISSMERROR("not supported yet");342 _error_("not supported yet"); 343 343 } 344 344 … … 398 398 void ElementMatrix::Init(ElementMatrix* Ke){ 399 399 400 ISSMASSERT(Ke);400 _assert_(Ke); 401 401 402 402 this->nrows =Ke->nrows; -
TabularUnified issm/trunk/src/c/objects/Numerics/ElementVector.cpp ¶
r6034 r6412 42 42 /*If one of the two matrix is NULL, we copy the other one*/ 43 43 if(!pe1 && !pe2){ 44 ISSMERROR("Two input element matrices are NULL");44 _error_("Two input element matrices are NULL"); 45 45 } 46 46 else if(!pe1){ … … 223 223 void ElementVector::Init(ElementVector* pe){ 224 224 225 ISSMASSERT(pe);225 _assert_(pe); 226 226 227 227 this->nrows =pe->nrows; -
TabularUnified issm/trunk/src/c/objects/Params/BoolParam.h ¶
r6165 r6412 50 50 int EnumType(){return enum_type;} 51 51 void GetParameterValue(bool* pbool){*pbool=value;} 52 void GetParameterValue(int* pinteger){ ISSMERROR("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}54 void GetParameterValue(double* pdouble){ ISSMERROR("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}55 void GetParameterValue(char** pstring){ ISSMERROR("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}57 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(Vec* pvec){ ISSMERROR("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Mat* pmat){ ISSMERROR("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}62 void GetParameterValue(FILE** pfid){ ISSMERROR("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}52 void GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(double* pdouble){_error_("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(double** pdoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(Vec* pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 63 63 64 64 void SetValue(bool boolean){this->value=boolean;} 65 65 void SetValue(int integer){this->value=(bool)integer;} 66 void SetValue(int* intarray,int M){ ISSMERROR("Bool param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}66 void SetValue(int* intarray,int M){_error_("Bool param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 67 67 void SetValue(double scalar){this->value=(bool)scalar;} 68 void SetValue(char* string){ ISSMERROR("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}69 void SetValue(char** stringarray,int M){ ISSMERROR("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}70 void SetValue(double* doublearray,int M){ ISSMERROR("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}71 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(Vec vec){ ISSMERROR("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}73 void SetValue(Mat mat){ ISSMERROR("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}74 void SetValue(FILE* fid){ ISSMERROR("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}75 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}68 void SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 69 void SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 70 void SetValue(double* doublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* pdoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(Vec vec){_error_("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 73 void SetValue(Mat mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 74 void SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 75 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 76 76 77 77 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/DoubleMatArrayParam.h ¶
r6165 r6412 52 52 /*Param vritual function definitions: {{{1*/ 53 53 int EnumType(){return enum_type;} 54 void GetParameterValue(bool* pbool){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}55 void GetParameterValue(int* pinteger){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}56 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}57 void GetParameterValue(double* pdouble){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}58 void GetParameterValue(char** pstring){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}59 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}54 void GetParameterValue(bool* pbool){_error_("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(double* pdouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 62 62 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims); 63 void GetParameterValue(Vec* pvec){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}64 void GetParameterValue(Mat* pmat){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}65 void GetParameterValue(FILE** pfid){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}63 void GetParameterValue(Vec* pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 64 void GetParameterValue(Mat* pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 65 void GetParameterValue(FILE** pfid){_error_("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 66 66 67 void SetValue(bool boolean){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}68 void SetValue(int integer){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}69 void SetValue(int* intarray,int M){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}70 void SetValue(double scalar){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}71 void SetValue(char* string){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}72 void SetValue(char** stringarray,int M){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}73 void SetValue(double* doublearray,int M){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}74 void SetValue(double* doublearray,int M,int N){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}75 void SetValue(Vec vec){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}76 void SetValue(Mat mat){ ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}77 void SetValue(FILE* fid){ ISSMERROR("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}67 void SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 68 void SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 69 void SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 70 void SetValue(double scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 71 void SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 72 void SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 73 void SetValue(double* doublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));} 74 void SetValue(double* doublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));} 75 void SetValue(Vec vec){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 76 void SetValue(Mat mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 77 void SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 78 78 void SetValue(double** array, int M, int* mdim_array, int* ndim_array); 79 79 -
TabularUnified issm/trunk/src/c/objects/Params/DoubleMatParam.h ¶
r6165 r6412 51 51 /*Param vritual function definitions: {{{1*/ 52 52 int EnumType(){return enum_type;} 53 void GetParameterValue(bool* pbool){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int* pinteger){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}55 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}56 void GetParameterValue(double* pdouble){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char** pstring){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}58 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}53 void GetParameterValue(bool* pbool){_error_("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(double* pdouble){_error_("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 60 void GetParameterValue(double** pdoublearray,int* pM,int* pN); 61 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Vec* pvec){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}63 void GetParameterValue(Mat* pmat){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}64 void GetParameterValue(FILE** pfid){ ISSMERROR("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}61 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Vec* pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(Mat* pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 64 void GetParameterValue(FILE** pfid){_error_("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 65 65 66 void SetValue(bool boolean){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}67 void SetValue(int integer){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}68 void SetValue(int* intarray,int M){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}69 void SetValue(double scalar){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}70 void SetValue(char* string){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}71 void SetValue(char** stringarray,int M){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}72 void SetValue(double* doublearray,int M){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}66 void SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 67 void SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 68 void SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 69 void SetValue(double scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 70 void SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 71 void SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* doublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));} 73 73 void SetValue(double* doublearray,int M,int N); 74 void SetValue(Vec vec){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}75 void SetValue(Mat mat){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}76 void SetValue(FILE* fid){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}77 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}74 void SetValue(Vec vec){_error_("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 75 void SetValue(Mat mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 76 void SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 77 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 78 78 79 79 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/DoubleParam.cpp ¶
r6226 r6412 134 134 *pinteger=(int)value; 135 135 #else 136 ISSMERROR("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));136 _error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type)); 137 137 #endif 138 138 } … … 143 143 144 144 /*If debugging mode, cheeck that the double is 0 or 1*/ 145 ISSMASSERT(value==0 || value==1);145 _assert_(value==0 || value==1); 146 146 *pbool=(bool)value; 147 147 148 148 #else 149 ISSMERROR("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToString(enum_type));149 _error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToString(enum_type)); 150 150 #endif 151 151 } … … 163 163 *pintarray=output; 164 164 #else 165 ISSMERROR("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));165 _error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type)); 166 166 #endif 167 167 } … … 179 179 *pdoublearray=output; 180 180 #else 181 ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));181 _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type)); 182 182 #endif 183 183 } … … 196 196 *pdoublearray=output; 197 197 #else 198 ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));198 _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type)); 199 199 #endif 200 200 } -
TabularUnified issm/trunk/src/c/objects/Params/DoubleParam.h ¶
r6226 r6412 54 54 void GetParameterValue(int** pintarray,int* pM); 55 55 void GetParameterValue(double* pdouble){*pdouble=value;} 56 void GetParameterValue(char** pstring){ ISSMERROR("Double param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 58 void GetParameterValue(double** pdoublearray,int* pM); 59 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN); 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Vec* pvec){ ISSMERROR("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Mat* pmat){ ISSMERROR("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){ ISSMERROR("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 65 void SetValue(bool boolean){this->value=(double)boolean;} 66 66 void SetValue(int integer){this->value=(double)integer;} 67 void SetValue(int* intarray,int M){ ISSMERROR("Double param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){_error_("Double param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 68 void SetValue(double scalar){this->value=(double)scalar;} 69 void SetValue(char* string){ ISSMERROR("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){ ISSMERROR("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}71 void SetValue(double* doublearray,int M){ ISSMERROR("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}73 void SetValue(Vec vec){ ISSMERROR("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}74 void SetValue(Mat mat){ ISSMERROR("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){ ISSMERROR("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}69 void SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 73 void SetValue(Vec vec){_error_("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 74 void SetValue(Mat mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 75 void SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/DoubleVecParam.cpp ¶
r6260 r6412 174 174 *pintarray=output; 175 175 #else 176 ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));176 _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type)); 177 177 #endif 178 178 } -
TabularUnified issm/trunk/src/c/objects/Params/DoubleVecParam.h ¶
r6260 r6412 50 50 /*Param virtual functions definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int* pinteger){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}52 void GetParameterValue(bool* pbool){_error_("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 54 54 void GetParameterValue(int** pintarray,int* pM); 55 void GetParameterValue(double* pdouble){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char** pstring){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}55 void GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 58 void GetParameterValue(double** pdoublearray,int* pM); 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Vec* pvec){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Mat* pmat){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){ ISSMERROR("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 void SetValue(bool boolean){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}66 void SetValue(int integer){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}68 void SetValue(double scalar){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}69 void SetValue(char* string){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}65 void SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 66 void SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 67 void SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 void SetValue(double scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 69 void SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 71 void SetValue(double* doublearray,int M); 72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}73 void SetValue(Vec vec){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}74 void SetValue(Mat mat){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));} 73 void SetValue(Vec vec){_error_("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 74 void SetValue(Mat mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 75 void SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/FileParam.cpp ¶
r5103 r6412 65 65 void FileParam::Marshall(char** pmarshalled_dataset){ 66 66 67 ISSMERROR("FileParam is a pointer and cannot be marshalled");67 _error_("FileParam is a pointer and cannot be marshalled"); 68 68 } 69 69 /*}}}*/ 70 70 /*FUNCTION FileParam::MarshallSize{{{1*/ 71 71 int FileParam::MarshallSize(){ 72 ISSMERROR("FileParam is a pointer and cannot be marshalled");72 _error_("FileParam is a pointer and cannot be marshalled"); 73 73 } 74 74 /*}}}*/ 75 75 /*FUNCTION FileParam::Demarshall{{{1*/ 76 76 void FileParam::Demarshall(char** pmarshalled_dataset){ 77 ISSMERROR("FileParam is a pointer and cannot be marshalled");77 _error_("FileParam is a pointer and cannot be marshalled"); 78 78 } 79 79 /*}}}*/ … … 103 103 void FileParam::SetMatlabField(mxArray* dataref){ 104 104 105 ISSMERROR("FileParam is a pointer and cannot be converted into a matlab object");105 _error_("FileParam is a pointer and cannot be converted into a matlab object"); 106 106 } 107 107 #endif -
TabularUnified issm/trunk/src/c/objects/Params/FileParam.h ¶
r6165 r6412 49 49 /*Param vritual function definitions: {{{1*/ 50 50 int EnumType(){return enum_type;} 51 void GetParameterValue(bool* pbool){ ISSMERROR("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}52 void GetParameterValue(int* pinteger){ ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}54 void GetParameterValue(double* pdouble){ ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}55 void GetParameterValue(char** pstring){ ISSMERROR("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("FileParam of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}57 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(Vec* pvec){ ISSMERROR("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Mat* pmat){ ISSMERROR("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}51 void GetParameterValue(bool* pbool){ _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 52 void GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(double* pdouble){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(double** pdoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(Vec* pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 62 62 void GetParameterValue(FILE** pfid){*pfid=value;}; 63 63 64 void SetValue(bool boolean){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}65 void SetValue(int integer){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}66 void SetValue(int* intarray,int M){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}67 void SetValue(double scalar){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}68 void SetValue(char* string){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}69 void SetValue(char** stringarray,int M){ ISSMERROR("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}70 void SetValue(double* doublearray,int M){ ISSMERROR("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}71 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(Vec vec){ ISSMERROR("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}73 void SetValue(Mat mat){ ISSMERROR("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}74 void SetValue(FILE* fid){ ISSMERROR("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}75 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}64 void SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 65 void SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 66 void SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 67 void SetValue(double scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 68 void SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 69 void SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 70 void SetValue(double* doublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* pdoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(Vec vec){_error_("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 73 void SetValue(Mat mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 74 void SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 75 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 76 76 77 77 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/IntParam.h ¶
r6165 r6412 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){ ISSMERROR("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}52 void GetParameterValue(bool* pbool){_error_("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 53 53 void GetParameterValue(int* pinteger){*pinteger=value;} 54 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}55 void GetParameterValue(double* pdouble){ ISSMERROR("Int param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char** pstring){ ISSMERROR("Int param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Vec* pvec){ ISSMERROR("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Mat* pmat){ ISSMERROR("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){ ISSMERROR("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("Int param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 65 void SetValue(bool boolean){this->value=(int)boolean;} 66 66 void SetValue(int integer){this->value=integer;} 67 void SetValue(int* intarray,int M){ ISSMERROR("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 68 void SetValue(double scalar){this->value=(int)scalar;} 69 void SetValue(char* string){ ISSMERROR("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){ ISSMERROR("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}71 void SetValue(double* doublearray,int M){ ISSMERROR("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}73 void SetValue(Vec vec){ ISSMERROR("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}74 void SetValue(Mat mat){ ISSMERROR("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){ ISSMERROR("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}69 void SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 73 void SetValue(Vec vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 74 void SetValue(Mat mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 75 void SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/IntVecParam.h ¶
r6213 r6412 51 51 /*Param virtual functions definitions: {{{1*/ 52 52 int EnumType(){return enum_type;} 53 void GetParameterValue(bool* pbool){ ISSMERROR("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int* pinteger){ ISSMERROR("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}53 void GetParameterValue(bool* pbool){_error_("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 55 55 void GetParameterValue(int** pintarray,int* pM); 56 void GetParameterValue(double* pdouble){ ISSMERROR("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char** pstring){ ISSMERROR("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}58 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Vec* pvec){ ISSMERROR("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}63 void GetParameterValue(Mat* pmat){ ISSMERROR("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}64 void GetParameterValue(FILE** pfid){ ISSMERROR("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}56 void GetParameterValue(double* pdouble){_error_("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Vec* pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(Mat* pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 64 void GetParameterValue(FILE** pfid){_error_("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 65 65 66 void SetValue(bool boolean){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}67 void SetValue(int integer){ ISSMERROR("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}66 void SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 67 void SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 68 68 void SetValue(int* intarray,int M); 69 void SetValue(double scalar){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}70 void SetValue(char* string){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}71 void SetValue(char** stringarray,int M){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}72 void SetValue(double* doublearray,int M){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}73 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}74 void SetValue(Vec vec){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}75 void SetValue(Mat mat){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}76 void SetValue(FILE* fid){ ISSMERROR("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}77 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}69 void SetValue(double scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 70 void SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 71 void SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* doublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));} 73 void SetValue(double* pdoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));} 74 void SetValue(Vec vec){_error_("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 75 void SetValue(Mat mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 76 void SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 77 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 78 78 79 79 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/PetscMatParam.h ¶
r6165 r6412 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int* pinteger){ ISSMERROR("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("PetscMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}55 void GetParameterValue(double* pdouble){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char** pstring){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Vec* pvec){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumToString(enum_type));}52 void GetParameterValue(bool* pbool){_error_("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char** pstring){_error_("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("PetscMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumToString(enum_type));} 62 62 void GetParameterValue(Mat* poutput); 63 void GetParameterValue(FILE** pfid){ ISSMERROR("PetscMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){_error_("PetscMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 void SetValue(bool boolean){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}66 void SetValue(int integer){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}68 void SetValue(double scalar){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}69 void SetValue(char* string){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}71 void SetValue(double* doublearray,int M){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}73 void SetValue(Vec vec){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}65 void SetValue(bool boolean){_error_("PetscMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 66 void SetValue(int integer){_error_("PetscMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 67 void SetValue(int* intarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 void SetValue(double scalar){_error_("PetscMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 69 void SetValue(char* string){_error_("PetscMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 73 void SetValue(Vec vec){_error_("PetscMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 74 74 void SetValue(Mat mat); 75 void SetValue(FILE* fid){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("PetscMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){_error_("PetscMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("PetscMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/PetscVecParam.h ¶
r6165 r6412 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int* pinteger){ ISSMERROR("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("PetscVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}55 void GetParameterValue(double* pdouble){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}56 void GetParameterValue(char** pstring){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Mat* pmat){ ISSMERROR("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}52 void GetParameterValue(bool* pbool){_error_("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(char** pstring){_error_("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("PetscVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 62 62 void GetParameterValue(Vec* poutput); 63 void GetParameterValue(FILE** pfid){ ISSMERROR("PetscVec of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){_error_("PetscVec of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 void SetValue(bool boolean){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}66 void SetValue(int integer){ ISSMERROR("PetscVec of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){ ISSMERROR("PetscVec of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}68 void SetValue(double scalar){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}69 void SetValue(char* string){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}71 void SetValue(double* doublearray,int M){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}65 void SetValue(bool boolean){_error_("PetscVec of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 66 void SetValue(int integer){_error_("PetscVec of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 67 void SetValue(int* intarray,int M){_error_("PetscVec of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 void SetValue(double scalar){_error_("PetscVec of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 69 void SetValue(char* string){_error_("PetscVec of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("PetscVec of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 73 73 void SetValue(Vec vec); 74 void SetValue(Mat mat){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){ ISSMERROR("PetscVec of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("PetscVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}74 void SetValue(Mat mat){_error_("PetscVec of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 75 void SetValue(FILE* fid){_error_("PetscVec of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("PetscVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/StringArrayParam.h ¶
r6165 r6412 52 52 /*Param vritual function definitions: {{{1*/ 53 53 int EnumType(){return enum_type;} 54 void GetParameterValue(bool* pbool){ ISSMERROR("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}55 void GetParameterValue(int* pinteger){ ISSMERROR("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}56 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}57 void GetParameterValue(double* pdouble){ ISSMERROR("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}58 void GetParameterValue(char** pstring){ ISSMERROR("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}54 void GetParameterValue(bool* pbool){_error_("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 56 void GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 57 void GetParameterValue(double* pdouble){_error_("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));} 59 59 void GetParameterValue(char*** pstringarray,int* pM); 60 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}62 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}63 void GetParameterValue(Vec* pvec){ ISSMERROR("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}64 void GetParameterValue(Mat* pmat){ ISSMERROR("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}65 void GetParameterValue(FILE** pfid){ ISSMERROR("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double** pdoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(Vec* pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 64 void GetParameterValue(Mat* pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 65 void GetParameterValue(FILE** pfid){_error_("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 66 66 67 void SetValue(bool boolean){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}68 void SetValue(int integer){ ISSMERROR("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}69 void SetValue(int* intarray,int M){ ISSMERROR("StringArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}70 void SetValue(double scalar){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}71 void SetValue(char* string){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}67 void SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 68 void SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 69 void SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 70 void SetValue(double scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 71 void SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));} 72 72 void SetValue(char** stringarray,int M); 73 void SetValue(double* doublearray,int M){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}74 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}75 void SetValue(Vec vec){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}76 void SetValue(Mat mat){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}77 void SetValue(FILE* fid){ ISSMERROR("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}78 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}73 void SetValue(double* doublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 74 void SetValue(double* pdoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 75 void SetValue(Vec vec){_error_("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 76 void SetValue(Mat mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 77 void SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 78 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 79 79 80 80 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Params/StringParam.h ¶
r6165 r6412 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){ ISSMERROR("String param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}53 void GetParameterValue(int* pinteger){ ISSMERROR("String param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}54 void GetParameterValue(int** pintarray,int* pM){ ISSMERROR("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}55 void GetParameterValue(double* pdouble){ ISSMERROR("String param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}52 void GetParameterValue(bool* pbool){_error_("String param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("String param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));} 56 56 void GetParameterValue(char** pstring); 57 void GetParameterValue(char*** pstringarray,int* pM){ ISSMERROR("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}58 void GetParameterValue(double** pdoublearray,int* pM){ ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){ ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ ISSMERROR("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}61 void GetParameterValue(Vec* pvec){ ISSMERROR("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}62 void GetParameterValue(Mat* pmat){ ISSMERROR("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}63 void GetParameterValue(FILE** pfid){ ISSMERROR("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}57 void GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));} 60 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));} 64 64 65 void SetValue(bool boolean){ ISSMERROR("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}66 void SetValue(int integer){ ISSMERROR("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}67 void SetValue(int* intarray,int M){ ISSMERROR("String param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}68 void SetValue(double scalar){ ISSMERROR("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}65 void SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));} 66 void SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));} 67 void SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));} 68 void SetValue(double scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));} 69 69 void SetValue(char* string); 70 void SetValue(char** stringarray,int M){ ISSMERROR("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}71 void SetValue(double* doublearray,int M){ ISSMERROR("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}72 void SetValue(double* pdoublearray,int M,int N){ ISSMERROR("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}73 void SetValue(Vec vec){ ISSMERROR("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}74 void SetValue(Mat mat){ ISSMERROR("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}75 void SetValue(FILE* fid){ ISSMERROR("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){ ISSMERROR("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}70 void SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));} 73 void SetValue(Vec vec){_error_("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));} 74 void SetValue(Mat mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));} 75 void SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));} 76 void SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));} 77 77 78 78 char* GetParameterName(void); -
TabularUnified issm/trunk/src/c/objects/Segment.cpp ¶
r4773 r6412 74 74 void Segment::Marshall(char** pmarshalled_dataset){ 75 75 76 ISSMERROR(" not supported yet!");76 _error_(" not supported yet!"); 77 77 } 78 78 /*}}}*/ 79 79 /*FUNCTION Segment::MarshallSize{{{1*/ 80 80 int Segment::MarshallSize(){ 81 ISSMERROR(" not supported yet!");81 _error_(" not supported yet!"); 82 82 } 83 83 /*}}}*/ 84 84 /*FUNCTION Segment::Demarshall{{{1*/ 85 85 void Segment::Demarshall(char** pmarshalled_dataset){ 86 ISSMERROR(" not supported yet!");86 _error_(" not supported yet!"); 87 87 } 88 88 /*}}}*/ -
TabularUnified issm/trunk/src/c/shared/Alloc/alloc.cpp ¶
r5768 r6412 33 33 void* memptr=NULL; 34 34 35 if(!size) ISSMERROR(" attempting to 0 size allocation!");35 if(!size)_error_(" attempting to 0 size allocation!"); 36 36 37 37 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) … … 42 42 memptr=malloc(size); 43 43 #endif 44 if(!memptr) ISSMERROR("memory allocation failed!");44 if(!memptr) _error_("memory allocation failed!"); 45 45 46 46 return memptr; … … 51 51 void* memptr=NULL; 52 52 53 if(!size) ISSMERROR("attempting to 0 size allocation!");53 if(!size)_error_("attempting to 0 size allocation!"); 54 54 55 55 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) … … 60 60 memptr=calloc(n,size); 61 61 #endif 62 if(!memptr) ISSMERROR("memory allocation failed!");62 if(!memptr) _error_("memory allocation failed!"); 63 63 64 64 return memptr; … … 83 83 register void* value=NULL; 84 84 85 if(!size) ISSMERROR("attempting to realloc to zero");85 if(!size)_error_("attempting to realloc to zero"); 86 86 87 87 #ifndef MATLAB … … 92 92 93 93 if (value == NULL) { 94 ISSMERROR("virtual memory exhausted");94 _error_("virtual memory exhausted"); 95 95 } 96 96 return value; -
TabularUnified issm/trunk/src/c/shared/Elements/GetVerticesCoordinates.cpp ¶
r5908 r6412 8 8 9 9 /*In debugging mode, check that nodes is not a NULL pointer*/ 10 ISSMASSERT(nodes);10 _assert_(nodes); 11 11 12 12 for(int i=0;i<numvertices;i++) { -
TabularUnified issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp ¶
r3775 r6412 37 37 /*open domain outline file for reading: */ 38 38 if ((fid=fopen(domainname,"r"))==NULL){ 39 ISSMERROR("%s%s","could not find domain file ",domainname);39 _error_("%s%s","could not find domain file ",domainname); 40 40 noerr=0; goto cleanupandreturn; 41 41 } -
TabularUnified issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp ¶
r3775 r6412 17 17 /* special case: */ 18 18 function(); 19 ISSMERROR("usage: see above");19 _error_("usage: see above"); 20 20 } 21 21 else if (nlhs!=NLHS || nrhs!=NRHS ) { 22 22 function(); 23 ISSMERROR("usage error.");23 _error_("usage error."); 24 24 } 25 25 return 1; -
TabularUnified issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp ¶
r5371 r6412 36 36 if (!itrnb) { 37 37 if (nrowb != idimb) { 38 ISSMERROR("Matrix A and B inner vectors not equal size.");38 _error_("Matrix A and B inner vectors not equal size."); 39 39 } 40 40 idimc=ncolb; … … 42 42 else { 43 43 if (ncolb != idimb) { 44 ISSMERROR("Matrix A and B inner vectors not equal size.");44 _error_("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 ISSMERROR("Matrix B and C inner vectors not equal size.");51 _error_("Matrix B and C inner vectors not equal size."); 52 52 } 53 53 idimd=ncolc; … … 55 55 else { 56 56 if (ncolc != idimc) { 57 ISSMERROR("Matrix B and C inner vectors not equal size.");57 _error_("Matrix B and C inner vectors not equal size."); 58 58 } 59 59 idimd=nrowc; … … 134 134 135 135 if (ntrma != ntrmb) { 136 ISSMERROR("Matrix A and B inner vectors not equal size");136 _error_("Matrix A and B inner vectors not equal size"); 137 137 noerr=0; 138 138 return noerr; … … 185 185 186 186 if (!b && nvec) { 187 ISSMERROR("No right-hand side for nvec=%d.",nvec);187 _error_("No right-hand side for nvec=%d.",nvec); 188 188 noerr=0; 189 189 return noerr; … … 191 191 192 192 /*In debugging mode, check that we are not dealing with simple matrices*/ 193 ISSMASSERT(!(ndim==2 && nrow==2));194 ISSMASSERT(!(ndim==3 && nrow==3));193 _assert_(!(ndim==2 && nrow==2)); 194 _assert_(!(ndim==3 && nrow==3)); 195 195 196 196 /* initialize local variables and arrays */ … … 223 223 xfree((void **)&pivrc); 224 224 xfree((void **)&pindx); 225 ISSMERROR("Pivot %f less than machine epsilon",pivot);225 _error_("Pivot %f less than machine epsilon",pivot); 226 226 noerr=0; 227 227 return noerr; … … 234 234 pindx[ipiv]++; 235 235 236 // _printf_( "pivot for i=%d: irow=%d, icol=%d, pindx[%d]=%d\n",236 // _printf_(true,"pivot for i=%d: irow=%d, icol=%d, pindx[%d]=%d\n", 237 237 // i,irow,icol,ipiv,pindx[ipiv]); 238 238 … … 241 241 242 242 if (irow != icol) { 243 // _printf_( "row switch for i=%d: irow=%d, icol=%d\n",243 // _printf_(true,"row switch for i=%d: irow=%d, icol=%d\n", 244 244 // i,irow,icol); 245 245 … … 323 323 icol=pivrc[j][1]; 324 324 325 // _printf_( "column switch back for j=%d: irow=%d, icol=%d\n",325 // _printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n", 326 326 // j,irow,icol); 327 327 … … 360 360 /*Compute determinant*/ 361 361 Matrix2x2Determinant(&det,A); 362 if (fabs(det) < DBL_EPSILON) ISSMERROR("Determinant smaller that machine epsilon");362 if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon"); 363 363 364 364 /*Compute invert*/ … … 385 385 /*Compute determinant*/ 386 386 Matrix3x3Determinant(&det,A); 387 if (fabs(det) < DBL_EPSILON) ISSMERROR("Determinant smaller that machine epsilon");387 if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon"); 388 388 389 389 /*Compute invert*/ … … 406 406 407 407 /*Check the the matrix has been allocated*/ 408 ISSMASSERT(tA);408 _assert_(tA); 409 409 410 410 /*Transpose*/ -
TabularUnified issm/trunk/src/c/shared/Numerics/BrentSearch.cpp ¶
r6323 r6412 56 56 //get the value of the function at the first boundary 57 57 fxmin = (*f)(xmin,optargs); 58 if isnan(fxmin) ISSMERROR("Function evaluation returned NaN");58 if isnan(fxmin) _error_("Function evaluation returned NaN"); 59 59 60 60 //display result 61 ISSMPRINTF(VerboseControl(),"\n Iteration x f(x) Tolerance Procedure\n\n");62 ISSMPRINTF(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmin,fxmin," N/A boundary\n");61 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance Procedure\n\n"); 62 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmin,fxmin," N/A boundary\n"); 63 63 64 64 //get the value of the function at the first boundary xmax and display result 65 65 fxmax = (*f)(xmax,optargs); 66 if isnan(fxmax) ISSMERROR("Function evaluation returned NaN");67 ISSMPRINTF(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmax,fxmax," N/A boundary\n");66 if isnan(fxmax) _error_("Function evaluation returned NaN"); 67 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmax,fxmax," N/A boundary\n"); 68 68 69 69 //test if jump option activated and xmin==0 … … 96 96 //2: call the function to be evaluated 97 97 fxbest = (*f)(x,optargs); 98 if isnan(fxbest) ISSMERROR("Function evaluation returned NaN");98 if isnan(fxbest) _error_("Function evaluation returned NaN"); 99 99 iter=iter+1; 100 100 … … 109 109 110 110 //4: print result 111 ISSMPRINTF(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,xbest,fxbest,pow(pow(xbest-xm,2),0.5)," initial");111 _printf_(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,xbest,fxbest,pow(pow(xbest-xm,2),0.5)," initial"); 112 112 113 113 //Main Loop … … 193 193 //evaluate function on x 194 194 fx = (*f)(x,optargs); 195 if isnan(fx) ISSMERROR("Function evaluation returned NaN");195 if isnan(fx) _error_("Function evaluation returned NaN"); 196 196 iter=iter+1; 197 197 … … 230 230 //print result 231 231 if (goldenflag){ 232 ISSMPRINTF(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5)," golden");233 } 234 else{ 235 ISSMPRINTF(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5)," parabolic");232 _printf_(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5)," golden"); 233 } 234 else{ 235 _printf_(VerboseControl()," %5i %12.6g %12.6g %12.6g %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5)," parabolic"); 236 236 } 237 237 238 238 //Stop the optimization? 239 239 if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){ 240 ISSMPRINTF(VerboseControl()," %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of" ,tolerance);240 _printf_(VerboseControl()," %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of" ,tolerance); 241 241 loop=0; 242 242 } 243 243 else if (iter>=maxiter){ 244 ISSMPRINTF(VerboseControl()," %s\n","exiting: Maximum number of iterations has been exceeded - increase 'maxiter'\n");244 _printf_(VerboseControl()," %s\n","exiting: Maximum number of iterations has been exceeded - increase 'maxiter'\n"); 245 245 loop=0; 246 246 } -
TabularUnified issm/trunk/src/c/shared/Numerics/GaussPoints.cpp ¶
r5808 r6412 51 51 sizeof(wgt4 )/sizeof(double)}; 52 52 53 // _printf_( "Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);53 // _printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus); 54 54 *pxgaus = (double *) xmalloc(ngaus*sizeof(double)); 55 55 *pxwgt = (double *) xmalloc(ngaus*sizeof(double)); … … 1139 1139 sizeof(wgt20)/sizeof(double)}; 1140 1140 1141 // _printf_( "GaussLegendreTria: iord=%d\n",iord);1141 // _printf_(true,"GaussLegendreTria: iord=%d\n",iord); 1142 1142 1143 1143 /* check to see if Gauss points need to be calculated */ … … 1199 1199 } 1200 1200 1201 // _printf_( "GaussLegendreTria - ngaus=%d\n",*pngaus);1201 // _printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus); 1202 1202 // for (i=0; i<*pngaus; i++) 1203 // _printf_( "i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",1203 // _printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n", 1204 1204 // i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]); 1205 1205 … … 1398 1398 sizeof(wgt6 )/sizeof(double)}; 1399 1399 1400 // _printf_( "GaussLegendreTetra: iord=%d\n",iord);1400 // _printf_(true,"GaussLegendreTetra: iord=%d\n",iord); 1401 1401 1402 1402 /* check to see if Gauss points need to be calculated */ … … 1521 1521 sizeof(wgt5 )/sizeof(double)}; 1522 1522 1523 // _printf_( "Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);1523 // _printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus); 1524 1524 *pxgaus = (double *) xmalloc(ngaus*sizeof(double)); 1525 1525 *pxwgt = (double *) xmalloc(ngaus*sizeof(double)); … … 1670 1670 if (iter >= MAX_GAUS_ITER) { 1671 1671 xfree((void **)&work); 1672 ISSMERROR("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);1672 _error_("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER); 1673 1673 } 1674 1674 } -
TabularUnified issm/trunk/src/c/shared/Numerics/IsInputConverged.cpp ¶
r5103 r6412 34 34 35 35 /*in debugging mode, check that the inputs are of the same type*/ 36 ISSMASSERT(new_inputs[i]->Enum()==old_inputs[i]->Enum());36 _assert_(new_inputs[i]->Enum()==old_inputs[i]->Enum()); 37 37 38 38 /*Get pointers*/ … … 53 53 else eps=0; 54 54 } 55 else ISSMERROR("%s%s%s"," convergence criterion ",EnumToString(criterion_enum)," not supported yet!");55 else _error_("%s%s%s"," convergence criterion ",EnumToString(criterion_enum)," not supported yet!"); 56 56 57 57 /*Assign output pointers:*/ -
TabularUnified issm/trunk/src/c/shared/Numerics/OptFunc.cpp ¶
r4540 r6412 38 38 #else 39 39 double OptFunc(double scalar, OptArgs* optargs){ 40 ISSMERROR(" not implemented yet");40 _error_(" not implemented yet"); 41 41 } 42 42 #endif -
TabularUnified issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp ¶
r6323 r6412 40 40 //get the value of the function at the first boundary 41 41 fx1= (*f)(x1,optargs); 42 if isnan(fx1) ISSMERROR("Function evaluation returned NaN");43 ISSMPRINTF(VerboseControl(),"\n Iteration x f(x) Tolerance\n\n");44 ISSMPRINTF(VerboseControl()," %s %12.6g %12.6g %s"," N/A",x1,fx1," N/A\n");42 if isnan(fx1) _error_("Function evaluation returned NaN"); 43 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance\n\n"); 44 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",x1,fx1," N/A\n"); 45 45 46 46 //update tolerances … … 53 53 iter++; 54 54 fx2 = (*f)(x2,optargs); 55 if isnan(fx2) ISSMERROR("Function evaluation returned NaN");56 ISSMPRINTF(VerboseControl()," %5i %12.6g %12.6g %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));55 if isnan(fx2) _error_("Function evaluation returned NaN"); 56 _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)); 57 57 58 58 //Stop the optimization? 59 59 if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){ 60 ISSMPRINTF(VerboseControl()," %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);60 _printf_(VerboseControl()," %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance); 61 61 loop=false; 62 62 } 63 63 else if (iter>=maxiter){ 64 ISSMPRINTF(VerboseControl()," %s\n","exiting: Maximum number of iterations has been exceeded - increase 'maxiter'\n");64 _printf_(VerboseControl()," %s\n","exiting: Maximum number of iterations has been exceeded - increase 'maxiter'\n"); 65 65 loop=false; 66 66 } -
TabularUnified issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp ¶
r6020 r6412 57 57 if (found==-1){ 58 58 /*ok, we did not find anything, this is not good! error out: */ 59 ISSMERROR("%s%s","could find neither a default analysis nor analysis ",EnumToString(analysis_type));59 _error_("%s%s","could find neither a default analysis nor analysis ",EnumToString(analysis_type)); 60 60 } 61 61 -
TabularUnified issm/trunk/src/c/shared/Numerics/Synchronize.sh ¶
r6324 r6412 138 138 void SetVerbosityLevel(int level){ 139 139 140 if(level<0) ISSMERROR("vebosity level should be a positive integer (user provided %i)",level);140 if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level); 141 141 142 142 #ifdef _SERIAL_ … … 168 168 #else 169 169 170 ISSMASSERT(verbositylevel>=0);170 _assert_(verbositylevel>=0); 171 171 return verbositylevel; 172 172 -
TabularUnified issm/trunk/src/c/shared/Numerics/UnitConversion.cpp ¶
r5659 r6412 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 ISSMERROR(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");31 else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. "); 32 32 33 33 } … … 43 43 if(direction_enum==IuToExtEnum)value=value*scale; 44 44 else if(direction_enum==ExtToIuEnum)value=value/scale; 45 else ISSMERROR(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");45 else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. "); 46 46 47 47 return value; -
TabularUnified issm/trunk/src/c/shared/Numerics/Verbosity.cpp ¶
r6323 r6412 37 37 void SetVerbosityLevel(int level){ 38 38 39 if(level<0) ISSMERROR("vebosity level should be a positive integer (user provided %i)",level);39 if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level); 40 40 41 41 #ifdef _SERIAL_ … … 67 67 #else 68 68 69 ISSMASSERT(verbositylevel>=0);69 _assert_(verbositylevel>=0); 70 70 return verbositylevel; 71 71 -
TabularUnified issm/trunk/src/c/shared/String/DescriptorIndex.cpp ¶
r5470 r6412 23 23 /*retrieve first token, separated by underscore: */ 24 24 pch = strtok (descriptor,"_"); 25 if(!pch) ISSMERROR("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");25 if(!pch)_error_("%s%s%s"," 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) ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");30 if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!"); 31 31 strcpy(root,pch); 32 32 /*now recover the index if it exists: */ … … 43 43 /*we have an indexed variable. recover the root: */ 44 44 pch = strtok (NULL, "_"); 45 if(!pch) ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");45 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!"); 46 46 strcpy(root,pch); 47 47 /*now recover the index: */ 48 48 pch = strtok (NULL, "_"); 49 if(!pch) ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");49 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!"); 50 50 sscanf(pch,"%i",pindex); 51 51 return IndexedEnum; … … 54 54 /*we have an indexed variable. recover the root: */ 55 55 pch = strtok (NULL, "_"); 56 if(!pch) ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");56 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!"); 57 57 strcpy(root,pch); 58 58 /*now recover the index: */ 59 59 pch = strtok (NULL, "_"); 60 if(!pch) ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");60 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!"); 61 61 sscanf(pch,"%i",pindex); 62 62 return NodalEnum; -
TabularUnified issm/trunk/src/c/shared/Threads/LaunchThread.cpp ¶
r3775 r6412 46 46 47 47 if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){ 48 ISSMERROR(" pthread_create error");48 _error_(" pthread_create error"); 49 49 } 50 50 } 51 51 for(i=0;i<num_threads;i++){ 52 52 if(pthread_join(threads[i],(void**)&status)){ 53 ISSMERROR(" pthread_join error");53 _error_(" pthread_join error"); 54 54 } 55 55 } -
TabularUnified issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp ¶
r5238 r6412 919 919 /*Using the order vector, and the riftsegments_copy and riftspairs_copy, reorder the segments and the pairs: */ 920 920 for (j=0;j<numsegs;j++){ 921 ISSMASSERT(order[j]<numsegs);921 _assert_(order[j]<numsegs); 922 922 *(riftsegments_copy+3*j+0)=*(riftsegments+3*order[j]+0); 923 923 *(riftsegments_copy+3*j+1)=*(riftsegments+3*order[j]+1); -
TabularUnified issm/trunk/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp ¶
r5378 r6412 35 35 break; 36 36 default: 37 ISSMERROR("No adjoint has been implemented for solution %s yet",EnumToString(solutiontype));37 _error_("No adjoint has been implemented for solution %s yet",EnumToString(solutiontype)); 38 38 break; 39 39 } 40 40 41 41 /*Assign output pointer:*/ 42 ISSMASSERT(padjointcore);42 _assert_(padjointcore); 43 43 *padjointcore=adjointcore; 44 44 -
TabularUnified issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp ¶
r5247 r6412 56 56 break; 57 57 default: 58 ISSMERROR("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");58 _error_("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!"); 59 59 break; 60 60 } 61 61 62 62 /*Assign output pointer:*/ 63 ISSMASSERT(psolutioncore);63 _assert_(psolutioncore); 64 64 *psolutioncore=solutioncore; 65 65 -
TabularUnified issm/trunk/src/c/solutions/ResetBoundaryConditions.cpp ¶
r6323 r6412 13 13 int analysis_counter; 14 14 15 ISSMPRINTF(VerboseSolution(),"%s\n"," updating boundary conditions...");15 _printf_(VerboseSolution(),"%s\n"," updating boundary conditions..."); 16 16 17 17 /*set current analysis: */ -
TabularUnified issm/trunk/src/c/solutions/SolutionConfiguration.cpp ¶
r5579 r6412 116 116 117 117 default: 118 ISSMERROR("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");118 _error_("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!"); 119 119 break; 120 120 } -
TabularUnified issm/trunk/src/c/solutions/WriteLockFile.cpp ¶
r3775 r6412 17 17 if(my_rank==0){ 18 18 fid=fopen(filename,"w"); 19 if(fid==NULL) ISSMERROR("%s%s","error message: could not open lock file ",filename);19 if(fid==NULL) _error_("%s%s","error message: could not open lock file ",filename); 20 20 21 21 /*Close file: */ 22 if(fclose(fid)!=0) ISSMERROR("%s%s","could not close lock file ",filename);22 if(fclose(fid)!=0) _error_("%s%s","could not close lock file ",filename); 23 23 } 24 24 -
TabularUnified issm/trunk/src/c/solutions/adjointbalancedthickness_core.cpp ¶
r6323 r6412 23 23 24 24 /*compute thickness */ 25 ISSMPRINTF(VerboseSolution(),"%s\n"," computing thickness");25 _printf_(VerboseSolution(),"%s\n"," computing thickness"); 26 26 femmodel->SetCurrentConfiguration(BalancedthicknessAnalysisEnum); 27 27 solver_linear(femmodel); … … 31 31 32 32 /*compute adjoint*/ 33 ISSMPRINTF(VerboseSolution(),"%s\n"," computing adjoint");33 _printf_(VerboseSolution(),"%s\n"," computing adjoint"); 34 34 femmodel->SetCurrentConfiguration(BalancedthicknessAnalysisEnum,AdjointBalancedthicknessAnalysisEnum); 35 35 solver_adjoint_linear(femmodel); … … 37 37 /*Save results*/ 38 38 if(solution_type==AdjointSolutionEnum && !control_analysis){ 39 ISSMPRINTF(VerboseSolution()," saving results\n");39 _printf_(VerboseSolution()," saving results\n"); 40 40 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum); 41 41 } -
TabularUnified issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp ¶
r6323 r6412 26 26 27 27 /*Compute velocities*/ 28 ISSMPRINTF(VerboseSolution(),"%s\n"," computing velocities");28 _printf_(VerboseSolution(),"%s\n"," computing velocities"); 29 29 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum); 30 30 solver_diagnostic_nonlinear(femmodel,conserve_loads); … … 34 34 35 35 /*Compute adjoint*/ 36 ISSMPRINTF(VerboseSolution(),"%s\n"," computing adjoint");36 _printf_(VerboseSolution(),"%s\n"," computing adjoint"); 37 37 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum); 38 38 solver_adjoint_linear(femmodel); … … 40 40 /*Save results*/ 41 41 if(solution_type==AdjointSolutionEnum && !control_analysis){ 42 ISSMPRINTF(VerboseSolution()," saving results\n");42 _printf_(VerboseSolution()," saving results\n"); 43 43 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum); 44 44 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum); -
TabularUnified issm/trunk/src/c/solutions/balancedthickness_core.cpp ¶
r6323 r6412 27 27 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 28 28 29 ISSMPRINTF(VerboseSolution(),"call computational core:\n");29 _printf_(VerboseSolution(),"call computational core:\n"); 30 30 solver_linear(femmodel); 31 31 32 32 if(solution_type==BalancedthicknessSolutionEnum && !control_analysis){ 33 ISSMPRINTF(VerboseSolution()," saving results\n");33 _printf_(VerboseSolution()," saving results\n"); 34 34 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum); 35 35 } -
TabularUnified issm/trunk/src/c/solutions/balancedvelocities_core.cpp ¶
r6323 r6412 26 26 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 27 27 28 ISSMPRINTF(VerboseSolution()," call computational core\n");28 _printf_(VerboseSolution()," call computational core\n"); 29 29 solver_linear(femmodel); 30 30 31 31 if(solution_type==BalancedvelocitiesSolutionEnum && !control_analysis){ 32 ISSMPRINTF(VerboseSolution()," saving results\n");32 _printf_(VerboseSolution()," saving results\n"); 33 33 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VelEnum); 34 34 } -
TabularUnified issm/trunk/src/c/solutions/bedslope_core.cpp ¶
r6323 r6412 24 24 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 25 25 26 ISSMPRINTF(VerboseSolution(),"%s\n"," computing slope");26 _printf_(VerboseSolution(),"%s\n"," computing slope"); 27 27 28 28 /*Call on core computations: */ … … 33 33 34 34 if(solution_type==BedSlopeSolutionEnum && !control_analysis){ 35 ISSMPRINTF(VerboseSolution()," saving results\n");35 _printf_(VerboseSolution()," saving results\n"); 36 36 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum); 37 37 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeYEnum); -
TabularUnified issm/trunk/src/c/solutions/control_core.cpp ¶
r6323 r6412 66 66 67 67 /*Launch once a complete solution to set up all inputs*/ 68 ISSMPRINTF(VerboseControl(),"%s\n"," preparing initial solution");68 _printf_(VerboseControl(),"%s\n"," preparing initial solution"); 69 69 if (isstokes) solutioncore(femmodel); 70 70 … … 80 80 81 81 /*Display info*/ 82 ISSMPRINTF(VerboseControl(),"\n%s%i%s%i\n"," control method step ",n+1,"/",nsteps);82 _printf_(VerboseControl(),"\n%s%i%s%i\n"," control method step ",n+1,"/",nsteps); 83 83 InputUpdateFromConstantx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,(int)responses[n],CmResponseEnum); 84 84 … … 86 86 if (solution_type==SteadystateSolutionEnum) solutioncore(femmodel); 87 87 88 ISSMPRINTF(VerboseControl(),"%s\n"," compute adjoint state:");88 _printf_(VerboseControl(),"%s\n"," compute adjoint state:"); 89 89 adjointcore(femmodel); 90 90 … … 97 97 } 98 98 99 ISSMPRINTF(VerboseControl(),"%s\n"," optimizing along gradient direction");99 _printf_(VerboseControl(),"%s\n"," optimizing along gradient direction"); 100 100 optargs.n=n; optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n]; 101 101 BrentSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs); 102 102 //OptimalSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs); 103 103 104 ISSMPRINTF(VerboseControl(),"%s\n"," updating parameter using optimized search scalar"); //true means update save controls104 _printf_(VerboseControl(),"%s\n"," updating parameter using optimized search scalar"); //true means update save controls 105 105 InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true); 106 106 … … 109 109 /*Temporary saving every 5 control steps: */ 110 110 if (((n+1)%5)==0){ 111 ISSMPRINTF(VerboseControl(),"%s\n"," saving temporary results");111 _printf_(VerboseControl(),"%s\n"," saving temporary results"); 112 112 controlrestart(femmodel,J); 113 113 } 114 114 } 115 115 116 ISSMPRINTF(VerboseControl(),"%s\n"," preparing final solution");116 _printf_(VerboseControl(),"%s\n"," preparing final solution"); 117 117 femmodel->parameters->SetParam(false,ControlAnalysisEnum); //needed to turn control result output in solutioncore 118 118 solutioncore(femmodel); -
TabularUnified issm/trunk/src/c/solutions/controlconvergence.cpp ¶
r6323 r6412 32 32 //convergence if convergence criteria fullfilled 33 33 converged=true; 34 ISSMPRINTF(VerboseConvergence(),"%s%g%s%g\n"," Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm);34 _printf_(VerboseConvergence(),"%s%g%s%g\n"," Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm); 35 35 } 36 36 else{ 37 ISSMPRINTF(VerboseConvergence(),"%s%g%s%g\n"," Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],">",eps_cm);37 _printf_(VerboseConvergence(),"%s%g%s%g\n"," Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],">",eps_cm); 38 38 } 39 39 break; -
TabularUnified issm/trunk/src/c/solutions/convergence.cpp ¶
r6322 r6412 54 54 VecNorm(pf,NORM_2,&nF); 55 55 solver_residue=nKUF/nF; 56 _printf_( "\n%s%g\n"," solver residue: norm(KU-F)/norm(F)=",solver_residue);56 _printf_(true,"\n%s%g\n"," solver residue: norm(KU-F)/norm(F)=",solver_residue); 57 57 58 58 //clean up … … 70 70 res=nKUoldF/nF; 71 71 if (isnan(res)){ 72 _printf_( "norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);73 ISSMERROR("mechanical equilibrium convergence criterion is NaN!");72 _printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF); 73 _error_("mechanical equilibrium convergence criterion is NaN!"); 74 74 } 75 75 … … 80 80 //print 81 81 if(res<eps_res){ 82 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");82 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %"); 83 83 converged=1; 84 84 } 85 85 else{ 86 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");86 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %"); 87 87 converged=0; 88 88 } … … 95 95 VecNorm(duf,NORM_2,&ndu); VecNorm(old_uf,NORM_2,&nu); 96 96 97 if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!");97 if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!"); 98 98 99 99 //clean up … … 103 103 if (!isnan(eps_rel)){ 104 104 if((ndu/nu)<eps_rel){ 105 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");105 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %"); 106 106 } 107 107 else{ 108 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");108 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %"); 109 109 converged=0; 110 110 } 111 111 } 112 else _printf_( "%-50s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");112 else _printf_(true,"%-50s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %"); 113 113 114 114 } … … 120 120 VecDuplicate(old_uf,&duf);VecCopy(old_uf,duf); VecAYPX(duf,-1.0,uf); 121 121 VecNorm(duf,NORM_2,&ndu); VecNorm(duf,NORM_INFINITY,&nduinf); 122 if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!");122 if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!"); 123 123 124 124 //clean up … … 128 128 if (!isnan(eps_abs)){ 129 129 if ((nduinf*yts)<eps_abs){ 130 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");130 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr"); 131 131 } 132 132 else{ 133 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");133 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr"); 134 134 converged=0; 135 135 } 136 136 } 137 else _printf_( "%-50s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," m/yr");137 else _printf_(true,"%-50s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," m/yr"); 138 138 139 139 } -
TabularUnified issm/trunk/src/c/solutions/diagnostic_core.cpp ¶
r6323 r6412 50 50 if(ishutter){ 51 51 52 ISSMPRINTF(VerboseControl(),"%s\n"," computing hutter velocities");52 _printf_(VerboseControl(),"%s\n"," computing hutter velocities"); 53 53 54 54 //Take the last velocity into account so that the velocity on the MacAyeal domain is not zero … … 63 63 if (ismacayealpattyn^isstokes){ 64 64 65 ISSMPRINTF(VerboseControl(),"%s\n"," computing velocities");65 _printf_(VerboseControl(),"%s\n"," computing velocities"); 66 66 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum); 67 67 solver_diagnostic_nonlinear(femmodel,modify_loads); … … 70 70 if (ismacayealpattyn && isstokes){ 71 71 72 ISSMPRINTF(VerboseControl(),"%s\n"," computing coupling macayealpattyn and stokes velocities and pressure ");72 _printf_(VerboseControl(),"%s\n"," computing coupling macayealpattyn and stokes velocities and pressure "); 73 73 solver_stokescoupling_nonlinear(femmodel,conserve_loads); 74 74 } … … 76 76 if (dim==3 & (ishutter || ismacayealpattyn)){ 77 77 78 ISSMPRINTF(VerboseControl(),"%s\n"," computing vertical velocities");78 _printf_(VerboseControl(),"%s\n"," computing vertical velocities"); 79 79 femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum); 80 80 solver_linear(femmodel); … … 83 83 84 84 if(solution_type==DiagnosticSolutionEnum && !control_analysis){ 85 ISSMPRINTF(VerboseControl()," saving results\n");85 _printf_(VerboseControl()," saving results\n"); 86 86 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum); 87 87 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum); -
TabularUnified issm/trunk/src/c/solutions/gradient_core.cpp ¶
r6323 r6412 36 36 for (int i=0;i<num_controls;i++){ 37 37 38 ISSMPRINTF(VerboseControl()," compute gradient of J with respect to %s\n",EnumToString(control_type[i]));38 _printf_(VerboseControl()," compute gradient of J with respect to %s\n",EnumToString(control_type[i])); 39 39 Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, control_type[i]); 40 40 … … 42 42 43 43 if (step>0 && search_scalar==0){ 44 ISSMPRINTF(VerboseControl()," orthogonalization\n");44 _printf_(VerboseControl()," orthogonalization\n"); 45 45 ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters,control_type[i]); 46 46 Orthx(&new_gradient,gradient,old_gradient); VecFree(&old_gradient); VecFree(&gradient); 47 47 } 48 48 else{ 49 ISSMPRINTF(VerboseControl()," normalizing directions\n");49 _printf_(VerboseControl()," normalizing directions\n"); 50 50 Orthx(&new_gradient,gradient,NULL); VecFree(&gradient); 51 51 } … … 53 53 /*Get scaling factor of current control:*/ 54 54 VecNorm(new_gradient,NORM_INFINITY,&norm_grad); 55 if(norm_grad<=0) ISSMERROR("||∂J/∂α||∞ = 0 gradient norm of J with respect to %s is zero",EnumToString(control_type[i]));56 if(isnan(norm_grad)) ISSMERROR("||∂J/∂α||∞ = NaN gradient norm of J with respect to %s is NaN" ,EnumToString(control_type[i]));55 if(norm_grad<=0) _error_("||∂J/∂α||∞ = 0 gradient norm of J with respect to %s is zero",EnumToString(control_type[i])); 56 if(isnan(norm_grad))_error_("||∂J/∂α||∞ = NaN gradient norm of J with respect to %s is NaN" ,EnumToString(control_type[i])); 57 57 if(i==0 || (optscal_list[num_controls*step+i]/norm_grad)<optscal) optscal=optscal_list[num_controls*step+i]/norm_grad; 58 58 -
TabularUnified issm/trunk/src/c/solutions/issm.cpp ¶
r6389 r6412 36 36 37 37 #if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_)) 38 ISSMERROR(" parallel executable was compiled without support of parallel libraries!");38 _error_(" parallel executable was compiled without support of parallel libraries!"); 39 39 #endif 40 40 41 41 /*Initialize Petsc and get start time*/ 42 42 int ierr=PetscInitialize(&argc,&argv,(char*)0,""); 43 if(ierr) ISSMERROR("Could not initialize Petsc");43 if(ierr) _error_("Could not initialize Petsc"); 44 44 MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime(); 45 45 … … 48 48 MPI_Comm_size(MPI_COMM_WORLD,&num_procs); 49 49 50 _printf_( "Launching solution sequence\n");50 _printf_(true,"Launching solution sequence\n"); 51 51 solution_type=StringToEnum(argv[1]); 52 52 petscoptionsfilename=argv[4]; … … 78 78 if(!qmu_analysis){ 79 79 80 _printf_( "call computational core:\n");80 _printf_(true,"call computational core:\n"); 81 81 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 82 82 solutioncore(femmodel); 83 83 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 84 84 85 _printf_( "write results to disk:\n");85 _printf_(true,"write results to disk:\n"); 86 86 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results); 87 87 } 88 88 else{ 89 89 /*run qmu analysis: */ 90 _printf_( "calling qmu analysis on diagnostic core:\n");90 _printf_(true,"calling qmu analysis on diagnostic core:\n"); 91 91 92 92 #ifdef _HAVE_DAKOTA_ … … 95 95 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 96 96 #else 97 ISSMERROR(" Dakota not present, cannot do qmu!");97 _error_(" Dakota not present, cannot do qmu!"); 98 98 #endif 99 99 } … … 101 101 /*Close output file and write lock file if requested*/ 102 102 if (waitonlock>0){ 103 _printf_( "write lock file:\n");103 _printf_(true,"write lock file:\n"); 104 104 WriteLockFile(lockname); 105 105 } … … 111 111 /*Get finish time and close*/ 112 112 MPI_Barrier(MPI_COMM_WORLD); finish = MPI_Wtime( ); 113 _printf_( "\n %-34s %f seconds \n","FemModel initialization elapsed time:",finish_init-start_init);114 _printf_( " %-34s %f seconds \n","Core solution elapsed time:",finish_core-start_core);115 _printf_( "\n %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60);116 _printf_( "closing MPI and Petsc\n");113 _printf_(true,"\n %-34s %f seconds \n","FemModel initialization elapsed time:",finish_init-start_init); 114 _printf_(true," %-34s %f seconds \n","Core solution elapsed time:",finish_core-start_core); 115 _printf_(true,"\n %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60); 116 _printf_(true,"closing MPI and Petsc\n"); 117 117 PetscFinalize(); 118 118 -
TabularUnified issm/trunk/src/c/solutions/objectivefunctionC.cpp ¶
r6226 r6412 55 55 } 56 56 else{ 57 ISSMERROR("Solution %s not implemented yet",EnumToString(solution_type));57 _error_("Solution %s not implemented yet",EnumToString(solution_type)); 58 58 } 59 59 … … 72 72 } 73 73 else{ 74 ISSMERROR("Solution %s not implemented yet",EnumToString(solution_type));74 _error_("Solution %s not implemented yet",EnumToString(solution_type)); 75 75 } 76 76 -
TabularUnified issm/trunk/src/c/solutions/prognostic_core.cpp ¶
r6323 r6412 24 24 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 25 25 26 ISSMPRINTF(VerboseSolution()," call computational core\n");26 _printf_(VerboseSolution()," call computational core\n"); 27 27 solver_linear(femmodel); 28 28 29 29 if(solution_type==PrognosticSolutionEnum && !control_analysis){ 30 ISSMPRINTF(VerboseSolution()," saving results\n");30 _printf_(VerboseSolution()," saving results\n"); 31 31 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum); 32 32 } -
TabularUnified issm/trunk/src/c/solutions/steadystate_core.cpp ¶
r6323 r6412 32 32 for(;;){ 33 33 34 ISSMPRINTF(VerboseSolution(),"%s%i\n"," computing temperature and velocity for step: ",step);34 _printf_(VerboseSolution(),"%s%i\n"," computing temperature and velocity for step: ",step); 35 35 thermal_core(femmodel); 36 36 37 ISSMPRINTF(VerboseSolution(),"%s\n"," computing new velocity");37 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 38 38 diagnostic_core(femmodel); 39 39 40 40 if (step>1){ 41 ISSMPRINTF(VerboseSolution(),"%s\n"," checking velocity, temperature and pressure convergence");41 _printf_(VerboseSolution(),"%s\n"," checking velocity, temperature and pressure convergence"); 42 42 if(steadystateconvergence(femmodel)) break; 43 43 } 44 44 45 ISSMPRINTF(VerboseSolution(),"%s\n"," saving velocity, temperature and pressure to check for convergence at next step");45 _printf_(VerboseSolution(),"%s\n"," saving velocity, temperature and pressure to check for convergence at next step"); 46 46 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxOldEnum); 47 47 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyOldEnum); … … 55 55 56 56 if(solution_type==SteadystateSolutionEnum && !control_analysis){ 57 ISSMPRINTF(VerboseSolution()," saving results\n");57 _printf_(VerboseSolution()," saving results\n"); 58 58 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum); 59 59 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum); -
TabularUnified issm/trunk/src/c/solutions/surfaceslope_core.cpp ¶
r6323 r6412 24 24 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 25 25 26 ISSMPRINTF(VerboseSolution(),"%s\n","computing slope...");26 _printf_(VerboseSolution(),"%s\n","computing slope..."); 27 27 28 28 /*Call on core computations: */ … … 33 33 34 34 if(solution_type==SurfaceSlopeSolutionEnum && !control_analysis){ 35 ISSMPRINTF(VerboseSolution(),"saving results:\n");35 _printf_(VerboseSolution(),"saving results:\n"); 36 36 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum); 37 37 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeYEnum); -
TabularUnified issm/trunk/src/c/solutions/thermal_core.cpp ¶
r6323 r6412 41 41 for(i=0;i<nsteps;i++){ 42 42 43 if(nsteps) ISSMPRINTF(VerboseSolution(),"time step: %i/%i\n",i+1,nsteps);43 if(nsteps)_printf_(VerboseSolution(),"time step: %i/%i\n",i+1,nsteps); 44 44 time=(i+1)*dt; 45 45 … … 48 48 49 49 if(solution_type==ThermalSolutionEnum && !control_analysis){ 50 ISSMPRINTF(VerboseSolution()," saving results\n");50 _printf_(VerboseSolution()," saving results\n"); 51 51 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time); 52 52 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,MeltingRateEnum,i+1,time); -
TabularUnified issm/trunk/src/c/solutions/thermal_core_step.cpp ¶
r6323 r6412 14 14 void thermal_core_step(FemModel* femmodel,int step, double time){ 15 15 16 ISSMPRINTF(VerboseSolution()," computing temperatures\n");16 _printf_(VerboseSolution()," computing temperatures\n"); 17 17 femmodel->SetCurrentConfiguration(ThermalAnalysisEnum); 18 18 solver_thermal_nonlinear(femmodel); 19 19 20 ISSMPRINTF(VerboseSolution()," computing melting\n");20 _printf_(VerboseSolution()," computing melting\n"); 21 21 femmodel->SetCurrentConfiguration(MeltingAnalysisEnum); 22 22 solver_linear(femmodel); -
TabularUnified issm/trunk/src/c/solutions/transient2d_core.cpp ¶
r6372 r6412 50 50 step+=1; 51 51 52 ISSMPRINTF(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);52 _printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts); 53 53 54 ISSMPRINTF(VerboseSolution(),"%s\n"," computing new velocity");54 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 55 55 diagnostic_core(femmodel); 56 56 57 ISSMPRINTF(VerboseSolution(),"%s\n"," computing new thickness");57 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 58 58 prognostic_core(femmodel); 59 59 60 ISSMPRINTF(VerboseSolution(),"%s\n"," updating geometry");60 _printf_(VerboseSolution(),"%s\n"," updating geometry"); 61 61 UpdateGeometryx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 62 62 63 63 if(solution_type==Transient2DSolutionEnum && !control_analysis && (step%output_frequency==0)){ 64 ISSMPRINTF(VerboseSolution(),"%s\n"," saving results\n");64 _printf_(VerboseSolution(),"%s\n"," saving results\n"); 65 65 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,step,time); 66 66 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,step,time); … … 72 72 73 73 /*unload results*/ 74 ISSMPRINTF(VerboseSolution(),"%s"," saving temporary results");74 _printf_(VerboseSolution(),"%s"," saving temporary results"); 75 75 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,step,time); 76 76 } -
TabularUnified issm/trunk/src/c/solutions/transient3d_core.cpp ¶
r6372 r6412 50 50 time+=dt; 51 51 52 ISSMPRINTF(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);52 _printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts); 53 53 54 ISSMPRINTF(VerboseSolution()," computing temperatures:\n");54 _printf_(VerboseSolution()," computing temperatures:\n"); 55 55 thermal_core_step(femmodel,step,time); 56 56 57 ISSMPRINTF(VerboseSolution(),"%s\n"," computing new velocity");57 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 58 58 diagnostic_core(femmodel); 59 59 60 ISSMPRINTF(VerboseSolution(),"%s\n"," computing new thickness");60 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 61 61 prognostic_core(femmodel); 62 62 63 ISSMPRINTF(VerboseSolution()," updating geometry\n");63 _printf_(VerboseSolution()," updating geometry\n"); 64 64 UpdateGeometryx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 65 65 66 ISSMPRINTF(VerboseSolution(),"%s\n"," updating vertices positions");66 _printf_(VerboseSolution(),"%s\n"," updating vertices positions"); 67 67 UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 68 68 69 69 if(solution_type==Transient3DSolutionEnum && !control_analysis && (step%output_frequency==0)){ 70 ISSMPRINTF(VerboseSolution(),"%s\n"," saving results\n");70 _printf_(VerboseSolution(),"%s\n"," saving results\n"); 71 71 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,step,time); 72 72 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,step,time); … … 81 81 82 82 /*unload results*/ 83 ISSMPRINTF(VerboseSolution(),"%s"," saving temporary results");83 _printf_(VerboseSolution(),"%s"," saving temporary results"); 84 84 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,step,time); 85 85 } -
TabularUnified issm/trunk/src/c/solvers/solver_diagnostic_nonlinear.cpp ¶
r6323 r6412 69 69 70 70 PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters); 71 ISSMPRINTF(VerboseConvergence()," number of unstable constraints: %i\n",num_unstable_constraints);71 _printf_(VerboseConvergence()," number of unstable constraints: %i\n",num_unstable_constraints); 72 72 73 73 convergence(&converged,Kff,pf,uf,old_uf,femmodel->parameters); MatFree(&Kff);VecFree(&pf); … … 87 87 if(converged==1)break; 88 88 if(count>=max_nonlinear_iterations){ 89 _printf_( " maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations);89 _printf_(true," maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 90 90 break; 91 91 } -
TabularUnified issm/trunk/src/c/solvers/solver_stokescoupling_nonlinear.cpp ¶
r6323 r6412 95 95 if(converged==1)break; 96 96 if(count>=max_nonlinear_iterations){ 97 _printf_( " maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations);97 _printf_(true," maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 98 98 break; 99 99 } -
TabularUnified issm/trunk/src/c/solvers/solver_thermal_nonlinear.cpp ¶
r6323 r6412 44 44 converged=false; 45 45 46 ISSMPRINTF(VerboseSolution(),"%s\n","starting direct shooting method");46 _printf_(VerboseSolution(),"%s\n","starting direct shooting method"); 47 47 InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,reset_penalties,ResetPenaltiesEnum); 48 48 InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,false,ConvergedEnum); … … 71 71 72 72 if (!converged){ 73 ISSMPRINTF(VerboseConvergence(),"%s%i\n"," #unstable constraints = ",num_unstable_constraints);73 _printf_(VerboseConvergence(),"%s%i\n"," #unstable constraints = ",num_unstable_constraints); 74 74 if (num_unstable_constraints <= min_thermal_constraints)converged=true; 75 75 } -
TabularUnified issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp ¶
r5895 r6412 29 29 /*Some checks: */ 30 30 MatGetSize(matrix,&M,&N); 31 if(M!=N) ISSMERROR("trying to invert a non square matrix!");31 if(M!=N) _error_("trying to invert a non square matrix!"); 32 32 33 33 /*Create identitiy matrix: */ -
TabularUnified issm/trunk/src/c/toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp ¶
r4206 r6412 54 54 55 55 /*Check that input is actualy a vector*/ 56 if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols);56 if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols); 57 57 58 58 nz=(int)((double)nnz/(double)rows); … … 83 83 84 84 /*Check that input is actualy a vector*/ 85 if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols);85 if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols); 86 86 87 87 /*allocate and memcpy*/ -
TabularUnified issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp ¶
r3775 r6412 55 55 if(first[0]!='-'){ 56 56 /*This is not good, the option does not have '-'! Get out*/ 57 ISSMERROR("%s%s%s","Option ",first," should be preceded by '-'!");57 _error_("%s%s%s","Option ",first," should be preceded by '-'!"); 58 58 } 59 59 /*Reduce first to bare option value*/ -
TabularUnified issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp ¶
r3775 r6412 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 ISSMERROR("Dimensions of partitioning vector incompatible with dimensions of input vector\n");37 _error_("Dimensions of partitioning vector incompatible with dimensions of input vector\n"); 38 38 } 39 39 -
TabularUnified issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp ¶
r3775 r6412 53 53 54 54 /*Some dimensions checks: */ 55 if (mA!=nA) ISSMERROR(" trying to take the invert of a non-square matrix!");55 if (mA!=nA) _error_(" trying to take the invert of a non-square matrix!"); 56 56 57 57 /* Set default Plapack parameters */ -
TabularUnified issm/trunk/src/m/model/collapse.m ¶
r6335 r6412 66 66 67 67 %Extrusion of Neumann BC 68 %in 2d, segmentonnumann is: [grid1 grid2 element] 69 numberofneumann2d=size(md.pressureload,1)/md.numlayers; 70 md.pressureload=[md.pressureload(1:numberofneumann2d,1:2) md.pressureload(1:numberofneumann2d,5:6)]; %Add two columns on the first layer 68 if ~isnan(md.pressureload), 69 numberofneumann2d=size(md.pressureload,1)/md.numlayers; 70 md.pressureload=[md.pressureload(1:numberofneumann2d,1:2) md.pressureload(1:numberofneumann2d,5:6)]; %Add two columns on the first layer 71 end 71 72 72 73 %materials -
TabularUnified issm/trunk/src/mex/AddExternalResult/AddExternalResult.cpp ¶
r4553 r6412 34 34 } 35 35 else{ 36 ISSMERROR("type of result not implemented yet in AddExternalResult");36 _error_("type of result not implemented yet in AddExternalResult"); 37 37 } 38 38 … … 49 49 void AddExternalResultUsage(void) 50 50 { 51 _printf_( "\n");52 _printf_( " usage: [results] = %s(results,type,value);\n",__FUNCT__);53 _printf_( "\n");51 _printf_(true,"\n"); 52 _printf_(true," usage: [results] = %s(results,type,value);\n",__FUNCT__); 53 _printf_(true,"\n"); 54 54 } -
TabularUnified issm/trunk/src/mex/BamgConvertMesh/BamgConvertMesh.cpp ¶
r5177 r6412 44 44 /*Check inputs*/ 45 45 if (nels<0){ 46 ISSMERROR("Number of elements must be positive, check index number of lines");46 _error_("Number of elements must be positive, check index number of lines"); 47 47 } 48 48 if (nods<0){ 49 ISSMERROR("Number of nods must be positive, check x and y sizes");49 _error_("Number of nods must be positive, check x and y sizes"); 50 50 } 51 51 if (index_rows!=3){ 52 ISSMERROR("index should have 3 columns");52 _error_("index should have 3 columns"); 53 53 } 54 54 if (y_rows!=nods){ 55 ISSMERROR("x and y do not have the same length");55 _error_("x and y do not have the same length"); 56 56 } 57 57 if (x_cols>1 || y_cols>1){ 58 ISSMERROR("x and y should have only one column");58 _error_("x and y should have only one column"); 59 59 } 60 60 … … 77 77 void BamgConvertMeshUsage(void) 78 78 { 79 _printf_( "BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");80 _printf_( "\n");81 _printf_( " Usage:\n");82 _printf_( " [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);\n");83 _printf_( " index: index of the mesh\n");84 _printf_( " x,y: coordinates of the nodes\n");85 _printf_( "\n");79 _printf_(true,"BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom"); 80 _printf_(true,"\n"); 81 _printf_(true," Usage:\n"); 82 _printf_(true," [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);\n"); 83 _printf_(true," index: index of the mesh\n"); 84 _printf_(true," x,y: coordinates of the nodes\n"); 85 _printf_(true,"\n"); 86 86 } -
TabularUnified issm/trunk/src/mex/BamgMesher/BamgMesher.cpp ¶
r5245 r6412 51 51 52 52 void BamgMesherUsage(void){ 53 _printf_( "\n");54 _printf_( " usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);55 _printf_( "\n");53 _printf_(true,"\n"); 54 _printf_(true," usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__); 55 _printf_(true,"\n"); 56 56 } -
TabularUnified issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp ¶
r4453 r6412 41 41 void BuildNodeSetsUsage(void) 42 42 { 43 _printf_( "\n");44 _printf_( " usage: [m.nodesets]=%s(m.nodes);\n",__FUNCT__);45 _printf_( "\n");43 _printf_(true,"\n"); 44 _printf_(true," usage: [m.nodesets]=%s(m.nodes);\n",__FUNCT__); 45 _printf_(true,"\n"); 46 46 } -
TabularUnified issm/trunk/src/mex/Chaco/Chaco.cpp ¶
r4640 r6412 43 43 44 44 #ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in. 45 ISSMERROR(" Chaco not available! Cannot carry out Chaco partitioning!");45 _error_(" Chaco not available! Cannot carry out Chaco partitioning!"); 46 46 #endif 47 47 … … 140 140 void ChacoUsage( void ) 141 141 { 142 _printf_( "\n");143 _printf_( "Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");144 _printf_( "\n");142 _printf_(true,"\n"); 143 _printf_(true,"Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n"); 144 _printf_(true,"\n"); 145 145 } 146 146 -
TabularUnified issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp ¶
r4453 r6412 54 54 void ConfigureObjectsUsage(void) 55 55 { 56 _printf_( "\n");57 _printf_( " usage: [elements,loads, nodes,parameters] = %s(elements,loads,nodes, materials,parameters);\n",__FUNCT__);58 _printf_( "\n");56 _printf_(true,"\n"); 57 _printf_(true," usage: [elements,loads, nodes,parameters] = %s(elements,loads,nodes, materials,parameters);\n",__FUNCT__); 58 _printf_(true,"\n"); 59 59 } -
TabularUnified issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp ¶
r5685 r6412 56 56 if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){ 57 57 ContourToMeshUsage(); 58 ISSMERROR(" usage. See above");58 _error_(" usage. See above"); 59 59 } 60 60 … … 110 110 WriteData(PLHS1,in_elem); 111 111 } 112 else ISSMERROR(" wrong interpolation type");112 else _error_(" wrong interpolation type"); 113 113 114 114 /*end module: */ -
TabularUnified issm/trunk/src/mex/ControlInputGetGradient/ControlInputGetGradient.cpp ¶
r6200 r6412 58 58 void ControlInputGetGradientUsage(void) 59 59 { 60 _printf_( "\n");61 _printf_( " usage: [gradient] = %s(elements,nodes,vertices,loads, materials,parameters,control_type);\n",__FUNCT__);62 _printf_( "\n");60 _printf_(true,"\n"); 61 _printf_(true," usage: [gradient] = %s(elements,nodes,vertices,loads, materials,parameters,control_type);\n",__FUNCT__); 62 _printf_(true,"\n"); 63 63 } -
TabularUnified issm/trunk/src/mex/ControlInputScaleGradient/ControlInputScaleGradient.cpp ¶
r6238 r6412 63 63 void ControlInputScaleGradientUsage(void) 64 64 { 65 _printf_( "\n");66 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,scaling_factor);\n",__FUNCT__);67 _printf_( "\n");65 _printf_(true,"\n"); 66 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,scaling_factor);\n",__FUNCT__); 67 _printf_(true,"\n"); 68 68 } -
TabularUnified issm/trunk/src/mex/ControlInputSetGradient/ControlInputSetGradient.cpp ¶
r6200 r6412 63 63 void ControlInputSetGradientUsage(void) 64 64 { 65 _printf_( "\n");66 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,gradient);\n",__FUNCT__);67 _printf_( "\n");65 _printf_(true,"\n"); 66 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,gradient);\n",__FUNCT__); 67 _printf_(true,"\n"); 68 68 } -
TabularUnified issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp ¶
r4539 r6412 67 67 void ControlOptimizationUsage(void) 68 68 { 69 _printf_( "\n");70 _printf_( " usage: [search_scalar J] = %s(function_name,xmin,xmax,options,femmodel,step,parameters)\n",__FUNCT__);71 _printf_( "\n");69 _printf_(true,"\n"); 70 _printf_(true," usage: [search_scalar J] = %s(function_name,xmin,xmax,options,femmodel,step,parameters)\n",__FUNCT__); 71 _printf_(true,"\n"); 72 72 } -
TabularUnified issm/trunk/src/mex/CostFunction/CostFunction.cpp ¶
r5280 r6412 59 59 void CostFunctionUsage(void) 60 60 { 61 _printf_( "\n");62 _printf_( " usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters,response);\n",__FUNCT__);63 _printf_( "\n");61 _printf_(true,"\n"); 62 _printf_(true," usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters,response);\n",__FUNCT__); 63 _printf_(true,"\n"); 64 64 } -
TabularUnified issm/trunk/src/mex/CreateNodalConstraints/CreateNodalConstraints.cpp ¶
r5775 r6412 40 40 void CreateNodalConstraintsUsage(void) 41 41 { 42 _printf_( "\n");43 _printf_( " usage: ys = %s(nodes,analysis_type);\n",__FUNCT__);44 _printf_( "\n");42 _printf_(true,"\n"); 43 _printf_(true," usage: ys = %s(nodes,analysis_type);\n",__FUNCT__); 44 _printf_(true,"\n"); 45 45 } -
TabularUnified issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp ¶
r6231 r6412 87 87 void DakotaResponsesUsage(void) 88 88 { 89 _printf_( "\n");90 _printf_( " usage: [responses] = %s(elements,nodes,vertices,loads,materials,parameters,responses_descritpors);\n",__FUNCT__);91 _printf_( "\n");89 _printf_(true,"\n"); 90 _printf_(true," usage: [responses] = %s(elements,nodes,vertices,loads,materials,parameters,responses_descritpors);\n",__FUNCT__); 91 _printf_(true,"\n"); 92 92 } -
TabularUnified issm/trunk/src/mex/Echo/Echo.cpp ¶
r4453 r6412 28 28 void EchoUsage(void) 29 29 { 30 _printf_( "\n");31 _printf_( " usage: %s(m.dataset);\n",__FUNCT__);32 _printf_( "\n");30 _printf_(true,"\n"); 31 _printf_(true," usage: %s(m.dataset);\n",__FUNCT__); 32 _printf_(true,"\n"); 33 33 } -
TabularUnified issm/trunk/src/mex/ElementConnectivity/ElementConnectivity.cpp ¶
r2333 r6412 41 41 42 42 void ElementConnectivityUsage(void) { 43 _printf_( "\n");44 _printf_( " usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);45 _printf_( "\n");43 _printf_(true,"\n"); 44 _printf_(true," usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__); 45 _printf_(true,"\n"); 46 46 } -
TabularUnified issm/trunk/src/mex/GetPId/GetPId.cpp ¶
r5004 r6412 29 29 void GetPIdUsage(void) 30 30 { 31 _printf_( "\n");32 _printf_( " usage: pid=%s();\n",__FUNCT__);33 _printf_( "\n");31 _printf_(true,"\n"); 32 _printf_(true," usage: pid=%s();\n",__FUNCT__); 33 _printf_(true,"\n"); 34 34 } -
TabularUnified issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp ¶
r4573 r6412 57 57 void GetSolutionFromInputsUsage(void) 58 58 { 59 _printf_( "\n");60 _printf_( " usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters);\n",__FUNCT__);61 _printf_( "\n");59 _printf_(true,"\n"); 60 _printf_(true," usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters);\n",__FUNCT__); 61 _printf_(true,"\n"); 62 62 } -
TabularUnified issm/trunk/src/mex/GetVectorFromInputs/GetVectorFromInputs.cpp ¶
r4573 r6412 61 61 void GetVectorFromInputsUsage(void) 62 62 { 63 _printf_( "\n");64 _printf_( " usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,name_enum,type_enum);\n",__FUNCT__);65 _printf_( "\n");63 _printf_(true,"\n"); 64 _printf_(true," usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,name_enum,type_enum);\n",__FUNCT__); 65 _printf_(true,"\n"); 66 66 } -
TabularUnified issm/trunk/src/mex/Gradj/Gradj.cpp ¶
r6261 r6412 60 60 void GradjUsage(void) 61 61 { 62 _printf_( "\n");63 _printf_( " usage: [gradient] = %s(elements,nodes,vertices,loads, materials, parameters,control_type);\n",__FUNCT__);64 _printf_( "\n");62 _printf_(true,"\n"); 63 _printf_(true," usage: [gradient] = %s(elements,nodes,vertices,loads, materials, parameters,control_type);\n",__FUNCT__); 64 _printf_(true,"\n"); 65 65 } -
TabularUnified issm/trunk/src/mex/InputControlUpdate/InputControlUpdate.cpp ¶
r4967 r6412 63 63 void InputControlUpdateUsage(void) 64 64 { 65 _printf_( "\n");66 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,scalar);\n",__FUNCT__);67 _printf_( "\n");65 _printf_(true,"\n"); 66 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,scalar);\n",__FUNCT__); 67 _printf_(true,"\n"); 68 68 } -
TabularUnified issm/trunk/src/mex/InputConvergence/InputConvergence.cpp ¶
r4778 r6412 80 80 81 81 void InputConvergenceUsage(void) { 82 _printf_( "\n");83 _printf_( " usage: convergence=InputConvergence(elements,nodes,vertices,loads,materials,parameters,fieldenums,criterionenums,criterionvalue)\n");84 _printf_( "\n");82 _printf_(true,"\n"); 83 _printf_(true," usage: convergence=InputConvergence(elements,nodes,vertices,loads,materials,parameters,fieldenums,criterionenums,criterionvalue)\n"); 84 _printf_(true,"\n"); 85 85 } -
TabularUnified issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp ¶
r4453 r6412 54 54 void InputDuplicateUsage(void) 55 55 { 56 _printf_( "\n");57 _printf_( " usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, original_enum,new_enum);\n",__FUNCT__);58 _printf_( "\n");56 _printf_(true,"\n"); 57 _printf_(true," usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, original_enum,new_enum);\n",__FUNCT__); 58 _printf_(true,"\n"); 59 59 } -
TabularUnified issm/trunk/src/mex/InputScale/InputScale.cpp ¶
r4573 r6412 60 60 void InputScaleUsage(void) 61 61 { 62 _printf_( "\n");63 _printf_( " usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,scale_factor);\n",__FUNCT__);64 _printf_( "\n");62 _printf_(true,"\n"); 63 _printf_(true," usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,scale_factor);\n",__FUNCT__); 64 _printf_(true,"\n"); 65 65 } -
TabularUnified issm/trunk/src/mex/InputToResult/InputToResult.cpp ¶
r5019 r6412 24 24 if((nlhs!=NLHS) || (nrhs!=7 && nrhs!=9)){ 25 25 InputToResultUsage(); 26 ISSMERROR(" usage. See above");26 _error_(" usage. See above"); 27 27 } 28 28 … … 73 73 void InputToResultUsage(void) 74 74 { 75 _printf_( "\n");76 _printf_( " usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,step,time);\n",__FUNCT__);77 _printf_( " usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type);\n",__FUNCT__);78 _printf_( "\n");75 _printf_(true,"\n"); 76 _printf_(true," usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,step,time);\n",__FUNCT__); 77 _printf_(true," usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type);\n",__FUNCT__); 78 _printf_(true,"\n"); 79 79 } -
TabularUnified issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp ¶
r4573 r6412 59 59 void InputUpdateFromConstantUsage(void) 60 60 { 61 _printf_( "\n");62 _printf_( " usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,constant,name);\n",__FUNCT__);63 _printf_( "\n");61 _printf_(true,"\n"); 62 _printf_(true," usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,constant,name);\n",__FUNCT__); 63 _printf_(true,"\n"); 64 64 } -
TabularUnified issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp ¶
r6231 r6412 84 84 void InputUpdateFromDakotaUsage(void) 85 85 { 86 _printf_( "\n");87 _printf_( " usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,variables,variables_descriptors);\n",__FUNCT__);88 _printf_( "\n");86 _printf_(true,"\n"); 87 _printf_(true," usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,variables,variables_descriptors);\n",__FUNCT__); 88 _printf_(true,"\n"); 89 89 } -
TabularUnified issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp ¶
r4686 r6412 58 58 void InputUpdateFromSolutionUsage(void) 59 59 { 60 _printf_( "\n");61 _printf_( " usage: [elements,materials] = %s(elements,nodes,vertices,loads,materials,parameters,solution);\n",__FUNCT__);62 _printf_( "\n");60 _printf_(true,"\n"); 61 _printf_(true," usage: [elements,materials] = %s(elements,nodes,vertices,loads,materials,parameters,solution);\n",__FUNCT__); 62 _printf_(true,"\n"); 63 63 } -
TabularUnified issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp ¶
r5103 r6412 38 38 /*Check that type is one of Constant, Vertex or Element: */ 39 39 if ((TypeEnum!=ConstantEnum) && (TypeEnum!=VertexEnum) && (TypeEnum!=ElementEnum)){ 40 ISSMERROR("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector. Right now, you input a ",EnumToString(TypeEnum)," type data for input update");40 _error_("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector. Right now, you input a ",EnumToString(TypeEnum)," type data for input update"); 41 41 } 42 42 … … 72 72 void InputUpdateFromVectorUsage(void) 73 73 { 74 _printf_( "\n");75 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,vector,name_enum,type_enum);\n",__FUNCT__);76 _printf_( "\n");74 _printf_(true,"\n"); 75 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,vector,name_enum,type_enum);\n",__FUNCT__); 76 _printf_(true,"\n"); 77 77 } -
TabularUnified issm/trunk/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.cpp ¶
r2627 r6412 72 72 void InterpFromGridToMeshUsage(void) 73 73 { 74 _printf_( "INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points\n");75 _printf_( "\n");76 _printf_( " This function is a multi-threaded mex file that interpolates a field\n");77 _printf_( " defined on a grid onto a list of points\n");78 _printf_( "\n");79 _printf_( " Usage:\n");80 _printf_( " data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);\n");81 _printf_( "\n");82 _printf_( " data: matrix holding the data to be interpolated onto the mesh.\n");83 _printf_( " x,y: coordinates of matrix data. (x and y must be in increasing order)\n");84 _printf_( " x_mesh,y_mesh: coordinates of the points onto which we interpolate.\n");85 _printf_( " default_value: default value if no data is found (holes).\n");86 _printf_( " data_mesh: vector of mesh interpolated data.\n");87 _printf_( "\n");88 _printf_( " Example:\n");89 _printf_( " load('velocities.mat');\n");90 _printf_( " md.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.x,md.y,0);\n");91 _printf_( "\n");74 _printf_(true,"INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points\n"); 75 _printf_(true,"\n"); 76 _printf_(true," This function is a multi-threaded mex file that interpolates a field\n"); 77 _printf_(true," defined on a grid onto a list of points\n"); 78 _printf_(true,"\n"); 79 _printf_(true," Usage:\n"); 80 _printf_(true," data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);\n"); 81 _printf_(true,"\n"); 82 _printf_(true," data: matrix holding the data to be interpolated onto the mesh.\n"); 83 _printf_(true," x,y: coordinates of matrix data. (x and y must be in increasing order)\n"); 84 _printf_(true," x_mesh,y_mesh: coordinates of the points onto which we interpolate.\n"); 85 _printf_(true," default_value: default value if no data is found (holes).\n"); 86 _printf_(true," data_mesh: vector of mesh interpolated data.\n"); 87 _printf_(true,"\n"); 88 _printf_(true," Example:\n"); 89 _printf_(true," load('velocities.mat');\n"); 90 _printf_(true," md.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.x,md.y,0);\n"); 91 _printf_(true,"\n"); 92 92 } -
TabularUnified issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp ¶
r5032 r6412 69 69 if(nlhs!=NLHS){ 70 70 InterpFromMesh2dUsage(); 71 ISSMERROR("InterpFromMeshToMesh2dUsage usage error");71 _error_("InterpFromMeshToMesh2dUsage usage error"); 72 72 } 73 73 if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){ 74 74 InterpFromMesh2dUsage(); 75 ISSMERROR("InterpFromMeshToMesh2dUsage usage error");75 _error_("InterpFromMeshToMesh2dUsage usage error"); 76 76 } 77 77 … … 131 131 /*some checks*/ 132 132 if (x_data_rows!=y_data_rows){ 133 ISSMERROR("vectors x and y should have the same length!");133 _error_("vectors x and y should have the same length!"); 134 134 } 135 135 if (x_prime_rows!=y_prime_rows){ 136 ISSMERROR("vectors x_prime and y_prime should have the same length!");136 _error_("vectors x_prime and y_prime should have the same length!"); 137 137 } 138 138 … … 154 154 void InterpFromMesh2dUsage(void) 155 155 { 156 _printf_( " usage:\n");157 _printf_( " data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n\n");158 _printf_( " or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n\n");159 _printf_( " or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n\n");160 _printf_( " where:\n");161 _printf_( " x,y: coordinates of the nodes where data is defined\n");162 _printf_( " index: index of the mesh where data is defined\n");163 _printf_( " data - vector holding the data to be interpolated onto the points.\n");164 _printf_( " x_prime,y_prime: coordinates of the mesh grids onto which we interpolate.\n");165 _printf_( " default_value: a scalar or vector of size length(x_prime).\n");166 _printf_( " contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");167 _printf_( " data_prime: vector of prime interpolated data.\n");168 _printf_( "\n");156 _printf_(true," usage:\n"); 157 _printf_(true," data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n\n"); 158 _printf_(true," or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n\n"); 159 _printf_(true," or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n\n"); 160 _printf_(true," where:\n"); 161 _printf_(true," x,y: coordinates of the nodes where data is defined\n"); 162 _printf_(true," index: index of the mesh where data is defined\n"); 163 _printf_(true," data - vector holding the data to be interpolated onto the points.\n"); 164 _printf_(true," x_prime,y_prime: coordinates of the mesh grids onto which we interpolate.\n"); 165 _printf_(true," default_value: a scalar or vector of size length(x_prime).\n"); 166 _printf_(true," contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n"); 167 _printf_(true," data_prime: vector of prime interpolated data.\n"); 168 _printf_(true,"\n"); 169 169 } -
TabularUnified issm/trunk/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp ¶
r2627 r6412 64 64 void InterpFromMeshToGridUsage(void) 65 65 { 66 _printf_( "INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n");67 _printf_( "\n");68 _printf_( " This function is a multi-threaded mex file that interpolates a field\n");69 _printf_( " defined on a triangular mesh onto a regular grid\n");70 _printf_( "\n");71 _printf_( " Usage:\n");72 _printf_( " [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,cornereast,cornernorth,xposting,yposting,nlines,ncols,default_value)\n");73 _printf_( "\n");74 _printf_( " index,x,y: delaunay triangulation defining the mesh.\n");75 _printf_( " meshdata: vertex values of data to be interpolated.\n");76 _printf_( " cornereast,cornernorth,posting,nlines,ncols: parameters that define the grid\n");77 _printf_( " default_value: value of points located out of the mesh.\n");78 _printf_( "\n");66 _printf_(true,"INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n"); 67 _printf_(true,"\n"); 68 _printf_(true," This function is a multi-threaded mex file that interpolates a field\n"); 69 _printf_(true," defined on a triangular mesh onto a regular grid\n"); 70 _printf_(true,"\n"); 71 _printf_(true," Usage:\n"); 72 _printf_(true," [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,cornereast,cornernorth,xposting,yposting,nlines,ncols,default_value)\n"); 73 _printf_(true,"\n"); 74 _printf_(true," index,x,y: delaunay triangulation defining the mesh.\n"); 75 _printf_(true," meshdata: vertex values of data to be interpolated.\n"); 76 _printf_(true," cornereast,cornernorth,posting,nlines,ncols: parameters that define the grid\n"); 77 _printf_(true," default_value: value of points located out of the mesh.\n"); 78 _printf_(true,"\n"); 79 79 } -
TabularUnified issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp ¶
r5144 r6412 52 52 if(nlhs!=NLHS){ 53 53 InterpFromMeshToMesh2dUsage(); 54 ISSMERROR("InterpFromMeshToMesh2dUsage usage error");54 _error_("InterpFromMeshToMesh2dUsage usage error"); 55 55 } 56 56 if((nrhs!=6) & (nrhs!=8)){ 57 57 InterpFromMeshToMesh2dUsage(); 58 ISSMERROR("InterpFromMeshToMesh2dUsage usage error");58 _error_("InterpFromMeshToMesh2dUsage usage error"); 59 59 } 60 60 … … 111 111 if (verbose) printf("Checking inputs\n"); 112 112 if (x_data_rows!=y_data_rows){ 113 ISSMERROR("vectors x and y should have the same length!");113 _error_("vectors x and y should have the same length!"); 114 114 } 115 115 if (x_interp_rows!=y_interp_rows){ 116 ISSMERROR("vectors x_interp and y_interp should have the same length!");116 _error_("vectors x_interp and y_interp should have the same length!"); 117 117 } 118 118 if (index_cols!=3){ 119 ISSMERROR("index should have 3 columns (input provided has %i columns)",index_cols);119 _error_("index should have 3 columns (input provided has %i columns)",index_cols); 120 120 } 121 121 … … 137 137 void InterpFromMeshToMesh2dUsage(void) 138 138 { 139 _printf_( "INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n");140 _printf_( "\n");141 _printf_( " This function is a multi-threaded mex file that interpolates a field\n");142 _printf_( " defined on a triangular mesh onto a list of point\n");143 _printf_( "\n");144 _printf_( " Usage:\n");145 _printf_( " data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);\n");146 _printf_( " or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);\n");147 _printf_( "\n");148 _printf_( " index: index of the mesh where data is defined\n");149 _printf_( " x,y: coordinates of the nodes where data is defined\n");150 _printf_( " data: matrix holding the data to be interpolated onto the mesh. (one column per field)\n");151 _printf_( " x_interp,y_interp: coordinates of the points onto which we interpolate.\n");152 _printf_( " if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.\n");153 _printf_( " if (default_value,contourname) specified: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");154 _printf_( " note that default_value is either a scalar, or a vector of size length(x_interp)\n");155 _printf_( " data_interp: vector of mesh interpolated data.\n");156 _printf_( "\n");157 _printf_( " Example:\n");158 _printf_( " load('temperature.mat');\n");159 _printf_( " md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y);\n");160 _printf_( " md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y,253,'Contour.exp');\n");161 _printf_( "\n");139 _printf_(true,"INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n"); 140 _printf_(true,"\n"); 141 _printf_(true," This function is a multi-threaded mex file that interpolates a field\n"); 142 _printf_(true," defined on a triangular mesh onto a list of point\n"); 143 _printf_(true,"\n"); 144 _printf_(true," Usage:\n"); 145 _printf_(true," data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);\n"); 146 _printf_(true," or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);\n"); 147 _printf_(true,"\n"); 148 _printf_(true," index: index of the mesh where data is defined\n"); 149 _printf_(true," x,y: coordinates of the nodes where data is defined\n"); 150 _printf_(true," data: matrix holding the data to be interpolated onto the mesh. (one column per field)\n"); 151 _printf_(true," x_interp,y_interp: coordinates of the points onto which we interpolate.\n"); 152 _printf_(true," if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.\n"); 153 _printf_(true," if (default_value,contourname) specified: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n"); 154 _printf_(true," note that default_value is either a scalar, or a vector of size length(x_interp)\n"); 155 _printf_(true," data_interp: vector of mesh interpolated data.\n"); 156 _printf_(true,"\n"); 157 _printf_(true," Example:\n"); 158 _printf_(true," load('temperature.mat');\n"); 159 _printf_(true," md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y);\n"); 160 _printf_(true," md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y,253,'Contour.exp');\n"); 161 _printf_(true,"\n"); 162 162 } -
TabularUnified issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp ¶
r3332 r6412 76 76 /*some checks*/ 77 77 if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){ 78 ISSMERROR("vectors x, y and z should have the same length!");78 _error_("vectors x, y and z should have the same length!"); 79 79 } 80 80 if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){ 81 ISSMERROR("vectors x_prime, y_prime and z_prime should have the same length!");81 _error_("vectors x_prime, y_prime and z_prime should have the same length!"); 82 82 } 83 83 /*get number of elements and number of nodes in the data*/ … … 98 98 void InterpFromMeshToMesh3dUsage(void) 99 99 { 100 _printf_( "INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point\n");101 _printf_( "\n");102 _printf_( " This function is a multi-threaded mex file that interpolates a field\n");103 _printf_( " defined on a triangular mesh onto a list of point\n");104 _printf_( "\n");105 _printf_( " Usage:\n");106 _printf_( " data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);\n");107 _printf_( "\n");108 _printf_( " index: index of the mesh where data is defined\n");109 _printf_( " x,y,z: coordinates of the nodes where data is defined\n");110 _printf_( " data: matrix holding the data to be interpolated onto the mesh.\n");111 _printf_( " x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.\n");112 _printf_( " default_value: default value if no data is found (holes).\n");113 _printf_( " data_prime: vector of mesh interpolated data.\n");114 _printf_( "\n");115 _printf_( " Example:\n");116 _printf_( " load('temperature.mat');\n");117 _printf_( " md.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.x,md.y,md.z,253);\n");118 _printf_( "\n");100 _printf_(true,"INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point\n"); 101 _printf_(true,"\n"); 102 _printf_(true," This function is a multi-threaded mex file that interpolates a field\n"); 103 _printf_(true," defined on a triangular mesh onto a list of point\n"); 104 _printf_(true,"\n"); 105 _printf_(true," Usage:\n"); 106 _printf_(true," data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);\n"); 107 _printf_(true,"\n"); 108 _printf_(true," index: index of the mesh where data is defined\n"); 109 _printf_(true," x,y,z: coordinates of the nodes where data is defined\n"); 110 _printf_(true," data: matrix holding the data to be interpolated onto the mesh.\n"); 111 _printf_(true," x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.\n"); 112 _printf_(true," default_value: default value if no data is found (holes).\n"); 113 _printf_(true," data_prime: vector of mesh interpolated data.\n"); 114 _printf_(true,"\n"); 115 _printf_(true," Example:\n"); 116 _printf_(true," load('temperature.mat');\n"); 117 _printf_(true," md.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.x,md.y,md.z,253);\n"); 118 _printf_(true,"\n"); 119 119 } -
TabularUnified issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp ¶
r5689 r6412 23 23 if((nlhs!=NLHS) || (nrhs!=4 && nrhs!=5)){ 24 24 MergesolutionfromftogUsage(); 25 ISSMERROR(" usage. See above");25 _error_(" usage. See above"); 26 26 } 27 27 … … 57 57 void MergesolutionfromftogUsage(void) 58 58 { 59 _printf_( "\n");60 _printf_( " usage: [ug] = %s(uf,ys,nodesets,parameters);\n",__FUNCT__);61 _printf_( "\n");59 _printf_(true,"\n"); 60 _printf_(true," usage: [ug] = %s(uf,ys,nodesets,parameters);\n",__FUNCT__); 61 _printf_(true,"\n"); 62 62 } -
TabularUnified issm/trunk/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp ¶
r5031 r6412 54 54 //index 55 55 FetchData(&double_index,&nel,&dummy,INDEX); 56 if(dummy!=3) ISSMERROR(" element triangulation should be of 3 column width!");56 if(dummy!=3)_error_(" element triangulation should be of 3 column width!"); 57 57 index=(int*)xmalloc(nel*3*sizeof(int)); 58 58 for(i=0;i<nel;i++){ -
TabularUnified issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp ¶
r4773 r6412 65 65 66 66 void ModelProcessorUsage(void) { 67 _printf_( "\n");68 _printf_( " usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses)\n");69 _printf_( " where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n");70 _printf_( "\n");67 _printf_(true,"\n"); 68 _printf_(true," usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses)\n"); 69 _printf_(true," where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n"); 70 _printf_(true,"\n"); 71 71 } -
TabularUnified issm/trunk/src/mex/NodeConnectivity/NodeConnectivity.cpp ¶
r2333 r6412 39 39 40 40 void NodeConnectivityUsage(void) { 41 _printf_( "\n");42 _printf_( " usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);43 _printf_( "\n");41 _printf_(true,"\n"); 42 _printf_(true," usage: connectivity = %s(elements, numnodes);\n",__FUNCT__); 43 _printf_(true,"\n"); 44 44 } -
TabularUnified issm/trunk/src/mex/NodesDof/NodesDof.cpp ¶
r4234 r6412 40 40 void NodesDofUsage(void) 41 41 { 42 _printf_( "\n");43 _printf_( " usage: [nodes] = %s(nodes,parameters);\n",__FUNCT__);44 _printf_( "\n");42 _printf_(true,"\n"); 43 _printf_(true," usage: [nodes] = %s(nodes,parameters);\n",__FUNCT__); 44 _printf_(true,"\n"); 45 45 } -
TabularUnified issm/trunk/src/mex/Orth/Orth.cpp ¶
r4453 r6412 41 41 void OrthUsage(void) 42 42 { 43 _printf_( "\n");44 _printf_( " usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__);45 _printf_( "\n");43 _printf_(true,"\n"); 44 _printf_(true," usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__); 45 _printf_(true,"\n"); 46 46 } -
TabularUnified issm/trunk/src/mex/OutputResults/OutputResults.cpp ¶
r6372 r6412 63 63 void OutputResultsUsage(void) 64 64 { 65 _printf_( "\n");66 _printf_( " usage: [results] = %s(elements,nodes,vertices,loads,materials,parameters,results);\n",__FUNCT__);67 _printf_( "\n");65 _printf_(true,"\n"); 66 _printf_(true," usage: [results] = %s(elements,nodes,vertices,loads,materials,parameters,results);\n",__FUNCT__); 67 _printf_(true,"\n"); 68 68 } -
TabularUnified issm/trunk/src/mex/OutputRifts/OutputRifts.cpp ¶
r4453 r6412 43 43 void OutputRiftsUsage(void) 44 44 { 45 _printf_( "\n");46 _printf_( " usage: [riftproperties] = %s(loads,parameters);\n",__FUNCT__);47 _printf_( "\n");45 _printf_(true,"\n"); 46 _printf_(true," usage: [riftproperties] = %s(loads,parameters);\n",__FUNCT__); 47 _printf_(true,"\n"); 48 48 } -
TabularUnified issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp ¶
r4453 r6412 56 56 void ParameterOutputUsage(void) 57 57 { 58 _printf_( "\n");59 _printf_( " usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__);60 _printf_( "\n");58 _printf_(true,"\n"); 59 _printf_(true," usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__); 60 _printf_(true,"\n"); 61 61 } -
TabularUnified issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp ¶
r4573 r6412 60 60 void PenaltyConstraintsUsage(void) 61 61 { 62 _printf_( "\n");63 _printf_( " usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params);\n",__FUNCT__);64 _printf_( "\n");62 _printf_(true,"\n"); 63 _printf_(true," usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params);\n",__FUNCT__); 64 _printf_(true,"\n"); 65 65 } -
TabularUnified issm/trunk/src/mex/ProcessParams/ProcessParams.cpp ¶
r4187 r6412 31 31 void ProcessParamsUsage(void) 32 32 { 33 _printf_( "\n");34 _printf_( " usage: [parameters] = %s(parameters);\n",__FUNCT__);35 _printf_( "\n");33 _printf_(true,"\n"); 34 _printf_(true," usage: [parameters] = %s(parameters);\n",__FUNCT__); 35 _printf_(true,"\n"); 36 36 } -
TabularUnified issm/trunk/src/mex/Qmu/Qmu.cpp ¶
r4525 r6412 20 20 21 21 #ifndef _HAVE_DAKOTA_ //only works if dakota library has been compiled in. 22 ISSMERROR(" Dakota not available! Cannot carry out qmu analysis!");22 _error_(" Dakota not available! Cannot carry out qmu analysis!"); 23 23 #endif 24 24 … … 48 48 49 49 void QmuUsage(void){ 50 _printf_( "\n");51 _printf_( " usage: %s(femmodel,parameters);\n",__FUNCT__);52 _printf_( "\n");50 _printf_(true,"\n"); 51 _printf_(true," usage: %s(femmodel,parameters);\n",__FUNCT__); 52 _printf_(true,"\n"); 53 53 } -
TabularUnified issm/trunk/src/mex/Reduceload/Reduceload.cpp ¶
r6012 r6412 20 20 if((nlhs!=NLHS) || (nrhs!=4 && nrhs!=5)){ 21 21 ReduceloadUsage(); 22 ISSMERROR(" usage. See above");22 _error_(" usage. See above"); 23 23 } 24 24 … … 52 52 void ReduceloadUsage(void) 53 53 { 54 _printf_( "\n");55 _printf_( " usage: [pf] = %s(pf,Kfs,ys,parameters);\n",__FUNCT__);56 _printf_( " [pf] = %s(pf,Kfs,ys,parameters,ys0_flag);\n",__FUNCT__);57 _printf_( "\n");54 _printf_(true,"\n"); 55 _printf_(true," usage: [pf] = %s(pf,Kfs,ys,parameters);\n",__FUNCT__); 56 _printf_(true," [pf] = %s(pf,Kfs,ys,parameters,ys0_flag);\n",__FUNCT__); 57 _printf_(true,"\n"); 58 58 } -
TabularUnified issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp ¶
r5689 r6412 24 24 if((nlhs!=NLHS) || (nrhs!=5 && nrhs!=6)){ 25 25 ReduceloadfromgtofUsage(); 26 ISSMERROR(" usage. See above");26 _error_(" usage. See above"); 27 27 } 28 28 … … 60 60 void ReduceloadfromgtofUsage(void) 61 61 { 62 _printf_( "\n");63 _printf_( " usage: [pf] = %s(pg,Kfs,ys,nodesets,parameters);\n",__FUNCT__);64 _printf_( "\n");62 _printf_(true,"\n"); 63 _printf_(true," usage: [pf] = %s(pg,Kfs,ys,nodesets,parameters);\n",__FUNCT__); 64 _printf_(true,"\n"); 65 65 } -
TabularUnified issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp ¶
r5689 r6412 47 47 void ReducematrixfromgtofUsage(void) 48 48 { 49 _printf_( "\n");50 _printf_( " usage: [Kff,Kfs] = %s(Kgg,nodesets,parameters);\n",__FUNCT__);51 _printf_( "\n");49 _printf_(true,"\n"); 50 _printf_(true," usage: [Kff,Kfs] = %s(Kgg,nodesets,parameters);\n",__FUNCT__); 51 _printf_(true,"\n"); 52 52 } -
TabularUnified issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp ¶
r5787 r6412 44 44 void ReducevectorgtofUsage(void) 45 45 { 46 _printf_( "\n");47 _printf_( " usage: uf = %s(ug,nodesets,parameters);\n",__FUNCT__);48 _printf_( "\n");46 _printf_(true,"\n"); 47 _printf_(true," usage: uf = %s(ug,nodesets,parameters);\n",__FUNCT__); 48 _printf_(true,"\n"); 49 49 } -
TabularUnified issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp ¶
r5787 r6412 44 44 void ReducevectorgtosUsage(void) 45 45 { 46 _printf_( "\n");47 _printf_( " usage: ys = %s(yg,nodesets,parameters);\n",__FUNCT__);48 _printf_( "\n");46 _printf_(true,"\n"); 47 _printf_(true," usage: ys = %s(yg,nodesets,parameters);\n",__FUNCT__); 48 _printf_(true,"\n"); 49 49 } -
TabularUnified issm/trunk/src/mex/Scotch/Scotch.cpp ¶
r4711 r6412 25 25 26 26 #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in. 27 ISSMERROR(" Scotch not available! Cannot carry out Scotch partitioning!");27 _error_(" Scotch not available! Cannot carry out Scotch partitioning!"); 28 28 #else 29 29 -
TabularUnified issm/trunk/src/mex/Solver/Solver.cpp ¶
r6014 r6412 75 75 void SolverUsage(void) 76 76 { 77 _printf_( "\n");78 _printf_( " usage: [uf] = %s(Kff,pf,uf0,parameters);\n",__FUNCT__);79 _printf_( "\n");77 _printf_(true,"\n"); 78 _printf_(true," usage: [uf] = %s(Kff,pf,uf0,parameters);\n",__FUNCT__); 79 _printf_(true,"\n"); 80 80 } -
TabularUnified issm/trunk/src/mex/SpcNodes/SpcNodes.cpp ¶
r5775 r6412 40 40 void SpcNodesUsage(void) 41 41 { 42 _printf_( "\n");43 _printf_( " usage: [m.node]=%s(m.nodes,m.constraints);\n",__FUNCT__);44 _printf_( "\n");42 _printf_(true,"\n"); 43 _printf_(true," usage: [m.node]=%s(m.nodes,m.constraints);\n",__FUNCT__); 44 _printf_(true,"\n"); 45 45 } -
TabularUnified issm/trunk/src/mex/SurfaceArea/SurfaceArea.cpp ¶
r5413 r6412 55 55 void SurfaceAreaUsage(void) 56 56 { 57 _printf_( "\n");58 _printf_( " usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters);\n",__FUNCT__);59 _printf_( "\n");57 _printf_(true,"\n"); 58 _printf_(true," usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters);\n",__FUNCT__); 59 _printf_(true,"\n"); 60 60 } -
TabularUnified issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp ¶
r5775 r6412 30 30 if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=10)){ 31 31 SystemMatricesUsage(); 32 ISSMERROR(" usage. See above");32 _error_(" usage. See above"); 33 33 } 34 34 … … 85 85 void SystemMatricesUsage(void) 86 86 { 87 _printf_( "\n");88 _printf_( " usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);89 _printf_( " usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters,kflag,pflag,penalty_kflag,penalty_pflag);\n",__FUNCT__);90 _printf_( "\n");87 _printf_(true,"\n"); 88 _printf_(true," usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__); 89 _printf_(true," usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters,kflag,pflag,penalty_kflag,penalty_pflag);\n",__FUNCT__); 90 _printf_(true,"\n"); 91 91 } -
TabularUnified issm/trunk/src/mex/Test/Test.cpp ¶
r3261 r6412 13 13 void TestUsage(void) 14 14 { 15 _printf_( "\n");16 _printf_( " usage: %s(whatever in here);\n",__FUNCT__);17 _printf_( "\n");15 _printf_(true,"\n"); 16 _printf_(true," usage: %s(whatever in here);\n",__FUNCT__); 17 _printf_(true,"\n"); 18 18 } -
TabularUnified issm/trunk/src/mex/TimeAdapt/TimeAdapt.cpp ¶
r6130 r6412 57 57 void TimeAdaptUsage(void) 58 58 { 59 _printf_( "\n");60 _printf_( " usage: dt = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);61 _printf_( "\n");59 _printf_(true,"\n"); 60 _printf_(true," usage: dt = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__); 61 _printf_(true,"\n"); 62 62 } -
TabularUnified issm/trunk/src/mex/TriaSearch/TriaSearch.cpp ¶
r5357 r6412 56 56 void TriaSearchUsage(void) 57 57 { 58 _printf_( "TriaSearch- find triangle holding a point (x0,y0) in a mesh\n");59 _printf_( "\n");60 _printf_( " Usage:\n");61 _printf_( " tria=TriaSearch(index,x,y,x0,y0);\n");62 _printf_( " index,x,y: mesh triangulatrion\n");63 _printf_( " x0,y0: coordinates of the point for which we are trying to find a triangle\n");64 _printf_( " x0,y0 can be an array of points\n");65 _printf_( "\n");58 _printf_(true,"TriaSearch- find triangle holding a point (x0,y0) in a mesh\n"); 59 _printf_(true,"\n"); 60 _printf_(true," Usage:\n"); 61 _printf_(true," tria=TriaSearch(index,x,y,x0,y0);\n"); 62 _printf_(true," index,x,y: mesh triangulatrion\n"); 63 _printf_(true," x0,y0: coordinates of the point for which we are trying to find a triangle\n"); 64 _printf_(true," x0,y0 can be an array of points\n"); 65 _printf_(true,"\n"); 66 66 } -
TabularUnified issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp ¶
r4573 r6412 59 59 void UpdateGeometryUsage(void) 60 60 { 61 _printf_( "\n");62 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);63 _printf_( "\n");61 _printf_(true,"\n"); 62 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__); 63 _printf_(true,"\n"); 64 64 } -
TabularUnified issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp ¶
r4573 r6412 59 59 void UpdateVertexPositionsUsage(void) 60 60 { 61 _printf_( "\n");62 _printf_( " usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);63 _printf_( "\n");61 _printf_(true,"\n"); 62 _printf_(true," usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__); 63 _printf_(true,"\n"); 64 64 } -
TabularUnified issm/trunk/src/mex/VerticesDof/VerticesDof.cpp ¶
r6231 r6412 37 37 void VerticesDofUsage(void) 38 38 { 39 _printf_( "\n");40 _printf_( " usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__);41 _printf_( "\n");39 _printf_(true,"\n"); 40 _printf_(true," usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__); 41 _printf_(true,"\n"); 42 42 }
Note:
See TracChangeset
for help on using the changeset viewer.