Changeset 22123
- Timestamp:
- 09/27/17 09:09:50 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r22105 r22123 217 217 IssmDouble lambda1,lambda2,ex,ey,vx,vy,vel; 218 218 IssmDouble sigma_vm,sigma_max,sigma_max_floating,sigma_max_grounded; 219 IssmDouble epse_2,groundedice ;219 IssmDouble epse_2,groundedice,bed; 220 220 221 221 /* Get node coordinates and dof list: */ … … 226 226 Input* vy_input = inputs->GetInput(VyEnum); _assert_(vy_input); 227 227 Input* gr_input = inputs->GetInput(MaskGroundediceLevelsetEnum); _assert_(gr_input); 228 Input* bs_input = inputs->GetInput(BaseEnum); _assert_(bs_input); 228 229 Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input); 229 230 Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input); … … 240 241 vy_input->GetInputValue(&vy,gauss); 241 242 gr_input->GetInputValue(&groundedice,gauss); 243 bs_input->GetInputValue(&bed,gauss); 242 244 smax_fl_input->GetInputValue(&sigma_max_floating,gauss); 243 245 smax_gr_input->GetInputValue(&sigma_max_grounded,gauss); … … 272 274 273 275 /*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]); 277 285 } 278 286
Note:
See TracChangeset
for help on using the changeset viewer.