Changeset 22123


Ignore:
Timestamp:
09/27/17 09:09:50 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: no calving is bed>0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r22105 r22123  
    217217        IssmDouble  lambda1,lambda2,ex,ey,vx,vy,vel;
    218218        IssmDouble  sigma_vm,sigma_max,sigma_max_floating,sigma_max_grounded;
    219         IssmDouble  epse_2,groundedice;
     219        IssmDouble  epse_2,groundedice,bed;
    220220
    221221        /* Get node coordinates and dof list: */
     
    226226        Input* vy_input = inputs->GetInput(VyEnum); _assert_(vy_input);
    227227        Input* gr_input = inputs->GetInput(MaskGroundediceLevelsetEnum); _assert_(gr_input);
     228        Input* bs_input = inputs->GetInput(BaseEnum);                    _assert_(bs_input);
    228229        Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input);
    229230        Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input);
     
    240241                vy_input->GetInputValue(&vy,gauss);
    241242                gr_input->GetInputValue(&groundedice,gauss);
     243                bs_input->GetInputValue(&bed,gauss);
    242244                smax_fl_input->GetInputValue(&sigma_max_floating,gauss);
    243245                smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
     
    272274
    273275                /*Assign values*/
    274                 calvingratex[iv]=vx*sigma_vm/sigma_max;
    275                 calvingratey[iv]=vy*sigma_vm/sigma_max;
    276                 calvingrate[iv]=sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]);
     276                if(bed>0.){
     277                        calvingratex[iv]=0.;
     278                        calvingratey[iv]=0.;
     279                }
     280                else{
     281                        calvingratex[iv]=vx*sigma_vm/sigma_max;
     282                        calvingratey[iv]=vy*sigma_vm/sigma_max;
     283                }
     284                calvingrate[iv] =sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]);
    277285        }
    278286
Note: See TracChangeset for help on using the changeset viewer.