Ignore:
Timestamp:
08/21/18 19:16:04 (7 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixing friction and hydrology PISM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Loads/Friction.cpp

    r23143 r23156  
    710710        element->GetInputValue(&Cc,gauss,FrictionSedimentCompressibilityCoefficientEnum);
    711711        element->GetInputValue(&W,gauss,WatercolumnEnum);
    712         element->GetInputValue(&Wmax,gauss,FrictionWatercolumnMaxEnum);
    713 
    714 //      /*Check that water column height is within 0 and upper bound, correct if needed*/
    715 //      // if watercolumn height is higher than the maximum allowed height, set height to upper bound
    716 //      if(W>Wmax){
    717 //              W=Wmax;
    718 //      }
    719 //      // if watercolumn height is negative (shouldn't happen), set it to 0
    720 //      if(W<0){
    721 //              W=0;
    722 //      }
    723 //      // if watercolumn height is within 0 and upper bound, nothing to be done
    724 //      else{
    725 //              //do nothing
    726 //      }
     712        element->GetInputValue(&Wmax,gauss,HydrologyWatercolumnMaxEnum);
     713
     714        /*Check that water column height is within 0 and upper bound, correct if needed*/
     715        if(W>Wmax) W=Wmax;
     716        if(W<0)    W=0.;
    727717
    728718        N = delta*P0*pow(10.,(e0/Cc)*(1.-W/Wmax));
     
    746736        element->parameters->FindParam(&u0,FrictionThresholdSpeedEnum);
    747737        element->parameters->FindParam(&q,FrictionPseudoplasticityExponentEnum);
    748         IssmDouble alpha2 = tau_c/(pow(ub,1.-q)*pow(u0,q));
     738        IssmDouble alpha2 = tau_c/(pow(ub+1.e-10,1.-q)*pow(u0,q));
    749739
    750740        /*Final checks in debuging mode*/
Note: See TracChangeset for help on using the changeset viewer.