Changeset 15041


Ignore:
Timestamp:
05/17/13 11:30:17 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removed automated penalty when surface slopes > 0.06% (MOUNTAINEXPONENT)

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

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

    r15040 r15041  
    60676067        IssmDouble xyz_list[NUMVERTICES][3];
    60686068        IssmDouble xyz_list_tria[NUMVERTICES2D][3]={0.0};
    6069         IssmDouble slope[3]={0.0,0.0,0.0};
    6070         IssmDouble MAXSLOPE=.06; // 6 %
    6071         IssmDouble MOUNTAINKEXPONENT=10;
    60726069        IssmDouble L[2][numdof];
    60736070        IssmDouble DL[2][2]                  ={{ 0,0 },{0,0}}; //for basal drag
     
    60996096        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
    61006097        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    6101         Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
    61026098        Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
    61036099        Input* vy_input=inputs->GetInput(VyEnum);           _assert_(vy_input);
     
    61156111                /*Friction: */
    61166112                friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
    6117 
    6118                 // If we have a slope > 6% for this element,  it means  we are on a mountain. In this particular case,
    6119                 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
    6120                 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
    6121                 slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));
    6122 
    6123                 if (slope_magnitude>MAXSLOPE){
    6124                         alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
    6125                 }
    61266113
    61276114                GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
     
    69056892        IssmDouble slope_magnitude,alpha2,Jdet;
    69066893        IssmDouble phi=1.0;
    6907         IssmDouble slope[3]={0.0,0.0,0.0};
    6908         IssmDouble MAXSLOPE=.06; // 6 %
    6909         IssmDouble MOUNTAINKEXPONENT=10;
    69106894        IssmDouble L[2][numdof];
    69116895        IssmDouble DL[2][2]={{ 0,0 },{0,0}}; //for basal drag
     
    69446928                GetL(&L[0][0], gauss,NDOF2);
    69456929
    6946                 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
    69476930                friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
    6948                 slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));
    69496931                if(migration_style==SubelementMigrationEnum) alpha2=phi*alpha2;
    6950 
    6951                 // If we have a slope > 6% for this element,  it means  we are on a mountain. In this particular case,
    6952                 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
    6953                 if (slope_magnitude>MAXSLOPE){
    6954                         alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
    6955                 }
    69566932
    69576933                DL_scalar=alpha2*gauss->weight*Jdet;
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15040 r15041  
    33193319        int        analysis_type,migration_style;
    33203320        int        gausspoints=2;
    3321         IssmDouble MAXSLOPE  = .06; // 6 %
    3322         IssmDouble MOUNTAINKEXPONENT = 10;
    3323         IssmDouble slope_magnitude,alpha2;
     3321        IssmDouble alpha2;
    33243322        IssmDouble Jdet;
    33253323        IssmDouble phi=1.0;
     
    33633361                gauss->GaussPoint(ig);
    33643362
    3365                 // If we have a slope > 6% for this element,  it means  we are on a mountain. In this particular case,
    3366                 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
    3367                 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
    3368                 slope_magnitude=sqrt(slope[0]*slope[0]+slope[1]*slope[1]);
    3369                 if(slope_magnitude>MAXSLOPE) alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
    3370                 else friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
     3363                friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
    33713364                if(migration_style==SubelementMigrationEnum) alpha2=phi*alpha2;
    33723365                if(migration_style==SubelementMigration2Enum){
Note: See TracChangeset for help on using the changeset viewer.