Changeset 8224
- Timestamp:
- 05/10/11 09:30:01 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 6 added
- 94 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/DataSet.cpp
r8129 r8224 123 123 * because this is a nasty error: */ 124 124 if (marshalled_dataset!=old_marshalled_dataset){ 125 _error_("final marshalled dataset \"%s\" is different from initial one!",EnumToString (enum_type));125 _error_("final marshalled dataset \"%s\" is different from initial one!",EnumToStringx(enum_type)); 126 126 abort(); 127 127 } … … 355 355 break; 356 356 default: 357 _error_("could not recognize enum type: %i (%s)",enum_type,EnumToString (enum_type));357 _error_("could not recognize enum type: %i (%s)",enum_type,EnumToStringx(enum_type)); 358 358 } 359 359 … … 479 479 /*Carry out a binary search on the sorted_ids: */ 480 480 if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){ 481 _error_("could not find object with id %i in DataSet %s",eid,EnumToString (enum_type));481 _error_("could not find object with id %i in DataSet %s",eid,EnumToStringx(enum_type)); 482 482 } 483 483 -
issm/trunk/src/c/Container/Inputs.cpp
r6412 r8224 63 63 /*we could not find an input with the correct enum type. No defaults values were provided, 64 64 * error out: */ 65 _error_("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,EnumToStringx(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 _error_("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,EnumToStringx(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 _error_("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,EnumToStringx(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 _error_("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,EnumToStringx(enum_type)); 150 150 } 151 151 … … 219 219 220 220 /*some checks: */ 221 if(!constrain_input) _error_(" input %s could not be found!",EnumToString (constrain_enum));221 if(!constrain_input) _error_(" input %s could not be found!",EnumToStringx(constrain_enum)); 222 222 223 223 /*Apply ContrainMin: */ … … 260 260 } 261 261 else{ 262 _error_("Input %s not found",EnumToString (enumtype));262 _error_("Input %s not found",EnumToStringx(enumtype)); 263 263 } 264 264 … … 281 281 } 282 282 else{ 283 _error_("Input %s not found",EnumToString (enumtype));283 _error_("Input %s not found",EnumToStringx(enumtype)); 284 284 } 285 285 … … 302 302 } 303 303 else{ 304 _error_("Input %s not found",EnumToString (enumtype));304 _error_("Input %s not found",EnumToStringx(enumtype)); 305 305 } 306 306 … … 323 323 } 324 324 else{ 325 _error_("Input %s not found",EnumToString (enumtype));325 _error_("Input %s not found",EnumToStringx(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)_error_("could not find input with enum: %s",EnumToString (original_enum));377 if(!original)_error_("could not find input with enum: %s",EnumToStringx(original_enum)); 378 378 copy=(Input*)original->copy(); 379 379 … … 422 422 423 423 /*some checks: */ 424 if(!xinput) _error_(" input %s could not be found!",EnumToString (XEnum));425 if(!yinput) _error_(" input %s could not be found!",EnumToString (YEnum));424 if(!xinput) _error_(" input %s could not be found!",EnumToStringx(XEnum)); 425 if(!yinput) _error_(" input %s could not be found!",EnumToStringx(YEnum)); 426 426 427 427 /*Apply AXPY: */ -
issm/trunk/src/c/Container/Nodes.cpp
r6412 r8224 74 74 75 75 /*some check: */ 76 if ((setenum!=GsetEnum) && (setenum!=FsetEnum) && (setenum!=SsetEnum))_error_("%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 ",EnumToStringx(setenum)," not supported yet!"); 77 77 78 78 /*Go through objects, and distribute dofs locally, from 0 to numberofdofs: */ -
issm/trunk/src/c/Container/Options.cpp
r7760 r8224 266 266 /*Else: not supported*/ 267 267 else{ 268 _error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToString (option->Enum()));268 _error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToStringx(option->Enum())); 269 269 } 270 270 } -
issm/trunk/src/c/Container/Results.cpp
r6389 r8224 129 129 for(i=0;i<maxfields;i++){ 130 130 if (enums[i]>0){ 131 fnames[count]=EnumToString (enums[i]);131 fnames[count]=EnumToStringx(enums[i]); 132 132 count++; 133 133 } -
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r8117 r8224 6 6 #ifndef _ENUM_DEFINITIONS_ 7 7 #define _ENUM_DEFINITIONS_ 8 9 #include "../modules/EnumToStringx/EnumToStringx.h" 10 #include "../modules/StringToEnumx/StringToEnumx.h" 8 11 9 12 enum definitions{ … … 444 447 445 448 /*Functions on enums: */ 446 char *EnumToString(int enum_type);447 int StringToEnum(char *string);448 449 char *EnumToModelField(int en); 449 450 -
issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp
r7076 r8224 23 23 case VyObsEnum : return "vy_obs"; 24 24 case GroundingLineMigrationEnum : return "gl_migration"; 25 default : _error_("No model field is associated to enum %s",EnumToString (en));25 default : _error_("No model field is associated to enum %s",EnumToStringx(en)); 26 26 } 27 27 } -
issm/trunk/src/c/EnumDefinitions/README
r5227 r8224 1 1 2 2 DO NOT MODIFY the following files: 3 - StringToEnum .cpp4 - EnumToString .cpp3 - StringToEnumx.cpp 4 - EnumToStringx.cpp 5 5 - src/m/enum/* 6 6 all these files are automatically synchronized with EnumDefinitions.h and EnumToModelField.cpp -
issm/trunk/src/c/EnumDefinitions/Synchronize.sh
r6412 r8224 1 1 #!/bin/bash 2 #Synchronize EnumToString .cpp and StringToEnum.cpp2 #Synchronize EnumToStringx.cpp and StringToEnumx.cpp and matlab Enums 3 3 4 #Get all lines of EnumDefinitions2.h which hold Enum | remove all comas | add line number in the first column > put everything in file temp 5 cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v include | sed -e "s/,//g" | awk '{ printf "%s %s\n", NR, $0 }' > temp 4 6 5 #first remove existing files 6 rm EnumToString.cpp StringToEnum.cpp 7 #Removed existing files 7 8 rm $ISSM_TIER/src/m/enum/*.m 8 9 echo "Synchronizing Enums..." 9 rm $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp 10 rm $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp 10 11 11 12 #Take care of EnumToModelField.m first (easy) 12 13 #Build EnumToModelField.m {{{1 13 cat <<END > EnumToModelField.m14 cat <<END > $ISSM_TIER/src/m/enum/EnumToModelField.m 14 15 function string=EnumToModelField(enum) 15 16 %ENUMTOMODELFIELD - output string of model field associated to enum … … 35 36 #}}} 36 37 37 #Get all lines of EnumDefinitions2.h which hold Enum | remove all comas | add line number in the first column > put everything in file temp 38 cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v StringToEnum | sed -e "s/,//g" | awk '{ printf "%s %s\n", NR, $0 }' > temp 39 #Build header of EnumToString.cpp {{{1 40 cat <<END > EnumToString.cpp 38 #Build header of EnumToStringx.cpp {{{1 39 cat <<END > $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp 41 40 /* 42 * \file EnumToString .cpp:41 * \file EnumToStringx.cpp: 43 42 * \brief: output string associated with enum 44 43 * … … 48 47 */ 49 48 50 #include "../ shared/shared.h"51 #include "../ include/include.h"52 #include "./Enum Definitions.h"49 #include "../../shared/shared.h" 50 #include "../../include/include.h" 51 #include "./EnumToStringx.h" 53 52 54 char* EnumToString (int en){53 char* EnumToStringx(int en){ 55 54 56 55 switch(en){ … … 58 57 END 59 58 #}}} 60 #Build header of StringToEnum .cpp {{{161 cat <<END > StringToEnum.cpp59 #Build header of StringToEnumx.cpp {{{1 60 cat <<END > $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp 62 61 /* 63 * \file StringToEnum .cpp:62 * \file StringToEnumx.cpp: 64 63 * \brief: output enum associated with string 65 64 * … … 69 68 */ 70 69 71 #include "../ shared/shared.h"72 #include "../ include/include.h"73 #include "./ EnumDefinitions.h"70 #include "../../shared/shared.h" 71 #include "../../include/include.h" 72 #include "./StringToEnumx.h" 74 73 75 int StringToEnum(char* name){ 76 77 END 78 #}}} 79 #Build header of EnumToString.m {{{1 80 cat <<END > EnumToString.m 81 function string=EnumToString(enum) 82 %ENUMASSTRING - output string associated with enum 83 % 84 % WARNING: DO NOT MODIFY THIS FILE 85 % this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh 86 % Please read src/c/EnumDefinitions/README for more information 87 % 88 % Usage: 89 % string=EnumToString(enum) 90 91 switch enum, 92 93 END 94 #}}} 95 #Build header of StringToEnum.m {{{1 96 cat <<END > StringToEnum.m 97 function enum=StringToEnum(name) 98 %STRINGASENUM - output enum associated with string 99 % 100 % WARNING: DO NOT MODIFY THIS FILE 101 % this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh 102 % Please read src/c/EnumDefinitions/README for more information 103 % 104 % Usage: 105 % enum=StringToEnum(name) 74 int StringToEnumx(char* name){ 106 75 107 76 END … … 150 119 % macro=$NAMEENUM() 151 120 152 macro= $ENUM;121 macro=StringToEnum('$NAME'); 153 122 END 154 123 #}}} 155 156 #Add case to EnumToString.cpp {{{ 157 cat <<END >> EnumToString.cpp 124 #Add case to EnumToStringx.cpp {{{ 125 cat <<END >> $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp 158 126 case $NAMEENUM : return "$NAME"; 159 127 END 160 128 #}}} 161 #Add case to StringToEnum .cpp {{{129 #Add case to StringToEnumx.cpp {{{ 162 130 if [ $i -eq 1 ] 163 131 then 164 cat <<END >> StringToEnum.cpp132 cat <<END >> $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp 165 133 if (strcmp(name,"$NAME")==0) return $NAMEENUM; 166 134 END 167 135 else 168 cat <<END >> StringToEnum.cpp136 cat <<END >> $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp 169 137 else if (strcmp(name,"$NAME")==0) return $NAMEENUM; 170 138 END … … 172 140 #}}} 173 141 174 #Add case to EnumToString.m {{{175 cat <<END >> EnumToString.m176 case $NAMEENUM(), string='$NAME'; return177 END178 #}}}179 #Add case to StringToEnum.m {{{180 if [ $i -eq 1 ]181 then182 cat <<END >> StringToEnum.m183 if (strcmpi(name,'$NAME')), enum=$NAMEENUM(); return184 END185 else186 cat <<END >> StringToEnum.m187 elseif (strcmpi(name,'$NAME')), enum=$NAMEENUM(); return188 END189 fi190 #}}}191 192 142 done 193 143 194 #Add footer of of EnumToString .cpp{{{1195 cat <<END >> EnumToString.cpp144 #Add footer of of EnumToStringx.cpp{{{1 145 cat <<END >> $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp 196 146 default : return "unknown"; 197 147 … … 200 150 END 201 151 #}}} 202 #Add footer of of StringToEnum .cpp{{{1203 cat <<END >> StringToEnum.cpp152 #Add footer of of StringToEnumx.cpp{{{1 153 cat <<END >> $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp 204 154 else _error_("Enum %s not found",name); 205 155 … … 207 157 END 208 158 #}}} 209 #Add footer of of EnumToString.m{{{1210 cat <<END >> EnumToString.m211 otherwise, error(['Enum ' num2str(enum) ' not found']);212 159 213 end214 END215 #}}}216 #Add footer of of StringToEnum.m{{{1217 cat <<END >> StringToEnum.m218 else error(['Enum ' name ' not found']);219 220 end221 END222 #}}}223 224 #move files to new location {{{1225 mv StringToEnum.m $ISSM_TIER/src/m/enum/226 mv EnumToString.m $ISSM_TIER/src/m/enum/227 mv EnumToModelField.m $ISSM_TIER/src/m/enum/228 #}}}229 160 #clean up{{{ 230 161 rm temp -
issm/trunk/src/c/Makefile.am
r8206 r8224 398 398 ./io/pfclose.cpp\ 399 399 ./EnumDefinitions/EnumDefinitions.h\ 400 ./EnumDefinitions/EnumToString.cpp\401 ./EnumDefinitions/StringToEnum.cpp\402 400 ./EnumDefinitions/EnumToModelField.cpp\ 403 401 ./modules/AddExternalResultx/AddExternalResultx.h\ … … 612 610 ./modules/ElementConnectivityx/ElementConnectivityx.cpp\ 613 611 ./modules/ElementConnectivityx/ElementConnectivityx.h\ 612 ./modules/EnumToStringx/EnumToStringx.cpp\ 613 ./modules/EnumToStringx/EnumToStringx.h\ 614 ./modules/StringToEnumx/StringToEnumx.cpp\ 615 ./modules/StringToEnumx/StringToEnumx.h\ 614 616 ./modules/MassFluxx/MassFluxx.cpp\ 615 617 ./modules/MassFluxx/MassFluxx.h\ … … 1035 1037 ./io/ParsePetscOptions.cpp\ 1036 1038 ./EnumDefinitions/EnumDefinitions.h\ 1037 ./EnumDefinitions/EnumToString.cpp\1038 ./EnumDefinitions/StringToEnum.cpp\1039 1039 ./EnumDefinitions/EnumToModelField.cpp\ 1040 1040 ./modules/AddExternalResultx/AddExternalResultx.h\ … … 1240 1240 ./modules/Reduceloadx/Reduceloadx.h\ 1241 1241 ./modules/Reduceloadx/Reduceloadx.cpp\ 1242 ./modules/EnumToStringx/EnumToStringx.cpp\ 1243 ./modules/EnumToStringx/EnumToStringx.h\ 1244 ./modules/StringToEnumx/StringToEnumx.cpp\ 1245 ./modules/StringToEnumx/StringToEnumx.h\ 1242 1246 ./modules/MassFluxx/MassFluxx.cpp\ 1243 1247 ./modules/MassFluxx/MassFluxx.h\ -
issm/trunk/src/c/io/FetchParams.cpp
r7740 r8224 53 53 /*Get i'th field: */ 54 54 name=(char*)mxGetFieldNameByNumber(dataref,count); 55 enum_type=StringToEnum (name);55 enum_type=StringToEnumx(name); 56 56 pfield=mxGetFieldByNumber(dataref,0,count); 57 57 _assert_(pfield); -
issm/trunk/src/c/io/ParsePetscOptions.cpp
r6028 r8224 63 63 64 64 if (line[0]=='+'){ /*this is the analysis line: */ 65 analyses[numanalyses]=StringToEnum (&line[1]); //skip the '+'65 analyses[numanalyses]=StringToEnumx(&line[1]); //skip the '+' 66 66 numanalyses++; 67 67 } -
issm/trunk/src/c/modules/CostFunctionx/CostFunctionx.cpp
r5476 r8224 25 25 26 26 /*Get response*/ 27 Responsex(&J,elements,nodes,vertices,loads,materials,parameters,EnumToString (response),false); //False means DO NOT process units27 Responsex(&J,elements,nodes,vertices,loads,materials,parameters,EnumToStringx(response),false); //False means DO NOT process units 28 28 29 29 /*Add Regularization terms: */ -
issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
r6412 r8224 51 51 52 52 /*this response was scaled. pick up the response from the inputs: */ 53 GetVectorFromInputsx(&vertex_response,elements,nodes, vertices, loads, materials, parameters, StringToEnum (root),VertexEnum);53 GetVectorFromInputsx(&vertex_response,elements,nodes, vertices, loads, materials, parameters, StringToEnumx(root),VertexEnum); 54 54 55 55 /*Now, average it onto the partition grids: */ -
issm/trunk/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp
r6412 r8224 26 26 /*Get size of vector: */ 27 27 gsize=nodes->NumberOfDofs(configuration_type,GsetEnum); 28 if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToString (configuration_type));28 if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToStringx(configuration_type)); 29 29 30 30 /*Initialize solution: */ -
issm/trunk/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
r7177 r8224 23 23 } 24 24 } 25 else _error_("%s%s%s"," vector type: ",EnumToString (type)," not supported yet!");25 else _error_("%s%s%s"," vector type: ",EnumToStringx(type)," not supported yet!"); 26 26 27 27 VecAssemblyBegin(vector); -
issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp
r7737 r8224 26 26 else if(migration_style==SoftMigrationEnum) SoftMigration(elements,nodes, vertices,loads,materials, parameters); 27 27 else if(migration_style==NoneEnum) _printf_(true,"%s\n","NoneEnum supplied for migration style, doing nothing!"); 28 else _error_("%s not supported yet!",EnumToString (migration_style));28 else _error_("%s not supported yet!",EnumToStringx(migration_style)); 29 29 30 30 } -
issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r6412 r8224 50 50 51 51 /*Now, pick up the parameter corresponding to root: */ 52 if(!parameters->FindParam(¶meter,NULL,StringToEnum (root))){52 if(!parameters->FindParam(¶meter,NULL,StringToEnumx(root))){ 53 53 _error_("%s%s"," could not find Qmu parameter: ",root); 54 54 } … … 66 66 PetscSynchronizedFlush(MPI_COMM_WORLD); 67 67 } 68 PetscSynchronizedPrintf(MPI_COMM_WORLD," descriptor: %s root %s enum: %i\n",descriptor,root,StringToEnum (root));68 PetscSynchronizedPrintf(MPI_COMM_WORLD," descriptor: %s root %s enum: %i\n",descriptor,root,StringToEnumx(root)); 69 69 PetscSynchronizedFlush(MPI_COMM_WORLD); 70 70 #endif … … 72 72 73 73 /*Update inputs using the parameter vector: */ 74 InputUpdateFromVectorDakotax( elements,nodes, vertices,loads, materials, parameters, parameter, StringToEnum (root), VertexEnum);74 InputUpdateFromVectorDakotax( elements,nodes, vertices,loads, materials, parameters, parameter, StringToEnumx(root), VertexEnum); 75 75 76 76 /*increment i to skip the distributed values just collected: */ … … 89 89 else{ 90 90 /*Ok, standard variable, just update inputs using the variable: */ 91 InputUpdateFromConstantx( elements,nodes, vertices,loads, materials, parameters, variables[i],StringToEnum (descriptor));91 InputUpdateFromConstantx( elements,nodes, vertices,loads, materials, parameters, variables[i],StringToEnumx(descriptor)); 92 92 } 93 93 } -
issm/trunk/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
r8125 r8224 170 170 break; 171 171 default: 172 printf("Interpolation %s not supported yet\n",EnumToString (interpenum));172 printf("Interpolation %s not supported yet\n",EnumToStringx(interpenum)); 173 173 return NULL; /*WARNING: no error because it would blow up the multithreading!*/ 174 174 } -
issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
r8129 r8224 51 51 break; 52 52 default: 53 _error_("Control %s not implemented yet",EnumToString ((int)iomodel->control_type[i]));53 _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->control_type[i])); 54 54 } 55 55 } -
issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp
r7640 r8224 108 108 break; 109 109 default: 110 _error_("%s%s%s"," analysis_type: ",EnumToString (analysis_type)," not supported yet!");110 _error_("%s%s%s"," analysis_type: ",EnumToStringx(analysis_type)," not supported yet!"); 111 111 } 112 112 -
issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r7640 r8224 61 61 doftype[5]=StokesApproximationEnum; 62 62 } 63 else _error_("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,EnumToStringx((int)*vertices_type)); 64 64 } 65 65 else if (analysis_type==DiagnosticVertAnalysisEnum){ … … 90 90 numdofs=1; 91 91 } 92 else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString (analysis_type));92 else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToStringx(analysis_type)); 93 93 94 94 /*Now initialize the index*/ -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r6412 r8224 40 40 analysis_type=analysis_type_list[i]; 41 41 42 _printf_(VerboseMProcessor()," create datasets for analysis %s\n",EnumToString (analysis_type));42 _printf_(VerboseMProcessor()," create datasets for analysis %s\n",EnumToStringx(analysis_type)); 43 43 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,¶meters,iomodel,IOMODEL,solution_type,analysis_type,nummodels,i); 44 44 } -
issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp
r7124 r8224 74 74 parameters->AddObject(new StringParam(QmuErrNameEnum,qmuerrname)); 75 75 /*}}}*/ 76 77 76 /*Deal with variable descriptors: {{{1*/ 78 77 variabledescriptors=(char**)xmalloc(iomodel->numvariabledescriptors*sizeof(char*)); … … 101 100 102 101 /*}}}*/ 103 104 102 /*Deal with response descriptors: {{{1*/ 105 103 responsedescriptors=(char**)xmalloc(iomodel->numresponsedescriptors*sizeof(char*)); … … 125 123 parameters->AddObject(new IntParam(QmuNumberOfResponsesEnum,iomodel->numberofresponses)); 126 124 /*}}}*/ 127 128 125 /*Deal with partitioning: {{{1*/ 129 126 /*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */ … … 142 139 parameters->AddObject(new DoubleVecParam(QmuPartEnum,dpart,iomodel->numberofvertices)); 143 140 /*}}}*/ 144 145 141 /*Deal with data needed because of qmu variables: {{{1*/ 146 142 … … 152 148 153 149 /*Recover data: */ 154 IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,EnumToModelField(StringToEnum (tag)));150 IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,EnumToModelField(StringToEnumx(tag))); 155 151 156 152 /*Convert units: */ 157 UnitConversion(dakota_parameter,iomodel->numberofvertices,ExtToIuEnum,StringToEnum (tag),parameters);153 UnitConversion(dakota_parameter,iomodel->numberofvertices,ExtToIuEnum,StringToEnumx(tag),parameters); 158 154 159 155 /*Add to parameters: */ 160 parameters->AddObject(new DoubleVecParam(StringToEnum (tag),dakota_parameter,iomodel->numberofvertices));156 parameters->AddObject(new DoubleVecParam(StringToEnumx(tag),dakota_parameter,iomodel->numberofvertices)); 161 157 162 158 /*Free ressources:*/ … … 165 161 } 166 162 /*}}}*/ 167 168 163 /*Deal with data needed to compute qmu responses: {{{1*/ 169 164 for(i=0;i<iomodel->numresponsedescriptors;i++){ -
issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp
r6441 r8224 45 45 if(my_rank==0){ 46 46 parameters->FindParam(&solutiontype,SolutionTypeEnum); 47 results->AddObject(new StringExternalResult(results->Size()+1,SolutionTypeEnum,EnumToString (solutiontype),1,0));47 results->AddObject(new StringExternalResult(results->Size()+1,SolutionTypeEnum,EnumToStringx(solutiontype),1,0)); 48 48 } 49 49 -
issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp
r6412 r8224 66 66 67 67 /*Determine solution sequence: */ 68 _printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToString (solution_type)," core:");68 _printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToStringx(solution_type)," core:"); 69 69 SolutionConfiguration(NULL,NULL,&solutioncore,solution_type); 70 70 if(control_analysis)solutioncore=&control_core; -
issm/trunk/src/c/modules/Responsex/Responsex.cpp
r6412 r8224 18 18 void Responsex(double* responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char* response_descriptor,bool process_units){ 19 19 20 switch (StringToEnum (response_descriptor)){20 switch (StringToEnumx(response_descriptor)){ 21 21 22 22 case MinVelEnum: MinVelx( responses, elements,nodes, vertices, loads, materials, parameters,process_units); break; -
issm/trunk/src/c/modules/modules.h
r7666 r8224 26 26 #include "./DakotaResponsesx/DakotaResponsesx.h" 27 27 #include "./ElementConnectivityx/ElementConnectivityx.h" 28 #include "./EnumToStringx/EnumToStringx.h" 29 #include "./StringToEnumx/StringToEnumx.h" 28 30 #include "./GetSolutionFromInputsx/GetSolutionFromInputsx.h" 29 31 #include "./GetVectorFromInputsx/GetVectorFromInputsx.h" -
issm/trunk/src/c/objects/Constraints/Spc.cpp
r5103 r8224 50 50 printf(" dof: %i\n",dof); 51 51 printf(" value: %g\n",value); 52 printf(" analysis_type: %s\n",EnumToString (analysis_type));52 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 53 53 return; 54 54 } … … 62 62 printf(" dof: %i\n",dof); 63 63 printf(" value: %g\n",value); 64 printf(" analysis_type: %s\n",EnumToString (analysis_type));64 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 65 65 return; 66 66 } -
issm/trunk/src/c/objects/DofIndexing.cpp
r6412 r8224 141 141 else this->sdoflist=NULL; 142 142 } 143 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");143 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 144 144 145 145 -
issm/trunk/src/c/objects/ElementResults/BoolElementResult.cpp
r7077 r8224 49 49 50 50 printf("BoolElementResult:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" value: %s\n",this->value?"true":"false"); 53 53 printf(" step: %i\n",this->step); -
issm/trunk/src/c/objects/ElementResults/DoubleElementResult.cpp
r5529 r8224 49 49 50 50 printf("DoubleElementResult:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" value: %g\n",this->value); 53 53 printf(" step: %i\n",this->step); -
issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp
r6412 r8224 51 51 52 52 printf("PentaVertexElementResult:\n"); 53 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));53 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 54 54 printf(" values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]); 55 55 printf(" step: %i\n",this->step); -
issm/trunk/src/c/objects/ElementResults/TriaVertexElementResult.cpp
r5529 r8224 51 51 52 52 printf("TriaVertexElementResult:\n"); 53 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));53 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 54 54 printf(" values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]); 55 55 printf(" step: %i\n",this->step); -
issm/trunk/src/c/objects/Elements/Penta.cpp
r8129 r8224 482 482 input=inputs->GetInput(enum_type); 483 483 } 484 if (!input) _error_("Input %s not found",EnumToString (enum_type));485 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));484 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 485 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 486 486 487 487 this->GetDofList1(&doflist1[0]); … … 500 500 input=inputs->GetInput(enum_type); 501 501 } 502 if (!input) _error_("Input %s not found",EnumToString (enum_type));503 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));502 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 503 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 504 504 505 505 ((ControlInput*)input)->ScaleGradient(scale); … … 519 519 input=inputs->GetInput(enum_type); 520 520 } 521 if (!input) _error_("Input %s not found",EnumToString (enum_type));522 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));521 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 522 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 523 523 524 524 this->GetDofList1(&doflist1[0]); … … 574 574 break; 575 575 default: 576 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));576 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 577 577 } 578 578 … … 1008 1008 return CreateKMatrixDiagnosticPattynStokes(); 1009 1009 default: 1010 _error_("Approximation %s not supported yet",EnumToString (approximation));1010 _error_("Approximation %s not supported yet",EnumToStringx(approximation)); 1011 1011 } 1012 1012 } … … 1190 1190 matice->GetViscosity3dStokes(&newviscosity,&epsilons[0]); 1191 1191 } 1192 else _error_("approximation %i (%s) not supported yet",approximation,EnumToString (approximation));1192 else _error_("approximation %i (%s) not supported yet",approximation,EnumToStringx(approximation)); 1193 1193 1194 1194 D_scalar=2*newviscosity*gauss->weight*Jdet; … … 1921 1921 break; 1922 1922 default: 1923 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));1923 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 1924 1924 } 1925 1925 … … 1947 1947 return CreatePVectorAdjointStokes(); 1948 1948 default: 1949 _error_("Approximation %s not supported yet",EnumToString (approximation));1949 _error_("Approximation %s not supported yet",EnumToStringx(approximation)); 1950 1950 } 1951 1951 } … … 2337 2337 return CreatePVectorDiagnosticPattynStokes(); 2338 2338 default: 2339 _error_("Approximation %s not supported yet",EnumToString (approximation));2339 _error_("Approximation %s not supported yet",EnumToStringx(approximation)); 2340 2340 } 2341 2341 } … … 3025 3025 GradjB(gradient); 3026 3026 } 3027 else _error_("control type %s not supported yet: ",EnumToString (control_type));3027 else _error_("control type %s not supported yet: ",EnumToStringx(control_type)); 3028 3028 } 3029 3029 /*}}}*/ … … 3103 3103 return; 3104 3104 } 3105 else _error_("approximation %s not supported yet",EnumToString (approximation));3105 else _error_("approximation %s not supported yet",EnumToStringx(approximation)); 3106 3106 } 3107 3107 /*}}}*/ … … 3205 3205 /*Recover input*/ 3206 3206 Input* input=inputs->GetInput(enumtype); 3207 if (!input) _error_("Input %s not found in element",EnumToString (enumtype));3207 if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype)); 3208 3208 3209 3209 /*Checks in debugging mode*/ … … 3254 3254 3255 3255 Input* input=inputs->GetInput(enumtype); 3256 if(!input) _error_("No input of type %s found in tria",EnumToString (enumtype));3256 if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype)); 3257 3257 3258 3258 GaussPenta* gauss=new GaussPenta(); … … 3341 3341 } 3342 3342 else{ 3343 _error_("analysis: %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));3343 _error_("analysis: %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 3344 3344 } 3345 3345 } … … 3665 3665 /*Make a copy of the original input: */ 3666 3666 input=(Input*)this->inputs->GetInput(enum_type); 3667 if(!input)_error_(" could not find old input with enum: %s",EnumToString (enum_type));3667 if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type)); 3668 3668 3669 3669 /*ArtificialNoise: */ … … 3685 3685 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 3686 3686 old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]); 3687 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString (enums[2*i+0]));3688 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString (enums[2*i+0]));3687 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0])); 3688 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0])); 3689 3689 } 3690 3690 … … 3725 3725 } 3726 3726 3727 if (input->Enum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToString (control_type[i]));3727 if (input->Enum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToStringx(control_type[i])); 3728 3728 3729 3729 ((ControlInput*)input)->UpdateValue(scalar); … … 3774 3774 original_input=(Input*)penta->matice->inputs->GetInput(enum_type); 3775 3775 else 3776 _error_("object %s not supported yet",EnumToString (object_enum));3777 if(!original_input) _error_("could not find input with enum %s",EnumToString (enum_type));3776 _error_("object %s not supported yet",EnumToStringx(object_enum)); 3777 if(!original_input) _error_("could not find input with enum %s",EnumToStringx(enum_type)); 3778 3778 3779 3779 /*If first time, initialize total_integrated_input*/ … … 3786 3786 total_integrated_input=new DoubleInput(average_enum_type,0.0); 3787 3787 else 3788 _error_("object %s not supported yet",EnumToString (original_input->Enum()));3788 _error_("object %s not supported yet",EnumToStringx(original_input->Enum())); 3789 3789 } 3790 3790 … … 3834 3834 this->matice->inputs->AddInput((Input*)depth_averaged_input); 3835 3835 else 3836 _error_("object %s not supported yet",EnumToString (object_enum));3836 _error_("object %s not supported yet",EnumToStringx(object_enum)); 3837 3837 } 3838 3838 /*}}}*/ … … 3864 3864 original_input=(Input*)matice->inputs->GetInput(enum_type); 3865 3865 else 3866 _error_("object of type %s not supported yet",EnumToString (object_type));3867 if(!original_input) _error_("%s%s"," could not find input with enum:",EnumToString (enum_type));3866 _error_("object of type %s not supported yet",EnumToStringx(object_type)); 3867 if(!original_input) _error_("%s%s"," could not find input with enum:",EnumToStringx(enum_type)); 3868 3868 original_input->Extrude(); 3869 3869 … … 3887 3887 penta->matice->inputs->AddInput((Input*)copy); 3888 3888 else 3889 _error_("object of type %s not supported yet",EnumToString (object_type));3889 _error_("object of type %s not supported yet",EnumToStringx(object_type)); 3890 3890 3891 3891 /*Stop if we have reached the surface*/ … … 3904 3904 /*Make a copy of the original input: */ 3905 3905 input=(Input*)this->inputs->GetInput(enum_type); 3906 if(!input)_error_(" could not find old input with enum: %s",EnumToString (enum_type));3906 if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type)); 3907 3907 3908 3908 /*Scale: */ … … 3920 3920 if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(RheologyBEnum); 3921 3921 else input=this->inputs->GetInput(enum_type); 3922 if (!input) _error_("Input %s not found in penta->inputs",EnumToString (enum_type));3922 if (!input) _error_("Input %s not found in penta->inputs",EnumToStringx(enum_type)); 3923 3923 3924 3924 /*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result … … 4102 4102 /*Matice will take care of it*/ break; 4103 4103 default: 4104 _error_("Control %s not implemented yet",EnumToString ((int)iomodel->control_type[i]));4104 _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->control_type[i])); 4105 4105 } 4106 4106 } … … 4134 4134 } 4135 4135 else{ 4136 _error_("Approximation type %s not supported yet",EnumToString ((int)*(iomodel->elements_type+index)));4136 _error_("Approximation type %s not supported yet",EnumToStringx((int)*(iomodel->elements_type+index))); 4137 4137 } 4138 4138 } … … 4196 4196 } 4197 4197 else{ 4198 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));4198 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 4199 4199 } 4200 4200 } … … 4287 4287 Input* vz_input=inputs->GetInput(VzEnum); 4288 4288 if (vz_input){ 4289 if (vz_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vz is of type %s",EnumToString (vz_input->Enum()));4289 if (vz_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vz is of type %s",EnumToStringx(vz_input->Enum())); 4290 4290 vz_input->GetValuesPtr(&vz_ptr,&dummy); 4291 4291 for(i=0;i<NUMVERTICES;i++) vz[i]=vz_ptr[i]; … … 4378 4378 if (vz_input){ 4379 4379 if (vz_input->Enum()!=PentaVertexInputEnum){ 4380 _error_("Cannot compute Vel as Vz is of type %s",EnumToString (vz_input->Enum()));4380 _error_("Cannot compute Vel as Vz is of type %s",EnumToStringx(vz_input->Enum())); 4381 4381 } 4382 4382 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4477 4477 if (vzmacayeal_input){ 4478 4478 if (vzmacayeal_input->Enum()!=PentaVertexInputEnum){ 4479 _error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToString (vzmacayeal_input->Enum()));4479 _error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToStringx(vzmacayeal_input->Enum())); 4480 4480 } 4481 4481 vzmacayeal_input->GetValuesPtr(&vzmacayeal_ptr,&dummy); … … 4553 4553 if (vz_input){ 4554 4554 if (vz_input->Enum()!=PentaVertexInputEnum){ 4555 _error_("Cannot compute Vel as Vz is of type %s",EnumToString (vz_input->Enum()));4555 _error_("Cannot compute Vel as Vz is of type %s",EnumToStringx(vz_input->Enum())); 4556 4556 } 4557 4557 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4645 4645 if (vzpattyn_input){ 4646 4646 if (vzpattyn_input->Enum()!=PentaVertexInputEnum){ 4647 _error_("Cannot compute Vel as VzPattyn is of type %s",EnumToString (vzpattyn_input->Enum()));4647 _error_("Cannot compute Vel as VzPattyn is of type %s",EnumToStringx(vzpattyn_input->Enum())); 4648 4648 } 4649 4649 vzpattyn_input->GetValuesPtr(&vzpattyn_ptr,&dummy); … … 4721 4721 if (vz_input){ 4722 4722 if (vz_input->Enum()!=PentaVertexInputEnum){ 4723 _error_("Cannot compute Vel as Vz is of type %s",EnumToString (vz_input->Enum()));4723 _error_("Cannot compute Vel as Vz is of type %s",EnumToStringx(vz_input->Enum())); 4724 4724 } 4725 4725 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4803 4803 Input* vx_input=inputs->GetInput(VxEnum); 4804 4804 if (vx_input){ 4805 if (vx_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vx is of type %s",EnumToString (vx_input->Enum()));4805 if (vx_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vx is of type %s",EnumToStringx(vx_input->Enum())); 4806 4806 vx_input->GetValuesPtr(&vx_ptr,&dummy); 4807 4807 for(i=0;i<NUMVERTICES;i++) vx[i]=vx_ptr[i]; … … 4811 4811 Input* vy_input=inputs->GetInput(VyEnum); 4812 4812 if (vy_input){ 4813 if (vy_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vy is of type %s",EnumToString (vy_input->Enum()));4813 if (vy_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vy is of type %s",EnumToStringx(vy_input->Enum())); 4814 4814 vy_input->GetValuesPtr(&vy_ptr,&dummy); 4815 4815 for(i=0;i<NUMVERTICES;i++) vy[i]=vy_ptr[i]; … … 4821 4821 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 4822 4822 if (vzstokes_input){ 4823 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString (vy_input->Enum()));4823 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vy_input->Enum())); 4824 4824 vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy); 4825 4825 for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i]; … … 4834 4834 Input* vzstokes_input=inputs->GetInput(VzStokesEnum); 4835 4835 if (vzstokes_input){ 4836 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString (vy_input->Enum()));4836 if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vy_input->Enum())); 4837 4837 vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy); 4838 4838 for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i]; … … 5077 5077 bed[i]=bed_ptr[i]-rho_ice/rho_water*(values[i]-thickness_ptr[i]); //bed = oldbed + di * dH 5078 5078 } 5079 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToString (hydroadjustment));5079 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment)); 5080 5080 } 5081 5081 } … … 5155 5155 break; 5156 5156 default: 5157 _error_("Rheology law %s not supported yet",EnumToString (rheology_law));5157 _error_("Rheology law %s not supported yet",EnumToStringx(rheology_law)); 5158 5158 5159 5159 } … … 5257 5257 default: 5258 5258 5259 _error_("type %i (%s) not implemented yet",type,EnumToString (type));5259 _error_("type %i (%s) not implemented yet",type,EnumToStringx(type)); 5260 5260 } 5261 5261 } -
issm/trunk/src/c/objects/Elements/Tria.cpp
r8129 r8224 418 418 break; 419 419 default: 420 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));420 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 421 421 } 422 422 … … 442 442 break; 443 443 default: 444 _error_("Element type %s not supported yet",EnumToString (GetElementType()));444 _error_("Element type %s not supported yet",EnumToStringx(GetElementType())); 445 445 } 446 446 … … 459 459 return CreateKMatrixBalancedthickness_DG(); 460 460 default: 461 _error_("Element type %s not supported yet",EnumToString (GetElementType()));461 _error_("Element type %s not supported yet",EnumToStringx(GetElementType())); 462 462 } 463 463 … … 1275 1275 return CreateKMatrixPrognostic_DG(); 1276 1276 default: 1277 _error_("Element type %s not supported yet",EnumToString (GetElementType()));1277 _error_("Element type %s not supported yet",EnumToStringx(GetElementType())); 1278 1278 } 1279 1279 … … 1628 1628 break; 1629 1629 default: 1630 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));1630 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 1631 1631 } 1632 1632 … … 1648 1648 return CreatePVectorBalancedthickness_DG(); 1649 1649 default: 1650 _error_("Element type %s not supported yet",EnumToString (GetElementType()));1650 _error_("Element type %s not supported yet",EnumToStringx(GetElementType())); 1651 1651 } 1652 1652 } … … 2105 2105 else{ 2106 2106 /*Not supported yet! : */ 2107 _error_("response %s not supported yet",EnumToString (response));2107 _error_("response %s not supported yet",EnumToStringx(response)); 2108 2108 } 2109 2109 … … 2285 2285 else{ 2286 2286 /*Not supported yet! : */ 2287 _error_("response %s not supported yet",EnumToString (response));2287 _error_("response %s not supported yet",EnumToStringx(response)); 2288 2288 } 2289 2289 … … 2376 2376 return CreatePVectorPrognostic_DG(); 2377 2377 default: 2378 _error_("Element type %s not supported yet",EnumToString (GetElementType()));2378 _error_("Element type %s not supported yet",EnumToStringx(GetElementType())); 2379 2379 } 2380 2380 } … … 2740 2740 input=inputs->GetInput(enum_type); 2741 2741 } 2742 if (!input) _error_("Input %s not found",EnumToString (enum_type));2743 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));2742 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 2743 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 2744 2744 2745 2745 this->GetDofList1(&doflist1[0]); … … 2758 2758 input=inputs->GetInput(enum_type); 2759 2759 } 2760 if (!input) _error_("Input %s not found",EnumToString (enum_type));2761 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));2760 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 2761 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 2762 2762 2763 2763 ((ControlInput*)input)->ScaleGradient(scale); … … 2777 2777 input=inputs->GetInput(enum_type); 2778 2778 } 2779 if (!input) _error_("Input %s not found",EnumToString (enum_type));2780 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString (enum_type));2779 if (!input) _error_("Input %s not found",EnumToStringx(enum_type)); 2780 if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type)); 2781 2781 2782 2782 this->GetDofList1(&doflist1[0]); … … 2953 2953 /*Recover input*/ 2954 2954 Input* input=inputs->GetInput(enumtype); 2955 if (!input) _error_("Input %s not found in element",EnumToString (enumtype));2955 if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype)); 2956 2956 2957 2957 /*Checks in debugging mode*/ … … 2999 2999 3000 3000 Input* input=inputs->GetInput(enumtype); 3001 if(!input) _error_("No input of type %s found in tria",EnumToString (enumtype));3001 if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype)); 3002 3002 3003 3003 GaussTria* gauss=new GaussTria(); … … 3031 3031 GetSolutionFromInputsHydrology(solution); 3032 3032 else 3033 _error_("analysis: %s not supported yet",EnumToString (analysis_type));3033 _error_("analysis: %s not supported yet",EnumToStringx(analysis_type)); 3034 3034 3035 3035 } … … 3649 3649 /*Make a copy of the original input: */ 3650 3650 input=(Input*)this->inputs->GetInput(enum_type); 3651 if(!input)_error_(" could not find old input with enum: %s",EnumToString (enum_type));3651 if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type)); 3652 3652 3653 3653 /*ArtificialNoise: */ … … 3677 3677 3678 3678 if (input->Enum()!=ControlInputEnum){ 3679 _error_("input %s is not a ControlInput",EnumToString (control_type[i]));3679 _error_("input %s is not a ControlInput",EnumToStringx(control_type[i])); 3680 3680 } 3681 3681 … … 3704 3704 new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]); 3705 3705 old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]); 3706 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString (enums[2*i+0]));3707 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString (enums[2*i+0]));3706 if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0])); 3707 if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0])); 3708 3708 } 3709 3709 … … 3733 3733 oldinput=(Input*)this->matice->inputs->GetInput(enum_type); 3734 3734 else 3735 _error_("object %s not supported yet",EnumToString (object_enum));3736 if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToString (enum_type));3735 _error_("object %s not supported yet",EnumToStringx(object_enum)); 3736 if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToStringx(enum_type)); 3737 3737 newinput=(Input*)oldinput->copy(); 3738 3738 … … 3746 3746 this->matice->inputs->AddInput((Input*)newinput); 3747 3747 else 3748 _error_("object %s not supported yet",EnumToString (object_enum));3748 _error_("object %s not supported yet",EnumToStringx(object_enum)); 3749 3749 } 3750 3750 /*}}}*/ … … 3764 3764 /*Make a copy of the original input: */ 3765 3765 input=(Input*)this->inputs->GetInput(enum_type); 3766 if(!input)_error_(" could not find old input with enum: %s",EnumToString (enum_type));3766 if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type)); 3767 3767 3768 3768 /*Scale: */ … … 3779 3779 if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type); 3780 3780 else input=this->inputs->GetInput(enum_type); 3781 if (!input) _error_("Input %s not found in tria->inputs",EnumToString (enum_type));3781 if (!input) _error_("Input %s not found in tria->inputs",EnumToStringx(enum_type)); 3782 3782 3783 3783 /*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result … … 3980 3980 /*Matice will take care of it*/ break; 3981 3981 default: 3982 _error_("Control %s not implemented yet",EnumToString ((int)iomodel->control_type[i]));3982 _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->control_type[i])); 3983 3983 } 3984 3984 } … … 4032 4032 break; 4033 4033 default: 4034 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));4034 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 4035 4035 } 4036 4036 } … … 4200 4200 if (vz_input){ 4201 4201 if (vz_input->Enum()!=TriaVertexInputEnum){ 4202 _error_("Cannot compute Vel as Vz is of type %s",EnumToString (vz_input->Enum()));4202 _error_("Cannot compute Vel as Vz is of type %s",EnumToStringx(vz_input->Enum())); 4203 4203 } 4204 4204 vz_input->GetValuesPtr(&vz_ptr,&dummy); … … 4317 4317 bed[i]=bed_ptr[i]-rho_ice/rho_water*(values[i]-thickness_ptr[i]); //bed = oldbed + di * dH 4318 4318 } 4319 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToString (hydroadjustment));4319 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment)); 4320 4320 } 4321 4321 } … … 4389 4389 4390 4390 default: 4391 _error_("type %i (%s) not implemented yet",type,EnumToString (type));4391 _error_("type %i (%s) not implemented yet",type,EnumToStringx(type)); 4392 4392 } 4393 4393 } … … 4500 4500 4501 4501 default: 4502 _error_("type %i (%s) not implemented yet",type,EnumToString (type));4502 _error_("type %i (%s) not implemented yet",type,EnumToStringx(type)); 4503 4503 } 4504 4504 … … 5046 5046 } 5047 5047 else{ 5048 _error_("unsupported control type: %s",EnumToString (control_type[i]));5048 _error_("unsupported control type: %s",EnumToStringx(control_type[i])); 5049 5049 } 5050 5050 } -
issm/trunk/src/c/objects/ExternalResults/BoolExternalResult.cpp
r6389 r8224 53 53 printf("BoolExternalResult:\n"); 54 54 printf(" id: %i\n",this->id); 55 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));55 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 56 56 printf(" value: %s\n",this->value?"true":"false"); 57 57 printf(" step: %i\n",this->step); … … 156 156 157 157 /*First write enum: */ 158 name=EnumToString (this->enum_type);158 name=EnumToStringx(this->enum_type); 159 159 length=(strlen(name)+1)*sizeof(char); 160 160 fwrite(&length,sizeof(int),1,fid); … … 179 179 /*FUNCTION BoolExternalResult::GetResultName{{{1*/ 180 180 char* BoolExternalResult::GetResultName(void){ 181 return EnumToString (this->enum_type);181 return EnumToStringx(this->enum_type); 182 182 } 183 183 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/DoubleExternalResult.cpp
r6389 r8224 53 53 printf("DoubleExternalResult:\n"); 54 54 printf(" id: %i\n",this->id); 55 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));55 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 56 56 printf(" value: %g\n",this->value); 57 57 printf(" step: %i\n",this->step); … … 155 155 156 156 /*First write enum: */ 157 name=EnumToString (this->enum_type);157 name=EnumToStringx(this->enum_type); 158 158 length=(strlen(name)+1)*sizeof(char); 159 159 fwrite(&length,sizeof(int),1,fid); … … 175 175 /*FUNCTION DoubleExternalResult::GetResultName{{{1*/ 176 176 char* DoubleExternalResult::GetResultName(void){ 177 return EnumToString (this->enum_type);177 return EnumToStringx(this->enum_type); 178 178 } 179 179 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
r6389 r8224 58 58 59 59 printf("DoubleMatExternalResult:\n"); 60 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));60 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 61 61 printf(" step: %i\n",this->step); 62 62 printf(" time: %g\n",this->time); … … 72 72 printf("DoubleMatExternalResult:\n"); 73 73 printf(" id: %i\n",this->id); 74 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));74 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 75 75 printf(" step: %i\n",this->step); 76 76 printf(" time: %g\n",this->time); … … 194 194 195 195 /*First write enum: */ 196 name=EnumToString (this->enum_type);196 name=EnumToStringx(this->enum_type); 197 197 length=(strlen(name)+1)*sizeof(char); 198 198 fwrite(&length,sizeof(int),1,fid); … … 216 216 /*FUNCTION DoubleMatExternalResult::GetResultName{{{1*/ 217 217 char* DoubleMatExternalResult::GetResultName(void){ 218 return EnumToString (this->enum_type);218 return EnumToStringx(this->enum_type); 219 219 } 220 220 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
r6389 r8224 55 55 56 56 printf("DoubleVecExternalResult:\n"); 57 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));57 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 58 58 printf(" vector size: %i\n",this->M); 59 59 printf(" step: %i\n",this->step); … … 69 69 printf("DoubleVecExternalResult:\n"); 70 70 printf(" id: %i\n",this->id); 71 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));71 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 72 72 printf(" vector size: %i\n",this->M); 73 73 for(i=0;i<this->M;i++){ … … 180 180 181 181 /*First write enum: */ 182 name=EnumToString (this->enum_type);182 name=EnumToStringx(this->enum_type); 183 183 length=(strlen(name)+1)*sizeof(char); 184 184 fwrite(&length,sizeof(int),1,fid); … … 200 200 /*FUNCTION DoubleVecExternalResult::GetResultName{{{1*/ 201 201 char* DoubleVecExternalResult::GetResultName(void){ 202 return EnumToString (this->enum_type);202 return EnumToStringx(this->enum_type); 203 203 } 204 204 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/IntExternalResult.cpp
r6389 r8224 53 53 printf("IntExternalResult:\n"); 54 54 printf(" id: %i\n",this->id); 55 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));55 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 56 56 printf(" value: %i\n",this->value); 57 57 printf(" step: %i\n",this->step); … … 156 156 157 157 /*First write enum: */ 158 name=EnumToString (this->enum_type);158 name=EnumToStringx(this->enum_type); 159 159 length=(strlen(name)+1)*sizeof(char); 160 160 fwrite(&length,sizeof(int),1,fid); … … 179 179 /*FUNCTION IntExternalResult::GetResultName{{{1*/ 180 180 char* IntExternalResult::GetResultName(void){ 181 return EnumToString (this->enum_type);181 return EnumToStringx(this->enum_type); 182 182 } 183 183 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
r6389 r8224 55 55 56 56 printf("PetscVecExternalResult:\n"); 57 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));57 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 58 58 59 59 } … … 65 65 printf("PetscVecExternalResult:\n"); 66 66 printf(" id: %i\n",this->id); 67 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));67 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 68 68 printf(" step: %i\n",this->step); 69 69 printf(" time: %g\n",this->time); … … 215 215 216 216 /*First write enum: */ 217 name=EnumToString (this->enum_type);217 name=EnumToStringx(this->enum_type); 218 218 length=(strlen(name)+1)*sizeof(char); 219 219 fwrite(&length,sizeof(int),1,fid); … … 237 237 /*FUNCTION PetscVecExternalResult::GetResultName{{{1*/ 238 238 char* PetscVecExternalResult::GetResultName(void){ 239 return EnumToString (this->enum_type);239 return EnumToStringx(this->enum_type); 240 240 } 241 241 /*}}}*/ -
issm/trunk/src/c/objects/ExternalResults/StringExternalResult.cpp
r6389 r8224 55 55 printf("StringExternalResult:\n"); 56 56 printf(" id: %i\n",this->id); 57 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));57 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 58 58 printf(" value: %s\n",this->value); 59 59 printf(" step: %i\n",this->step); … … 169 169 170 170 /*First write enum: */ 171 name=EnumToString (this->enum_type);171 name=EnumToStringx(this->enum_type); 172 172 length=(strlen(name)+1)*sizeof(char); 173 173 fwrite(&length,sizeof(int),1,fid); … … 190 190 /*FUNCTION StringExternalResult::GetResultName{{{1*/ 191 191 char* StringExternalResult::GetResultName(void){ 192 return EnumToString (this->enum_type);192 return EnumToStringx(this->enum_type); 193 193 } 194 194 /*}}}*/ -
issm/trunk/src/c/objects/FemModel.cpp
r6412 r8224 53 53 for(i=0;i<nummodels;i++){ 54 54 55 _printf_(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",EnumToStringx(analysis_type_list[i])); 56 56 analysis_type=analysis_type_list[i]; 57 57 this->SetCurrentConfiguration(analysis_type); … … 127 127 printf(" number of fem models: %i\n",nummodels); 128 128 printf(" analysis_type_list: \n"); 129 for(int i=0;i<nummodels;i++)printf(" %i: %s\n",i,EnumToString (analysis_type_list[i]));129 for(int i=0;i<nummodels;i++)printf(" %i: %s\n",i,EnumToStringx(analysis_type_list[i])); 130 130 printf(" current analysis_type: \n"); 131 printf(" %i: %s\n",analysis_counter,EnumToString (analysis_type_list[analysis_counter]));131 printf(" %i: %s\n",analysis_counter,EnumToStringx(analysis_type_list[analysis_counter])); 132 132 133 133 … … 152 152 } 153 153 if(found!=-1) analysis_counter=found; 154 else _error_("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",EnumToStringx(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 _printf_(VerboseSolver()," petsc Options set for analysis type: %s\n",EnumToString (analysis_type));172 _printf_(VerboseSolver()," petsc Options set for analysis type: %s\n",EnumToStringx(analysis_type)); 173 173 174 174 } -
issm/trunk/src/c/objects/Inputs/BoolInput.cpp
r7089 r8224 46 46 47 47 printf("BoolInput:\n"); 48 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));48 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 49 49 printf(" value: %s\n",value?"true":"false"); 50 50 } -
issm/trunk/src/c/objects/Inputs/ControlInput.cpp
r8129 r8224 48 48 break; 49 49 default: 50 _error_("Input of Enum %s not supported yet by ControlInput",EnumToString (enum_input));50 _error_("Input of Enum %s not supported yet by ControlInput",EnumToStringx(enum_input)); 51 51 } 52 52 gradient =NULL; … … 73 73 74 74 printf("ControlInput:\n"); 75 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));75 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 76 76 printf("---values: \n"); if (values) values->Echo(); 77 77 printf("---savedvalues: \n");if (savedvalues) savedvalues->Echo(); … … 358 358 /*FUNCTION ControlInput::ScaleGradient{{{1*/ 359 359 void ControlInput::ScaleGradient(double scaling_factor){ 360 if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToString (enum_type));360 if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToStringx(enum_type)); 361 361 gradient->Scale(scaling_factor); 362 362 }/*}}}*/ … … 430 430 /*FUNCTION ControlInput::SaveValue{{{1*/ 431 431 void ControlInput::SaveValue(void){ 432 if(!values) _error_("Values of %s not found",EnumToString (this->enum_type));432 if(!values) _error_("Values of %s not found",EnumToStringx(this->enum_type)); 433 433 434 434 if(savedvalues) delete this->savedvalues; … … 437 437 /*FUNCTION ControlInput::UpdateValue{{{1*/ 438 438 void ControlInput::UpdateValue(double scalar){ 439 if(!gradient) _error_("Gradient of %s not found",EnumToString (this->enum_type));440 if(!savedvalues) _error_("Values of %s not found",EnumToString (this->enum_type));439 if(!gradient) _error_("Gradient of %s not found",EnumToStringx(this->enum_type)); 440 if(!savedvalues) _error_("Values of %s not found",EnumToStringx(this->enum_type)); 441 441 442 442 if(values) delete this->values; -
issm/trunk/src/c/objects/Inputs/DoubleInput.cpp
r8129 r8224 46 46 47 47 printf("DoubleInput:\n"); 48 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));48 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 49 49 printf(" value: %g\n",this->value); 50 50 } … … 160 160 *pvalue=(bool)value; 161 161 #else 162 _error_("Double input of enum %s cannot return a boolean",EnumToString (enum_type));162 _error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type)); 163 163 #endif 164 164 … … 170 170 *pvalue=(int)value; 171 171 #else 172 _error_("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,EnumToStringx(enum_type)); 173 173 #endif 174 174 … … 291 291 292 292 /*Check that input provided is a thickness*/ 293 if (thickness_input->EnumType()!=ThicknessEnum) _error_("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)",EnumToStringx(thickness_input->EnumType())); 294 294 295 295 /*vertically integrate depending on type:*/ -
issm/trunk/src/c/objects/Inputs/IntInput.cpp
r6412 r8224 41 41 42 42 printf("IntInput:\n"); 43 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));43 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 44 44 printf(" value: %i\n",(int)this->value); 45 45 } -
issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp
r8129 r8224 57 57 58 58 printf("PentaVertexInput:\n"); 59 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));59 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 60 60 printf(" values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]); 61 61 } … … 545 545 546 546 /*Check that input provided is a thickness*/ 547 if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToString (thickness_input->EnumType()));547 if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->EnumType())); 548 548 549 549 /*Get Thickness value pointer*/ … … 579 579 580 580 /*Check that inputB is of the same type*/ 581 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString (inputB->Enum()));581 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->Enum())); 582 582 xinputB=(PentaVertexInput*)inputB; 583 583 … … 610 610 611 611 /*Check that inputB is of the same type*/ 612 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString (inputB->Enum()));612 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->Enum())); 613 613 xinputB=(PentaVertexInput*)inputB; 614 614 … … 641 641 642 642 /*Check that inputB is of the same type*/ 643 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString (inputB->Enum()));643 if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->Enum())); 644 644 xinputB=(PentaVertexInput*)inputB; 645 645 -
issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
r8129 r8224 57 57 58 58 printf("TriaVertexInput:\n"); 59 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));59 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 60 60 printf(" values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]); 61 61 } … … 417 417 418 418 /*Check that inputB is of the same type*/ 419 if (inputB->Enum()!=TriaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString (inputB->Enum()));419 if (inputB->Enum()!=TriaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->Enum())); 420 420 xinputB=(TriaVertexInput*)inputB; 421 421 … … 448 448 449 449 /*Check that inputB is of the same type*/ 450 if (inputB->Enum()!=TriaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString (inputB->Enum()));450 if (inputB->Enum()!=TriaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->Enum())); 451 451 xinputB=(TriaVertexInput*)inputB; 452 452 -
issm/trunk/src/c/objects/Loads/Friction.cpp
r7922 r8224 49 49 void Friction::Echo(void){ 50 50 printf("Friction:\n"); 51 printf(" analysis_type: %s\n",EnumToString (analysis_type));51 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 52 52 printf(" element_type: %s\n",this->element_type); 53 53 inputs->Echo(); … … 251 251 252 252 Input* input=inputs->GetInput(enum_type); 253 if(!input) _error_("input %s not found",EnumToString (enum_type));253 if(!input) _error_("input %s not found",EnumToStringx(enum_type)); 254 254 input->GetParameterValue(pvalue,gauss); 255 255 … … 260 260 261 261 Input* input=inputs->GetInput(enum_type); 262 if(!input) _error_("input %s not found",EnumToString (enum_type));262 if(!input) _error_("input %s not found",EnumToStringx(enum_type)); 263 263 input->GetParameterValue(pvalue,gauss); 264 264 -
issm/trunk/src/c/objects/Loads/Icefront.cpp
r7306 r8224 74 74 icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3); 75 75 } 76 else _error_("in_icefront_type %s not supported yet!",EnumToString (in_icefront_type));76 else _error_("in_icefront_type %s not supported yet!",EnumToStringx(in_icefront_type)); 77 77 78 78 if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum) num_nodes=4; … … 118 118 printf("Icefront:\n"); 119 119 printf(" id: %i\n",id); 120 printf(" analysis_type: %s\n",EnumToString (analysis_type));120 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 121 121 hnodes->Echo(); 122 122 helement->Echo(); … … 133 133 printf("Icefront:\n"); 134 134 printf(" id: %i\n",id); 135 printf(" analysis_type: %s\n",EnumToString (analysis_type));135 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 136 136 hnodes->DeepEcho(); 137 137 helement->DeepEcho(); … … 334 334 break; 335 335 default: 336 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));336 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 337 337 } 338 338 … … 432 432 return CreatePVectorDiagnosticStokes(); 433 433 default: 434 _error_("Icefront type %s not supported yet",EnumToString (type));434 _error_("Icefront type %s not supported yet",EnumToStringx(type)); 435 435 } 436 436 } … … 490 490 switch(fill){ 491 491 case WaterEnum: 492 surface_under_water=min(0 ,thickness+bed); // 0 if the top of the glacier is above water level493 base_under_water=min(0 ,bed); // 0 if the bottom of the glacier is above water level492 surface_under_water=min(0.,thickness+bed); // 0 if the top of the glacier is above water level 493 base_under_water=min(0.,bed); // 0 if the bottom of the glacier is above water level 494 494 water_pressure=1.0/2.0*gravity*rho_water*(pow(surface_under_water,2) - pow(base_under_water,2)); 495 495 break; … … 501 501 break; 502 502 default: 503 _error_("fill type %s not supported yet",EnumToString (fill));503 _error_("fill type %s not supported yet",EnumToStringx(fill)); 504 504 } 505 505 ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2); … … 603 603 switch(fill){ 604 604 case WaterEnum: 605 water_pressure=rho_water*gravity*min(0 ,z_g);//0 if the gaussian point is above water level605 water_pressure=rho_water*gravity*min(0.,z_g);//0 if the gaussian point is above water level 606 606 break; 607 607 case AirEnum: … … 609 609 break; 610 610 default: 611 _error_("fill type %s not supported yet",EnumToString (fill));611 _error_("fill type %s not supported yet",EnumToStringx(fill)); 612 612 } 613 613 ice_pressure=rho_ice*gravity*(surface-z_g); … … 674 674 switch(fill){ 675 675 case WaterEnum: 676 water_pressure=rho_water*gravity*min(0 ,z_g);//0 if the gaussian point is above water level676 water_pressure=rho_water*gravity*min(0.,z_g);//0 if the gaussian point is above water level 677 677 break; 678 678 case AirEnum: … … 680 680 break; 681 681 default: 682 _error_("fill type %s not supported yet",EnumToString (fill));682 _error_("fill type %s not supported yet",EnumToStringx(fill)); 683 683 } 684 684 air_pressure=0; -
issm/trunk/src/c/objects/Loads/Numericalflux.cpp
r6413 r8224 148 148 printf("Numericalflux:\n"); 149 149 printf(" id: %i\n",id); 150 printf(" analysis_type: %s\n",EnumToString (analysis_type));150 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 151 151 hnodes->Echo(); 152 152 helement->Echo(); … … 160 160 printf("Numericalflux:\n"); 161 161 printf(" id: %i\n",id); 162 printf(" analysis_type: %s\n",EnumToString (analysis_type));162 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 163 163 hnodes->DeepEcho(); 164 164 helement->DeepEcho(); … … 346 346 break; 347 347 default: 348 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));348 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 349 349 } 350 350 … … 376 376 break; 377 377 default: 378 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));378 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 379 379 } 380 380 -
issm/trunk/src/c/objects/Loads/Pengrid.cpp
r8073 r8224 104 104 printf("Pengrid:\n"); 105 105 printf(" id: %i\n",id); 106 printf(" analysis_type: %s\n",EnumToString (analysis_type));106 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 107 107 hnode->DeepEcho(); 108 108 helement->DeepEcho(); … … 320 320 break; 321 321 default: 322 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));322 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 323 323 } 324 324 … … 348 348 break; 349 349 default: 350 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));350 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 351 351 } 352 352 … … 451 451 } 452 452 else{ 453 _error_("analysis: %s not supported yet",EnumToString (analysis_type));453 _error_("analysis: %s not supported yet",EnumToStringx(analysis_type)); 454 454 } 455 455 -
issm/trunk/src/c/objects/Loads/Penpair.cpp
r7833 r8224 59 59 printf("Penpair:\n"); 60 60 printf(" id: %i\n",id); 61 printf(" analysis_type: %s\n",EnumToString (analysis_type));61 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 62 62 hnodes->Echo(); 63 63 … … 70 70 printf("Penpair:\n"); 71 71 printf(" id: %i\n",id); 72 printf(" analysis_type: %s\n",EnumToString (analysis_type));72 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 73 73 hnodes->DeepEcho(); 74 74 … … 228 228 break; 229 229 default: 230 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));230 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 231 231 } 232 232 -
issm/trunk/src/c/objects/Loads/Riftfront.cpp
r7089 r8224 139 139 printf("Riftfront:\n"); 140 140 printf(" id: %i\n",id); 141 printf(" analysis_type: %s\n",EnumToString (analysis_type));141 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 142 142 printf(" hnodes: %p\n",hnodes); 143 143 printf(" helements: %p\n",helements); … … 167 167 printf("Riftfront:\n"); 168 168 printf(" id: %i\n",id); 169 printf(" analysis_type: %s\n",EnumToString (analysis_type));169 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 170 170 hnodes->DeepEcho(); 171 171 helements->DeepEcho(); … … 435 435 break; 436 436 default: 437 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));437 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 438 438 } 439 439 … … 461 461 break; 462 462 default: 463 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToString (analysis_type));463 _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); 464 464 } 465 465 -
issm/trunk/src/c/objects/Materials/Matice.cpp
r8129 r8224 521 521 return; 522 522 523 default: _error_("element %s not implemented yet",EnumToString (element->Enum()));524 } 525 default: _error_("type %i (%s) not implemented yet",type,EnumToString (type));523 default: _error_("element %s not implemented yet",EnumToStringx(element->Enum())); 524 } 525 default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type)); 526 526 } 527 527 } … … 561 561 return; 562 562 563 default: _error_("element %s not implemented yet",EnumToString (element->Enum()));564 } 565 default: _error_("type %i (%s) not implemented yet",type,EnumToString (type));563 default: _error_("element %s not implemented yet",EnumToStringx(element->Enum())); 564 } 565 default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type)); 566 566 } 567 567 } -
issm/trunk/src/c/objects/Node.cpp
r7515 r8224 174 174 printf(" id: %i\n",id); 175 175 printf(" sid: %i\n",sid); 176 printf(" analysis_type: %s\n",EnumToString (analysis_type));176 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 177 177 indexing.Echo(); 178 178 printf(" hvertex: not displayed\n"); … … 188 188 printf(" id: %i\n",id); 189 189 printf(" sid: %i\n",sid); 190 printf(" analysis_type: %s\n",EnumToString (analysis_type));190 printf(" analysis_type: %s\n",EnumToStringx(analysis_type)); 191 191 indexing.DeepEcho(); 192 192 printf("Vertex:\n"); … … 328 328 return indexing.sdoflist[dofindex]; 329 329 } 330 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");330 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 331 331 332 332 } … … 400 400 else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i]; 401 401 } 402 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");402 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 403 403 } 404 404 } … … 440 440 } 441 441 } 442 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");442 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 443 443 } 444 444 else{ … … 509 509 } 510 510 } 511 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");511 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 512 512 } 513 513 } … … 668 668 else if (setenum==FsetEnum) numdofs=this->indexing.fsize; 669 669 else if (setenum==SsetEnum) numdofs=this->indexing.ssize; 670 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");670 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 671 671 } 672 672 else{ … … 698 698 else numdofs=this->indexing.ssize; 699 699 } 700 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");700 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 701 701 } 702 702 return numdofs; … … 881 881 dofcount+=this->indexing.ssize; 882 882 } 883 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");883 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 884 884 885 885 … … 910 910 for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount; 911 911 } 912 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");912 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 913 913 } 914 914 /*}}}*/ … … 926 926 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) *(truedofs+ncols*sid+j)=indexing.fdoflist[j]; 927 927 else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) *(truedofs+ncols*sid+j)=indexing.sdoflist[j]; 928 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");928 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 929 929 930 930 } … … 945 945 else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j); 946 946 else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j); 947 else _error_("%s%s%s"," set of enum type ",EnumToString (setenum)," not supported yet!");947 else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!"); 948 948 949 949 } -
issm/trunk/src/c/objects/Params/BoolParam.cpp
r5103 r8224 49 49 50 50 printf("BoolParam:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" value: %s\n",this->value?"true":"false"); 53 53 } … … 129 129 /*FUNCTION BoolParam::GetParameterName{{{1*/ 130 130 char* BoolParam::GetParameterName(void){ 131 return EnumToString (this->enum_type);131 return EnumToStringx(this->enum_type); 132 132 } 133 133 /*}}}*/ -
issm/trunk/src/c/objects/Params/BoolParam.h
r6412 r8224 50 50 int EnumType(){return enum_type;} 51 51 void GetParameterValue(bool* pbool){*pbool=value;} 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));}52 void GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(double* pdouble){_error_("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(double** pdoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 60 void GetParameterValue(Vec* pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 62 void GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(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){_error_("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,EnumToStringx(enum_type));} 67 67 void SetValue(double scalar){this->value=(bool)scalar;} 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));}68 void SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 69 void SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 70 void SetValue(double* doublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 72 void SetValue(Vec vec){_error_("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 73 void SetValue(Mat mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 74 void SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 76 76 77 77 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/DoubleMatArrayParam.cpp
r5103 r8224 88 88 89 89 printf("DoubleMatArrayParam:\n"); 90 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));90 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 91 91 printf(" array size: %i\n",this->M); 92 92 printf(" array pointer: %p\n",this->array); … … 102 102 103 103 printf("DoubleMatArrayParam:\n"); 104 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));104 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 105 105 printf(" array size: %i\n",this->M); 106 106 for(i=0;i<M;i++){ … … 303 303 /*FUNCTION DoubleMatArrayParam::GetParameterName{{{1*/ 304 304 char* DoubleMatArrayParam::GetParameterName(void){ 305 return EnumToString (this->enum_type);305 return EnumToStringx(this->enum_type); 306 306 } 307 307 /*}}}*/ -
issm/trunk/src/c/objects/Params/DoubleMatArrayParam.h
r6412 r8224 52 52 /*Param vritual function definitions: {{{1*/ 53 53 int EnumType(){return 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));}54 void GetParameterValue(bool* pbool){_error_("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(double* pdouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 59 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 60 void GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 62 62 void GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims); 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));}63 void GetParameterValue(Vec* pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 64 void GetParameterValue(Mat* pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 65 void GetParameterValue(FILE** pfid){_error_("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 66 66 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));}67 void SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 68 void SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 69 void SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 70 void SetValue(double scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 71 void SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 72 void SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 73 void SetValue(double* doublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 75 void SetValue(Vec vec){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 76 void SetValue(Mat mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 77 void SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));} 78 78 void SetValue(double** array, int M, int* mdim_array, int* ndim_array); 79 79 -
issm/trunk/src/c/objects/Params/DoubleMatParam.cpp
r6163 r8224 49 49 50 50 printf("DoubleMatParam:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" matrix size: %ix%i\n",this->M,this->N); 53 53 … … 60 60 61 61 printf("DoubleMatParam:\n"); 62 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));62 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 63 63 printf(" matrix size: %ix%i\n",this->M,this->N); 64 64 for(i=0;i<this->M;i++){ … … 167 167 /*FUNCTION DoubleMatParam::GetParameterName{{{1*/ 168 168 char* DoubleMatParam::GetParameterName(void){ 169 return EnumToString (this->enum_type);169 return EnumToStringx(this->enum_type); 170 170 } 171 171 /*}}}*/ -
issm/trunk/src/c/objects/Params/DoubleMatParam.h
r6412 r8224 51 51 /*Param vritual function definitions: {{{1*/ 52 52 int EnumType(){return 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));}53 void GetParameterValue(bool* pbool){_error_("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(double* pdouble){_error_("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 59 void GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));} 60 60 void GetParameterValue(double** pdoublearray,int* pM,int* pN); 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));}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,EnumToStringx(enum_type));} 62 void GetParameterValue(Vec* pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(Mat* pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 64 void GetParameterValue(FILE** pfid){_error_("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 65 65 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));}66 void SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 68 void SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 69 void SetValue(double scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 71 void SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 72 void SetValue(double* doublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));} 73 73 void SetValue(double* doublearray,int M,int N); 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));}74 void SetValue(Vec vec){_error_("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 75 void SetValue(Mat mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 76 void SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 78 78 79 79 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/DoubleParam.cpp
r6412 r8224 46 46 47 47 printf("DoubleParam:\n"); 48 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));48 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 49 49 printf(" value: %g\n",this->value); 50 50 } … … 126 126 /*FUNCTION DoubleParam::GetParameterName{{{1*/ 127 127 char* DoubleParam::GetParameterName(void){ 128 return EnumToString (this->enum_type);128 return EnumToStringx(this->enum_type); 129 129 } 130 130 /*}}}*/ … … 134 134 *pinteger=(int)value; 135 135 #else 136 _error_("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,EnumToStringx(enum_type)); 137 137 #endif 138 138 } … … 147 147 148 148 #else 149 _error_("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,EnumToStringx(enum_type)); 150 150 #endif 151 151 } … … 163 163 *pintarray=output; 164 164 #else 165 _error_("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,EnumToStringx(enum_type)); 166 166 #endif 167 167 } … … 179 179 *pdoublearray=output; 180 180 #else 181 _error_("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,EnumToStringx(enum_type)); 182 182 #endif 183 183 } … … 196 196 *pdoublearray=output; 197 197 #else 198 _error_("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,EnumToStringx(enum_type)); 199 199 #endif 200 200 } -
issm/trunk/src/c/objects/Params/DoubleParam.h
r6412 r8224 54 54 void GetParameterValue(int** pintarray,int* pM); 55 55 void GetParameterValue(double* pdouble){*pdouble=value;} 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));}56 void GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(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){_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));}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,EnumToStringx(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(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){_error_("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,EnumToStringx(enum_type));} 68 68 void SetValue(double scalar){this->value=(double)scalar;} 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));}69 void SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 73 void SetValue(Vec vec){_error_("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 74 void SetValue(Mat mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 75 void SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/DoubleVecParam.cpp
r6412 r8224 48 48 49 49 printf("DoubleVecParam:\n"); 50 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));50 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 51 51 printf(" vector size: %i\n",this->M); 52 52 … … 59 59 60 60 printf("DoubleVecParam:\n"); 61 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));61 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 62 62 printf(" vector size: %i\n",this->M); 63 63 for(i=0;i<this->M;i++){ … … 174 174 *pintarray=output; 175 175 #else 176 _error_("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,EnumToStringx(enum_type)); 177 177 #endif 178 178 } … … 180 180 /*FUNCTION DoubleVecParam::GetParameterName{{{1*/ 181 181 char* DoubleVecParam::GetParameterName(void){ 182 return EnumToString (this->enum_type);182 return EnumToStringx(this->enum_type); 183 183 } 184 184 /*}}}*/ -
issm/trunk/src/c/objects/Params/DoubleVecParam.h
r6412 r8224 50 50 /*Param virtual functions definitions: {{{1*/ 51 51 int EnumType(){return 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));}52 void GetParameterValue(bool* pbool){_error_("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 54 54 void GetParameterValue(int** pintarray,int* pM); 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));}55 void GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 58 58 void GetParameterValue(double** pdoublearray,int* pM); 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));}59 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 64 64 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));}65 void SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 66 void SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 68 void SetValue(double scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 69 void SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 71 void SetValue(double* doublearray,int M); 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));}72 void SetValue(double* pdoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));} 73 void SetValue(Vec vec){_error_("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 74 void SetValue(Mat mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 75 void SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/FileParam.cpp
r6412 r8224 49 49 50 50 printf("FileParam:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" value: %p\n",this->value); 53 53 } … … 96 96 /*FUNCTION FileParam::GetParameterName{{{1*/ 97 97 char* FileParam::GetParameterName(void){ 98 return EnumToString (this->enum_type);98 return EnumToStringx(this->enum_type); 99 99 } 100 100 /*}}}*/ -
issm/trunk/src/c/objects/Params/FileParam.h
r6412 r8224 49 49 /*Param vritual function definitions: {{{1*/ 50 50 int EnumType(){return 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));}51 void GetParameterValue(bool* pbool){ _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 52 void GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(double* pdouble){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(double** pdoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 60 void GetParameterValue(Vec* pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 62 62 void GetParameterValue(FILE** pfid){*pfid=value;}; 63 63 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));}64 void SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 65 void SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 66 void SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 67 void SetValue(double scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 68 void SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 69 void SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 70 void SetValue(double* doublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* pdoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));} 72 void SetValue(Vec vec){_error_("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 73 void SetValue(Mat mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 74 void SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 76 76 77 77 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/IntParam.cpp
r5103 r8224 49 49 50 50 printf("IntParam:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 printf(" value: %i\n",this->value); 53 53 } … … 129 129 /*FUNCTION IntParam::GetParameterName{{{1*/ 130 130 char* IntParam::GetParameterName(void){ 131 return EnumToString (this->enum_type);131 return EnumToStringx(this->enum_type); 132 132 } 133 133 /*}}}*/ -
issm/trunk/src/c/objects/Params/IntParam.h
r6412 r8224 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return enum_type;} 52 void GetParameterValue(bool* pbool){_error_("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,EnumToStringx(enum_type));} 53 53 void GetParameterValue(int* pinteger){*pinteger=value;} 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));}54 void GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("Int param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(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){_error_("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,EnumToStringx(enum_type));} 68 68 void SetValue(double scalar){this->value=(int)scalar;} 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));}69 void SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 73 void SetValue(Vec vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 74 void SetValue(Mat mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 75 void SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/IntVecParam.cpp
r6213 r8224 58 58 59 59 printf("IntVecParam:\n"); 60 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));60 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 61 61 printf(" vector size: %i\n",this->M); 62 62 … … 69 69 70 70 printf("IntVecParam:\n"); 71 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));71 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 72 72 printf(" vector size: %i\n",this->M); 73 73 for(i=0;i<this->M;i++){ … … 170 170 /*FUNCTION IntVecParam::GetParameterName{{{1*/ 171 171 char* IntVecParam::GetParameterName(void){ 172 return EnumToString (this->enum_type);172 return EnumToStringx(this->enum_type); 173 173 } 174 174 /*}}}*/ -
issm/trunk/src/c/objects/Params/IntVecParam.h
r6412 r8224 51 51 /*Param virtual functions definitions: {{{1*/ 52 52 int EnumType(){return 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));}53 void GetParameterValue(bool* pbool){_error_("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 55 55 void GetParameterValue(int** pintarray,int* pM); 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));}56 void GetParameterValue(double* pdouble){_error_("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 62 void GetParameterValue(Vec* pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(Mat* pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 64 void GetParameterValue(FILE** pfid){_error_("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 65 65 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));}66 void SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 68 68 void SetValue(int* intarray,int M); 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));}69 void SetValue(double scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 71 void SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 72 void SetValue(double* doublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 74 void SetValue(Vec vec){_error_("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 75 void SetValue(Mat mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 76 void SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 78 78 79 79 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/PetscMatParam.cpp
r5895 r8224 49 49 50 50 printf("PetscMatParam:\n"); 51 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));51 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 52 52 53 53 } … … 58 58 int i; 59 59 printf("PetscMatParam:\n"); 60 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));60 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 61 61 MatView(value,PETSC_VIEWER_STDOUT_WORLD); 62 62 } … … 200 200 /*FUNCTION PetscMatParam::GetParameterName{{{1*/ 201 201 char* PetscMatParam::GetParameterName(void){ 202 return EnumToString (this->enum_type);202 return EnumToStringx(this->enum_type); 203 203 } 204 204 /*}}}*/ -
issm/trunk/src/c/objects/Params/PetscMatParam.h
r6412 r8224 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return 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));}52 void GetParameterValue(bool* pbool){_error_("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char** pstring){_error_("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumToStringx(enum_type));} 62 62 void GetParameterValue(Mat* poutput); 63 void GetParameterValue(FILE** pfid){_error_("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,EnumToStringx(enum_type));} 64 64 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));}65 void SetValue(bool boolean){_error_("PetscMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 66 void SetValue(int integer){_error_("PetscMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int* intarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 68 void SetValue(double scalar){_error_("PetscMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 69 void SetValue(char* string){_error_("PetscMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 73 void SetValue(Vec vec){_error_("PetscMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 74 74 void SetValue(Mat mat); 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));}75 void SetValue(FILE* fid){_error_("PetscMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/PetscVecParam.cpp
r5103 r8224 50 50 51 51 printf("PetscVecParam:\n"); 52 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));52 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 53 53 54 54 } … … 59 59 int i; 60 60 printf("PetscVecParam:\n"); 61 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));61 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 62 62 VecView(value,PETSC_VIEWER_STDOUT_WORLD); 63 63 } … … 193 193 /*FUNCTION PetscVecParam::GetParameterName{{{1*/ 194 194 char* PetscVecParam::GetParameterName(void){ 195 return EnumToString (this->enum_type);195 return EnumToStringx(this->enum_type); 196 196 } 197 197 /*}}}*/ -
issm/trunk/src/c/objects/Params/PetscVecParam.h
r6412 r8224 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return 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));}52 void GetParameterValue(bool* pbool){_error_("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(char** pstring){_error_("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(char*** pstringarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 61 void GetParameterValue(Mat* pmat){_error_("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 62 62 void GetParameterValue(Vec* poutput); 63 void GetParameterValue(FILE** pfid){_error_("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,EnumToStringx(enum_type));} 64 64 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));}65 void SetValue(bool boolean){_error_("PetscVec of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 66 void SetValue(int integer){_error_("PetscVec of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int* intarray,int M){_error_("PetscVec of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 68 void SetValue(double scalar){_error_("PetscVec of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 69 void SetValue(char* string){_error_("PetscVec of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 70 void SetValue(char** stringarray,int M){_error_("PetscVec of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));} 72 void SetValue(double* pdoublearray,int M,int N){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));} 73 73 void SetValue(Vec vec); 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));}74 void SetValue(Mat mat){_error_("PetscVec of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 75 void SetValue(FILE* fid){_error_("PetscVec of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/StringArrayParam.cpp
r5103 r8224 73 73 74 74 printf("StringArrayParam:\n"); 75 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));75 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 76 76 for(i=0;i<this->numstrings;i++){ 77 77 string=this->value[i]; … … 222 222 /*FUNCTION StringArrayParam::GetParameterName{{{1*/ 223 223 char* StringArrayParam::GetParameterName(void){ 224 return EnumToString (this->enum_type);224 return EnumToStringx(this->enum_type); 225 225 } 226 226 /*}}}*/ -
issm/trunk/src/c/objects/Params/StringArrayParam.h
r6412 r8224 52 52 /*Param vritual function definitions: {{{1*/ 53 53 int EnumType(){return 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));}54 void GetParameterValue(bool* pbool){_error_("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 56 void GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 57 void GetParameterValue(double* pdouble){_error_("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));} 59 59 void GetParameterValue(char*** pstringarray,int* pM); 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));}60 void GetParameterValue(double** pdoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 63 void GetParameterValue(Vec* pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 64 void GetParameterValue(Mat* pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 65 void GetParameterValue(FILE** pfid){_error_("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 66 66 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));}67 void SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 68 void SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 69 void SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 70 void SetValue(double scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 71 void SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));} 72 72 void SetValue(char** stringarray,int M); 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));}73 void SetValue(double* doublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 75 void SetValue(Vec vec){_error_("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 76 void SetValue(Mat mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 77 void SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 79 79 80 80 char* GetParameterName(void); -
issm/trunk/src/c/objects/Params/StringParam.cpp
r5103 r8224 50 50 void StringParam::DeepEcho(void){ 51 51 printf("StringParam:\n"); 52 printf(" enum: %i (%s)\n",this->enum_type,EnumToString (this->enum_type));52 printf(" enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type)); 53 53 printf(" value: %s\n",this->value); 54 54 } … … 158 158 /*FUNCTION StringParam::GetParameterName{{{1*/ 159 159 char* StringParam::GetParameterName(void){ 160 return EnumToString (this->enum_type);160 return EnumToStringx(this->enum_type); 161 161 } 162 162 /*}}}*/ -
issm/trunk/src/c/objects/Params/StringParam.h
r6412 r8224 50 50 /*Param vritual function definitions: {{{1*/ 51 51 int EnumType(){return 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));}52 void GetParameterValue(bool* pbool){_error_("String param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));} 53 void GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));} 54 void GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));} 55 void GetParameterValue(double* pdouble){_error_("String param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));} 56 56 void GetParameterValue(char** pstring); 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));}57 void GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));} 58 void GetParameterValue(double** pdoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(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,EnumToStringx(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,EnumToStringx(enum_type));} 61 void GetParameterValue(Vec* pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));} 62 void GetParameterValue(Mat* pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));} 63 void GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));} 64 64 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));}65 void SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));} 66 void SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));} 67 void SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));} 68 void SetValue(double scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));} 69 69 void SetValue(char* string); 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));}70 void SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));} 71 void SetValue(double* doublearray,int M){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 73 void SetValue(Vec vec){_error_("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));} 74 void SetValue(Mat mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));} 75 void SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(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,EnumToStringx(enum_type));} 77 77 78 78 char* GetParameterName(void); -
issm/trunk/src/c/shared/Numerics/IsInputConverged.cpp
r6412 r8224 53 53 else eps=0; 54 54 } 55 else _error_("%s%s%s"," convergence criterion ",EnumToString (criterion_enum)," not supported yet!");55 else _error_("%s%s%s"," convergence criterion ",EnumToStringx(criterion_enum)," not supported yet!"); 56 56 57 57 /*Assign output pointers:*/ -
issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp
r6852 r8224 57 57 if (found==-1){ 58 58 /*ok, we did not find anything, this is not good! error out: */ 59 _error_("%s%s","could find neither a default analysis nor analysis ",EnumToString (analysis_type));59 _error_("%s%s","could find neither a default analysis nor analysis ",EnumToStringx(analysis_type)); 60 60 } 61 61 -
issm/trunk/src/c/shared/Numerics/extrema.cpp
r1 r8224 11 11 12 12 double min(double a,double b){ 13 if (a<=b)return a; 13 if (a<b)return a; 14 else return b; 15 } 16 int min(int a,int b){ 17 if (a<b)return a; 14 18 else return b; 15 19 } 16 20 double max(double a,double b){ 17 if (a> =b)return a;21 if (a>b)return a; 18 22 else return b; 19 23 } 24 int max(int a,int b){ 25 if (a>b)return a; 26 else return b; 27 } -
issm/trunk/src/c/shared/Numerics/numerics.h
r6273 r8224 18 18 double min(double a,double b); 19 19 double max(double a,double b); 20 int min(int a,int b); 21 int max(int a,int b); 20 22 double OptFunc(double scalar, OptArgs* optargs); 21 23 void BrentSearch(double* psearch_scalar,double* pJ,OptPars* optpars,double (*f)(double,OptArgs*), OptArgs* optargs); -
issm/trunk/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp
r6412 r8224 35 35 break; 36 36 default: 37 _error_("No adjoint has been implemented for solution %s yet",EnumToString (solutiontype));37 _error_("No adjoint has been implemented for solution %s yet",EnumToStringx(solutiontype)); 38 38 break; 39 39 } -
issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp
r7640 r8224 62 62 break; 63 63 default: 64 _error_("%s%s%s"," solution type: ",EnumToString (solutiontype)," not supported yet!");64 _error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!"); 65 65 break; 66 66 } -
issm/trunk/src/c/solutions/SolutionConfiguration.cpp
r7640 r8224 131 131 132 132 default: 133 _error_("%s%s%s"," solution type: ",EnumToString (solutiontype)," not supported yet!");133 _error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!"); 134 134 break; 135 135 } -
issm/trunk/src/c/solutions/control_core.cpp
r7288 r8224 122 122 for(i=0;i<num_controls;i++) InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,control_type[i]); 123 123 femmodel->results->AddObject(new DoubleVecExternalResult(femmodel->results->Size()+1,JEnum,J,nsteps,1,0)); 124 //femmodel->results->AddObject(new StringExternalResult(femmodel->results->Size()+1,ControlTypeEnum,EnumToString (control_type),1,0));124 //femmodel->results->AddObject(new StringExternalResult(femmodel->results->Size()+1,ControlTypeEnum,EnumToStringx(control_type),1,0)); 125 125 } 126 126 -
issm/trunk/src/c/solutions/controlrestart.cpp
r6213 r8224 26 26 for(int i=0;i<num_controls;i++) InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,control_type[i]); 27 27 femmodel->results->AddObject(new DoubleVecExternalResult(femmodel->results->Size()+1,JEnum,J,nsteps,1,0)); 28 //femmodel->results->AddObject(new StringExternalResult(femmodel->results->Size()+1,ControlTypeEnum,EnumToString (control_type),1,0));28 //femmodel->results->AddObject(new StringExternalResult(femmodel->results->Size()+1,ControlTypeEnum,EnumToStringx(control_type),1,0)); 29 29 30 30 /*write to disk: */ -
issm/trunk/src/c/solutions/gradient_core.cpp
r6412 r8224 36 36 for (int i=0;i<num_controls;i++){ 37 37 38 _printf_(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",EnumToStringx(control_type[i])); 39 39 Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, control_type[i]); 40 40 … … 53 53 /*Get scaling factor of current control:*/ 54 54 VecNorm(new_gradient,NORM_INFINITY,&norm_grad); 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]));55 if(norm_grad<=0) _error_("||∂J/∂α||∞ = 0 gradient norm of J with respect to %s is zero",EnumToStringx(control_type[i])); 56 if(isnan(norm_grad))_error_("||∂J/∂α||∞ = NaN gradient norm of J with respect to %s is NaN" ,EnumToStringx(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 -
issm/trunk/src/c/solutions/issm.cpp
r8196 r8224 51 51 _printf_(true,"Launching solution sequence\n"); 52 52 if(argc<2)_error_("Usage error: no solution requested"); 53 solution_type=StringToEnum (argv[1]);53 solution_type=StringToEnumx(argv[1]); 54 54 petscoptionsfilename=argv[4]; 55 55 lockname=argv[6]; -
issm/trunk/src/c/solutions/objectivefunctionC.cpp
r7638 r8224 55 55 } 56 56 else{ 57 _error_("Solution %s not implemented yet",EnumToString (solution_type));57 _error_("Solution %s not implemented yet",EnumToStringx(solution_type)); 58 58 } 59 59 … … 72 72 } 73 73 else{ 74 _error_("Solution %s not implemented yet",EnumToString (solution_type));74 _error_("Solution %s not implemented yet",EnumToStringx(solution_type)); 75 75 } 76 76
Note:
See TracChangeset
for help on using the changeset viewer.