Changeset 19235
- Timestamp:
- 04/01/15 09:57:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r19234 r19235 402 402 Input* slopey_input = element->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input); 403 403 Input* thickness_input = element->GetInput(ThicknessEnum); _assert_(thickness_input); 404 Input* drag_input = element->GetInput(FrictionCoefficientEnum); _assert_(drag_input); 404 Input* drag_input = NULL; 405 Friction* friction = NULL; 406 if(frictionlaw!=5){ 407 drag_input = element->GetInput(FrictionCoefficientEnum); _assert_(drag_input); 408 } 409 else{ 410 friction=new Friction(element,3); 411 } 405 412 406 413 /*Get Vertical segment indices*/ … … 443 450 /*Deal with basal velocities*/ 444 451 if(element->IsOnBase()){ 445 drag_input->GetInputValue(&drag,gauss);446 447 452 switch(frictionlaw){ 448 453 case 1: … … 453 458 case 2: 454 459 /*Ritz et al. 1996*/ 460 drag_input->GetInputValue(&drag,gauss); 455 461 ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2); 456 462 vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2); … … 458 464 case 3: 459 465 /*Rutt et al. 2009*/ 466 drag_input->GetInputValue(&drag,gauss); 460 467 ub=-drag*rho_ice*gravity*thickness*slope[0]; 461 468 vb=-drag*rho_ice*gravity*thickness*slope[1]; … … 463 470 case 4: 464 471 /*Henning Akesson*/ 472 drag_input->GetInputValue(&drag,gauss); 465 473 drag = -4e-15 * surface + 8.6e-12; 466 474 ub=-drag*rho_ice*gravity*thickness*slope[0]; … … 468 476 break; 469 477 case 5: /*Weertman temp for Kevin*/{ 470 Friction* friction=new Friction(element,3);471 478 friction->GetAlpha2WeertmanTemp(&drag,gauss); 472 479 ub = -1./drag * rho_ice*gravity*thickness*slope[0]; … … 487 494 xDelete<int>(pairindices); 488 495 xDelete<IssmDouble>(xyz_list); 496 delete friction; 489 497 return pe; 490 498
Note:
See TracChangeset
for help on using the changeset viewer.