Changeset 19534


Ignore:
Timestamp:
09/02/15 10:35:34 (10 years ago)
Author:
Mathieu Morlighem
Message:

CHG: drag_input not always necessary

File:
1 edited

Legend:

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

    r19531 r19534  
    338338        Input* thickness_input = element->GetInput(ThicknessEnum);            _assert_(thickness_input);
    339339        Input* surface_input   = element->GetInput(SurfaceEnum);              _assert_(surface_input);
    340         Input* drag_input      = element->GetInput(FrictionCoefficientEnum);  _assert_(drag_input);
     340        Input* drag_input      = NULL;
     341        if(frictionlaw!=5 && frictionlaw!=1){
     342                drag_input = element->GetInput(FrictionCoefficientEnum);  _assert_(drag_input);
     343        }
    341344
    342345        Gauss* gauss=element->NewGauss();
     
    348351                thickness_input->GetInputValue(&thickness,gauss);
    349352                surface_input->GetInputValue(&surface,gauss);
    350                 drag_input->GetInputValue(&drag,gauss);
    351353                slopex_input->GetInputValue(&slope[0],gauss);
    352354                slopey_input->GetInputValue(&slope[1],gauss);
     
    361363                        case 2:
    362364                                /*Ritz et al. 1996*/
     365                                drag_input->GetInputValue(&drag,gauss);
    363366                                ub=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[0]/sqrt(slope2);
    364367                                vb=drag*(rho_ice*gravity*thickness)*(rho_ice*gravity*thickness)*slope[1]/sqrt(slope2);
     
    366369                        case 3:
    367370                                /*Rutt et al. 2009*/
     371                                drag_input->GetInputValue(&drag,gauss);
    368372                                ub=-drag*rho_ice*gravity*thickness*slope[0];
    369373                                vb=-drag*rho_ice*gravity*thickness*slope[1];
Note: See TracChangeset for help on using the changeset viewer.