Changeset 23486
- Timestamp:
- 11/29/18 14:53:35 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r23483 r23486 99 99 /*Verifications. AMR supports SSA, P1 and horizontal 2D domain*/ 100 100 bool isSSA; 101 int domaintype,element_type,analysis_counter=-1; 101 int domaintype,element_type; 102 this->analysis_counter=-1; 102 103 this->parameters->FindParam(&isSSA,FlowequationIsSSAEnum); 103 104 this->parameters->FindParam(&domaintype,DomainTypeEnum); … … 207 208 int FemModel::AnalysisIndex(int analysis_enum){/*{{{*/ 208 209 209 int found=-1;210 /*Checks in debugging mode*/ 210 211 _assert_(this->analysis_type_list); 212 213 /*Find analysis in list*/ 211 214 for(int i=0;i<this->nummodels;i++){ 212 215 if(this->analysis_type_list[i]==analysis_enum){ 213 found=i;216 return i; 214 217 break; 215 218 } 216 219 } 217 if(found!=-1) return found; 218 else _error_("Could not find index of analysis " << EnumToStringx(analysis_enum) << " in list of FemModel analyses"); 220 221 /*If you reach this point, analysis has not been found*/ 222 _error_("Could not find index of analysis " << EnumToStringx(analysis_enum) << " in list of FemModel analyses"); 219 223 220 224 … … 409 413 /*Initialize internal data: */ 410 414 this->solution_type = in_solution_type; 411 this->analysis_counter = nummodels-1; //point to last analysis_type carried out.415 this->analysis_counter = -1; 412 416 this->results = new Results(); //not initialized by CreateDataSets 413 417 … … 582 586 * analyses. For example: do a SurfaceSlopeX, SurfaceSlopeY, BedSlopeX and BedSlopeY analysis using the 583 587 * Slope configuration.*/ 584 int found=-1; 585 for(int i=0;i<nummodels;i++){ 586 if (analysis_type_list[i]==configuration_type){ 587 found=i; 588 break; 589 } 590 } 591 if(found!=-1) this->analysis_counter=found; 592 else _error_("Could not find alias for analysis_type " << EnumToStringx(configuration_type) << " in list of FemModel analyses"); 588 int index = AnalysisIndex(configuration_type); 589 590 /*If we already have the right analysis, return*/ 591 if(this->analysis_counter==index) return; 592 this->analysis_counter=index; 593 593 594 594 /*Now, plug analysis_counter and analysis_type inside the parameters: */
Note:
See TracChangeset
for help on using the changeset viewer.