Changeset 25487


Ignore:
Timestamp:
08/27/20 05:41:30 (5 years ago)
Author:
bdef
Message:

CHG: minor change in workflow for downstream activation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp

    r25439 r25487  
    648648        bool        active_element;
    649649        int         domaintype;
     650        int         current_mask;
    650651        IssmDouble  h_max;
    651652        IssmDouble  sedheadmin;
     
    687688        for(int i=1;i<numnodes;i++) if(sedhead[i]<=sedheadmin)sedheadmin=sedhead[i];
    688689        for(int i=0;i<numnodes;i++){
    689                 GetHydrologyDCInefficientHmax(&h_max,basalelement,basalelement->nodes[i]);
     690                current_mask=old_active[i];
    690691                /*If mask was already one, keep one or colapse*/
    691692                if(old_active[i]>0.){
    692693                        vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
     694                        current_mask=1;
    693695                        /* If epl thickness gets under colapse thickness, close the layer if there is no residual*/
    694696                        if(epl_thickness[i]<colapse_thick && residual[i]<=0.){
    695697                                vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL);
     698                                current_mask=0;
    696699                                recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
    697700                        }
     
    701704                        if(residual[i]>0.){
    702705                                vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
     706                                current_mask=1;
    703707                                recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
    704708                        }
     
    707711                                epl_thickness[i]=init_thick;
    708712                                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                                                }
    719727                                        }
    720728                                }
Note: See TracChangeset for help on using the changeset viewer.