Changeset 16846


Ignore:
Timestamp:
11/21/13 08:06:40 (11 years ago)
Author:
bdef
Message:

Bug : Fixing issues in the epl gradient computation

File:
1 edited

Legend:

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

    r16839 r16846  
    67656765        this->parameters->FindParam(&input_enum,InputToL2ProjectEnum);
    67666766        switch(input_enum){
    6767                 case EplHeadSlopeXEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break;
    6768                 case EplHeadSlopeYEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break;
     6767                case EplHeadSlopeXEnum: input2 = inputs->GetInput(EplHeadEnum); _assert_(input2); break;
     6768                case EplHeadSlopeYEnum: input2 = inputs->GetInput(EplHeadEnum); _assert_(input2); break;
    67696769        default: input = inputs->GetInput(input_enum);
    67706770        }
     
    71007100                                        EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i])));
    71017101                                        if(EPL_N<0.0)EPL_N=0.0;
    7102                                         /*Get then the gradient of EPL heads*/
    7103                                         EPLgrad = epl_slopeX[i]+epl_slopeY[i];
     7102                                        /*Get then the square of th gradient of EPL heads*/
     7103                                        EPLgrad = (epl_slopeX[i]*epl_slopeX[i]+epl_slopeY[i]*epl_slopeY[i]);
    71047104                                       
    71057105                                        /*And proceed to the real thing*/
    7106                                         thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
     7106                                        thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*EPLgrad-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
    71077107                        }
    71087108                }
Note: See TracChangeset for help on using the changeset viewer.