Changeset 23893


Ignore:
Timestamp:
04/25/19 02:30:22 (6 years ago)
Author:
kakajanto
Message:

BUG: getting calving vonmises relative to sealevel

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

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

    r23888 r23893  
    189189        IssmDouble  lambda1,lambda2,ex,ey,vx,vy,vel;
    190190        IssmDouble  B,sigma_max,sigma_max_floating,sigma_max_grounded,n;
    191         IssmDouble  epse_2,groundedice,bed;
     191        IssmDouble  epse_2,groundedice,bed,sealevel;
    192192        IssmDouble  sigma_vm[NUMVERTICES];
    193193
     
    209209        Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input);
    210210        Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input);
     211        Input* sl_input  = inputs->GetInput(SealevelEnum); _assert_(sl_input);
    211212
    212213        /* Start looping on the number of vertices: */
     
    225226                smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
    226227                vel=sqrt(vx*vx+vy*vy)+1.e-14;
     228                sl_input->GetInputValue(&sealevel,gauss);
    227229
    228230                /*Compute strain rate and viscosity: */
     
    249251
    250252                /*Assign values*/
    251                 if(bed>0.){
     253                if(bed>sealevel){
    252254                        calvingratex[iv]=0.;
    253255                        calvingratey[iv]=0.;
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r23888 r23893  
    244244        IssmDouble  sigma_vm[NUMVERTICES];
    245245        IssmDouble  B,sigma_max,sigma_max_floating,sigma_max_grounded,n;
    246         IssmDouble  epse_2,groundedice,bed;
     246        IssmDouble  epse_2,groundedice,bed,sealevel;            // added sealevel
     247       
    247248
    248249        /* Get node coordinates and dof list: */
     
    258259        Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input);
    259260        Input* n_input  = inputs->GetInput(MaterialsRheologyNEnum); _assert_(n_input);
     261        Input* sl_input  = inputs->GetInput(SealevelEnum); _assert_(sl_input);
     262       
     263
    260264
    261265        /* Start looping on the number of vertices: */
     
    270274                vy_input->GetInputValue(&vy,gauss);
    271275                gr_input->GetInputValue(&groundedice,gauss);
    272                 bs_input->GetInputValue(&bed,gauss);
     276                bs_input->GetInputValue(&bed,gauss);   
    273277                smax_fl_input->GetInputValue(&sigma_max_floating,gauss);
    274278                smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
    275279                vel=sqrt(vx*vx+vy*vy)+1.e-14;
     280                sl_input->GetInputValue(&sealevel,gauss);
    276281
    277282                /*Compute strain rate and viscosity: */
     
    301306                else
    302307                 sigma_max = sigma_max_grounded;
    303 
    304308                /*Assign values*/
    305                 if(bed>0.){
     309                if(bed>sealevel){               // Changed 0. to sealevel
    306310                        calvingratex[iv]=0.;
    307311                        calvingratey[iv]=0.;
     
    312316                }
    313317                calvingrate[iv] =sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]);
     318       
    314319        }
    315320
Note: See TracChangeset for help on using the changeset viewer.