Changeset 25487
- Timestamp:
- 08/27/20 05:41:30 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r25439 r25487 648 648 bool active_element; 649 649 int domaintype; 650 int current_mask; 650 651 IssmDouble h_max; 651 652 IssmDouble sedheadmin; … … 687 688 for(int i=1;i<numnodes;i++) if(sedhead[i]<=sedheadmin)sedheadmin=sedhead[i]; 688 689 for(int i=0;i<numnodes;i++){ 689 GetHydrologyDCInefficientHmax(&h_max,basalelement,basalelement->nodes[i]);690 current_mask=old_active[i]; 690 691 /*If mask was already one, keep one or colapse*/ 691 692 if(old_active[i]>0.){ 692 693 vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 694 current_mask=1; 693 695 /* If epl thickness gets under colapse thickness, close the layer if there is no residual*/ 694 696 if(epl_thickness[i]<colapse_thick && residual[i]<=0.){ 695 697 vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); 698 current_mask=0; 696 699 recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 697 700 } … … 701 704 if(residual[i]>0.){ 702 705 vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 706 current_mask=1; 703 707 recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 704 708 } … … 707 711 epl_thickness[i]=init_thick; 708 712 vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); 709 } 710 } 711 /*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/ 712 if(eplhead[i]>=h_max && active_element){ 713 for(int j=0;j<numnodes;j++){ 714 /*Increase of the domain is on the downstream node in term of sediment head*/ 715 if((sedhead[j] == sedheadmin) && (i!=j)){ 716 vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL); 717 if(old_active[j]==0.){ 718 recurence->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL); 713 current_mask=0; 714 } 715 } 716 /*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now) we check that only if the epl is active here*/ 717 if(current_mask>0){ 718 GetHydrologyDCInefficientHmax(&h_max,basalelement,basalelement->nodes[i]); 719 if(eplhead[i]>=h_max && active_element){ 720 for(int j=0;j<numnodes;j++){ 721 /*Increase of the domain is on the downstream node in term of sediment head*/ 722 if((sedhead[j] == sedheadmin) && (i!=j)){ 723 vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL); 724 if(old_active[j]==0.){ 725 recurence->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL); 726 } 719 727 } 720 728 }
Note:
See TracChangeset
for help on using the changeset viewer.