Changeset 20654
- Timestamp:
- 05/26/16 01:06:01 (9 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IoModel.cpp
r20653 r20654 27 27 #include "../shared/shared.h" 28 28 29 /* NEW NEW NEW NEW NEW NEW NEW NEW NEW NEW*/29 /*IoConstant class and methods*/ 30 30 IoConstant::IoConstant(){/*{{{*/ 31 31 this->isindependent = false; … … 69 69 /*}}}*/ 70 70 71 /*IoData class and methods*/ 71 72 IoData::IoData(){/*{{{*/ 72 73 this->isindependent = false; … … 98 99 /*}}}*/ 99 100 100 void IoModel::AddConstant(IoConstant* in_constant){/*{{{*/ 101 102 _assert_(in_constant); 103 104 /*Go through dataset of constant and check whether it already exists */ 105 vector<IoConstant*>::iterator iter; 106 107 for(iter=constants.begin();iter<constants.end();iter++){ 108 if((*iter)->data_enum==in_constant->data_enum){ 109 delete in_constant; 110 return; 111 } 112 } 113 114 this->constants.push_back(in_constant); 115 } 116 /*}}}*/ 117 void IoModel::AddConstantIndependent(IoConstant* in_constant){/*{{{*/ 118 119 _assert_(in_constant); 120 121 /*Set constant as independent*/ 122 in_constant->isindependent = true; 123 124 /*Add to constnats*/ 125 this->AddConstant(in_constant); 126 } 127 /*}}}*/ 128 void IoModel::AddData(IoData* in_data){/*{{{*/ 129 130 _assert_(in_data); 131 132 /*Go through dataset of data and check whether it already exists */ 133 vector<IoData*>::iterator iter; 134 135 for(iter=data.begin();iter<data.end();iter++){ 136 if((*iter)->data_enum==in_data->data_enum){ 137 delete in_data; 138 return; 139 } 140 } 141 142 this->data.push_back(in_data); 143 } 144 /*}}}*/ 145 void IoModel::AddDataIndependent(IoData* in_data){/*{{{*/ 146 147 _assert_(in_data); 148 149 /*Set data as independent*/ 150 in_data->isindependent = true; 151 152 /*Add to constnats*/ 153 this->AddData(in_data); 154 } 155 /*}}}*/ 156 void IoModel::FetchIndependentConstant(int* pXcount,IssmPDouble* X,int name){/*{{{*/ 157 158 /*recover my_rank:*/ 159 int my_rank=IssmComm::GetRank(); 160 161 /*recover Xcount if X is not NULL:*/ 162 int Xcount = 0; 163 if(X) Xcount=*pXcount; 164 165 #ifdef _HAVE_ADOLC_ //cannot come here unless you are running AD mode, from DeclaredIndependents: 166 167 /*output: */ 168 IssmPDouble pscalar; 169 IssmDouble scalar; //same as pscalar, except it's an ADOLC independent variable 170 int code; 171 172 /*Set file pointer to beginning of the data: */ 173 fid=this->SetFilePointerToData(&code,NULL,name); 174 if(code!=3) _error_("expecting a IssmDouble for enum " << EnumToStringx(name)); 175 176 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ 177 if(my_rank==0){ 178 if(fread(&pscalar,sizeof(IssmPDouble),1,fid)!=1)_error_("could not read scalar "); 179 180 /*Now, before we even broadcast this to other nodes, declare the scalar as an independent variable!. If we 181 *have been supplied an X vector, use it instead of what we just read: */ 182 if(X){ 183 scalar<<=X[Xcount]; 184 } 185 else{ 186 scalar<<=pscalar; 187 } 188 } 189 190 ISSM_MPI_Bcast(&scalar,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 191 this->AddConstantIndependent(new IoConstant(scalar,name)); 192 193 /*increment offset into X vector, now that we have read 1 value:*/ 194 Xcount++; *pXcount=Xcount; 195 #endif 196 } 197 /*}}}*/ 198 void IoModel::FetchIndependentData(int* pXcount,IssmPDouble* X,int name){/*{{{*/ 199 200 /*recover my_rank:*/ 201 int my_rank=IssmComm::GetRank(); 202 203 /*recover Xcount if X is not NULL:*/ 204 int Xcount = 0; 205 if(X) Xcount=*pXcount; 206 207 #ifdef _HAVE_ADOLC_ //cannot come here unless you are running AD mode, from DeclaredIndependents: 208 209 /*Intermediaries*/ 210 int M,N; 211 IssmPDouble* buffer=NULL; //a buffer to read the data from disk 212 IssmDouble* matrix=NULL; //our independent variable 213 int code,layout; 214 215 /*Set file pointer to beginning of the data: */ 216 fid=this->SetFilePointerToData(&code,&layout,name); 217 if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(name)); 218 219 /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */ 220 /*numberofelements: */ 221 if(my_rank==0){ 222 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 223 } 224 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 225 226 if(my_rank==0){ 227 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 228 } 229 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 230 231 /*Now allocate matrix: */ 232 if(M*N){ 233 buffer=xNew<IssmPDouble>(M*N); 234 matrix=xNew<IssmDouble>(M*N); 235 236 /*Read matrix on node 0, then broadcast: */ 237 if(my_rank==0){ 238 if(fread(buffer,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix "); 239 240 /*Now, before we even broadcast this to other nodes, declare the whole matrix as a independent variable! 241 If we have been supplied an X vector, use it instead of what we just read: */ 242 if(X){ 243 for(int i=0;i<M*N;i++) matrix[i]<<=X[Xcount+i]; /*<<= ADOLC overloaded operator to declare independent*/ 244 } 245 else{ 246 for(int i=0;i<M*N;i++) matrix[i]<<=buffer[i]; 247 } 248 } 249 ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 250 251 xDelete<IssmPDouble>(buffer); 252 } 253 else _error_("cannot declare the independent variable " << EnumToStringx(name) << "if it's empty!"); 254 255 /*Add to data as independent*/ 256 this->AddDataIndependent(new IoData(matrix,code,layout,M,N,name)); 257 258 /*increment offset into X vector, now that we have read M*N values:*/ 259 Xcount+=M*N; *pXcount=Xcount; 260 #endif 261 } 262 /*}}}*/ 263 void IoModel::FindConstant(bool* pvalue,int constant_enum){/*{{{*/ 264 265 /*Intermediary*/ 266 vector<IoConstant*>::iterator iter; 267 268 for(iter=constants.begin();iter<constants.end();iter++){ 269 IoConstant* ioconstant=*iter; 270 271 if(ioconstant->data_enum==constant_enum){ 272 ioconstant->constant->GetParameterValue(pvalue); 273 return; 274 } 275 } 276 277 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++) (*iter)->constant->Echo(); 278 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 279 } 280 /*}}}*/ 281 void IoModel::FindConstant(int* pvalue,int constant_enum){/*{{{*/ 282 283 /*Intermediary*/ 284 vector<IoConstant*>::iterator iter; 285 286 for(iter=constants.begin();iter<constants.end();iter++){ 287 IoConstant* ioconstant=*iter; 288 289 if(ioconstant->data_enum==constant_enum){ 290 ioconstant->constant->GetParameterValue(pvalue); 291 return; 292 } 293 } 294 295 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 296 } 297 /*}}}*/ 298 void IoModel::FindConstant(IssmDouble* pvalue,int constant_enum){/*{{{*/ 299 300 /*Intermediary*/ 301 vector<IoConstant*>::iterator iter; 302 303 for(iter=constants.begin();iter<constants.end();iter++){ 304 IoConstant* ioconstant=*iter; 305 306 if(ioconstant->data_enum==constant_enum){ 307 ioconstant->constant->GetParameterValue(pvalue); 308 return; 309 } 310 } 311 312 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 313 } 314 /*}}}*/ 315 void IoModel::FindConstant(char** pvalue,int constant_enum){/*{{{*/ 316 317 /*Intermediary*/ 318 vector<IoConstant*>::iterator iter; 319 320 for(iter=constants.begin();iter<constants.end();iter++){ 321 IoConstant* ioconstant=*iter; 322 323 if(ioconstant->data_enum==constant_enum){ 324 ioconstant->constant->GetParameterValue(pvalue); 325 return; 326 } 327 } 328 329 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 330 } 331 /*}}}*/ 332 int IoModel::NumIndependents(void){/*{{{*/ 333 334 /*Initialize output*/ 335 int num_independents = 0; 336 337 /*Process constants*/ 338 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++){ 339 if((*iter)->isindependent){ 340 num_independents+= 1; 341 } 342 } 343 344 /*Process data*/ 345 for(vector<IoData*>::iterator iter=data.begin();iter<data.end();iter++){ 346 if((*iter)->isindependent){ 347 num_independents+= (*iter)->M*(*iter)->N; 348 } 349 } 350 351 /*return*/ 352 return num_independents; 353 } 354 /*}}}*/ 355 void IoModel::FillIndependents(IssmDouble* xp){/*{{{*/ 356 357 _assert_(xp); 358 359 /*Initialize local num ind*/ 360 int local_num_ind = 0; 361 362 /*Process constants*/ 363 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++){ 364 if((*iter)->isindependent){ 365 (*iter)->constant->GetParameterValue(&xp[local_num_ind]); 366 local_num_ind += 1; 367 } 368 } 369 370 /*Process data*/ 371 for(vector<IoData*>::iterator iter=data.begin();iter<data.end();iter++){ 372 if((*iter)->isindependent){ 373 for(int i=0;i<(*iter)->M*(*iter)->N;i++){ 374 xp[local_num_ind+i] = (*iter)->data[i]; 375 } 376 local_num_ind += (*iter)->M*(*iter)->N; 377 } 378 } 379 380 _assert_(local_num_ind == this->NumIndependents()); 381 } 382 /*}}}*/ 383 /*NEW NEW NEW NEW NEW NEW NEW NEW NEW NEW*/ 384 101 /*IoModel constructors/destructors*/ 385 102 IoModel::IoModel(){/*{{{*/ 386 103 … … 506 223 /*}}}*/ 507 224 225 /*IoModel methods*/ 226 void IoModel::AddConstant(IoConstant* in_constant){/*{{{*/ 227 228 _assert_(in_constant); 229 230 /*Go through dataset of constant and check whether it already exists */ 231 vector<IoConstant*>::iterator iter; 232 233 for(iter=constants.begin();iter<constants.end();iter++){ 234 if((*iter)->data_enum==in_constant->data_enum){ 235 delete in_constant; 236 return; 237 } 238 } 239 240 this->constants.push_back(in_constant); 241 } 242 /*}}}*/ 243 void IoModel::AddConstantIndependent(IoConstant* in_constant){/*{{{*/ 244 245 _assert_(in_constant); 246 247 /*Set constant as independent*/ 248 in_constant->isindependent = true; 249 250 /*Add to constnats*/ 251 this->AddConstant(in_constant); 252 } 253 /*}}}*/ 254 void IoModel::AddData(IoData* in_data){/*{{{*/ 255 256 _assert_(in_data); 257 258 /*Go through dataset of data and check whether it already exists */ 259 vector<IoData*>::iterator iter; 260 261 for(iter=data.begin();iter<data.end();iter++){ 262 if((*iter)->data_enum==in_data->data_enum){ 263 delete in_data; 264 return; 265 } 266 } 267 268 this->data.push_back(in_data); 269 } 270 /*}}}*/ 271 void IoModel::AddDataIndependent(IoData* in_data){/*{{{*/ 272 273 _assert_(in_data); 274 275 /*Set data as independent*/ 276 in_data->isindependent = true; 277 278 /*Add to constnats*/ 279 this->AddData(in_data); 280 } 281 /*}}}*/ 508 282 void IoModel::CheckEnumSync(void){/*{{{*/ 509 283 … … 589 363 } 590 364 } 365 } 366 /*}}}*/ 367 void IoModel::FetchIndependentConstant(int* pXcount,IssmPDouble* X,int name){/*{{{*/ 368 369 /*recover my_rank:*/ 370 int my_rank=IssmComm::GetRank(); 371 372 /*recover Xcount if X is not NULL:*/ 373 int Xcount = 0; 374 if(X) Xcount=*pXcount; 375 376 #ifdef _HAVE_ADOLC_ //cannot come here unless you are running AD mode, from DeclaredIndependents: 377 378 /*output: */ 379 IssmPDouble pscalar; 380 IssmDouble scalar; //same as pscalar, except it's an ADOLC independent variable 381 int code; 382 383 /*Set file pointer to beginning of the data: */ 384 fid=this->SetFilePointerToData(&code,NULL,name); 385 if(code!=3) _error_("expecting a IssmDouble for enum " << EnumToStringx(name)); 386 387 /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */ 388 if(my_rank==0){ 389 if(fread(&pscalar,sizeof(IssmPDouble),1,fid)!=1)_error_("could not read scalar "); 390 391 /*Now, before we even broadcast this to other nodes, declare the scalar as an independent variable!. If we 392 *have been supplied an X vector, use it instead of what we just read: */ 393 if(X){ 394 scalar<<=X[Xcount]; 395 } 396 else{ 397 scalar<<=pscalar; 398 } 399 } 400 401 ISSM_MPI_Bcast(&scalar,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 402 this->AddConstantIndependent(new IoConstant(scalar,name)); 403 404 /*increment offset into X vector, now that we have read 1 value:*/ 405 Xcount++; *pXcount=Xcount; 406 #endif 407 } 408 /*}}}*/ 409 void IoModel::FetchIndependentData(int* pXcount,IssmPDouble* X,int name){/*{{{*/ 410 411 /*recover my_rank:*/ 412 int my_rank=IssmComm::GetRank(); 413 414 /*recover Xcount if X is not NULL:*/ 415 int Xcount = 0; 416 if(X) Xcount=*pXcount; 417 418 #ifdef _HAVE_ADOLC_ //cannot come here unless you are running AD mode, from DeclaredIndependents: 419 420 /*Intermediaries*/ 421 int M,N; 422 IssmPDouble* buffer=NULL; //a buffer to read the data from disk 423 IssmDouble* matrix=NULL; //our independent variable 424 int code,layout; 425 426 /*Set file pointer to beginning of the data: */ 427 fid=this->SetFilePointerToData(&code,&layout,name); 428 if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(name)); 429 430 /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */ 431 /*numberofelements: */ 432 if(my_rank==0){ 433 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 434 } 435 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 436 437 if(my_rank==0){ 438 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 439 } 440 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 441 442 /*Now allocate matrix: */ 443 if(M*N){ 444 buffer=xNew<IssmPDouble>(M*N); 445 matrix=xNew<IssmDouble>(M*N); 446 447 /*Read matrix on node 0, then broadcast: */ 448 if(my_rank==0){ 449 if(fread(buffer,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix "); 450 451 /*Now, before we even broadcast this to other nodes, declare the whole matrix as a independent variable! 452 If we have been supplied an X vector, use it instead of what we just read: */ 453 if(X){ 454 for(int i=0;i<M*N;i++) matrix[i]<<=X[Xcount+i]; /*<<= ADOLC overloaded operator to declare independent*/ 455 } 456 else{ 457 for(int i=0;i<M*N;i++) matrix[i]<<=buffer[i]; 458 } 459 } 460 ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 461 462 xDelete<IssmPDouble>(buffer); 463 } 464 else _error_("cannot declare the independent variable " << EnumToStringx(name) << "if it's empty!"); 465 466 /*Add to data as independent*/ 467 this->AddDataIndependent(new IoData(matrix,code,layout,M,N,name)); 468 469 /*increment offset into X vector, now that we have read M*N values:*/ 470 Xcount+=M*N; *pXcount=Xcount; 471 #endif 472 } 473 /*}}}*/ 474 void IoModel::FindConstant(bool* pvalue,int constant_enum){/*{{{*/ 475 476 /*Intermediary*/ 477 vector<IoConstant*>::iterator iter; 478 479 for(iter=constants.begin();iter<constants.end();iter++){ 480 IoConstant* ioconstant=*iter; 481 482 if(ioconstant->data_enum==constant_enum){ 483 ioconstant->constant->GetParameterValue(pvalue); 484 return; 485 } 486 } 487 488 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++) (*iter)->constant->Echo(); 489 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 490 } 491 /*}}}*/ 492 void IoModel::FindConstant(int* pvalue,int constant_enum){/*{{{*/ 493 494 /*Intermediary*/ 495 vector<IoConstant*>::iterator iter; 496 497 for(iter=constants.begin();iter<constants.end();iter++){ 498 IoConstant* ioconstant=*iter; 499 500 if(ioconstant->data_enum==constant_enum){ 501 ioconstant->constant->GetParameterValue(pvalue); 502 return; 503 } 504 } 505 506 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 507 } 508 /*}}}*/ 509 void IoModel::FindConstant(IssmDouble* pvalue,int constant_enum){/*{{{*/ 510 511 /*Intermediary*/ 512 vector<IoConstant*>::iterator iter; 513 514 for(iter=constants.begin();iter<constants.end();iter++){ 515 IoConstant* ioconstant=*iter; 516 517 if(ioconstant->data_enum==constant_enum){ 518 ioconstant->constant->GetParameterValue(pvalue); 519 return; 520 } 521 } 522 523 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 524 } 525 /*}}}*/ 526 void IoModel::FindConstant(char** pvalue,int constant_enum){/*{{{*/ 527 528 /*Intermediary*/ 529 vector<IoConstant*>::iterator iter; 530 531 for(iter=constants.begin();iter<constants.end();iter++){ 532 IoConstant* ioconstant=*iter; 533 534 if(ioconstant->data_enum==constant_enum){ 535 ioconstant->constant->GetParameterValue(pvalue); 536 return; 537 } 538 } 539 540 _error_("Could not find constant \""<<EnumToStringx(constant_enum) <<"\""); 541 } 542 /*}}}*/ 543 int IoModel::NumIndependents(void){/*{{{*/ 544 545 /*Initialize output*/ 546 int num_independents = 0; 547 548 /*Process constants*/ 549 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++){ 550 if((*iter)->isindependent){ 551 num_independents+= 1; 552 } 553 } 554 555 /*Process data*/ 556 for(vector<IoData*>::iterator iter=data.begin();iter<data.end();iter++){ 557 if((*iter)->isindependent){ 558 num_independents+= (*iter)->M*(*iter)->N; 559 } 560 } 561 562 /*return*/ 563 return num_independents; 564 } 565 /*}}}*/ 566 void IoModel::FillIndependents(IssmDouble* xp){/*{{{*/ 567 568 _assert_(xp); 569 570 /*Initialize local num ind*/ 571 int local_num_ind = 0; 572 573 /*Process constants*/ 574 for(vector<IoConstant*>::iterator iter=constants.begin();iter<constants.end();iter++){ 575 if((*iter)->isindependent){ 576 (*iter)->constant->GetParameterValue(&xp[local_num_ind]); 577 local_num_ind += 1; 578 } 579 } 580 581 /*Process data*/ 582 for(vector<IoData*>::iterator iter=data.begin();iter<data.end();iter++){ 583 if((*iter)->isindependent){ 584 for(int i=0;i<(*iter)->M*(*iter)->N;i++){ 585 xp[local_num_ind+i] = (*iter)->data[i]; 586 } 587 local_num_ind += (*iter)->M*(*iter)->N; 588 } 589 } 590 591 _assert_(local_num_ind == this->NumIndependents()); 591 592 } 592 593 /*}}}*/ -
issm/trunk-jpl/src/c/classes/classes.h
r20644 r20654 15 15 #include "./Profiler.h" 16 16 #include "./DependentObject.h" 17 #include "./IndependentObject.h"18 17 #include "./Segment.h" 19 18 #include "./Massfluxatgate.h" -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r20649 r20654 189 189 HydrologySpcheadEnum, 190 190 HydrologyConductivityEnum, 191 IndependentObjectEnum,192 191 InversionControlParametersEnum, 193 192 InversionControlScalingFactorsEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r20649 r20654 193 193 case HydrologySpcheadEnum : return "HydrologySpchead"; 194 194 case HydrologyConductivityEnum : return "HydrologyConductivity"; 195 case IndependentObjectEnum : return "IndependentObject";196 195 case InversionControlParametersEnum : return "InversionControlParameters"; 197 196 case InversionControlScalingFactorsEnum : return "InversionControlScalingFactors"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r20649 r20654 196 196 else if (strcmp(name,"HydrologySpchead")==0) return HydrologySpcheadEnum; 197 197 else if (strcmp(name,"HydrologyConductivity")==0) return HydrologyConductivityEnum; 198 else if (strcmp(name,"IndependentObject")==0) return IndependentObjectEnum;199 198 else if (strcmp(name,"InversionControlParameters")==0) return InversionControlParametersEnum; 200 199 else if (strcmp(name,"InversionControlScalingFactors")==0) return InversionControlScalingFactorsEnum; … … 260 259 else if (strcmp(name,"DamageStabilization")==0) return DamageStabilizationEnum; 261 260 else if (strcmp(name,"DamageMaxiter")==0) return DamageMaxiterEnum; 261 else if (strcmp(name,"DamageSpcdamage")==0) return DamageSpcdamageEnum; 262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"DamageSpcdamage")==0) return DamageSpcdamageEnum; 266 else if (strcmp(name,"DamageMaxDamage")==0) return DamageMaxDamageEnum; 265 if (strcmp(name,"DamageMaxDamage")==0) return DamageMaxDamageEnum; 267 266 else if (strcmp(name,"DamageEquivStress")==0) return DamageEquivStressEnum; 268 267 else if (strcmp(name,"DamageEvolutionNumRequestedOutputs")==0) return DamageEvolutionNumRequestedOutputsEnum; … … 383 382 else if (strcmp(name,"TimesteppingTimeStep")==0) return TimesteppingTimeStepEnum; 384 383 else if (strcmp(name,"TimesteppingInterpForcings")==0) return TimesteppingInterpForcingsEnum; 384 else if (strcmp(name,"TransientIssmb")==0) return TransientIssmbEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"TransientIssmb")==0) return TransientIssmbEnum; 389 else if (strcmp(name,"TransientIscoupler")==0) return TransientIscouplerEnum; 388 if (strcmp(name,"TransientIscoupler")==0) return TransientIscouplerEnum; 390 389 else if (strcmp(name,"TransientIsstressbalance")==0) return TransientIsstressbalanceEnum; 391 390 else if (strcmp(name,"TransientIsgroundingline")==0) return TransientIsgroundinglineEnum; … … 506 505 else if (strcmp(name,"ConfigurationType")==0) return ConfigurationTypeEnum; 507 506 else if (strcmp(name,"AdjointBalancethicknessAnalysis")==0) return AdjointBalancethicknessAnalysisEnum; 507 else if (strcmp(name,"AdjointBalancethickness2Analysis")==0) return AdjointBalancethickness2AnalysisEnum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"AdjointBalancethickness2Analysis")==0) return AdjointBalancethickness2AnalysisEnum; 512 else if (strcmp(name,"AdjointHorizAnalysis")==0) return AdjointHorizAnalysisEnum; 511 if (strcmp(name,"AdjointHorizAnalysis")==0) return AdjointHorizAnalysisEnum; 513 512 else if (strcmp(name,"AnalysisCounter")==0) return AnalysisCounterEnum; 514 513 else if (strcmp(name,"DefaultAnalysis")==0) return DefaultAnalysisEnum; … … 629 628 else if (strcmp(name,"MassconName")==0) return MassconNameEnum; 630 629 else if (strcmp(name,"MassconDefinitionenum")==0) return MassconDefinitionenumEnum; 630 else if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum; 631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum; 635 else if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum; 634 if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum; 636 635 else if (strcmp(name,"MassconaxpbyName")==0) return MassconaxpbyNameEnum; 637 636 else if (strcmp(name,"MassconaxpbyDefinitionenum")==0) return MassconaxpbyDefinitionenumEnum; … … 752 751 else if (strcmp(name,"DeviatoricStressxz")==0) return DeviatoricStressxzEnum; 753 752 else if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum; 753 else if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 758 else if (strcmp(name,"DeviatoricStresszz")==0) return DeviatoricStresszzEnum; 757 if (strcmp(name,"DeviatoricStresszz")==0) return DeviatoricStresszzEnum; 759 758 else if (strcmp(name,"DeviatoricStresseffective")==0) return DeviatoricStresseffectiveEnum; 760 759 else if (strcmp(name,"StrainRate")==0) return StrainRateEnum; … … 875 874 else if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum; 876 875 else if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum; 876 else if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum; 877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum; 881 else if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum; 880 if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum; 882 881 else if (strcmp(name,"Outputdefinition74")==0) return Outputdefinition74Enum; 883 882 else if (strcmp(name,"Outputdefinition75")==0) return Outputdefinition75Enum; … … 998 997 else if (strcmp(name,"ToolkitsOptionsStrings")==0) return ToolkitsOptionsStringsEnum; 999 998 else if (strcmp(name,"QmuErrName")==0) return QmuErrNameEnum; 999 else if (strcmp(name,"QmuInName")==0) return QmuInNameEnum; 1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"QmuInName")==0) return QmuInNameEnum; 1004 else if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum; 1003 if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum; 1005 1004 else if (strcmp(name,"Regular")==0) return RegularEnum; 1006 1005 else if (strcmp(name,"Scaled")==0) return ScaledEnum;
Note:
See TracChangeset
for help on using the changeset viewer.