Changeset 27494


Ignore:
Timestamp:
01/02/23 16:56:51 (2 years ago)
Author:
Mathieu Morlighem
Message:

NEW: added linearization for Weertman as well

File:
1 edited

Legend:

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

    r27489 r27494  
    6767        }
    6868
    69         if(this->law==1){
     69        if(this->law==1 || this->law==2){
    7070                element_in->FindParam(&linearization_type,FrictionLinearizeEnum);
    7171                if(linearization_type==0){
     
    124124void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/
    125125
    126         switch(this->law){
    127                 case 1:
    128                         if(this->linearize==0){
     126        if(this->linearize==0){
     127                switch(this->law){
     128                        case 1:
    129129                                GetAlphaViscousComplement(palpha_complement,gauss);
    130                         }
    131                         else if(this->linearize==1){
    132                                 this->element->ValueP1OnGauss(palpha_complement, this->alpha2_complement_list, gauss);
    133                         }
    134                         else if(this->linearize==2){
    135                                 *palpha_complement = this->alpha2_complement_list[0];
    136                         }
    137                         else{
    138                                 _error_("not supported yet");
    139                         }
    140                         break;
    141                         break;
    142                 case 2:
    143                         GetAlphaWeertmanComplement(palpha_complement, gauss);
    144                         break;
    145                 case 3:
    146                         GetAlphaHydroComplement(palpha_complement,gauss);
    147                         break;
    148                 case 4:
    149                         GetAlphaTempComplement(palpha_complement,gauss);
    150                         break;
    151                 case 11:
    152                         GetAlphaSchoofComplement(palpha_complement,gauss);
    153                         break;
    154                 case 14:
    155                         GetAlphaRegCoulombComplement(palpha_complement,gauss);
    156                         break;
    157           default:
    158                         _error_("not supported");
     130                                break;
     131                        case 2:
     132                                GetAlphaWeertmanComplement(palpha_complement, gauss);
     133                                break;
     134                        case 3:
     135                                GetAlphaHydroComplement(palpha_complement,gauss);
     136                                break;
     137                        case 4:
     138                                GetAlphaTempComplement(palpha_complement,gauss);
     139                                break;
     140                        case 11:
     141                                GetAlphaSchoofComplement(palpha_complement,gauss);
     142                                break;
     143                        case 14:
     144                                GetAlphaRegCoulombComplement(palpha_complement,gauss);
     145                                break;
     146                        default:
     147                                _error_("not supported");
     148                }
     149        }
     150        else if(this->linearize==1){
     151                this->element->ValueP1OnGauss(palpha_complement, this->alpha2_complement_list, gauss);
     152        }
     153        else if(this->linearize==2){
     154                *palpha_complement = this->alpha2_complement_list[0];
     155        }
     156        else{
     157                _error_("not supported yet");
    159158        }
    160159
     
    358357void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){/*{{{*/
    359358
    360         switch(this->law){
    361                 case 1:
    362                         if(this->linearize==0){
     359        if(this->linearize==0){
     360                switch(this->law){
     361                        case 1:
    363362                                GetAlpha2Viscous(palpha2,gauss);
    364                         }
    365                         else if(this->linearize==1){
    366                                 this->element->ValueP1OnGauss(palpha2, this->alpha2_list, gauss);
    367                         }
    368                         else if(this->linearize==2){
    369                                 *palpha2 = this->alpha2_list[0];
    370                         }
    371                         else{
    372                                 _error_("not supported yet");
    373                         }
    374                         break;
    375                 case 2:
    376                         GetAlpha2Weertman(palpha2,gauss);
    377                         break;
    378                 case 3:
    379                         GetAlpha2Hydro(palpha2,gauss);
    380                         break;
    381                 case 4:
    382                         GetAlpha2Temp(palpha2,gauss);
    383                         break;
    384                 case 5:
    385                         GetAlpha2WaterLayer(palpha2,gauss);
    386                         break;
    387                 case 6:
    388                         GetAlpha2WeertmanTemp(palpha2,gauss);
    389                         break;
    390                 case 7:
    391                         GetAlpha2Coulomb(palpha2,gauss);
    392                         break;
    393                 case 8:
    394                         GetAlpha2Shakti(palpha2,gauss);
    395                         break;
    396                 case 9:
    397                         GetAlpha2Josh(palpha2,gauss);
    398                         break;
    399                 case 10:
    400                         GetAlpha2PISM(palpha2,gauss);
    401                         break;
    402                 case 11:
    403                         GetAlpha2Schoof(palpha2,gauss);
    404                         break;
    405                 case 12:
    406                         GetAlpha2Tsai(palpha2,gauss);
    407                         break;
    408                 case 13:
    409                         GetAlpha2Coulomb2(palpha2,gauss);
    410                         break;
    411                 case 14:
    412                         GetAlpha2RegCoulomb(palpha2,gauss);
    413                         break;
    414           default:
    415                         _error_("Friction law "<< this->law <<" not supported");
     363                                break;
     364                        case 2:
     365                                GetAlpha2Weertman(palpha2,gauss);
     366                                break;
     367                        case 3:
     368                                GetAlpha2Hydro(palpha2,gauss);
     369                                break;
     370                        case 4:
     371                                GetAlpha2Temp(palpha2,gauss);
     372                                break;
     373                        case 5:
     374                                GetAlpha2WaterLayer(palpha2,gauss);
     375                                break;
     376                        case 6:
     377                                GetAlpha2WeertmanTemp(palpha2,gauss);
     378                                break;
     379                        case 7:
     380                                GetAlpha2Coulomb(palpha2,gauss);
     381                                break;
     382                        case 8:
     383                                GetAlpha2Shakti(palpha2,gauss);
     384                                break;
     385                        case 9:
     386                                GetAlpha2Josh(palpha2,gauss);
     387                                break;
     388                        case 10:
     389                                GetAlpha2PISM(palpha2,gauss);
     390                                break;
     391                        case 11:
     392                                GetAlpha2Schoof(palpha2,gauss);
     393                                break;
     394                        case 12:
     395                                GetAlpha2Tsai(palpha2,gauss);
     396                                break;
     397                        case 13:
     398                                GetAlpha2Coulomb2(palpha2,gauss);
     399                                break;
     400                        case 14:
     401                                GetAlpha2RegCoulomb(palpha2,gauss);
     402                                break;
     403                        default:
     404                                _error_("Friction law "<< this->law <<" not supported");
     405                }
     406        }
     407        else if(this->linearize==1){
     408                this->element->ValueP1OnGauss(palpha2, this->alpha2_list, gauss);
     409        }
     410        else if(this->linearize==2){
     411                *palpha2 = this->alpha2_list[0];
     412        }
     413        else{
     414                _error_("not supported yet");
    416415        }
    417416
     
    13261325                        break;
    13271326                case 2:
     1327                        parameters->AddObject(iomodel->CopyConstantObject("md.friction.linearize",FrictionLinearizeEnum));
    13281328                        break;
    13291329                case 3:
Note: See TracChangeset for help on using the changeset viewer.