Changeset 8926
- Timestamp:
- 07/12/11 16:28:11 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 79 added
- 26 deleted
- 82 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r8806 r8926 189 189 ControlTypeEnum, 190 190 ConvergedEnum, 191 DhDtEnum,192 191 DragCoefficientEnum, 193 192 DragPEnum, … … 201 200 ElementOnSurfaceEnum, 202 201 ElementOnWaterEnum, 203 EpsVelEnum,204 202 FillEnum, 205 203 FractionIncrementEnum, 206 204 FrictionEnum, 207 GeothermalFluxEnum,208 205 HydrostaticAdjustmentEnum, 209 206 InternalEnum, … … 219 216 SurfaceAverageVelMisfitEnum, 220 217 MaxPenetrationEnum, 221 MeanVelEnum,222 218 MeltingOffsetEnum, 223 219 GroundingLineMeltingRateEnum, … … 242 238 ShelfDampeningEnum, 243 239 StabilizeConstraintsEnum, 244 StokesReconditioningEnum, 245 SurfaceAccumulationRateEnum, 240 SurfaceAccumulationRateEnum, 246 241 SurfaceAblationRateEnum, 247 242 SurfaceAreaEnum, … … 304 299 TimeEnum, 305 300 OutputFrequencyEnum, 306 WaterColumnEnum,307 301 WaterColumnOldEnum, 308 302 WaterColumnPicardEnum, … … 339 333 RhoWaterEnum, 340 334 GravityEnum, 341 ThermalConductivityEnum,342 335 BasalMeltingRateCorrectionEnum, 343 336 BasalMeltingRateCorrectionApplyEnum, … … 371 364 EpsRelEnum, 372 365 EpsResEnum, 373 HeatCapacityEnum,374 IsHutterEnum,375 IsMacAyealPattynEnum,376 IsStokesEnum,377 KffEnum, //TO BE DELETED (not used anymore)378 LatentHeatEnum,379 366 LowmemEnum, 380 MaxIterEnum,381 367 MaxNonlinearIterationsEnum, 382 MeltingPointEnum,383 368 MinMechanicalConstraintsEnum, 384 369 MinThermalConstraintsEnum, 385 NStepsEnum,386 370 NdtEnum, 387 371 NumOutputEnum, … … 390 374 NumberOfNodesEnum, 391 375 NumberOfVerticesEnum, 392 OptScalEnum,393 376 OutputFilePointerEnum, 394 OutputFileNameEnum,395 ParameterOutputEnum,396 377 PenaltyMeltingEnum, 397 378 QmuAnalysisEnum, … … 412 393 PetscRcEnum, 413 394 SparsityEnum, 414 TolXEnum,415 395 VariableDescriptorsEnum, 416 396 VerboseEnum, 417 WaitOnLockEnum,418 397 PetscOptionsStringsEnum, 419 398 PetscOptionsAnalysesEnum, … … 442 421 ArrheniusEnum, 443 422 /*}}}*/ 423 /*Temporary{{{1*/ 424 NumberOfElements2DEnum, 425 NumControlTypeEnum, 426 SpcvyEnum, 427 HydroQEnum, 428 VerboseBinaryEnum, 429 NodeOnWaterEnum, 430 YEnum, 431 GlMeltingRateEnum, 432 ElementsTypeEnum, 433 PenaltiesEnum, 434 PrognosticDGEnum, 435 PressureloadEnum, 436 HydroCREnum, 437 NameEnum, 438 VerticesTypeEnum, 439 HydroKnEnum, 440 GEnum, 441 InputfilenameEnum, 442 SpcvzEnum, 443 list, 444 NumberOfNodes2DEnum, 445 NodeOnStokesEnum, 446 NodeOnHutterEnum, 447 ZEnum, 448 GlMigrationEnum, 449 RiftinfoEnum, 450 ElementOnIceSheetEnum, 451 SpcthicknessEnum, 452 SpctemperatureEnum, 453 PenaltyLockEnum, 454 SpcvxEnum, 455 UpperelementsEnum, 456 HydroPEnum, 457 NodeOnPattynEnum, 458 EdgesEnum, 459 Elements2DEnum, 460 XEnum, 461 NumCmResponsesEnum, 462 NodeOnMacayealEnum, 463 ElementconnectivityEnum, 464 SpcwatercolumnEnum, 465 ArtificialDiffusivityEnum, 466 HydroNEnum, 467 BorderstokesEnum, 468 NumlayersEnum, 469 DiagnosticRefEnum, 470 IshutterEnum, 471 IsmacayealpattynEnum, 472 IsstokesEnum, 473 StokesreconditioningEnum, 474 LowerelementsEnum, 475 HeatcapacityEnum, 476 LatentheatEnum, 477 ThermalconductivityEnum, 478 MeltingpointEnum, 479 ReferencetemperatureEnum, 480 DhdtEnum, 481 GeothermalfluxEnum, 482 IsprognosticEnum, 483 IsdiagnosticEnum, 484 IsthermalEnum, 485 NstepsEnum, 486 MaxiterEnum, 487 TolxEnum, 488 OptscalEnum, 489 EpsvelEnum, 490 MeanvelEnum, 491 ParameteroutputEnum, 492 OutputfilenameEnum, 493 WaterfractionEnum, 494 WatercolumnEnum, 495 WaitonlockEnum, 496 NumberOfVariablesEnum, 497 NumvariabledescriptorsEnum, 498 NumberOfResponsesEnum, 499 NumresponsedescriptorsEnum, 500 NpartEnum, 501 QmuMassFluxNumProfilesEnum, 502 /*}}}*/ 444 503 VxMeshEnum, 445 504 VyMeshEnum, 446 505 VzMeshEnum, 447 IsDiagnosticEnum,448 IsPrognosticEnum,449 IsThermalEnum,450 506 EnthalpySolutionEnum, 451 507 EnthalpyAnalysisEnum, 452 508 EnthalpyEnum, 453 509 EnthalpyPicardEnum, 454 WaterFractionEnum,455 ReferenceTemperatureEnum,456 510 ThicknessAbsGradientEnum, 457 511 VelAbsGradientEnum, -
issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp
r8517 r8926 17 17 case RheologyBEnum : return "rheology_B"; 18 18 case RheologyBbarEnum : return "rheology_B"; 19 case Dh DtEnum : return "dhdt";19 case DhdtEnum : return "dhdt"; 20 20 case VxEnum : return "vx"; 21 21 case VxObsEnum : return "vx_obs"; -
issm/trunk/src/c/io/Disk/IoModelFetchData.cpp
r8913 r8926 13 13 #include "./diskio.h" 14 14 15 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle, char* data_name){{{1*/16 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle, char* data_name){15 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum){{{1*/ 16 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum){ 17 17 18 18 extern int my_rank; … … 26 26 27 27 /*Set file pointer to beginning of the data: */ 28 fid=SetFilePointerToData(model_handle,data_ name);28 fid=SetFilePointerToData(model_handle,data_enum); 29 29 30 30 /*Now fetch: */ … … 62 62 } 63 63 /*}}}*/ 64 /*FUNCTION IoModelFetchData(char** pstring,FILE* model_handle, char* data_name){{{1*/65 void IoModelFetchData(char** pstring,FILE* model_handle, char* data_name){64 /*FUNCTION IoModelFetchData(char** pstring,FILE* model_handle,int data_enum){{{1*/ 65 void IoModelFetchData(char** pstring,FILE* model_handle,int data_enum){ 66 66 67 67 extern int my_rank; … … 74 74 75 75 /*Set file pointer to beginning of the data: */ 76 fid=SetFilePointerToData(model_handle,data_ name);76 fid=SetFilePointerToData(model_handle,data_enum); 77 77 78 78 /*Now fetch: */ … … 106 106 } 107 107 /*}}}*/ 108 /*FUNCTION IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){{{1*/ 109 void IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){ 108 /*FUNCTION IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum){{{1*/ 109 void IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum){ 110 111 extern int my_rank; 112 extern int num_procs; 113 FILE* fid=NULL; 114 int i; 115 116 /*output: */ 117 int numstrings=0; 118 char** strings=NULL; 119 120 /*intermediary: */ 121 char* string=NULL; 122 int string_size; 123 124 /*Set file pointer to beginning of the data: */ 125 fid=SetFilePointerToData(model_handle,data_enum); 126 127 /*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */ 128 if(my_rank==0){ 129 if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array"); 130 } 131 MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 132 133 /*Now allocate string array: */ 134 if(numstrings){ 135 strings=(char**)xmalloc(numstrings*sizeof(char*)); 136 for(i=0;i<numstrings;i++)strings[i]=NULL; 137 138 /*Go through strings, and read: */ 139 for(i=0;i<numstrings;i++){ 140 141 if(my_rank==0){ 142 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string "); 143 } 144 MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 145 if(string_size){ 146 string=(char*)xmalloc((string_size+1)*sizeof(char)); 147 string[string_size]='\0'; 148 149 /*Read string on node 0, then broadcast: */ 150 if(my_rank==0){ 151 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 152 } 153 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 154 } 155 else{ 156 string=(char*)xmalloc(sizeof(char)); 157 string[0]='\0'; 158 } 159 160 strings[i]=string; 161 } 162 } 163 164 /*Assign output pointers: */ 165 *pstrings=strings; 166 *pnumstrings=numstrings; 167 } 168 /*}}}*/ 169 /*FUNCTION IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum){{{1*/ 170 void IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum){ 110 171 111 172 … … 118 179 119 180 /*Set file pointer to beginning of the data: */ 120 fid=SetFilePointerToData(model_handle,data_ name);181 fid=SetFilePointerToData(model_handle,data_enum); 121 182 122 183 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ … … 131 192 } 132 193 /*}}}*/ 133 /*FUNCTION IoModelFetchData(int* pinteger,FILE* model_handle, char* data_name){{{1*/134 void IoModelFetchData(int* pinteger,FILE* model_handle, char* data_name){194 /*FUNCTION IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum){{{1*/ 195 void IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum){ 135 196 136 197 extern int my_rank; … … 142 203 143 204 /*Set file pointer to beginning of the data: */ 144 fid=SetFilePointerToData(model_handle,data_ name);205 fid=SetFilePointerToData(model_handle,data_enum); 145 206 146 207 /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */ … … 156 217 } 157 218 /*}}}*/ 158 /*FUNCTION SetFilePointerToData(FILE* model_handle,char* data_name){{{1*/ 159 FILE* SetFilePointerToData(FILE* model_handle,char* data_name){ 160 161 extern int my_rank; 162 extern int num_procs; 163 164 int string_size; 219 /*FUNCTION SetFilePointerToData(FILE* model_handle,int data_enum){{{1*/ 220 FILE* SetFilePointerToData(FILE* model_handle,int data_enum){ 221 222 extern int my_rank; 223 extern int num_procs; 224 165 225 int record_length; 166 char* string=NULL;167 char* repository=NULL;168 226 FILE* fid=NULL; 169 227 int found=0; 228 int record_enum; 170 229 171 230 /*Go find in the binary file, the position of the data we want to fetch: */ … … 176 235 fseek(fid,0,SEEK_SET); 177 236 178 /*Now march through file looking for the correct name: */237 /*Now march through file looking for the correct data identifier: */ 179 238 for(;;){ 180 /*Read size of first string name: */181 if(fread(& string_size,sizeof(int),1,fid)==0){239 /*Read enum for this size of first string name: */ 240 if(fread(&record_enum,sizeof(int),1,fid)==0){ 182 241 /*Ok, we have reached the end of the file. break: */ 183 242 found=0; 184 243 break; 185 244 } 186 /*Allocate string of correct size: */ 187 string=(char*)xmalloc((string_size+1)*sizeof(char)); 188 string[string_size]='\0'; 189 190 /*Read string: */ 191 if(fread(string,string_size*sizeof(char),1,fid)==0){ 192 /*Ok, we have reached the end of the file. break: */ 193 found=0; 194 break; 195 } 196 /*Is this the correct string? : */ 197 if (strcmp(string,data_name)==0){ 245 246 /*Is this the record sought for? : */ 247 if (data_enum==record_enum){ 198 248 /*Ok, we have found the correct string. Pass the record length, and break: */ 199 249 fseek(fid,sizeof(int),SEEK_CUR); … … 207 257 fseek(fid,record_length,SEEK_CUR); 208 258 } 209 /*Erase string: */ 210 xfree((void**)&string); 211 } 212 /*erase string, if we broke from the for() loop:*/ 213 xfree((void**)&string); 259 } 214 260 } 215 261 MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 216 262 217 if(!found)_error_("%s %s ","could not find data with name", data_name);263 if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum)); 218 264 219 265 return fid; -
issm/trunk/src/c/io/Disk/diskio.h
r8913 r8926 16 16 void pfclose(FILE* fid,char* filename); 17 17 18 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name); 19 void IoModelFetchData(char** pstring,FILE* model_handle,char* data_name); 20 void IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name); 21 void IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name); 22 FILE* SetFilePointerToData(FILE* model_handle,char* data_name); 18 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum); 19 void IoModelFetchData(char** pstring,FILE* model_handle,int data_enum); 20 void IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum); 21 void IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum); 22 void IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum); 23 24 FILE* SetFilePointerToData(FILE* model_handle,int data_enum); 23 25 24 26 #endif /* _IO_H_ */ -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r8806 r8926 157 157 case ControlTypeEnum : return "ControlType"; 158 158 case ConvergedEnum : return "Converged"; 159 case DhDtEnum : return "DhDt";160 159 case DragCoefficientEnum : return "DragCoefficient"; 161 160 case DragPEnum : return "DragP"; … … 169 168 case ElementOnSurfaceEnum : return "ElementOnSurface"; 170 169 case ElementOnWaterEnum : return "ElementOnWater"; 171 case EpsVelEnum : return "EpsVel";172 170 case FillEnum : return "Fill"; 173 171 case FractionIncrementEnum : return "FractionIncrement"; 174 172 case FrictionEnum : return "Friction"; 175 case GeothermalFluxEnum : return "GeothermalFlux";176 173 case HydrostaticAdjustmentEnum : return "HydrostaticAdjustment"; 177 174 case InternalEnum : return "Internal"; … … 187 184 case SurfaceAverageVelMisfitEnum : return "SurfaceAverageVelMisfit"; 188 185 case MaxPenetrationEnum : return "MaxPenetration"; 189 case MeanVelEnum : return "MeanVel";190 186 case MeltingOffsetEnum : return "MeltingOffset"; 191 187 case GroundingLineMeltingRateEnum : return "GroundingLineMeltingRate"; … … 210 206 case ShelfDampeningEnum : return "ShelfDampening"; 211 207 case StabilizeConstraintsEnum : return "StabilizeConstraints"; 212 case StokesReconditioningEnum : return "StokesReconditioning";213 208 case SurfaceAccumulationRateEnum : return "SurfaceAccumulationRate"; 214 209 case SurfaceAblationRateEnum : return "SurfaceAblationRate"; … … 268 263 case TimeEnum : return "Time"; 269 264 case OutputFrequencyEnum : return "OutputFrequency"; 270 case WaterColumnEnum : return "WaterColumn";271 265 case WaterColumnOldEnum : return "WaterColumnOld"; 272 266 case WaterColumnPicardEnum : return "WaterColumnPicard"; … … 293 287 case RhoWaterEnum : return "RhoWater"; 294 288 case GravityEnum : return "Gravity"; 295 case ThermalConductivityEnum : return "ThermalConductivity";296 289 case BasalMeltingRateCorrectionEnum : return "BasalMeltingRateCorrection"; 297 290 case BasalMeltingRateCorrectionApplyEnum : return "BasalMeltingRateCorrectionApply"; … … 321 314 case EpsRelEnum : return "EpsRel"; 322 315 case EpsResEnum : return "EpsRes"; 323 case HeatCapacityEnum : return "HeatCapacity";324 case IsHutterEnum : return "IsHutter";325 case IsMacAyealPattynEnum : return "IsMacAyealPattyn";326 case IsStokesEnum : return "IsStokes";327 case KffEnum : return "Kff";328 case LatentHeatEnum : return "LatentHeat";329 316 case LowmemEnum : return "Lowmem"; 330 case MaxIterEnum : return "MaxIter";331 317 case MaxNonlinearIterationsEnum : return "MaxNonlinearIterations"; 332 case MeltingPointEnum : return "MeltingPoint";333 318 case MinMechanicalConstraintsEnum : return "MinMechanicalConstraints"; 334 319 case MinThermalConstraintsEnum : return "MinThermalConstraints"; 335 case NStepsEnum : return "NSteps";336 320 case NdtEnum : return "Ndt"; 337 321 case NumOutputEnum : return "NumOutput"; … … 340 324 case NumberOfNodesEnum : return "NumberOfNodes"; 341 325 case NumberOfVerticesEnum : return "NumberOfVertices"; 342 case OptScalEnum : return "OptScal";343 326 case OutputFilePointerEnum : return "OutputFilePointer"; 344 case OutputFileNameEnum : return "OutputFileName";345 case ParameterOutputEnum : return "ParameterOutput";346 327 case PenaltyMeltingEnum : return "PenaltyMelting"; 347 328 case QmuAnalysisEnum : return "QmuAnalysis"; … … 362 343 case PetscRcEnum : return "PetscRc"; 363 344 case SparsityEnum : return "Sparsity"; 364 case TolXEnum : return "TolX";365 345 case VariableDescriptorsEnum : return "VariableDescriptors"; 366 346 case VerboseEnum : return "Verbose"; 367 case WaitOnLockEnum : return "WaitOnLock";368 347 case PetscOptionsStringsEnum : return "PetscOptionsStrings"; 369 348 case PetscOptionsAnalysesEnum : return "PetscOptionsAnalyses"; … … 385 364 case PatersonEnum : return "Paterson"; 386 365 case ArrheniusEnum : return "Arrhenius"; 366 case NumberOfElements2DEnum : return "NumberOfElements2D"; 367 case NumControlTypeEnum : return "NumControlType"; 368 case SpcvyEnum : return "Spcvy"; 369 case HydroQEnum : return "HydroQ"; 370 case VerboseBinaryEnum : return "VerboseBinary"; 371 case NodeOnWaterEnum : return "NodeOnWater"; 372 case YEnum : return "Y"; 373 case GlMeltingRateEnum : return "GlMeltingRate"; 374 case ElementsTypeEnum : return "ElementsType"; 375 case PenaltiesEnum : return "Penalties"; 376 case PrognosticDGEnum : return "PrognosticDG"; 377 case PressureloadEnum : return "Pressureload"; 378 case HydroCREnum : return "HydroCR"; 379 case NameEnum : return "Name"; 380 case VerticesTypeEnum : return "VerticesType"; 381 case HydroKnEnum : return "HydroKn"; 382 case GEnum : return "G"; 383 case InputfilenameEnum : return "Inputfilename"; 384 case SpcvzEnum : return "Spcvz"; 385 case NumberOfNodes2DEnum : return "NumberOfNodes2D"; 386 case NodeOnStokesEnum : return "NodeOnStokes"; 387 case NodeOnHutterEnum : return "NodeOnHutter"; 388 case ZEnum : return "Z"; 389 case GlMigrationEnum : return "GlMigration"; 390 case RiftinfoEnum : return "Riftinfo"; 391 case ElementOnIceSheetEnum : return "ElementOnIceSheet"; 392 case SpcthicknessEnum : return "Spcthickness"; 393 case SpctemperatureEnum : return "Spctemperature"; 394 case PenaltyLockEnum : return "PenaltyLock"; 395 case SpcvxEnum : return "Spcvx"; 396 case UpperelementsEnum : return "Upperelements"; 397 case HydroPEnum : return "HydroP"; 398 case NodeOnPattynEnum : return "NodeOnPattyn"; 399 case EdgesEnum : return "Edges"; 400 case Elements2DEnum : return "Elements2D"; 401 case XEnum : return "X"; 402 case NumCmResponsesEnum : return "NumCmResponses"; 403 case NodeOnMacayealEnum : return "NodeOnMacayeal"; 404 case ElementconnectivityEnum : return "Elementconnectivity"; 405 case SpcwatercolumnEnum : return "Spcwatercolumn"; 406 case ArtificialDiffusivityEnum : return "ArtificialDiffusivity"; 407 case HydroNEnum : return "HydroN"; 408 case BorderstokesEnum : return "Borderstokes"; 409 case NumlayersEnum : return "Numlayers"; 410 case DiagnosticRefEnum : return "DiagnosticRef"; 411 case IshutterEnum : return "Ishutter"; 412 case IsmacayealpattynEnum : return "Ismacayealpattyn"; 413 case IsstokesEnum : return "Isstokes"; 414 case StokesreconditioningEnum : return "Stokesreconditioning"; 415 case LowerelementsEnum : return "Lowerelements"; 416 case HeatcapacityEnum : return "Heatcapacity"; 417 case LatentheatEnum : return "Latentheat"; 418 case ThermalconductivityEnum : return "Thermalconductivity"; 419 case MeltingpointEnum : return "Meltingpoint"; 420 case ReferencetemperatureEnum : return "Referencetemperature"; 421 case DhdtEnum : return "Dhdt"; 422 case GeothermalfluxEnum : return "Geothermalflux"; 423 case IsprognosticEnum : return "Isprognostic"; 424 case IsdiagnosticEnum : return "Isdiagnostic"; 425 case IsthermalEnum : return "Isthermal"; 426 case NstepsEnum : return "Nsteps"; 427 case MaxiterEnum : return "Maxiter"; 428 case TolxEnum : return "Tolx"; 429 case OptscalEnum : return "Optscal"; 430 case EpsvelEnum : return "Epsvel"; 431 case MeanvelEnum : return "Meanvel"; 432 case ParameteroutputEnum : return "Parameteroutput"; 433 case OutputfilenameEnum : return "Outputfilename"; 434 case WaterfractionEnum : return "Waterfraction"; 435 case WatercolumnEnum : return "Watercolumn"; 436 case WaitonlockEnum : return "Waitonlock"; 437 case NumberOfVariablesEnum : return "NumberOfVariables"; 438 case NumvariabledescriptorsEnum : return "Numvariabledescriptors"; 439 case NumberOfResponsesEnum : return "NumberOfResponses"; 440 case NumresponsedescriptorsEnum : return "Numresponsedescriptors"; 441 case NpartEnum : return "Npart"; 442 case QmuMassFluxNumProfilesEnum : return "QmuMassFluxNumProfiles"; 387 443 case VxMeshEnum : return "VxMesh"; 388 444 case VyMeshEnum : return "VyMesh"; 389 445 case VzMeshEnum : return "VzMesh"; 390 case IsDiagnosticEnum : return "IsDiagnostic";391 case IsPrognosticEnum : return "IsPrognostic";392 case IsThermalEnum : return "IsThermal";393 446 case EnthalpySolutionEnum : return "EnthalpySolution"; 394 447 case EnthalpyAnalysisEnum : return "EnthalpyAnalysis"; 395 448 case EnthalpyEnum : return "Enthalpy"; 396 449 case EnthalpyPicardEnum : return "EnthalpyPicard"; 397 case WaterFractionEnum : return "WaterFraction";398 case ReferenceTemperatureEnum : return "ReferenceTemperature";399 450 case ThicknessAbsGradientEnum : return "ThicknessAbsGradient"; 400 451 case VelAbsGradientEnum : return "VelAbsGradient"; -
issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp
r8330 r8926 30 30 31 31 /*Fetch data: */ 32 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle, "spcthickness");32 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum); 33 33 34 34 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
r8330 r8926 30 30 31 31 /*Get edges and elements*/ 32 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle, "edges");33 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");34 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");32 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,EdgesEnum); 33 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 34 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 35 35 36 36 /*First load data:*/ -
issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
r8330 r8926 39 39 40 40 /*First fetch data: */ 41 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");42 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");43 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");44 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");45 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");46 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");47 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");41 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 42 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 43 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 44 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 45 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 46 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 47 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 48 48 49 49 if(continuous_galerkin){ -
issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp
r8399 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");29 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");30 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");31 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");32 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle, "surface_accumulation_rate");33 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");34 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");35 IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle, "dhdt");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 29 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 30 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 31 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 32 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 33 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 34 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 35 IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,DhdtEnum); 36 36 if (iomodel->dim==3){ 37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 39 39 } 40 40 -
issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp
r8823 r8926 28 28 29 29 /*Fetch data: */ 30 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle, "spcvx");31 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle, "spcvy");30 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum); 31 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum); 32 32 33 33 count=1; //matlab indexing -
issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateNodesBalancevelocities.cpp
r8330 r8926 32 32 33 33 /*First fetch data: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 for (i=0;i<iomodel->numberofvertices;i++){ 41 41 -
issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/UpdateElementsBalancevelocities.cpp
r8399 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");29 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");30 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");31 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");32 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle, "surface_accumulation_rate");33 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");34 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 29 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 30 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 31 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 32 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 33 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 34 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 35 35 36 36 if (iomodel->dim==3){ 37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 39 39 } 40 40 -
issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
r8330 r8926 32 32 33 33 /*First fetch data: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp
r8330 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");25 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");26 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 25 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 26 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 27 27 28 28 if (iomodel->dim==3){ 29 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");30 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");29 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 30 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 31 31 } 32 32 -
issm/trunk/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp
r8647 r8926 28 28 29 29 /*What control type?*/ 30 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle, "control_type");30 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum); 31 31 parameters->AddObject(new IntVecParam(ControlTypeEnum,iomodel->control_type,iomodel->num_control_type)); 32 32 xfree((void**)&iomodel->control_type); … … 39 39 parameters->AddObject(new BoolParam(ControlSteadyEnum,false)); 40 40 } 41 parameters->AddObject(new IntParam(N StepsEnum,iomodel->nsteps));42 parameters->AddObject(new DoubleParam(Tol XEnum,iomodel->tolx));41 parameters->AddObject(new IntParam(NstepsEnum,iomodel->nsteps)); 42 parameters->AddObject(new DoubleParam(TolxEnum,iomodel->tolx)); 43 43 parameters->AddObject(new DoubleParam(EpsCmEnum,iomodel->eps_cm)); 44 parameters->AddObject(new DoubleParam(Mean VelEnum,iomodel->meanvel));44 parameters->AddObject(new DoubleParam(MeanvelEnum,iomodel->meanvel)); 45 45 46 46 parameters->AddObject(new BoolParam(CmGradientEnum,iomodel->cm_gradient)); 47 47 48 48 /*Now, recover fit, optscal and maxiter as vectors: */ 49 IoModelFetchData(&iomodel->cm_responses,NULL,NULL,iomodel_handle, "cm_responses");50 IoModelFetchData(&iomodel->cm_jump,NULL,NULL,iomodel_handle, "cm_jump");51 IoModelFetchData(&iomodel->optscal,NULL,NULL,iomodel_handle, "optscal");52 IoModelFetchData(&iomodel->maxiter,NULL,NULL,iomodel_handle, "maxiter");49 IoModelFetchData(&iomodel->cm_responses,NULL,NULL,iomodel_handle,CmResponsesEnum); 50 IoModelFetchData(&iomodel->cm_jump,NULL,NULL,iomodel_handle,CmJumpEnum); 51 IoModelFetchData(&iomodel->optscal,NULL,NULL,iomodel_handle,OptscalEnum); 52 IoModelFetchData(&iomodel->maxiter,NULL,NULL,iomodel_handle,MaxiterEnum); 53 53 54 parameters->AddObject(new DoubleMatParam(Opt ScalEnum,iomodel->optscal,iomodel->nsteps,iomodel->num_control_type));54 parameters->AddObject(new DoubleMatParam(OptscalEnum,iomodel->optscal,iomodel->nsteps,iomodel->num_control_type)); 55 55 parameters->AddObject(new DoubleMatParam(CmResponsesEnum,iomodel->cm_responses,iomodel->nsteps,iomodel->num_cm_responses)); 56 56 parameters->AddObject(new DoubleVecParam(CmJumpEnum,iomodel->cm_jump,iomodel->nsteps)); 57 parameters->AddObject(new DoubleVecParam(Max IterEnum,iomodel->maxiter,iomodel->nsteps));57 parameters->AddObject(new DoubleVecParam(MaxiterEnum,iomodel->maxiter,iomodel->nsteps)); 58 58 59 59 xfree((void**)&iomodel->cm_responses); -
issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
r8635 r8926 25 25 26 26 /*Fetch data needed: */ 27 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");28 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle, "control_type");29 IoModelFetchData(&iomodel->weights,NULL,NULL,iomodel_handle, "weights");30 IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle, "cm_min");31 IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle, "cm_max");32 IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle, "vx_obs");33 IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle, "vy_obs");34 IoModelFetchData(&iomodel->thickness_obs,NULL,NULL,iomodel_handle, "thickness_obs");27 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 28 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum); 29 IoModelFetchData(&iomodel->weights,NULL,NULL,iomodel_handle,WeightsEnum); 30 IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,CmMinEnum); 31 IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,CmMaxEnum); 32 IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,VxObsEnum); 33 IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,VyObsEnum); 34 IoModelFetchData(&iomodel->thickness_obs,NULL,NULL,iomodel_handle,ThicknessObsEnum); 35 35 for(i=0;i<iomodel->num_control_type;i++){ 36 36 switch((int)iomodel->control_type[i]){ 37 case Dh DtEnum:38 IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle, "dhdt");37 case DhdtEnum: 38 IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,DhdtEnum); 39 39 break; 40 40 case VxEnum: 41 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");41 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 42 42 break; 43 43 case VyEnum: 44 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");44 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 45 45 break; 46 46 case DragCoefficientEnum: 47 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");47 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 48 48 break; 49 49 case RheologyBbarEnum: 50 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");50 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 51 51 break; 52 52 default: -
issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r8330 r8926 35 35 36 36 /*Fetch data needed: */ 37 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");38 IoModelFetchData(&iomodel->elementconnectivity,NULL,NULL,iomodel_handle, "elementconnectivity");39 IoModelFetchData(&iomodel->upperelements,NULL,NULL,iomodel_handle, "upperelements");40 IoModelFetchData(&iomodel->lowerelements,NULL,NULL,iomodel_handle, "lowerelements");41 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");42 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");43 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle, "control_type");44 IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle, "cm_min");45 IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle, "cm_max");37 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 38 IoModelFetchData(&iomodel->elementconnectivity,NULL,NULL,iomodel_handle,ElementconnectivityEnum); 39 IoModelFetchData(&iomodel->upperelements,NULL,NULL,iomodel_handle,UpperelementsEnum); 40 IoModelFetchData(&iomodel->lowerelements,NULL,NULL,iomodel_handle,LowerelementsEnum); 41 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 42 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 43 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum); 44 IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,CmMinEnum); 45 IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,CmMaxEnum); 46 46 47 47 /*Create elements and materials: */ … … 74 74 75 75 /*Create vertices: */ 76 IoModelFetchData(&iomodel->x,NULL,NULL,iomodel_handle, "x");77 IoModelFetchData(&iomodel->y,NULL,NULL,iomodel_handle, "y");78 IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle, "z");79 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");80 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");76 IoModelFetchData(&iomodel->x,NULL,NULL,iomodel_handle,XEnum); 77 IoModelFetchData(&iomodel->y,NULL,NULL,iomodel_handle,YEnum); 78 IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,ZEnum); 79 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 80 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 81 81 82 82 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r8799 r8926 17 17 18 18 Parameters* parameters = NULL; 19 19 20 char** parameteroutput=NULL; 20 char* descriptor=NULL; 21 char* tag=NULL; 22 #ifdef _SERIAL_ 23 mxArray* pfield=NULL; 24 mxArray* pfield2=NULL; 25 #endif 26 int dummy; 27 int numpetscoptions; 28 29 /*petsc options: */ 30 double* analyses=NULL; 31 char** petscstrings=NULL; 32 21 int numparameters=0; 22 33 23 if(*pparameters)return; //do not create parameters twice! 34 24 … … 41 31 42 32 parameters->AddObject(new IntParam(DimEnum,iomodel->dim)); 43 parameters->AddObject(new BoolParam(Is HutterEnum,iomodel->ishutter));44 parameters->AddObject(new BoolParam(Is MacAyealPattynEnum,iomodel->ismacayealpattyn));45 parameters->AddObject(new BoolParam(Is StokesEnum,iomodel->isstokes));33 parameters->AddObject(new BoolParam(IshutterEnum,iomodel->ishutter)); 34 parameters->AddObject(new BoolParam(IsmacayealpattynEnum,iomodel->ismacayealpattyn)); 35 parameters->AddObject(new BoolParam(IsstokesEnum,iomodel->isstokes)); 46 36 parameters->AddObject(new IntParam(OutputFrequencyEnum,iomodel->output_frequency)); 47 37 parameters->AddObject(new DoubleParam(EpsResEnum,iomodel->eps_res)); … … 49 39 parameters->AddObject(new DoubleParam(EpsAbsEnum,iomodel->eps_abs)); 50 40 parameters->AddObject(new IntParam(MaxNonlinearIterationsEnum,(IssmInt)iomodel->max_nonlinear_iterations)); 51 parameters->AddObject(new DoubleParam(Eps VelEnum,iomodel->epsvel));41 parameters->AddObject(new DoubleParam(EpsvelEnum,iomodel->epsvel)); 52 42 parameters->AddObject(new DoubleParam(YtsEnum,iomodel->yts)); 53 43 parameters->AddObject(new DoubleParam(DtEnum,iomodel->dt*iomodel->yts)); //Ndt is in yeats in iomodel … … 61 51 parameters->AddObject(new IntParam(ConnectivityEnum,iomodel->connectivity)); 62 52 parameters->AddObject(new DoubleParam(BetaEnum,iomodel->beta)); 63 parameters->AddObject(new DoubleParam(Melting PointEnum,iomodel->meltingpoint));64 parameters->AddObject(new DoubleParam(Reference TemperatureEnum,iomodel->referencetemperature));65 parameters->AddObject(new DoubleParam(Latent HeatEnum,iomodel->latentheat));66 parameters->AddObject(new DoubleParam(Heat CapacityEnum,iomodel->heatcapacity));53 parameters->AddObject(new DoubleParam(MeltingpointEnum,iomodel->meltingpoint)); 54 parameters->AddObject(new DoubleParam(ReferencetemperatureEnum,iomodel->referencetemperature)); 55 parameters->AddObject(new DoubleParam(LatentheatEnum,iomodel->latentheat)); 56 parameters->AddObject(new DoubleParam(HeatcapacityEnum,iomodel->heatcapacity)); 67 57 parameters->AddObject(new IntParam(ArtDiffEnum,iomodel->artdiff)); 68 58 parameters->AddObject(new IntParam(BasalMeltingRateCorrectionApplyEnum,iomodel->basal_melting_rate_correction_apply)); … … 72 62 parameters->AddObject(new IntParam(MinMechanicalConstraintsEnum,iomodel->min_mechanical_constraints)); 73 63 parameters->AddObject(new IntParam(StabilizeConstraintsEnum,iomodel->stabilize_constraints)); 74 parameters->AddObject(new DoubleParam(Stokes ReconditioningEnum,iomodel->stokesreconditioning));64 parameters->AddObject(new DoubleParam(StokesreconditioningEnum,iomodel->stokesreconditioning)); 75 65 parameters->AddObject(new IntParam(ShelfDampeningEnum,iomodel->shelf_dampening)); 76 66 parameters->AddObject(new DoubleParam(ViscosityOvershootEnum,iomodel->viscosity_overshoot)); 77 parameters->AddObject(new BoolParam(Wait OnLockEnum,iomodel->waitonlock));67 parameters->AddObject(new BoolParam(WaitonlockEnum,iomodel->waitonlock)); 78 68 parameters->AddObject(new IntParam(NumberOfElementsEnum,iomodel->numberofelements)); 79 69 parameters->AddObject(new BoolParam(IoGatherEnum,iomodel->io_gather)); 80 70 parameters->AddObject(new IntParam(GroundingLineMigrationEnum,iomodel->gl_migration)); 81 71 parameters->AddObject(new IntParam(RheologyLawEnum,iomodel->rheology_law)); 82 parameters->AddObject(new BoolParam(Is DiagnosticEnum,iomodel->isdiagnostic));83 parameters->AddObject(new BoolParam(Is PrognosticEnum,iomodel->isprognostic));84 parameters->AddObject(new BoolParam(Is ThermalEnum,iomodel->isthermal));72 parameters->AddObject(new BoolParam(IsdiagnosticEnum,iomodel->isdiagnostic)); 73 parameters->AddObject(new BoolParam(IsprognosticEnum,iomodel->isprognostic)); 74 parameters->AddObject(new BoolParam(IsthermalEnum,iomodel->isthermal)); 85 75 86 76 /*Deal with more complex parameters*/ 87 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle, "riftinfo");77 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum); 88 78 parameters->AddObject(new IntParam(NumRiftsEnum,iomodel->numrifts)); 89 79 xfree((void**)&iomodel->riftinfo); 90 80 91 parameters->AddObject(new IntParam(NumOutputEnum,iomodel->numoutput)); 92 if(iomodel->numoutput){ 93 parameteroutput=(char**)xmalloc(iomodel->numoutput*sizeof(char*)); 94 95 tag=(char*)xmalloc((strlen("parameteroutput_i")+1)*sizeof(char)); 96 for(i=0;i<iomodel->numoutput;i++){ 97 sprintf(tag,"%s%i","parameteroutput_",i); 98 IoModelFetchData(&descriptor,iomodel_handle,tag); 99 parameteroutput[i]=descriptor; 100 } 101 102 /*Ok, we have all the parameter output descriptors. Build a parameter with it: */ 103 parameters->AddObject(new StringArrayParam(ParameterOutputEnum,parameteroutput,iomodel->numoutput)); 104 } 105 106 /*Free data: {{{1*/ 107 xfree((void**)&tag); 108 for(i=0;i<iomodel->numoutput;i++){ 109 char* descriptor=parameteroutput[i]; 110 xfree((void**)&descriptor); 111 } 112 xfree((void**)¶meteroutput); 113 /*}}}*/ 81 82 /*Deal with parametr outputs: */ 83 IoModelFetchData(¶meteroutput,&numparameters,iomodel_handle,ParameteroutputEnum); 84 if(numparameters) parameters->AddObject(new StringArrayParam(ParameteroutputEnum,parameteroutput,numparameters)); 114 85 115 86 /*Before returning, create parameters in case we are running Qmu or control types runs: */ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r8823 r8926 32 32 33 33 /*Spcs: fetch data: */ 34 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle, "spcvx");35 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle, "spcvy");36 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle, "spcvz");37 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle, "nodeonhutter");38 IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle, "nodeonmacayeal");39 if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonpattyn,NULL,NULL,iomodel_handle, "nodeonpattyn");40 if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle, "nodeonstokes");41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");42 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");43 IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle, "z");34 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum); 35 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum); 36 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum); 37 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum); 38 IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,NodeOnMacayealEnum); 39 if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonpattyn,NULL,NULL,iomodel_handle,NodeOnPattynEnum); 40 if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 42 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 43 IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,ZEnum); 44 44 45 45 /*Initialize counter: */ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r8823 r8926 37 37 /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the nodes 38 38 * referenced by a certain load must belong to the cluster node): */ 39 IoModelFetchData(&iomodel->pressureload,&iomodel->numberofpressureloads,NULL,iomodel_handle, "pressureload");40 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");41 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");42 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");39 IoModelFetchData(&iomodel->pressureload,&iomodel->numberofpressureloads,NULL,iomodel_handle,PressureloadEnum); 40 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 41 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 42 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 43 43 44 44 /*Initialize counter: */ … … 103 103 104 104 /*create penalties for nodes on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy */ 105 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");106 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");107 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle, "nodeonstokes");108 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");109 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle, "spcvx");110 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle, "spcvy");111 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle, "spcvz");112 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");105 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 106 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 107 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum); 108 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 109 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum); 110 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum); 111 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum); 112 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 113 113 CreateSingleNodeToElementConnectivity(iomodel); 114 114 … … 137 137 138 138 /*Create Penpair for penalties: */ 139 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle, "penalties");139 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum); 140 140 141 141 for(i=0;i<iomodel->numpenalties;i++){ … … 160 160 161 161 /*Create Riffront loads for rifts: */ 162 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,"riftinfo"); 163 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness"); 164 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed"); 165 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface"); 166 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf"); 162 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum); 163 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 164 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 165 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 166 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 167 167 168 168 169 for(i=0;i<iomodel->numrifts;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r8330 r8926 35 35 36 36 /*Create nodes: */ 37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");39 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle, "nodeonhutter");40 IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle, "nodeonmacayeal");41 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle, "nodeonstokes");42 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");43 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");44 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");45 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");46 IoModelFetchData(&iomodel->diagnostic_ref,NULL,NULL,iomodel_handle, "diagnostic_ref");37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 39 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum); 40 IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,NodeOnMacayealEnum); 41 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum); 42 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 43 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 44 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 45 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 46 IoModelFetchData(&iomodel->diagnostic_ref,NULL,NULL,iomodel_handle,DiagnosticRefEnum); 47 47 48 48 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
r8399 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");27 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");28 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");29 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle, "thickness_coeff");30 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");31 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");32 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");33 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle, "drag_p");34 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle, "drag_q");35 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");37 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");38 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");39 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");40 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");41 if(iomodel->gl_migration!=NoneEnum) IoModelFetchData(&iomodel->bathymetry,NULL,NULL,iomodel_handle, "bathymetry");26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 27 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 28 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 29 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum); 30 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 31 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 32 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 33 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum); 34 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum); 35 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 37 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 38 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 39 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 40 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 41 if(iomodel->gl_migration!=NoneEnum) IoModelFetchData(&iomodel->bathymetry,NULL,NULL,iomodel_handle,BathymetryEnum); 42 42 43 43 if (iomodel->dim==3){ 44 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");45 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");46 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle, "vz");47 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle, "surface_accumulation_rate");48 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");49 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");50 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");51 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle, "nodeonstokes");44 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 45 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 46 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum); 47 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 48 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 49 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 50 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 51 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum); 52 52 } 53 53 if(iomodel->control_analysis){ 54 IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle, "vx_obs");55 IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle, "vy_obs");54 IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,VxObsEnum); 55 IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,VyObsEnum); 56 56 } 57 57 -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
r8823 r8926 31 31 32 32 /*Fetch data: */ 33 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle, "spcvx");34 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle, "spcvy");35 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle, "nodeonhutter");33 IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum); 34 IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum); 35 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum); 36 36 37 37 /*Initialize conunter*/ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
r8330 r8926 35 35 36 36 /*First fetch data: */ 37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");39 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle, "nodeonhutter");40 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");41 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");42 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");43 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");44 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 39 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum); 40 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 41 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 42 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 43 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 44 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 45 45 46 46 CreateNumberNodeToElementConnectivity(iomodel); -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp
r8330 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle, "nodeonhutter");27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");28 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle, "thickness_coeff");29 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");30 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");31 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");32 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");33 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");34 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");35 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");36 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");39 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");40 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");26 IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum); 27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 28 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum); 29 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 30 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 31 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 32 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 33 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 34 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 35 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 36 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 37 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 38 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 39 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 40 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 41 41 42 42 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
r8823 r8926 30 30 31 31 /*Fetch data: */ 32 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle, "spcvz");33 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle, "nodeonstokes");32 IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum); 33 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum); 34 34 35 35 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
r8330 r8926 35 35 36 36 /*First fetch data: */ 37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");39 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");40 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");42 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");37 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 38 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 39 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 40 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 42 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 43 43 44 44 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp
r8399 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");28 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle, "thickness_coeff");29 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");30 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");31 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");32 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");33 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");34 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");35 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");36 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle, "surface_accumulation_rate");37 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");38 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");39 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");40 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 28 IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum); 29 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 30 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 31 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 32 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 33 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 34 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 35 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 36 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 37 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 38 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 39 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 40 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 41 41 42 42 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
r8330 r8926 46 46 if(iomodel->dim==2){ 47 47 /*load elements: */ 48 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");48 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 49 49 } 50 50 else{ 51 51 /*load elements2d: */ 52 IoModelFetchData(&iomodel->elements2d,NULL,NULL,iomodel_handle, "elements2d");52 IoModelFetchData(&iomodel->elements2d,NULL,NULL,iomodel_handle,Elements2DEnum); 53 53 } 54 54 … … 65 65 66 66 /*Deal with rifts, they have to be included into one partition only, not several: */ 67 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle, "riftinfo");67 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum); 68 68 69 69 for(i=0;i<iomodel->numrifts;i++){ … … 81 81 82 82 /*Start figuring out, out of the partition, which elements belong to this cpu: */ 83 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");83 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 84 84 for (i=0;i<iomodel->numberofelements;i++){ 85 85 … … 110 110 * penpair has 2 nodes that are poointing toward 2 vertices. 111 111 * The 2 vertices must be in the same cpu as the penpair*/ 112 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle, "penalties");112 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum); 113 113 for(i=0;i<iomodel->numpenalties;i++){ 114 114 if(my_vertices[(int)iomodel->penalties[2*i+0]-1] && !my_vertices[(int)iomodel->penalties[2*i+1]-1]){ -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
r8498 r8926 31 31 32 32 /*Fetch data: */ 33 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle, "spctemperature");33 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum); 34 34 35 35 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
r8483 r8926 32 32 33 33 /*Create nodes and vertices: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp
r8487 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle, "drag_p");32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle, "drag_q");33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle, "pressure");41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle, "temperature");42 IoModelFetchData(&iomodel->waterfraction,NULL,NULL,iomodel_handle, "waterfraction");43 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle, "geothermalflux");44 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");45 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");46 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle, "vz");26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum); 32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum); 33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum); 41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum); 42 IoModelFetchData(&iomodel->waterfraction,NULL,NULL,iomodel_handle,WaterfractionEnum); 43 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum); 44 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 45 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 46 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum); 47 47 48 48 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp
r8330 r8926 28 28 29 29 /*Fetch data: */ 30 IoModelFetchData(&iomodel->spcwatercolumn,NULL,NULL,iomodel_handle, "spcwatercolumn");30 IoModelFetchData(&iomodel->spcwatercolumn,NULL,NULL,iomodel_handle,SpcwatercolumnEnum); 31 31 32 32 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp
r8330 r8926 32 32 33 33 /*Create nodes and vertices: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp
r8392 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");27 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");28 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle, "drag_p");29 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle, "drag_q");30 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");31 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");32 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");33 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");34 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");35 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");36 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");37 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle, "pressure");38 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle, "temperature");39 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");40 IoModelFetchData(&iomodel->watercolumn,NULL,NULL,iomodel_handle, "watercolumn");41 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle, "geothermalflux");42 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");43 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");44 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle, "vz");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 27 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 28 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum); 29 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum); 30 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 31 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 32 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 33 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 34 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 35 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 36 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 37 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum); 38 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum); 39 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 40 IoModelFetchData(&iomodel->watercolumn,NULL,NULL,iomodel_handle,WatercolumnEnum); 41 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum); 42 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 43 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 44 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum); 45 45 46 46 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r8330 r8926 29 29 30 30 //create penalties for nodes: no node can have a temperature over the melting point 31 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");32 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");31 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 32 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 33 33 CreateSingleNodeToElementConnectivity(iomodel); 34 34 -
issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
r8330 r8926 32 32 33 33 /*First fetch data: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp
r8399 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle, "drag_p");32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle, "drag_q");33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");40 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle, "surface_accumulation_rate");41 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");42 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");43 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");44 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle, "pressure");26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum); 32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum); 33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 40 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 41 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 42 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 43 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 44 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum); 45 45 46 46 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
r8330 r8926 93 93 94 94 /*Get edges and elements*/ 95 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle, "edges");96 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");95 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle,EdgesEnum); 96 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 97 97 if (cols!=4) _error_("field edges should have 4 columns"); 98 98 -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
r8330 r8926 31 31 32 32 /*Fetch data: */ 33 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle, "spcthickness");33 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum); 34 34 35 35 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r8330 r8926 32 32 33 33 /*Get edges and elements*/ 34 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle, "edges");35 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");36 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");34 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,EdgesEnum); 35 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 36 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 37 37 38 38 /*First load data:*/ … … 57 57 58 58 /*Create Penpair for penalties: */ 59 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle, "penalties");60 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");59 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum); 60 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 61 61 62 62 for(i=0;i<iomodel->numpenalties;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r8330 r8926 39 39 40 40 /*First fetch data: */ 41 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");42 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");43 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");44 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");45 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");46 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");47 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");41 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 42 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 43 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 44 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 45 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 46 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 47 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 48 48 49 49 if(continuous_galerkin){ -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
r8399 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");29 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");30 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle, "surface_ablation_rate");31 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle, "surface_mass_balance");32 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle, "basal_melting_rate");33 if(iomodel->basal_melting_rate_correction_apply)IoModelFetchData(&iomodel->basal_melting_rate_correction,NULL,NULL,iomodel_handle, "basal_melting_rate_correction");34 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");35 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 25 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 26 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 27 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 28 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 29 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum); 30 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum); 31 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum); 32 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum); 33 if(iomodel->basal_melting_rate_correction_apply)IoModelFetchData(&iomodel->basal_melting_rate_correction,NULL,NULL,iomodel_handle,BasalMeltingRateCorrectionEnum); 34 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 35 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 36 36 37 37 if (iomodel->dim==3){ 38 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");39 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle, "pressure");41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle, "temperature");38 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 39 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum); 41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum); 42 42 } 43 43 -
issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp
r8330 r8926 79 79 for(i=0;i<iomodel->numvariabledescriptors;i++){ 80 80 sprintf(tag,"%s%i","variabledescriptor",i+1); 81 IoModelFetchData(&descriptor,iomodel_handle,tag); 81 _error_("not yet"); 82 //IoModelFetchData(&descriptor,iomodel_handle,tag); 82 83 variabledescriptors[i]=descriptor; 83 84 } … … 93 94 for(i=0;i<iomodel->numresponsedescriptors;i++){ 94 95 sprintf(tag,"%s%i","responsedescriptor",i+1); 95 IoModelFetchData(&descriptor,iomodel_handle,tag); 96 _error_("not yet"); 97 //IoModelFetchData(&descriptor,iomodel_handle,tag); 96 98 responsedescriptors[i]=descriptor; 97 99 } … … 105 107 parameters->AddObject(new IntParam(QmuNPartEnum,iomodel->qmu_npart)); 106 108 107 IoModelFetchData(&dpart,NULL,NULL,iomodel_handle,"part"); 109 //IoModelFetchData(&dpart,NULL,NULL,iomodel_handle,PartEnum); 110 _error_("not yet"); 108 111 109 112 if(!dpart){ … … 126 129 127 130 /*Recover data: */ 128 IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,EnumToModelField(StringToEnumx(tag))); 131 //IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,StringToEnumx(tag)); 132 _error_("not yet"); 129 133 130 134 /*Convert units: */ … … 162 166 for(i=0;i<M;i++){ 163 167 sprintf(tag,"%s%i","qmu_mass_flux_segments",i+1); //names were created using Matlab indexing convention 164 IoModelFetchData(&temp_matrix,&temp_m,&temp_n,iomodel_handle,tag); 168 //IoModelFetchData(&temp_matrix,&temp_m,&temp_n,iomodel_handle,tag); 169 _error_("not yet"); 165 170 166 171 /*This temp_matrix represents all the segments, for all elements. On this cpu, we only have a subset of these -
issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
r8330 r8926 32 32 33 33 /*First fetch data: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp
r8330 r8926 21 21 22 22 /*Fetch data needed: */ 23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");24 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");25 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");26 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");23 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 24 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 25 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 26 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 27 27 28 28 if (iomodel->dim==3){ 29 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");30 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");29 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 30 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 31 31 } 32 32 -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r8330 r8926 31 31 32 32 /*Fetch data: */ 33 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle, "spctemperature");33 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum); 34 34 35 35 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r8330 r8926 30 30 31 31 //create penalties for nodes: no node can have a temperature over the melting point 32 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle, "spctemperature");33 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");32 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum); 33 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 34 34 CreateSingleNodeToElementConnectivity(iomodel); 35 35 -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
r8330 r8926 32 32 33 33 /*Create nodes and vertices: */ 34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle, "nodeonbed");35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle, "nodeonsurface");36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle, "nodeonicesheet");37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle, "nodeoniceshelf");38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle, "vertices_type");39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle, "nodeonwater");34 IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum); 35 IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum); 36 IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum); 37 IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum); 38 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum); 39 IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum); 40 40 41 41 for (i=0;i<iomodel->numberofvertices;i++){ -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
r8330 r8926 24 24 25 25 /*Fetch data needed: */ 26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle, "elements");27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle, "thickness");28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle, "surface");29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle, "bed");30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle, "drag_coefficient");31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle, "drag_p");32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle, "drag_q");33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle, "elementoniceshelf");34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle, "elementonbed");35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle, "elementonsurface");36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle, "elementonwater");37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle, "elements_type");38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle, "rheology_B");39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle, "rheology_n");40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle, "pressure");41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle, "temperature");42 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle, "geothermalflux");43 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle, "vx");44 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle, "vy");45 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle, "vz");26 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum); 27 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum); 28 IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum); 29 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum); 30 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum); 31 IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum); 32 IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum); 33 IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum); 34 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum); 35 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum); 36 IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum); 37 IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum); 38 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum); 39 IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum); 40 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum); 41 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum); 42 IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum); 43 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum); 44 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum); 45 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum); 46 46 47 47 /*Update elements: */ -
issm/trunk/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
r8548 r8926 15 15 void UpdateElementsTransient(Elements* elements, Parameters* parameters,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 /*Intermediary*/ 18 int i,j,k; 19 int counter; 20 Element *element = NULL; 21 char fetchstring[100]; 22 double time; 23 double forcingenum; 17 /*nothing for now: */ 24 18 25 /*if no forcings, bail out: */26 if(!iomodel->numforcings)return;27 28 /*download whatever data will persist through forcing loop: */29 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");30 31 /*download forcing types: */32 IoModelFetchData(&iomodel->forcingtypes,NULL,NULL,iomodel_handle,"forcingtypes");33 34 /*loop over forcings: */35 for(i=0;i<iomodel->numforcings;i++){36 37 forcingenum=iomodel->forcingtypes[i];38 39 sprintf(&fetchstring[0],"forcing_%s_num_time_steps",EnumToStringx(forcingenum));40 IoModelFetchData(&iomodel->forcing_numtimesteps,iomodel_handle,fetchstring);41 sprintf(&fetchstring[0],"forcing_%s_time_steps",EnumToStringx(forcingenum));42 IoModelFetchData(&iomodel->timesteps,NULL,NULL,iomodel_handle,fetchstring);43 44 for(j=0;j<iomodel->forcing_numtimesteps;j++){45 46 time=iomodel->timesteps[j]*iomodel->yts;47 sprintf(&fetchstring[0],"forcing_%s_%i",EnumToStringx(forcingenum),j+1);48 IoModelFetchData(&iomodel->forcing,NULL,NULL,iomodel_handle,fetchstring);49 50 /*we now have the forcing for the corresponding time step, for all the nodes. Use this51 *to write over the existing smb input: */52 counter=0;53 for (k=0;k<iomodel->numberofelements;k++){54 if(iomodel->my_elements[k]){55 element=(Element*)elements->GetObjectByOffset(counter);56 element->UpdateForcing(k,iomodel,j,time,forcingenum,parameters);57 counter++;58 }59 }60 /*Free ressources:*/61 xfree((void**)&iomodel->forcing);62 }63 64 /*Free ressources:*/65 xfree((void**)&iomodel->timesteps);66 }67 68 /*Free ressources:*/69 xfree((void**)&iomodel->forcing);70 xfree((void**)&iomodel->timesteps);71 xfree((void**)&iomodel->elements);72 xfree((void**)&iomodel->forcingtypes);73 19 } -
issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp
r8263 r8926 53 53 54 54 /*We don't have a file pointer. Retrieve the output file name and open it for writing:*/ 55 parameters->FindParam(&outputfilename,Output FileNameEnum);55 parameters->FindParam(&outputfilename,OutputfilenameEnum); 56 56 57 57 /*What strategy? : */ -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r8806 r8926 155 155 else if (strcmp(name,"ControlType")==0) return ControlTypeEnum; 156 156 else if (strcmp(name,"Converged")==0) return ConvergedEnum; 157 else if (strcmp(name,"DhDt")==0) return DhDtEnum;158 157 else if (strcmp(name,"DragCoefficient")==0) return DragCoefficientEnum; 159 158 else if (strcmp(name,"DragP")==0) return DragPEnum; … … 167 166 else if (strcmp(name,"ElementOnSurface")==0) return ElementOnSurfaceEnum; 168 167 else if (strcmp(name,"ElementOnWater")==0) return ElementOnWaterEnum; 169 else if (strcmp(name,"EpsVel")==0) return EpsVelEnum;170 168 else if (strcmp(name,"Fill")==0) return FillEnum; 171 169 else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum; 172 170 else if (strcmp(name,"Friction")==0) return FrictionEnum; 173 else if (strcmp(name,"GeothermalFlux")==0) return GeothermalFluxEnum;174 171 else if (strcmp(name,"HydrostaticAdjustment")==0) return HydrostaticAdjustmentEnum; 175 172 else if (strcmp(name,"Internal")==0) return InternalEnum; … … 185 182 else if (strcmp(name,"SurfaceAverageVelMisfit")==0) return SurfaceAverageVelMisfitEnum; 186 183 else if (strcmp(name,"MaxPenetration")==0) return MaxPenetrationEnum; 187 else if (strcmp(name,"MeanVel")==0) return MeanVelEnum;188 184 else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum; 189 185 else if (strcmp(name,"GroundingLineMeltingRate")==0) return GroundingLineMeltingRateEnum; … … 208 204 else if (strcmp(name,"ShelfDampening")==0) return ShelfDampeningEnum; 209 205 else if (strcmp(name,"StabilizeConstraints")==0) return StabilizeConstraintsEnum; 210 else if (strcmp(name,"StokesReconditioning")==0) return StokesReconditioningEnum;211 206 else if (strcmp(name,"SurfaceAccumulationRate")==0) return SurfaceAccumulationRateEnum; 212 207 else if (strcmp(name,"SurfaceAblationRate")==0) return SurfaceAblationRateEnum; … … 266 261 else if (strcmp(name,"Time")==0) return TimeEnum; 267 262 else if (strcmp(name,"OutputFrequency")==0) return OutputFrequencyEnum; 268 else if (strcmp(name,"WaterColumn")==0) return WaterColumnEnum;269 263 else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum; 270 264 else if (strcmp(name,"WaterColumnPicard")==0) return WaterColumnPicardEnum; … … 291 285 else if (strcmp(name,"RhoWater")==0) return RhoWaterEnum; 292 286 else if (strcmp(name,"Gravity")==0) return GravityEnum; 293 else if (strcmp(name,"ThermalConductivity")==0) return ThermalConductivityEnum;294 287 else if (strcmp(name,"BasalMeltingRateCorrection")==0) return BasalMeltingRateCorrectionEnum; 295 288 else if (strcmp(name,"BasalMeltingRateCorrectionApply")==0) return BasalMeltingRateCorrectionApplyEnum; … … 319 312 else if (strcmp(name,"EpsRel")==0) return EpsRelEnum; 320 313 else if (strcmp(name,"EpsRes")==0) return EpsResEnum; 321 else if (strcmp(name,"HeatCapacity")==0) return HeatCapacityEnum;322 else if (strcmp(name,"IsHutter")==0) return IsHutterEnum;323 else if (strcmp(name,"IsMacAyealPattyn")==0) return IsMacAyealPattynEnum;324 else if (strcmp(name,"IsStokes")==0) return IsStokesEnum;325 else if (strcmp(name,"Kff")==0) return KffEnum;326 else if (strcmp(name,"LatentHeat")==0) return LatentHeatEnum;327 314 else if (strcmp(name,"Lowmem")==0) return LowmemEnum; 328 else if (strcmp(name,"MaxIter")==0) return MaxIterEnum;329 315 else if (strcmp(name,"MaxNonlinearIterations")==0) return MaxNonlinearIterationsEnum; 330 else if (strcmp(name,"MeltingPoint")==0) return MeltingPointEnum;331 316 else if (strcmp(name,"MinMechanicalConstraints")==0) return MinMechanicalConstraintsEnum; 332 317 else if (strcmp(name,"MinThermalConstraints")==0) return MinThermalConstraintsEnum; 333 else if (strcmp(name,"NSteps")==0) return NStepsEnum;334 318 else if (strcmp(name,"Ndt")==0) return NdtEnum; 335 319 else if (strcmp(name,"NumOutput")==0) return NumOutputEnum; … … 338 322 else if (strcmp(name,"NumberOfNodes")==0) return NumberOfNodesEnum; 339 323 else if (strcmp(name,"NumberOfVertices")==0) return NumberOfVerticesEnum; 340 else if (strcmp(name,"OptScal")==0) return OptScalEnum;341 324 else if (strcmp(name,"OutputFilePointer")==0) return OutputFilePointerEnum; 342 else if (strcmp(name,"OutputFileName")==0) return OutputFileNameEnum;343 else if (strcmp(name,"ParameterOutput")==0) return ParameterOutputEnum;344 325 else if (strcmp(name,"PenaltyMelting")==0) return PenaltyMeltingEnum; 345 326 else if (strcmp(name,"QmuAnalysis")==0) return QmuAnalysisEnum; … … 360 341 else if (strcmp(name,"PetscRc")==0) return PetscRcEnum; 361 342 else if (strcmp(name,"Sparsity")==0) return SparsityEnum; 362 else if (strcmp(name,"TolX")==0) return TolXEnum;363 343 else if (strcmp(name,"VariableDescriptors")==0) return VariableDescriptorsEnum; 364 344 else if (strcmp(name,"Verbose")==0) return VerboseEnum; 365 else if (strcmp(name,"WaitOnLock")==0) return WaitOnLockEnum;366 345 else if (strcmp(name,"PetscOptionsStrings")==0) return PetscOptionsStringsEnum; 367 346 else if (strcmp(name,"PetscOptionsAnalyses")==0) return PetscOptionsAnalysesEnum; … … 383 362 else if (strcmp(name,"Paterson")==0) return PatersonEnum; 384 363 else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum; 364 else if (strcmp(name,"NumberOfElements2D")==0) return NumberOfElements2DEnum; 365 else if (strcmp(name,"NumControlType")==0) return NumControlTypeEnum; 366 else if (strcmp(name,"Spcvy")==0) return SpcvyEnum; 367 else if (strcmp(name,"HydroQ")==0) return HydroQEnum; 368 else if (strcmp(name,"VerboseBinary")==0) return VerboseBinaryEnum; 369 else if (strcmp(name,"NodeOnWater")==0) return NodeOnWaterEnum; 370 else if (strcmp(name,"Y")==0) return YEnum; 371 else if (strcmp(name,"GlMeltingRate")==0) return GlMeltingRateEnum; 372 else if (strcmp(name,"ElementsType")==0) return ElementsTypeEnum; 373 else if (strcmp(name,"Penalties")==0) return PenaltiesEnum; 374 else if (strcmp(name,"PrognosticDG")==0) return PrognosticDGEnum; 375 else if (strcmp(name,"Pressureload")==0) return PressureloadEnum; 376 else if (strcmp(name,"HydroCR")==0) return HydroCREnum; 377 else if (strcmp(name,"Name")==0) return NameEnum; 378 else if (strcmp(name,"VerticesType")==0) return VerticesTypeEnum; 379 else if (strcmp(name,"HydroKn")==0) return HydroKnEnum; 380 else if (strcmp(name,"G")==0) return GEnum; 381 else if (strcmp(name,"Inputfilename")==0) return InputfilenameEnum; 382 else if (strcmp(name,"Spcvz")==0) return SpcvzEnum; 383 else if (strcmp(name,"NumberOfNodes2D")==0) return NumberOfNodes2DEnum; 384 else if (strcmp(name,"NodeOnStokes")==0) return NodeOnStokesEnum; 385 else if (strcmp(name,"NodeOnHutter")==0) return NodeOnHutterEnum; 386 else if (strcmp(name,"Z")==0) return ZEnum; 387 else if (strcmp(name,"GlMigration")==0) return GlMigrationEnum; 388 else if (strcmp(name,"Riftinfo")==0) return RiftinfoEnum; 389 else if (strcmp(name,"ElementOnIceSheet")==0) return ElementOnIceSheetEnum; 390 else if (strcmp(name,"Spcthickness")==0) return SpcthicknessEnum; 391 else if (strcmp(name,"Spctemperature")==0) return SpctemperatureEnum; 392 else if (strcmp(name,"PenaltyLock")==0) return PenaltyLockEnum; 393 else if (strcmp(name,"Spcvx")==0) return SpcvxEnum; 394 else if (strcmp(name,"Upperelements")==0) return UpperelementsEnum; 395 else if (strcmp(name,"HydroP")==0) return HydroPEnum; 396 else if (strcmp(name,"NodeOnPattyn")==0) return NodeOnPattynEnum; 397 else if (strcmp(name,"Edges")==0) return EdgesEnum; 398 else if (strcmp(name,"Elements2D")==0) return Elements2DEnum; 399 else if (strcmp(name,"X")==0) return XEnum; 400 else if (strcmp(name,"NumCmResponses")==0) return NumCmResponsesEnum; 401 else if (strcmp(name,"NodeOnMacayeal")==0) return NodeOnMacayealEnum; 402 else if (strcmp(name,"Elementconnectivity")==0) return ElementconnectivityEnum; 403 else if (strcmp(name,"Spcwatercolumn")==0) return SpcwatercolumnEnum; 404 else if (strcmp(name,"ArtificialDiffusivity")==0) return ArtificialDiffusivityEnum; 405 else if (strcmp(name,"HydroN")==0) return HydroNEnum; 406 else if (strcmp(name,"Borderstokes")==0) return BorderstokesEnum; 407 else if (strcmp(name,"Numlayers")==0) return NumlayersEnum; 408 else if (strcmp(name,"DiagnosticRef")==0) return DiagnosticRefEnum; 409 else if (strcmp(name,"Ishutter")==0) return IshutterEnum; 410 else if (strcmp(name,"Ismacayealpattyn")==0) return IsmacayealpattynEnum; 411 else if (strcmp(name,"Isstokes")==0) return IsstokesEnum; 412 else if (strcmp(name,"Stokesreconditioning")==0) return StokesreconditioningEnum; 413 else if (strcmp(name,"Lowerelements")==0) return LowerelementsEnum; 414 else if (strcmp(name,"Heatcapacity")==0) return HeatcapacityEnum; 415 else if (strcmp(name,"Latentheat")==0) return LatentheatEnum; 416 else if (strcmp(name,"Thermalconductivity")==0) return ThermalconductivityEnum; 417 else if (strcmp(name,"Meltingpoint")==0) return MeltingpointEnum; 418 else if (strcmp(name,"Referencetemperature")==0) return ReferencetemperatureEnum; 419 else if (strcmp(name,"Dhdt")==0) return DhdtEnum; 420 else if (strcmp(name,"Geothermalflux")==0) return GeothermalfluxEnum; 421 else if (strcmp(name,"Isprognostic")==0) return IsprognosticEnum; 422 else if (strcmp(name,"Isdiagnostic")==0) return IsdiagnosticEnum; 423 else if (strcmp(name,"Isthermal")==0) return IsthermalEnum; 424 else if (strcmp(name,"Nsteps")==0) return NstepsEnum; 425 else if (strcmp(name,"Maxiter")==0) return MaxiterEnum; 426 else if (strcmp(name,"Tolx")==0) return TolxEnum; 427 else if (strcmp(name,"Optscal")==0) return OptscalEnum; 428 else if (strcmp(name,"Epsvel")==0) return EpsvelEnum; 429 else if (strcmp(name,"Meanvel")==0) return MeanvelEnum; 430 else if (strcmp(name,"Parameteroutput")==0) return ParameteroutputEnum; 431 else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum; 432 else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum; 433 else if (strcmp(name,"Watercolumn")==0) return WatercolumnEnum; 434 else if (strcmp(name,"Waitonlock")==0) return WaitonlockEnum; 435 else if (strcmp(name,"NumberOfVariables")==0) return NumberOfVariablesEnum; 436 else if (strcmp(name,"Numvariabledescriptors")==0) return NumvariabledescriptorsEnum; 437 else if (strcmp(name,"NumberOfResponses")==0) return NumberOfResponsesEnum; 438 else if (strcmp(name,"Numresponsedescriptors")==0) return NumresponsedescriptorsEnum; 439 else if (strcmp(name,"Npart")==0) return NpartEnum; 440 else if (strcmp(name,"QmuMassFluxNumProfiles")==0) return QmuMassFluxNumProfilesEnum; 385 441 else if (strcmp(name,"VxMesh")==0) return VxMeshEnum; 386 442 else if (strcmp(name,"VyMesh")==0) return VyMeshEnum; 387 443 else if (strcmp(name,"VzMesh")==0) return VzMeshEnum; 388 else if (strcmp(name,"IsDiagnostic")==0) return IsDiagnosticEnum;389 else if (strcmp(name,"IsPrognostic")==0) return IsPrognosticEnum;390 else if (strcmp(name,"IsThermal")==0) return IsThermalEnum;391 444 else if (strcmp(name,"EnthalpySolution")==0) return EnthalpySolutionEnum; 392 445 else if (strcmp(name,"EnthalpyAnalysis")==0) return EnthalpyAnalysisEnum; 393 446 else if (strcmp(name,"Enthalpy")==0) return EnthalpyEnum; 394 447 else if (strcmp(name,"EnthalpyPicard")==0) return EnthalpyPicardEnum; 395 else if (strcmp(name,"WaterFraction")==0) return WaterFractionEnum;396 else if (strcmp(name,"ReferenceTemperature")==0) return ReferenceTemperatureEnum;397 448 else if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum; 398 449 else if (strcmp(name,"VelAbsGradient")==0) return VelAbsGradientEnum; -
issm/trunk/src/c/objects/Elements/Element.h
r8800 r8926 59 59 virtual void DeleteResults(void)=0; 60 60 virtual void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type)=0; 61 virtual void UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters)=0;62 61 virtual void InputToResult(int enum_type,int step,double time)=0; 63 62 virtual void ControlInputGetGradient(Vec gradient,int enum_type)=0; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r8800 r8926 374 374 375 375 /*retrieve some parameters: */ 376 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);376 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 377 377 378 378 if(!IsOnBed()){ … … 917 917 /* Get node coordinates and dof list: */ 918 918 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 919 parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);919 parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 920 920 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 921 921 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 1008 1008 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1009 1009 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 1010 parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);1010 parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 1011 1011 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1012 1012 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 1574 1574 /*Retrieve all inputs and parameters*/ 1575 1575 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1576 parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);1576 parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 1577 1577 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1578 1578 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 1643 1643 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1644 1644 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 1645 parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);1645 parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 1646 1646 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 1647 1647 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 1873 1873 this->parameters->FindParam(&dt,DtEnum); 1874 1874 this->parameters->FindParam(&artdiff,ArtDiffEnum); 1875 this->parameters->FindParam(&epsvel,Eps VelEnum);1875 this->parameters->FindParam(&epsvel,EpsvelEnum); 1876 1876 Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input); 1877 1877 Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input); … … 2162 2162 this->parameters->FindParam(&dt,DtEnum); 2163 2163 this->parameters->FindParam(&artdiff,ArtDiffEnum); 2164 this->parameters->FindParam(&epsvel,Eps VelEnum);2164 this->parameters->FindParam(&epsvel,EpsvelEnum); 2165 2165 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2166 2166 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 2533 2533 /*Retrieve all inputs and parameters*/ 2534 2534 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2535 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);2535 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 2536 2536 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2537 2537 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 2598 2598 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2599 2599 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 2600 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);2600 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 2601 2601 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2602 2602 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 2678 2678 /*Retrieve all inputs and parameters*/ 2679 2679 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2680 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);2680 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 2681 2681 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2682 2682 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 2743 2743 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2744 2744 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 2745 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);2745 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 2746 2746 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2747 2747 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 3049 3049 3050 3050 /*Retrieve all inputs and parameters*/ 3051 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);3051 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 3052 3052 rho_ice=matpar->GetRhoIce(); 3053 3053 gravity=matpar->GetG(); … … 3506 3506 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 3507 3507 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 3508 Input* geothermalflux_input=inputs->GetInput(Geothermal FluxEnum); _assert_(geothermalflux_input);3508 Input* geothermalflux_input=inputs->GetInput(GeothermalfluxEnum); _assert_(geothermalflux_input); 3509 3509 3510 3510 /*Build frictoin element, needed later: */ … … 3775 3775 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 3776 3776 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 3777 Input* geothermalflux_input=inputs->GetInput(Geothermal FluxEnum); _assert_(geothermalflux_input);3777 Input* geothermalflux_input=inputs->GetInput(GeothermalfluxEnum); _assert_(geothermalflux_input); 3778 3778 3779 3779 /*Build frictoin element, needed later: */ … … 4247 4247 4248 4248 /*Recondition pressure: */ 4249 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);4249 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 4250 4250 4251 4251 /*Ok, we have vx vy vz and P in values, fill in vx vy vz P arrays: */ … … 5143 5143 if (iomodel->geothermalflux) { 5144 5144 for(i=0;i<6;i++)nodeinputs[i]=iomodel->geothermalflux[penta_vertex_ids[i]-1]; 5145 this->inputs->AddInput(new PentaVertexInput(Geothermal FluxEnum,nodeinputs));5145 this->inputs->AddInput(new PentaVertexInput(GeothermalfluxEnum,nodeinputs)); 5146 5146 } 5147 5147 if (iomodel->pressure) { … … 5155 5155 if (iomodel->waterfraction) { 5156 5156 for(i=0;i<6;i++)nodeinputs[i]=iomodel->waterfraction[penta_vertex_ids[i]-1]; 5157 this->inputs->AddInput(new PentaVertexInput(Water FractionEnum,nodeinputs));5157 this->inputs->AddInput(new PentaVertexInput(WaterfractionEnum,nodeinputs)); 5158 5158 } 5159 5159 if (iomodel->dhdt) { 5160 5160 for(i=0;i<6;i++)nodeinputs[i]=iomodel->dhdt[penta_vertex_ids[i]-1]/iomodel->yts; 5161 this->inputs->AddInput(new PentaVertexInput(Dh DtEnum,nodeinputs));5161 this->inputs->AddInput(new PentaVertexInput(DhdtEnum,nodeinputs)); 5162 5162 } 5163 5163 /*vx,vy and vz: */ … … 5201 5201 for(i=0;i<iomodel->num_control_type;i++){ 5202 5202 switch((int)iomodel->control_type[i]){ 5203 case Dh DtEnum:5203 case DhdtEnum: 5204 5204 if (iomodel->dhdt){ 5205 5205 for(j=0;j<6;j++)nodeinputs[j]=iomodel->dhdt[penta_vertex_ids[j]-1]/iomodel->yts; 5206 5206 for(j=0;j<6;j++)cmmininputs[j]=iomodel->cm_min[(penta_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts; 5207 5207 for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->cm_max[(penta_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts; 5208 this->inputs->AddInput(new ControlInput(Dh DtEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));5208 this->inputs->AddInput(new ControlInput(DhdtEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1)); 5209 5209 } 5210 5210 break; … … 5595 5595 penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum); 5596 5596 GetDofList(&doflists,StokesApproximationEnum,GsetEnum); 5597 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);5597 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 5598 5598 5599 5599 /*Get node data: */ … … 5768 5768 GetDofList(&doflistp,PattynApproximationEnum,GsetEnum); 5769 5769 GetDofList(&doflists,StokesApproximationEnum,GsetEnum); 5770 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);5770 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 5771 5771 5772 5772 /*Get node data: */ … … 6065 6065 6066 6066 /*Recondition pressure and compute vel: */ 6067 this->parameters->FindParam(&stokesreconditioning,Stokes ReconditioningEnum);6067 this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum); 6068 6068 for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]*stokesreconditioning; 6069 6069 for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5); … … 6356 6356 6357 6357 this->inputs->AddInput(new PentaVertexInput(EnthalpyEnum,values)); 6358 this->inputs->AddInput(new PentaVertexInput(Water FractionEnum,waterfraction));6358 this->inputs->AddInput(new PentaVertexInput(WaterfractionEnum,waterfraction)); 6359 6359 this->inputs->AddInput(new PentaVertexInput(TemperatureEnum,temperatures)); 6360 6360 … … 6529 6529 name==BasalMeltingRateEnum || 6530 6530 name==SurfaceMassBalanceEnum || 6531 name==Geothermal FluxEnum ||6531 name==GeothermalfluxEnum || 6532 6532 name==SurfaceAreaEnum|| 6533 6533 name==PressureEnum || … … 7471 7471 } 7472 7472 /*}}}*/ 7473 /*FUNCTION Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum){{{1*/7474 void Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters){7475 7476 /*Intermediaries*/7477 int i,j;7478 int penta_vertex_ids[6];7479 double nodeinputs[6];7480 7481 /*Recover vertices ids needed to initialize inputs*/7482 for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->elements[6*index+i]; //ids for vertices are in the elements array from Matlab7483 7484 /*recover forcing for this time step: */7485 for(i=0;i<6;i++)nodeinputs[i]=iomodel->forcing[penta_vertex_ids[i]-1];7486 7487 /*process units: */7488 UnitConversion(&nodeinputs[0],6,ExtToIuEnum, FieldEnum, parameters);7489 7490 if(step==0){7491 7492 /*This is the first time we are trying to replace the smb tria vertex input by a smb triav vertex7493 *forcing, which is essentially a tria vertex input that can vary with time. So first, if there is already7494 *an input with enum FieldEnum, squash it: */7495 TransientInput* transientinput = new TransientInput(FieldEnum);7496 7497 PentaVertexInput* pentavertexinput = new PentaVertexInput(FieldEnum,&nodeinputs[0]);7498 transientinput->AddTimeInput(pentavertexinput,time);7499 this->inputs->AddInput(transientinput);7500 7501 }7502 else{7503 7504 /*Ok, we can't write over the existing forcing that was created in previous step 0. Find the input, and add7505 *values for this time step: */7506 TransientInput* transientinput=(TransientInput*)inputs->GetInput(FieldEnum); _assert_(transientinput);7507 7508 PentaVertexInput* pentavertexinput = new PentaVertexInput(FieldEnum,&nodeinputs[0]);7509 transientinput->AddTimeInput(pentavertexinput,time);7510 7511 }7512 7513 }7514 /*}}}*/7515 7473 /*FUNCTION Penta::UpdateShelfStatus{{{1*/ 7516 7474 int Penta::UpdateShelfStatus(Vec new_shelf_nodes){ -
issm/trunk/src/c/objects/Elements/Penta.h
r8800 r8926 135 135 double SurfaceArea(void); 136 136 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 137 void UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters);138 137 int UpdateShelfStatus(Vec new_shelf_nodes); 139 138 void UpdateShelfFlags(double* new_shelf_nodes); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r8800 r8926 1407 1407 Input* surface_mass_balance_input=inputs->GetInput(SurfaceMassBalanceEnum); _assert_(surface_mass_balance_input); 1408 1408 Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum); _assert_(basal_melting_input); 1409 Input* dhdt_input=inputs->GetInput(Dh DtEnum); _assert_(dhdt_input);1409 Input* dhdt_input=inputs->GetInput(DhdtEnum); _assert_(dhdt_input); 1410 1410 1411 1411 /* Start looping on the number of gaussian points: */ … … 1450 1450 Input* surface_mass_balance_input=inputs->GetInput(SurfaceMassBalanceEnum); _assert_(surface_mass_balance_input); 1451 1451 Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum); _assert_(basal_melting_input); 1452 Input* dhdt_input=inputs->GetInput(Dh DtEnum); _assert_(dhdt_input);1452 Input* dhdt_input=inputs->GetInput(DhdtEnum); _assert_(dhdt_input); 1453 1453 1454 1454 /* Start looping on the number of gaussian points: */ … … 1671 1671 this->parameters->FindParam(&num_responses,NumResponsesEnum); 1672 1672 this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum); 1673 this->parameters->FindParam(&meanvel,Mean VelEnum);1674 this->parameters->FindParam(&epsvel,Eps VelEnum);1673 this->parameters->FindParam(&meanvel,MeanvelEnum); 1674 this->parameters->FindParam(&epsvel,EpsvelEnum); 1675 1675 Input* weights_input=inputs->GetInput(WeightsEnum); _assert_(weights_input); 1676 1676 Input* vx_input =inputs->GetInput(VxEnum); _assert_(vx_input); … … 1847 1847 this->parameters->FindParam(&num_responses,NumResponsesEnum); 1848 1848 this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum); 1849 this->parameters->FindParam(&meanvel,Mean VelEnum);1850 this->parameters->FindParam(&epsvel,Eps VelEnum);1849 this->parameters->FindParam(&meanvel,MeanvelEnum); 1850 this->parameters->FindParam(&epsvel,EpsvelEnum); 1851 1851 Input* weights_input = inputs->GetInput(WeightsEnum); _assert_(weights_input); 1852 1852 Input* vx_input = inputs->GetInput(VxEnum); _assert_(vx_input); … … 2768 2768 2769 2769 /*Get inputs*/ 2770 Input* watercolumn_input=inputs->GetInput(Water ColumnEnum); _assert_(watercolumn_input);2770 Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input); 2771 2771 2772 2772 /*Ok, we have watercolumn values, fill in watercolumn array: */ … … 2851 2851 Input* bedslopex_input=inputs->GetInput(BedSlopeXEnum); _assert_(bedslopex_input); 2852 2852 Input* bedslopey_input=inputs->GetInput(BedSlopeYEnum); _assert_(bedslopey_input); 2853 Input* watercolumn_input=inputs->GetInput(Water ColumnEnum); _assert_(watercolumn_input);2853 Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input); 2854 2854 2855 2855 /*recover slopes: */ … … 2888 2888 GradjBMacAyeal(gradient); 2889 2889 break; 2890 case Dh DtEnum:2890 case DhdtEnum: 2891 2891 GradjDhDtBalancedthickness(gradient); 2892 2892 break; … … 3495 3495 if (iomodel->watercolumn){ 3496 3496 for(i=0;i<3;i++)nodeinputs[i]=iomodel->watercolumn[tria_vertex_ids[i]-1]; 3497 this->inputs->AddInput(new TriaVertexInput(Water ColumnEnum,nodeinputs));3497 this->inputs->AddInput(new TriaVertexInput(WatercolumnEnum,nodeinputs)); 3498 3498 this->inputs->AddInput(new TriaVertexInput(WaterColumnOldEnum,nodeinputs)); 3499 3499 } … … 3512 3512 if (iomodel->geothermalflux) { 3513 3513 for(i=0;i<3;i++)nodeinputs[i]=iomodel->geothermalflux[tria_vertex_ids[i]-1]; 3514 this->inputs->AddInput(new TriaVertexInput(Geothermal FluxEnum,nodeinputs));3514 this->inputs->AddInput(new TriaVertexInput(GeothermalfluxEnum,nodeinputs)); 3515 3515 } 3516 3516 if (iomodel->dhdt){ 3517 3517 for(i=0;i<3;i++)nodeinputs[i]=iomodel->dhdt[tria_vertex_ids[i]-1]/iomodel->yts; 3518 this->inputs->AddInput(new TriaVertexInput(Dh DtEnum,nodeinputs));3518 this->inputs->AddInput(new TriaVertexInput(DhdtEnum,nodeinputs)); 3519 3519 } 3520 3520 if (iomodel->pressure){ … … 3567 3567 for(i=0;i<iomodel->num_control_type;i++){ 3568 3568 switch((int)iomodel->control_type[i]){ 3569 case Dh DtEnum:3569 case DhdtEnum: 3570 3570 if (iomodel->dhdt){ 3571 3571 for(j=0;j<3;j++)nodeinputs[j]=iomodel->dhdt[tria_vertex_ids[j]-1]/iomodel->yts; 3572 3572 for(j=0;j<3;j++)cmmininputs[j]=iomodel->cm_min[(tria_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts; 3573 3573 for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->cm_max[(tria_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts; 3574 this->inputs->AddInput(new ControlInput(Dh DtEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));3574 this->inputs->AddInput(new ControlInput(DhdtEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1)); 3575 3575 } 3576 3576 break; … … 3989 3989 /*Now, we have to move the previous WaterColumn input to Picard 3990 3990 * status, otherwise, we'll wipe them off: */ 3991 this->inputs->ChangeEnum(Water ColumnEnum,WaterColumnPicardEnum);3991 this->inputs->ChangeEnum(WatercolumnEnum,WaterColumnPicardEnum); 3992 3992 3993 3993 /*Add input to the element: */ 3994 this->inputs->AddInput(new TriaVertexInput(Water ColumnEnum,values));3994 this->inputs->AddInput(new TriaVertexInput(WatercolumnEnum,values)); 3995 3995 3996 3996 /*Free ressources:*/ … … 4161 4161 name==SurfaceSlopeYEnum || 4162 4162 name==BasalMeltingRateEnum || 4163 name==Water ColumnEnum ||4163 name==WatercolumnEnum || 4164 4164 name==SurfaceMassBalanceEnum || 4165 4165 name==SurfaceAreaEnum|| … … 4993 4993 4994 4994 /*Retrieve all inputs we will be needing: */ 4995 this->parameters->FindParam(&meanvel,Mean VelEnum);4996 this->parameters->FindParam(&epsvel,Eps VelEnum);4995 this->parameters->FindParam(&meanvel,MeanvelEnum); 4996 this->parameters->FindParam(&epsvel,EpsvelEnum); 4997 4997 Input* weights_input=inputs->GetInput(WeightsEnum); _assert_(weights_input); 4998 4998 Input* vx_input =inputs->GetInput(VxEnum); _assert_(vx_input); … … 5058 5058 5059 5059 /*Retrieve all inputs we will be needing: */ 5060 this->parameters->FindParam(&meanvel,Mean VelEnum);5061 this->parameters->FindParam(&epsvel,Eps VelEnum);5060 this->parameters->FindParam(&meanvel,MeanvelEnum); 5061 this->parameters->FindParam(&epsvel,EpsvelEnum); 5062 5062 Input* weights_input=inputs->GetInput(WeightsEnum); _assert_(weights_input); 5063 5063 Input* vx_input =inputs->GetInput(VxEnum); _assert_(vx_input); … … 5147 5147 5148 5148 /*Retrieve all inputs we will be needing: */ 5149 this->parameters->FindParam(&meanvel,Mean VelEnum);5150 this->parameters->FindParam(&epsvel,Eps VelEnum);5149 this->parameters->FindParam(&meanvel,MeanvelEnum); 5150 this->parameters->FindParam(&epsvel,EpsvelEnum); 5151 5151 Input* weights_input=inputs->GetInput(WeightsEnum); _assert_(weights_input); 5152 5152 Input* vx_input =inputs->GetInput(VxEnum); _assert_(vx_input); … … 5420 5420 } 5421 5421 /*}}}*/ 5422 /*FUNCTION Tria::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum){{{1*/5423 void Tria::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters){5424 5425 /*Intermediaries*/5426 int i,j;5427 int tria_vertex_ids[3];5428 double nodeinputs[3];5429 5430 /*Recover vertices ids needed to initialize inputs*/5431 for(i=0;i<3;i++) tria_vertex_ids[i]=(int)iomodel->elements[3*index+i]; //ids for vertices are in the elements array from Matlab5432 5433 /*recover forcing for this time step: */5434 for(i=0;i<3;i++) nodeinputs[i]=iomodel->forcing[tria_vertex_ids[i]-1];5435 5436 /*process units: */5437 UnitConversion(&nodeinputs[0], 3 ,ExtToIuEnum, FieldEnum, parameters);5438 5439 if(step==0){5440 5441 /*This is the first time we are trying to replace the smb tria vertex input by a smb triav vertex5442 *forcing, which is essentially a tria vertex input that can vary with time. So first, if there is already5443 * an input with enum FieldEnum, squash it: */5444 TransientInput* transientinput = new TransientInput(FieldEnum);5445 5446 TriaVertexInput* triavertexinput = new TriaVertexInput(FieldEnum,&nodeinputs[0]);5447 transientinput->AddTimeInput(triavertexinput,time);5448 this->inputs->AddInput(transientinput);5449 5450 }5451 else{5452 5453 /*Ok, we can't write over the existing forcing that was created in previous step 0. Find the input, and add5454 *values for this time step: */5455 TransientInput* transientinput=(TransientInput*)inputs->GetInput(FieldEnum); _assert_(transientinput);5456 5457 TriaVertexInput* triavertexinput = new TriaVertexInput(FieldEnum,&nodeinputs[0]);5458 transientinput->AddTimeInput(triavertexinput,time);5459 5460 }5461 5462 }5463 /*}}}*/5464 5422 /*FUNCTION Tria::UpdateShelfStatus{{{1*/ 5465 5423 int Tria::UpdateShelfStatus(Vec new_shelf_nodes){ -
issm/trunk/src/c/objects/Elements/Tria.h
r8800 r8926 139 139 double SurfaceArea(void); 140 140 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 141 void UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters);142 141 int UpdateShelfStatus(Vec new_shelf_nodes); 143 142 int UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf); -
issm/trunk/src/c/objects/FemModel.cpp
r8800 r8926 72 72 73 73 /*Add output file name to parameters: */ 74 this->parameters->AddObject(new StringParam(Output FileNameEnum,outputfilename));74 this->parameters->AddObject(new StringParam(OutputfilenameEnum,outputfilename)); 75 75 76 76 #endif -
issm/trunk/src/c/objects/IoModel.cpp
r8823 r8926 94 94 xfree((void**)&this->surface_ablation_rate); 95 95 xfree((void**)&this->surface_mass_balance); 96 xfree((void**)&this->forcingtypes);97 xfree((void**)&this->forcing);98 xfree((void**)&this->timesteps);99 96 xfree((void**)&this->dhdt); 100 97 xfree((void**)&this->rheology_B); … … 137 134 /*Get all the data that consists of scalars, integers and strings: */ 138 135 139 IoModelFetchData(&this->name,iomodel_handle, "name");140 IoModelFetchData(&this->inputfilename,iomodel_handle, "inputfilename");141 IoModelFetchData(&this->outputfilename,iomodel_handle, "outputfilename");142 IoModelFetchData(&this->qmu_analysis,iomodel_handle, "qmu_analysis");143 IoModelFetchData(&this->control_analysis,iomodel_handle, "control_analysis");144 IoModelFetchData(&this->dim,iomodel_handle, "dim");136 IoModelFetchData(&this->name,iomodel_handle,NameEnum); 137 IoModelFetchData(&this->inputfilename,iomodel_handle,InputfilenameEnum); 138 IoModelFetchData(&this->outputfilename,iomodel_handle,OutputfilenameEnum); 139 IoModelFetchData(&this->qmu_analysis,iomodel_handle,QmuAnalysisEnum); 140 IoModelFetchData(&this->control_analysis,iomodel_handle,ControlAnalysisEnum); 141 IoModelFetchData(&this->dim,iomodel_handle,DimEnum); 145 142 /*!Get numberofelements and numberofvertices: */ 146 IoModelFetchData(&this->numberofvertices,iomodel_handle, "numberofnodes");147 IoModelFetchData(&this->numberofelements,iomodel_handle, "numberofelements");143 IoModelFetchData(&this->numberofvertices,iomodel_handle,NumberOfNodesEnum); 144 IoModelFetchData(&this->numberofelements,iomodel_handle,NumberOfElementsEnum); 148 145 /*!In case we are running 3d, we are going to need the collapsed and non-collapsed 2d meshes, from which the 3d mesh was extruded: */ 149 146 if (this->dim==3){ 150 147 151 148 /*!Deal with 2d mesh: */ 152 IoModelFetchData(&this->numberofelements2d,iomodel_handle, "numberofelements2d");153 IoModelFetchData(&this->numberofvertices2d,iomodel_handle, "numberofnodes2d");154 IoModelFetchData(&this->numlayers,iomodel_handle, "numlayers");149 IoModelFetchData(&this->numberofelements2d,iomodel_handle,NumberOfElements2DEnum); 150 IoModelFetchData(&this->numberofvertices2d,iomodel_handle,NumberOfNodes2DEnum); 151 IoModelFetchData(&this->numlayers,iomodel_handle,NumlayersEnum); 155 152 } 156 153 157 154 158 155 /*elements type: */ 159 IoModelFetchData(&this->ishutter,iomodel_handle, "ishutter");160 IoModelFetchData(&this->ismacayealpattyn,iomodel_handle, "ismacayealpattyn");161 IoModelFetchData(&this->isstokes,iomodel_handle, "isstokes");156 IoModelFetchData(&this->ishutter,iomodel_handle,IshutterEnum); 157 IoModelFetchData(&this->ismacayealpattyn,iomodel_handle,IsmacayealpattynEnum); 158 IoModelFetchData(&this->isstokes,iomodel_handle,IsstokesEnum); 162 159 163 160 /*!Get drag_type, drag and p,q: */ 164 IoModelFetchData(&this->drag_type,iomodel_handle, "drag_type");161 IoModelFetchData(&this->drag_type,iomodel_handle,DragTypeEnum); 165 162 166 163 /*!Get materials: */ 167 IoModelFetchData(&this->rho_water,iomodel_handle, "rho_water");168 IoModelFetchData(&this->rho_ice,iomodel_handle, "rho_ice");169 IoModelFetchData(&this->g,iomodel_handle, "g");164 IoModelFetchData(&this->rho_water,iomodel_handle,RhoWaterEnum); 165 IoModelFetchData(&this->rho_ice,iomodel_handle,RhoIceEnum); 166 IoModelFetchData(&this->g,iomodel_handle,GEnum); 170 167 171 168 /*Get control parameters: */ 172 IoModelFetchData(&this->num_control_type,iomodel_handle, "num_control_type");173 IoModelFetchData(&this->num_cm_responses,iomodel_handle, "num_cm_responses");169 IoModelFetchData(&this->num_control_type,iomodel_handle,NumControlTypeEnum); 170 IoModelFetchData(&this->num_cm_responses,iomodel_handle,NumCmResponsesEnum); 174 171 175 172 /*!Get solution parameters: */ 176 IoModelFetchData(&this->yts,iomodel_handle, "yts");177 IoModelFetchData(&this->meanvel,iomodel_handle, "meanvel");178 IoModelFetchData(&this->epsvel,iomodel_handle, "epsvel");179 IoModelFetchData(&this->verbose,iomodel_handle, "verbose_binary");180 IoModelFetchData(&this->output_frequency,iomodel_handle, "output_frequency");181 IoModelFetchData(&this->prognostic_DG,iomodel_handle, "prognostic_DG");182 IoModelFetchData(&this->nsteps,iomodel_handle, "nsteps");183 IoModelFetchData(&this->eps_cm,iomodel_handle, "eps_cm");184 IoModelFetchData(&this->tolx,iomodel_handle, "tolx");185 IoModelFetchData(&this->cm_gradient,iomodel_handle, "cm_gradient");186 IoModelFetchData(&this->eps_res,iomodel_handle, "eps_res");187 IoModelFetchData(&this->eps_rel,iomodel_handle, "eps_rel");188 IoModelFetchData(&this->eps_abs,iomodel_handle, "eps_abs");189 IoModelFetchData(&this->max_nonlinear_iterations,iomodel_handle, "max_nonlinear_iterations");190 IoModelFetchData(&this->dt,iomodel_handle, "dt");191 IoModelFetchData(&this->ndt,iomodel_handle, "ndt");192 IoModelFetchData(&this->time_adapt,iomodel_handle, "time_adapt");193 IoModelFetchData(&this->cfl_coefficient,iomodel_handle, "cfl_coefficient");194 IoModelFetchData(&this->hydrostatic_adjustment,iomodel_handle, "hydrostatic_adjustment");195 IoModelFetchData(&this->penalty_offset,iomodel_handle, "penalty_offset");196 IoModelFetchData(&this->penalty_melting,iomodel_handle, "penalty_melting");197 IoModelFetchData(&this->penalty_lock,iomodel_handle, "penalty_lock");198 IoModelFetchData(&this->sparsity,iomodel_handle, "sparsity");199 IoModelFetchData(&this->connectivity,iomodel_handle, "connectivity");200 IoModelFetchData(&this->lowmem,iomodel_handle, "lowmem");201 IoModelFetchData(&this->viscosity_overshoot,iomodel_handle, "viscosity_overshoot");202 IoModelFetchData(&this->artdiff,iomodel_handle, "artificial_diffusivity");203 IoModelFetchData(&this->prognostic_DG,iomodel_handle, "prognostic_DG");204 IoModelFetchData(&this->stokesreconditioning,iomodel_handle, "stokesreconditioning");205 IoModelFetchData(&this->shelf_dampening,iomodel_handle, "shelf_dampening");206 IoModelFetchData(&this->waitonlock,iomodel_handle, "waitonlock");207 IoModelFetchData(&this->gl_migration,iomodel_handle, "gl_migration");208 IoModelFetchData(&this->isdiagnostic,iomodel_handle, "isdiagnostic");209 IoModelFetchData(&this->isprognostic,iomodel_handle, "isprognostic");210 IoModelFetchData(&this->isthermal,iomodel_handle, "isthermal");173 IoModelFetchData(&this->yts,iomodel_handle,YtsEnum); 174 IoModelFetchData(&this->meanvel,iomodel_handle,MeanvelEnum); 175 IoModelFetchData(&this->epsvel,iomodel_handle,EpsvelEnum); 176 IoModelFetchData(&this->verbose,iomodel_handle,VerboseBinaryEnum); 177 IoModelFetchData(&this->output_frequency,iomodel_handle,OutputFrequencyEnum); 178 IoModelFetchData(&this->prognostic_DG,iomodel_handle,PrognosticDGEnum); 179 IoModelFetchData(&this->nsteps,iomodel_handle,NstepsEnum); 180 IoModelFetchData(&this->eps_cm,iomodel_handle,EpsCmEnum); 181 IoModelFetchData(&this->tolx,iomodel_handle,TolxEnum); 182 IoModelFetchData(&this->cm_gradient,iomodel_handle,CmGradientEnum); 183 IoModelFetchData(&this->eps_res,iomodel_handle,EpsResEnum); 184 IoModelFetchData(&this->eps_rel,iomodel_handle,EpsRelEnum); 185 IoModelFetchData(&this->eps_abs,iomodel_handle,EpsAbsEnum); 186 IoModelFetchData(&this->max_nonlinear_iterations,iomodel_handle,MaxNonlinearIterationsEnum); 187 IoModelFetchData(&this->dt,iomodel_handle,DtEnum); 188 IoModelFetchData(&this->ndt,iomodel_handle,NdtEnum); 189 IoModelFetchData(&this->time_adapt,iomodel_handle,TimeAdaptEnum); 190 IoModelFetchData(&this->cfl_coefficient,iomodel_handle,CflCoefficientEnum); 191 IoModelFetchData(&this->hydrostatic_adjustment,iomodel_handle,HydrostaticAdjustmentEnum); 192 IoModelFetchData(&this->penalty_offset,iomodel_handle,PenaltyOffsetEnum); 193 IoModelFetchData(&this->penalty_melting,iomodel_handle,PenaltyMeltingEnum); 194 IoModelFetchData(&this->penalty_lock,iomodel_handle,PenaltyLockEnum); 195 IoModelFetchData(&this->sparsity,iomodel_handle,SparsityEnum); 196 IoModelFetchData(&this->connectivity,iomodel_handle,ConnectivityEnum); 197 IoModelFetchData(&this->lowmem,iomodel_handle,LowmemEnum); 198 IoModelFetchData(&this->viscosity_overshoot,iomodel_handle,ViscosityOvershootEnum); 199 IoModelFetchData(&this->artdiff,iomodel_handle,ArtificialDiffusivityEnum); 200 IoModelFetchData(&this->prognostic_DG,iomodel_handle,PrognosticDGEnum); 201 IoModelFetchData(&this->stokesreconditioning,iomodel_handle,StokesreconditioningEnum); 202 IoModelFetchData(&this->shelf_dampening,iomodel_handle,ShelfDampeningEnum); 203 IoModelFetchData(&this->waitonlock,iomodel_handle,WaitonlockEnum); 204 IoModelFetchData(&this->gl_migration,iomodel_handle,GlMigrationEnum); 205 IoModelFetchData(&this->isdiagnostic,iomodel_handle,IsdiagnosticEnum); 206 IoModelFetchData(&this->isprognostic,iomodel_handle,IsprognosticEnum); 207 IoModelFetchData(&this->isthermal,iomodel_handle,IsthermalEnum); 211 208 212 209 /*!Get thermal parameters: */ 213 IoModelFetchData(&this->beta,iomodel_handle,"beta"); 214 IoModelFetchData(&this->meltingpoint,iomodel_handle,"meltingpoint"); 215 IoModelFetchData(&this->referencetemperature,iomodel_handle,"referencetemperature"); 216 IoModelFetchData(&this->latentheat,iomodel_handle,"latentheat"); 217 IoModelFetchData(&this->heatcapacity,iomodel_handle,"heatcapacity"); 218 IoModelFetchData(&this->thermalconductivity,iomodel_handle,"thermalconductivity"); 219 IoModelFetchData(&this->min_thermal_constraints,iomodel_handle,"min_thermal_constraints"); 220 IoModelFetchData(&this->min_mechanical_constraints,iomodel_handle,"min_mechanical_constraints"); 221 IoModelFetchData(&this->stabilize_constraints,iomodel_handle,"stabilize_constraints"); 222 IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,"mixed_layer_capacity"); 223 IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,"thermal_exchange_velocity"); 224 IoModelFetchData(&this->basal_melting_rate_correction_apply,iomodel_handle,"basal_melting_rate_correction_apply"); 225 IoModelFetchData(&this->gl_melting_rate,iomodel_handle,"gl_melting_rate"); 226 IoModelFetchData(&this->rheology_law,iomodel_handle,"rheology_law"); 227 IoModelFetchData(&this->numforcings,iomodel_handle,"numforcings"); 210 IoModelFetchData(&this->beta,iomodel_handle,BetaEnum); 211 IoModelFetchData(&this->meltingpoint,iomodel_handle,MeltingpointEnum); 212 IoModelFetchData(&this->referencetemperature,iomodel_handle,ReferencetemperatureEnum); 213 IoModelFetchData(&this->latentheat,iomodel_handle,LatentheatEnum); 214 IoModelFetchData(&this->heatcapacity,iomodel_handle,HeatcapacityEnum); 215 IoModelFetchData(&this->thermalconductivity,iomodel_handle,ThermalconductivityEnum); 216 IoModelFetchData(&this->min_thermal_constraints,iomodel_handle,MinThermalConstraintsEnum); 217 IoModelFetchData(&this->min_mechanical_constraints,iomodel_handle,MinMechanicalConstraintsEnum); 218 IoModelFetchData(&this->stabilize_constraints,iomodel_handle,StabilizeConstraintsEnum); 219 IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,MixedLayerCapacityEnum); 220 IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,ThermalExchangeVelocityEnum); 221 IoModelFetchData(&this->basal_melting_rate_correction_apply,iomodel_handle,BasalMeltingRateCorrectionApplyEnum); 222 IoModelFetchData(&this->gl_melting_rate,iomodel_handle,GlMeltingRateEnum); 223 IoModelFetchData(&this->rheology_law,iomodel_handle,RheologyLawEnum); 228 224 229 225 /*!Get hydrology parameters: */ 230 IoModelFetchData(&this->hydro_kn,iomodel_handle, "hydro_kn");231 IoModelFetchData(&this->hydro_p,iomodel_handle, "hydro_p");232 IoModelFetchData(&this->hydro_q,iomodel_handle, "hydro_q");233 IoModelFetchData(&this->hydro_CR,iomodel_handle, "hydro_CR");234 IoModelFetchData(&this->hydro_n,iomodel_handle, "hydro_n");226 IoModelFetchData(&this->hydro_kn,iomodel_handle,HydroKnEnum); 227 IoModelFetchData(&this->hydro_p,iomodel_handle,HydroPEnum); 228 IoModelFetchData(&this->hydro_q,iomodel_handle,HydroQEnum); 229 IoModelFetchData(&this->hydro_CR,iomodel_handle,HydroCREnum); 230 IoModelFetchData(&this->hydro_n,iomodel_handle,HydroNEnum); 235 231 236 232 /*qmu: */ 237 233 if(this->qmu_analysis){ 238 IoModelFetchData(&this->numberofvariables,iomodel_handle, "numberofvariables");239 IoModelFetchData(&this->numvariabledescriptors,iomodel_handle, "numvariabledescriptors");240 IoModelFetchData(&this->numberofresponses,iomodel_handle, "numberofresponses");241 IoModelFetchData(&this->numresponsedescriptors,iomodel_handle, "numresponsedescriptors");242 IoModelFetchData(&this->qmu_npart,iomodel_handle, "npart");243 IoModelFetchData(&this->qmu_mass_flux_num_profiles,iomodel_handle, "qmu_mass_flux_num_profiles");244 IoModelFetchData(&this->qmu_save_femmodel,iomodel_handle, "qmu_save_femmodel");234 IoModelFetchData(&this->numberofvariables,iomodel_handle,NumberOfVariablesEnum); 235 IoModelFetchData(&this->numvariabledescriptors,iomodel_handle,NumvariabledescriptorsEnum); 236 IoModelFetchData(&this->numberofresponses,iomodel_handle,NumberOfResponsesEnum); 237 IoModelFetchData(&this->numresponsedescriptors,iomodel_handle,NumresponsedescriptorsEnum); 238 IoModelFetchData(&this->qmu_npart,iomodel_handle,NpartEnum); 239 IoModelFetchData(&this->qmu_mass_flux_num_profiles,iomodel_handle,QmuMassFluxNumProfilesEnum); 240 IoModelFetchData(&this->qmu_save_femmodel,iomodel_handle,QmuSaveFemmodelEnum); 245 241 } 246 242 247 243 /*i/o: */ 248 IoModelFetchData(&this->io_gather,iomodel_handle,"io_gather"); 249 250 /*parameter output : */ 251 IoModelFetchData(&this->numoutput,iomodel_handle,"numoutput"); 244 IoModelFetchData(&this->io_gather,iomodel_handle,IoGatherEnum); 252 245 } 253 246 /*}}}*/ … … 416 409 this->dhdt=NULL; 417 410 418 /*forcings: */419 this->numforcings=0;420 this->forcingtypes=NULL;421 this->forcing_numtimesteps=0;422 this->forcing=NULL;423 this->timesteps=NULL;424 425 /*parameter output: */426 this->numoutput=0;427 428 411 /*elements type: */ 429 412 this->ishutter=0; -
issm/trunk/src/c/objects/IoModel.h
r8823 r8926 199 199 double* dhdt; 200 200 201 /*forcings: */202 int numforcings;203 double* forcingtypes;204 int forcing_numtimesteps;205 double* forcing;206 double* timesteps;207 208 /*parameter output: */209 int numoutput;210 211 201 /*qmu: */ 212 202 int qmu_mass_flux_num_profiles; -
issm/trunk/src/c/objects/Materials/Matpar.cpp
r8581 r8926 239 239 break; 240 240 241 case Heat CapacityEnum:241 case HeatcapacityEnum: 242 242 this->heatcapacity=constant; 243 243 break; 244 244 245 case Thermal ConductivityEnum:245 case ThermalconductivityEnum: 246 246 this->thermalconductivity=constant; 247 247 break; 248 248 249 case Latent HeatEnum:249 case LatentheatEnum: 250 250 this->latentheat=constant; 251 251 break; … … 255 255 break; 256 256 257 case Melting PointEnum:257 case MeltingpointEnum: 258 258 this->meltingpoint=constant; 259 259 break; 260 260 261 case Reference TemperatureEnum:261 case ReferencetemperatureEnum: 262 262 this->referencetemperature=constant; 263 263 break; -
issm/trunk/src/c/objects/Params/StringArrayParam.cpp
r8224 r8926 30 30 31 31 int i; 32 32 int size; 33 33 34 34 enum_type=in_enum_type; 35 35 numstrings=in_numstrings; 36 36 37 value=(char**)xmalloc(numstrings*sizeof(char*)); 38 for(i=0;i<numstrings;i++){ 39 char* string=NULL; 40 size=strlen(in_values[i])+1; 41 string=(char*)xmalloc(size*sizeof(char)); 42 memcpy(string,in_values[i],size*sizeof(char)); 43 value[i]=string; 44 } 37 if(numstrings){ 38 value=(char**)xmalloc(numstrings*sizeof(char*)); 39 for(i=0;i<numstrings;i++){ 40 char* string=NULL; 41 size=strlen(in_values[i])+1; 42 string=(char*)xmalloc(size*sizeof(char)); 43 memcpy(string,in_values[i],size*sizeof(char)); 44 value[i]=string; 45 } 46 } 47 else value=NULL; 45 48 46 49 } … … 160 163 161 164 memcpy(&numstrings,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int); 162 this->value=(char**)xmalloc(numstrings*sizeof(char*)); 163 164 for(i=0;i<numstrings;i++){ 165 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int); 166 167 string=(char*)xmalloc(stringsize*sizeof(char)); 168 memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char); 169 170 this->value[i]=string; 171 } 165 if(numstrings){ 166 this->value=(char**)xmalloc(numstrings*sizeof(char*)); 167 168 for(i=0;i<numstrings;i++){ 169 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int); 170 171 string=(char*)xmalloc(stringsize*sizeof(char)); 172 memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char); 173 174 this->value[i]=string; 175 } 176 } 177 else this->value=NULL; 172 178 173 179 /*return: */ … … 203 209 204 210 M=this->numstrings; 205 outstrings=(char**)xmalloc(this->numstrings*sizeof(char*)); 206 207 for(i=0;i<this->numstrings;i++){ 208 string=this->value[i]; 209 stringsize=strlen(string)+1; 210 211 string2=(char*)xmalloc(stringsize*sizeof(char)); 212 memcpy(string2,string,stringsize*sizeof(char)); 213 214 outstrings[i]=string2; 215 } 211 if(this->numstrings){ 212 outstrings=(char**)xmalloc(this->numstrings*sizeof(char*)); 213 214 for(i=0;i<this->numstrings;i++){ 215 string=this->value[i]; 216 stringsize=strlen(string)+1; 217 218 string2=(char*)xmalloc(stringsize*sizeof(char)); 219 memcpy(string2,string,stringsize*sizeof(char)); 220 221 outstrings[i]=string2; 222 } 223 } 224 else outstrings=NULL; 216 225 217 226 /*Assign output pointers:*/ -
issm/trunk/src/c/shared/Numerics/UnitConversion.cpp
r8399 r8926 67 67 case VelEnum: scale=yts;break; //m/yr 68 68 case VelObsEnum: scale=yts;break; //m/yr 69 case Dh DtEnum: scale=yts;break; //m/yr69 case DhdtEnum: scale=yts;break; //m/yr 70 70 case BasalMeltingRateEnum: scale=yts;break; //m/yr 71 71 case SurfaceAccumulationRateEnum: scale=yts;break; //m/yr -
issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp
r7638 r8926 21 21 22 22 /*retrieve parameters:*/ 23 femmodel->parameters->FindParam(&isstokes,Is StokesEnum);23 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 24 24 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 25 25 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); -
issm/trunk/src/c/solutions/control_core.cpp
r8601 r8926 50 50 femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum); 51 51 femmodel->parameters->FindParam(&responses,NULL,NULL,CmResponsesEnum); 52 femmodel->parameters->FindParam(&nsteps,N StepsEnum);53 femmodel->parameters->FindParam(&maxiter,NULL,Max IterEnum);52 femmodel->parameters->FindParam(&nsteps,NstepsEnum); 53 femmodel->parameters->FindParam(&maxiter,NULL,MaxiterEnum); 54 54 femmodel->parameters->FindParam(&cm_jump,NULL,CmJumpEnum); 55 55 femmodel->parameters->FindParam(&eps_cm,EpsCmEnum); 56 femmodel->parameters->FindParam(&tolx,Tol XEnum);56 femmodel->parameters->FindParam(&tolx,TolxEnum); 57 57 femmodel->parameters->FindParam(&cm_gradient,CmGradientEnum); 58 58 femmodel->parameters->FindParam(&dim,DimEnum); 59 59 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 60 femmodel->parameters->FindParam(&isstokes,Is StokesEnum);60 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 61 61 femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum); 62 62 /*}}}*/ -
issm/trunk/src/c/solutions/controlrestart.cpp
r8224 r8926 17 17 femmodel->parameters->FindParam(&num_controls,NumControlsEnum); 18 18 femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum); 19 femmodel->parameters->FindParam(&nsteps,N StepsEnum);19 femmodel->parameters->FindParam(&nsteps,NstepsEnum); 20 20 femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum); 21 21 -
issm/trunk/src/c/solutions/diagnostic_core.cpp
r8803 r8926 28 28 /* recover parameters:*/ 29 29 femmodel->parameters->FindParam(&dim,DimEnum); 30 femmodel->parameters->FindParam(&ishutter,Is HutterEnum);31 femmodel->parameters->FindParam(&ismacayealpattyn,Is MacAyealPattynEnum);32 femmodel->parameters->FindParam(&isstokes,Is StokesEnum);30 femmodel->parameters->FindParam(&ishutter,IshutterEnum); 31 femmodel->parameters->FindParam(&ismacayealpattyn,IsmacayealpattynEnum); 32 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 33 33 femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum); 34 34 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); -
issm/trunk/src/c/solutions/enthalpy_core.cpp
r8500 r8926 52 52 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time); 53 53 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum,i+1,time); 54 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,Water FractionEnum,i+1,time);54 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterfractionEnum,i+1,time); 55 55 } 56 56 -
issm/trunk/src/c/solutions/gradient_core.cpp
r8224 r8926 31 31 femmodel->parameters->FindParam(&num_controls,NumControlsEnum); 32 32 femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum); 33 femmodel->parameters->FindParam(&optscal_list,NULL,NULL,Opt ScalEnum);33 femmodel->parameters->FindParam(&optscal_list,NULL,NULL,OptscalEnum); 34 34 35 35 /*Compute and norm gradient of all controls*/ -
issm/trunk/src/c/solutions/hydrology_core.cpp
r8561 r8926 51 51 if(solution_type==HydrologySolutionEnum && !control_analysis){ 52 52 _printf_(VerboseSolution()," saving results\n"); 53 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,Water ColumnEnum,i+1,time);53 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time); 54 54 } 55 55 -
issm/trunk/src/c/solutions/hydrology_core_step.cpp
r8073 r8926 22 22 23 23 /*transfer water column thickness to old water column thickness: */ 24 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,Water ColumnEnum,WaterColumnOldEnum);24 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,WaterColumnOldEnum); 25 25 26 26 } -
issm/trunk/src/c/solutions/issm.cpp
r8539 r8926 75 75 femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum); 76 76 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 77 femmodel->parameters->FindParam(&waitonlock,Wait OnLockEnum);77 femmodel->parameters->FindParam(&waitonlock,WaitonlockEnum); 78 78 79 79 MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime(); -
issm/trunk/src/c/solutions/objectivefunctionC.cpp
r8607 r8926 37 37 38 38 /*Recover parameters: */ 39 femmodel->parameters->FindParam(&isstokes,Is StokesEnum);39 femmodel->parameters->FindParam(&isstokes,IsstokesEnum); 40 40 femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum); 41 41 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); -
issm/trunk/src/c/solutions/transient_core.cpp
r8658 r8926 37 37 femmodel->parameters->FindParam(&time_adapt,TimeAdaptEnum); 38 38 femmodel->parameters->FindParam(&gl_migration,GroundingLineMigrationEnum); 39 femmodel->parameters->FindParam(&isdiagnostic,Is DiagnosticEnum);40 femmodel->parameters->FindParam(&isprognostic,Is PrognosticEnum);41 femmodel->parameters->FindParam(&isthermal,Is ThermalEnum);39 femmodel->parameters->FindParam(&isdiagnostic,IsdiagnosticEnum); 40 femmodel->parameters->FindParam(&isprognostic,IsprognosticEnum); 41 femmodel->parameters->FindParam(&isthermal,IsthermalEnum); 42 42 43 43 /*initialize: */ -
issm/trunk/src/m/enum/EnumToModelField.m
r8518 r8926 15 15 case RheologyBEnum(), string='rheology_B'; return 16 16 case RheologyBbarEnum(), string='rheology_B'; return 17 case Dh DtEnum(), string='dhdt'; return17 case DhdtEnum(), string='dhdt'; return 18 18 case VxEnum(), string='vx'; return 19 19 case VxObsEnum(), string='vx_obs'; return -
issm/trunk/src/m/model/WriteData.m
r4448 r8926 1 function WriteData(fid,data,data_type, name)1 function WriteData(fid,data,data_type,enum) 2 2 %WRITEDATA - ... 3 3 % 4 4 % Usage: 5 % WriteData(fid,data,data_type) 5 % WriteData(fid,data,data_type,enum) 6 % 7 % Eg: WriteData(fid,md.elementoniceshelf,'Mat',ElementOnIceShelfEnum); 6 8 7 9 if issparse(data), … … 10 12 11 13 %Ok! put the length of the name, and the "name" string first! 12 fwrite(fid,length(name),'int'); 13 fwrite(fid,name,'char'); 14 fwrite(fid,enum,'int'); 14 15 15 16 if strcmpi(data_type,'String'), … … 46 47 %now write double 47 48 fwrite(fid,data,'double'); 49 elseif strcmpi(data_type,'StringArray'), 50 51 %first get length of string array: 52 num=length(data); 53 54 %now get length of record: 55 recordlength=4; %for length of array 56 for i=1:num, 57 string=data{i}; 58 recordlength=recordlength+4+length(string); %for each string 59 end 60 61 %write length of record 62 fwrite(fid,recordlength,'int'); 63 64 %now write length of string array 65 fwrite(fid,num,'int'); 66 67 %now write the strings 68 for i=1:num, 69 string=data{i}; 70 fwrite(fid,length(string),'int'); 71 fwrite(fid,string,'char'); 72 end 48 73 else 49 74 error('WriteData error message: data type not supported yet!'); -
issm/trunk/src/m/model/ismodelselfconsistent.m
r8823 r8926 165 165 if ~ismember(md.rheology_law,[NoneEnum PatersonEnum ArrheniusEnum]), 166 166 message(['model not consistent: model ' md.name ' rheology_law field should be NoneEnum, PatersonEnum or ArrheniusEnum']); 167 end168 %}}}169 %PARAMETEROUTPUT {{{1170 if md.numoutput~=length(md.parameteroutput),171 message('model not consistent: numoutput should be the same size as parameteroutput');172 167 end 173 168 %}}} -
issm/trunk/src/m/model/marshall.m
r8823 r8926 22 22 end 23 23 24 WriteData(fid,md.dim,'Integer','dim'); 25 WriteData(fid,md.numberofnodes,'Integer','numberofnodes'); 26 WriteData(fid,md.numberofelements,'Integer','numberofelements'); 27 WriteData(fid,md.x,'Mat','x'); 28 WriteData(fid,md.y,'Mat','y'); 29 WriteData(fid,md.z,'Mat','z'); 30 WriteData(fid,md.elements,'Mat','elements'); 31 WriteData(fid,md.elementconnectivity,'Mat','elementconnectivity'); 32 WriteData(fid,md.elements_type,'Mat','elements_type'); 33 WriteData(fid,md.vertices_type,'Mat','vertices_type'); 34 WriteData(fid,md.nodeonhutter,'Mat','nodeonhutter'); 35 WriteData(fid,md.nodeonmacayeal,'Mat','nodeonmacayeal'); 36 if md.dim==3, 37 WriteData(fid,md.numberofelements2d,'Integer','numberofelements2d'); 38 WriteData(fid,md.numberofnodes2d,'Integer','numberofnodes2d'); 39 WriteData(fid,md.elements2d,'Mat','elements2d'); 40 WriteData(fid,md.numlayers,'Integer','numlayers'); 41 WriteData(fid,md.nodeonpattyn,'Mat','nodeonpattyn'); 42 end 43 WriteData(fid,md.upperelements,'Mat','upperelements'); 44 WriteData(fid,md.lowerelements,'Mat','lowerelements'); 45 WriteData(fid,md.elementonbed,'Mat','elementonbed'); 46 WriteData(fid,md.elementonsurface,'Mat','elementonsurface'); 47 WriteData(fid,md.nodeonbed,'Mat','nodeonbed'); 48 WriteData(fid,md.nodeonsurface,'Mat','nodeonsurface'); 49 WriteData(fid,md.nodeonstokes,'Mat','nodeonstokes'); 50 WriteData(fid,md.borderstokes,'Mat','borderstokes'); 51 52 WriteData(fid,md.thickness,'Mat','thickness'); 53 WriteData(fid,md.thickness_coeff,'Mat','thickness_coeff'); 54 WriteData(fid,md.surface,'Mat','surface'); 55 WriteData(fid,md.bed,'Mat','bed'); 56 57 WriteData(fid,md.vx_obs,'Mat','vx_obs'); 58 WriteData(fid,md.vy_obs,'Mat','vy_obs'); 59 WriteData(fid,md.thickness_obs,'Mat','thickness_obs'); 60 61 WriteData(fid,md.vx,'Mat','vx'); 62 WriteData(fid,md.vy,'Mat','vy'); 63 WriteData(fid,md.vz,'Mat','vz'); 64 WriteData(fid,md.pressure,'Mat','pressure'); 65 WriteData(fid,md.temperature,'Mat','temperature'); 66 WriteData(fid,md.waterfraction,'Mat','waterfraction'); 67 68 WriteData(fid,md.drag_type,'Integer','drag_type'); 69 WriteData(fid,md.drag_coefficient,'Mat','drag_coefficient'); 70 WriteData(fid,md.drag_p,'Mat','drag_p'); 71 WriteData(fid,md.drag_q,'Mat','drag_q'); 72 73 WriteData(fid,md.elementoniceshelf,'Mat','elementoniceshelf'); 74 WriteData(fid,md.elementonwater,'Mat','elementonwater'); 75 WriteData(fid,md.nodeonicesheet,'Mat','nodeonicesheet'); 76 WriteData(fid,md.nodeoniceshelf,'Mat','nodeoniceshelf'); 77 WriteData(fid,md.nodeonwater,'Mat','nodeonwater'); 78 79 WriteData(fid,md.spcvx,'Mat','spcvx'); 80 WriteData(fid,md.spcvy,'Mat','spcvy'); 81 WriteData(fid,md.spcvz,'Mat','spcvz'); 82 WriteData(fid,md.spctemperature,'Mat','spctemperature'); 83 WriteData(fid,md.spcthickness,'Mat','spcthickness'); 84 WriteData(fid,md.spcwatercolumn,'Mat','spcwatercolumn'); 85 WriteData(fid,md.diagnostic_ref,'Mat','diagnostic_ref'); 86 87 WriteData(fid,md.pressureload,'Mat','pressureload'); 88 WriteData(fid,md.edges,'Mat','edges'); 89 90 WriteData(fid,md.geothermalflux,'Mat','geothermalflux'); 91 WriteData(fid,md.surface_accumulation_rate,'Mat','surface_accumulation_rate'); 92 WriteData(fid,md.surface_ablation_rate,'Mat','surface_ablation_rate'); 93 WriteData(fid,md.surface_mass_balance,'Mat','surface_mass_balance'); 94 WriteData(fid,md.gl_melting_rate,'Scalar','gl_melting_rate'); 95 WriteData(fid,md.basal_melting_rate,'Mat','basal_melting_rate'); 96 WriteData(fid,md.basal_melting_rate_correction_apply,'Integer','basal_melting_rate_correction_apply'); 97 98 %deal with forcings 99 if ~isempty(md.forcings), 100 forcingnames=fieldnames(md.forcings); 101 numforcings=length(forcingnames); 102 forcingtypes=zeros(numforcings,1); 103 for i=1:numforcings, 104 switch (forcingnames{i}) 105 case 'surface_accumulation_rate' 106 forcingtypes(i)=SurfaceAccumulationRateEnum; 107 case 'surface_ablation_rate' 108 forcingtypes(i)=SurfaceAblationRateEnum; 109 case 'surface_mass_balance' 110 forcingtypes(i)=SurfaceMassBalanceEnum; 111 case 'basal_melting_rate' 112 forcingtypes(i)=BasalMeltingRateEnum; 113 otherwise 114 error(['forcing ' forcingnames{i} ' not supported yet']); 115 end 116 end 117 WriteData(fid,numforcings,'Integer','numforcings'); 118 WriteData(fid,forcingtypes,'Mat','forcingtypes'); 119 120 for i=1:numforcings, 121 forcing=md.forcings.(forcingnames{i}); 122 forcingname=EnumToString(forcingtypes(i)); 123 124 WriteData(fid,size(forcing,2),'Integer',['forcing_' forcingname '_num_time_steps']); 125 WriteData(fid,forcing(end,:),'Mat',['forcing_' forcingname '_time_steps']); 126 for j=1:size(forcing,2), 127 WriteData(fid,forcing(1:end-1,j),'Mat',['forcing_' forcingname '_' num2str(j)]); 128 end 129 end 130 else 131 WriteData(fid,0,'Integer','numforcings'); 132 end 133 134 if md.basal_melting_rate_correction_apply, 135 WriteData(fid,md.basal_melting_rate_correction,'Mat','basal_melting_rate_correction'); 136 end 137 WriteData(fid,md.dhdt,'Mat','dhdt'); 138 WriteData(fid,md.watercolumn,'Mat','watercolumn'); 139 140 %Transient 141 WriteData(fid,md.isdiagnostic,'Integer','isdiagnostic'); 142 WriteData(fid,md.isprognostic,'Integer','isprognostic'); 143 WriteData(fid,md.isthermal,'Integer','isthermal'); 144 145 %Get materials 146 WriteData(fid,md.rho_water,'Scalar','rho_water'); 147 WriteData(fid,md.rho_ice,'Scalar','rho_ice'); 148 WriteData(fid,md.g,'Scalar','g'); 149 WriteData(fid,md.rheology_B,'Mat','rheology_B'); 150 WriteData(fid,md.rheology_n,'Mat','rheology_n'); 151 WriteData(fid,md.rheology_law,'Integer','rheology_law'); 152 153 %Control methods 154 WriteData(fid,md.control_analysis,'Integer','control_analysis'); 155 WriteData(fid,numel(md.control_type),'Integer','num_control_type'); 156 WriteData(fid,size(md.cm_responses,2),'Integer','num_cm_responses'); 157 WriteData(fid,md.control_type,'Mat','control_type'); 158 159 %Write solution parameters 160 WriteData(fid,md.cm_responses,'Mat','cm_responses'); 161 WriteData(fid,md.weights,'Mat','weights'); 162 WriteData(fid,md.cm_jump,'Mat','cm_jump'); 163 WriteData(fid,md.yts,'Scalar','yts'); 164 WriteData(fid,md.meanvel,'Scalar','meanvel'); 165 WriteData(fid,md.epsvel,'Scalar','epsvel'); 166 WriteData(fid,VerboseToBinary(md.verbose),'Integer','verbose_binary'); 167 WriteData(fid,md.output_frequency,'Integer','output_frequency'); 168 WriteData(fid,md.artificial_diffusivity,'Integer','artificial_diffusivity'); 169 WriteData(fid,md.prognostic_DG,'Integer','prognostic_DG'); 170 WriteData(fid,md.nsteps,'Integer','nsteps'); 171 WriteData(fid,md.eps_cm,'Scalar','eps_cm'); 172 WriteData(fid,md.tolx,'Scalar','tolx'); 173 WriteData(fid,md.maxiter,'Mat','maxiter'); 174 WriteData(fid,md.cm_min,'Mat','cm_min'); 175 WriteData(fid,md.cm_max,'Mat','cm_max'); 176 WriteData(fid,md.cm_gradient,'Integer','cm_gradient'); 177 WriteData(fid,md.eps_res,'Scalar','eps_res'); 178 WriteData(fid,md.eps_rel,'Scalar','eps_rel'); 179 WriteData(fid,md.eps_abs,'Scalar','eps_abs'); 180 WriteData(fid,md.max_nonlinear_iterations,'Scalar','max_nonlinear_iterations'); 181 WriteData(fid,md.dt,'Scalar','dt'); 182 WriteData(fid,md.ndt,'Scalar','ndt'); 183 WriteData(fid,md.time_adapt,'Integer','time_adapt'); 184 WriteData(fid,md.cfl_coefficient,'Scalar','cfl_coefficient'); 185 WriteData(fid,md.hydrostatic_adjustment,'Integer','hydrostatic_adjustment'); 186 WriteData(fid,md.penalty_offset,'Scalar','penalty_offset'); 187 WriteData(fid,md.penalty_melting,'Scalar','penalty_melting'); 188 WriteData(fid,md.penalty_lock,'Integer','penalty_lock'); 189 WriteData(fid,md.sparsity,'Scalar','sparsity'); 190 WriteData(fid,md.connectivity,'Integer','connectivity'); 191 WriteData(fid,md.lowmem,'Integer','lowmem'); 192 WriteData(fid,md.optscal,'Mat','optscal'); 193 WriteData(fid,md.viscosity_overshoot,'Scalar','viscosity_overshoot'); 194 WriteData(fid,md.stokesreconditioning,'Scalar','stokesreconditioning'); 195 WriteData(fid,md.shelf_dampening,'Integer','shelf_dampening'); 196 WriteData(fid,md.waitonlock,'Scalar','waitonlock'); 197 198 %Thermal parameters 199 WriteData(fid,md.beta,'Scalar','beta'); 200 WriteData(fid,md.meltingpoint,'Scalar','meltingpoint'); 201 WriteData(fid,md.referencetemperature,'Scalar','referencetemperature'); 202 WriteData(fid,md.latentheat,'Scalar','latentheat'); 203 WriteData(fid,md.heatcapacity,'Scalar','heatcapacity'); 204 WriteData(fid,md.thermalconductivity,'Scalar','thermalconductivity'); 205 WriteData(fid,md.min_thermal_constraints,'Integer','min_thermal_constraints'); 206 WriteData(fid,md.min_mechanical_constraints,'Integer','min_mechanical_constraints'); 207 WriteData(fid,md.mixed_layer_capacity,'Scalar','mixed_layer_capacity'); 208 WriteData(fid,md.thermal_exchange_velocity,'Scalar','thermal_exchange_velocity'); 209 WriteData(fid,md.stabilize_constraints,'Integer','stabilize_constraints'); 210 211 %Hydrology parameters 212 WriteData(fid,md.hydro_kn,'Scalar','hydro_kn'); 213 WriteData(fid,md.hydro_p,'Scalar','hydro_p'); 214 WriteData(fid,md.hydro_q,'Scalar','hydro_q'); 215 WriteData(fid,md.hydro_CR,'Scalar','hydro_CR'); 216 WriteData(fid,md.hydro_n,'Scalar','hydro_n'); 217 218 %elements type 219 WriteData(fid,md.ishutter,'Integer','ishutter'); 220 WriteData(fid,md.ismacayealpattyn,'Integer','ismacayealpattyn'); 221 WriteData(fid,md.isstokes,'Integer','isstokes'); 222 223 %grounding line migration: 224 WriteData(fid,md.gl_migration,'Integer','gl_migration'); 225 if(md.gl_migration~=NoneEnum), 226 WriteData(fid,md.bathymetry,'Mat','bathymetry'); 227 end 228 229 %Rifts 230 WriteData(fid,md.riftinfo,'Mat','riftinfo'); 231 232 %parameter output. 233 md.numoutput=length(md.parameteroutput); 234 WriteData(fid,md.numoutput,'Integer','numoutput'); 235 if(md.numoutput), 236 for i=1:md.numoutput, 237 WriteData(fid,md.parameteroutput{i},'String',['parameteroutput_' num2str(i-1)]); 24 %automatically marshall model md, using template information available from an empty model class. 25 template=struct(model(0)); 26 fields=fieldnames(template); 27 for i=1:length(fields), 28 field=fields{i}; 29 marshall=template.(field){2}; 30 if marshall, 31 enum=BuildEnum(field); 32 type=template.(field){3}; 33 WriteData(fid,md.(field),type,enum); 238 34 end 239 35 end 240 241 %Qmu: the rest will be handle by qmumarshall242 WriteData(fid,md.qmu_analysis,'Integer','qmu_analysis');243 WriteData(fid,md.name,'String','name');244 245 %Get penalties246 WriteData(fid,md.penalties,'Mat','penalties');247 248 %input and output file names249 WriteData(fid,md.inputfilename,'String','inputfilename');250 WriteData(fid,md.outputfilename,'String','outputfilename');251 252 %i/o:253 WriteData(fid,md.io_gather,'Integer','io_gather');254 255 36 256 37 %close file -
issm/trunk/src/m/model/presolve.m
r8592 r8926 36 36 37 37 38 %resolve some fields at solution time 39 md.verbose_binary=VerboseToBinary(md.verbose); 40 41 %Control methods 42 md.num_control_type=numel(md.control_type); 43 md.num_cm_responses=size(md.cm_responses,2); -
issm/trunk/src/m/solutions/diagnostic_core.m
r8576 r8926 12 12 %recover parameters common to all solutions 13 13 dim=femmodel.parameters.Dim; 14 ishutter=femmodel.parameters.Is Hutter;15 ismacayealpattyn=femmodel.parameters.Is MacAyealPattyn;16 isstokes=femmodel.parameters.Is Stokes;14 ishutter=femmodel.parameters.Ishutter; 15 ismacayealpattyn=femmodel.parameters.Ismacayealpattyn; 16 isstokes=femmodel.parameters.Isstokes; 17 17 qmu_analysis=femmodel.parameters.QmuAnalysis; 18 18 control_analysis=femmodel.parameters.ControlAnalysis; -
issm/trunk/src/m/solutions/transient_core.m
r8559 r8926 14 14 output_frequency=femmodel.parameters.OutputFrequency; 15 15 time_adapt=femmodel.parameters.TimeAdapt; 16 isdiagnostic=femmodel.parameters.Is Diagnostic;17 isprognostic=femmodel.parameters.Is Prognostic;18 isthermal=femmodel.parameters.Is Thermal;16 isdiagnostic=femmodel.parameters.Isdiagnostic; 17 isprognostic=femmodel.parameters.Isprognostic; 18 isthermal=femmodel.parameters.Isthermal; 19 19 20 20 %Initialize
Note:
See TracChangeset
for help on using the changeset viewer.