Changeset 15564


Ignore:
Timestamp:
07/23/13 14:23:07 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: hutter-> SIA macayeal->SSA pattyn->HO stokes->FS

Location:
issm/trunk-jpl/src
Files:
83 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/ad/validation/Update/update.m

    r10975 r15564  
    44md=setmask(md,'all','');
    55md=parameterize(md,'SquareShelfConstrained.par');
    6 md=setflowequation(md,'macayeal','all');
     6md=setflowequation(md,'SSA','all');
    77md.cluster=generic('name',oshostname(),'np',3);
    88md.cluster.executionpath=[issmtier() '/src/ad/validation/Validation/'];
  • issm/trunk-jpl/src/c/analyses/AnalysisConfiguration.cpp

    r15339 r15564  
    3030                        analyses[0]=DiagnosticHorizAnalysisEnum;
    3131                        analyses[1]=DiagnosticVertAnalysisEnum;
    32                         analyses[2]=DiagnosticHutterAnalysisEnum;
     32                        analyses[2]=DiagnosticSIAAnalysisEnum;
    3333                        analyses[3]=SurfaceSlopeAnalysisEnum;
    3434                        analyses[4]=BedSlopeAnalysisEnum;
     
    4040                        analyses[0]=DiagnosticHorizAnalysisEnum;
    4141                        analyses[1]=DiagnosticVertAnalysisEnum;
    42                         analyses[2]=DiagnosticHutterAnalysisEnum;
     42                        analyses[2]=DiagnosticSIAAnalysisEnum;
    4343                        analyses[3]=SurfaceSlopeAnalysisEnum;
    4444                        analyses[4]=BedSlopeAnalysisEnum;
     
    112112                        analyses[0]=DiagnosticHorizAnalysisEnum;
    113113                        analyses[1]=DiagnosticVertAnalysisEnum;
    114                         analyses[2]=DiagnosticHutterAnalysisEnum;
     114                        analyses[2]=DiagnosticSIAAnalysisEnum;
    115115                        analyses[3]=SurfaceSlopeAnalysisEnum;
    116116                        analyses[4]=BedSlopeAnalysisEnum;
  • issm/trunk-jpl/src/c/analyses/adjointdiagnostic_core.cpp

    r15104 r15564  
    1313
    1414        /*parameters: */
    15         bool isstokes;
     15        bool isFS;
    1616        bool save_results;
    1717        bool conserve_loads   = true;
    1818
    1919        /*retrieve parameters:*/
    20         femmodel->parameters->FindParam(&isstokes,FlowequationIsstokesEnum);
     20        femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum);
    2121        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2222
     
    3939                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum);
    4040                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum);
    41                 if (isstokes){
     41                if (isFS){
    4242                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointzEnum);
    4343                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointpEnum);
  • issm/trunk-jpl/src/c/analyses/control_core.cpp

    r15483 r15564  
    2424        int        dim;
    2525        int        solution_type;
    26         bool       isstokes;
     26        bool       isFS;
    2727        bool       dakota_analysis = false;
    2828
     
    5757        femmodel->parameters->FindParam(&dim,MeshDimensionEnum);
    5858        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
    59         femmodel->parameters->FindParam(&isstokes,FlowequationIsstokesEnum);
     59        femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum);
    6060        femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
    6161        femmodel->parameters->SetParam(false,SaveResultsEnum);
     
    6767        /*Launch once a complete solution to set up all inputs*/
    6868        if(VerboseControl()) _printf0_("   preparing initial solution\n");
    69         if(isstokes) solutioncore(femmodel);
     69        if(isFS) solutioncore(femmodel);
    7070
    7171        /*Initialize responses: */
  • issm/trunk-jpl/src/c/analyses/diagnostic_core.cpp

    r15504 r15564  
    1515        bool  dakota_analysis;
    1616        int   dim;
    17         bool  ishutter,ismacayeal,isl1l2,ispattyn,isstokes;
     17        bool  isSIA,isSSA,isL1L2,isHO,isFS;
    1818        bool  conserve_loads    = true;
    1919        bool  save_results;
     
    2525        /* recover parameters:*/
    2626        femmodel->parameters->FindParam(&dim,MeshDimensionEnum);
    27         femmodel->parameters->FindParam(&ishutter,FlowequationIshutterEnum);
    28         femmodel->parameters->FindParam(&ismacayeal,FlowequationIsmacayealEnum);
    29         femmodel->parameters->FindParam(&isl1l2,FlowequationIsl1l2Enum);
    30         femmodel->parameters->FindParam(&ispattyn,FlowequationIspattynEnum);
    31         femmodel->parameters->FindParam(&isstokes,FlowequationIsstokesEnum);
     27        femmodel->parameters->FindParam(&isSIA,FlowequationIsSIAEnum);
     28        femmodel->parameters->FindParam(&isSSA,FlowequationIsSSAEnum);
     29        femmodel->parameters->FindParam(&isL1L2,FlowequationIsL1L2Enum);
     30        femmodel->parameters->FindParam(&isHO,FlowequationIsHOEnum);
     31        femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum);
    3232        femmodel->parameters->FindParam(&newton,DiagnosticIsnewtonEnum);
    3333        femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
     
    4646
    4747        /*Compute slopes: */
    48         if(ishutter) surfaceslope_core(femmodel);
    49         if(isstokes){
     48        if(isSIA) surfaceslope_core(femmodel);
     49        if(isFS){
    5050                bedslope_core(femmodel);
    5151                femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
     
    5353        }
    5454
    55         if(ishutter){
    56                 if(VerboseSolution()) _printf0_("   computing hutter velocities\n");
     55        if(isSIA){
     56                if(VerboseSolution()) _printf0_("   computing SIA velocities\n");
    5757
    5858                /*Take the last velocity into account so that the velocity on the MacAyeal domain is not zero*/
    59                 if(ismacayeal || isl1l2 || ispattyn ) ResetBoundaryConditions(femmodel,DiagnosticHutterAnalysisEnum);
    60                 femmodel->SetCurrentConfiguration(DiagnosticHutterAnalysisEnum);
     59                if(isSSA || isL1L2 || isHO ) ResetBoundaryConditions(femmodel,DiagnosticSIAAnalysisEnum);
     60                femmodel->SetCurrentConfiguration(DiagnosticSIAAnalysisEnum);
    6161                solutionsequence_linear(femmodel);
    62                 if(ismacayeal || isl1l2 || ispattyn) ResetBoundaryConditions(femmodel,DiagnosticHorizAnalysisEnum);
     62                if(isSSA || isL1L2 || isHO) ResetBoundaryConditions(femmodel,DiagnosticHorizAnalysisEnum);
    6363        }
    6464
    65         if ((ismacayeal || ispattyn || isl1l2) ^ isstokes){ // ^ = xor
     65        if ((isSSA || isHO || isL1L2) ^ isFS){ // ^ = xor
    6666                if(VerboseSolution()) _printf0_("   computing velocities\n");
    6767
     
    7373        }
    7474
    75         if ((ismacayeal || isl1l2 || ispattyn) && isstokes){
    76                 if(VerboseSolution()) _printf0_("   computing coupling betweem lower order models and full-Stokes\n");
    77                 solutionsequence_stokescoupling_nonlinear(femmodel,conserve_loads);
     75        if ((isSSA || isL1L2 || isHO) && isFS){
     76                if(VerboseSolution()) _printf0_("   computing coupling betweem lower order models and full-FS\n");
     77                solutionsequence_FScoupling_nonlinear(femmodel,conserve_loads);
    7878        }
    7979
    80         if (dim==3 & (ishutter || ismacayeal || isl1l2 || ispattyn)){
     80        if (dim==3 & (isSIA || isSSA || isL1L2 || isHO)){
    8181                if(VerboseSolution()) _printf0_("   computing vertical velocities\n");
    8282                femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
  • issm/trunk-jpl/src/c/analyses/objectivefunction.cpp

    r15339 r15564  
    2424        /*parameters: */
    2525        int        solution_type,analysis_type;
    26         bool       isstokes       = false;
     26        bool       isFS       = false;
    2727        bool       conserve_loads = true;
    2828        FemModel  *femmodel       = NULL;
     
    3232
    3333        /*Recover parameters: */
    34         femmodel->parameters->FindParam(&isstokes,FlowequationIsstokesEnum);
     34        femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum);
    3535        femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    3636        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15556 r15564  
    217217        IssmDouble  xyz_list[NUMVERTICES][3];
    218218        IssmDouble  xyz_list_tria[3][3];
    219         IssmDouble  rho_ice,gravity,stokesreconditioning;
     219        IssmDouble  rho_ice,gravity,FSreconditioning;
    220220        IssmDouble  pressure,viscosity,Jdet2d;
    221221        IssmDouble  bed_normal[3];
     
    234234        /*Check analysis_types*/
    235235        if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!");
    236         if (approximation!=StokesApproximationEnum) _error_("Not supported yet!");
     236        if (approximation!=FSApproximationEnum) _error_("Not supported yet!");
    237237
    238238        /*retrieve some parameters: */
    239         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     239        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    240240
    241241        if(!IsOnBed()){
     
    267267                /*Compute strain rate viscosity and pressure: */
    268268                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    269                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     269                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    270270                pressure_input->GetInputValue(&pressure,gauss);
    271271
    272272                /*Compute Stress*/
    273                 sigma_xx=2*viscosity*epsilon[0]-pressure*stokesreconditioning; // sigma = nu eps - pressure
    274                 sigma_yy=2*viscosity*epsilon[1]-pressure*stokesreconditioning;
    275                 sigma_zz=2*viscosity*epsilon[2]-pressure*stokesreconditioning;
     273                sigma_xx=2*viscosity*epsilon[0]-pressure*FSreconditioning; // sigma = nu eps - pressure
     274                sigma_yy=2*viscosity*epsilon[1]-pressure*FSreconditioning;
     275                sigma_zz=2*viscosity*epsilon[2]-pressure*FSreconditioning;
    276276                sigma_xy=2*viscosity*epsilon[3];
    277277                sigma_xz=2*viscosity*epsilon[4];
     
    415415                        Ke=CreateKMatrixAdjointHoriz();
    416416                        break;
    417                 case DiagnosticHutterAnalysisEnum:
    418                         Ke=CreateKMatrixDiagnosticHutter();
     417                case DiagnosticSIAAnalysisEnum:
     418                        Ke=CreateKMatrixDiagnosticSIA();
    419419                        break;
    420420                case DiagnosticVertAnalysisEnum:
     
    546546                        pe=CreatePVectorDiagnosticHoriz();
    547547                        break;
    548                 case DiagnosticHutterAnalysisEnum:
    549                         pe=CreatePVectorDiagnosticHutter();
     548                case DiagnosticSIAAnalysisEnum:
     549                        pe=CreatePVectorDiagnosticSIA();
    550550                        break;
    551551                case DiagnosticVertAnalysisEnum:
     
    11901190                int approximation;
    11911191                inputs->GetInputValue(&approximation,ApproximationEnum);
    1192                 if(approximation==StokesApproximationEnum || approximation==NoneApproximationEnum){
    1193                         GetSolutionFromInputsDiagnosticStokes(solution);
    1194                 }
    1195                 else if (approximation==MacAyealApproximationEnum || approximation==PattynApproximationEnum || approximation==HutterApproximationEnum){
     1192                if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
     1193                        GetSolutionFromInputsDiagnosticFS(solution);
     1194                }
     1195                else if (approximation==MacAyealApproximationEnum || approximation==HOApproximationEnum || approximation==SIAApproximationEnum){
    11961196                        GetSolutionFromInputsDiagnosticHoriz(solution);
    11971197                }
    1198                 else if (approximation==MacAyealPattynApproximationEnum || approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){
     1198                else if (approximation==MacAyealHOApproximationEnum || approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){
    11991199                        return; //the elements around will create the solution
    12001200                }
    12011201                break;
    1202         case DiagnosticHutterAnalysisEnum:
    1203                 GetSolutionFromInputsDiagnosticHutter(solution);
     1202        case DiagnosticSIAAnalysisEnum:
     1203                GetSolutionFromInputsDiagnosticSIA(solution);
    12041204                break;
    12051205        case DiagnosticVertAnalysisEnum:
     
    12491249}
    12501250/*}}}*/
    1251 /*FUNCTION Penta::GetStrainRate3dPattyn{{{*/
    1252 void Penta::GetStrainRate3dPattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){
    1253         /*Compute the 3d Blatter/PattynStrain Rate (5 components):
     1251/*FUNCTION Penta::GetStrainRate3dHO{{{*/
     1252void Penta::GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){
     1253        /*Compute the 3d Blatter/HOStrain Rate (5 components):
    12541254         *
    12551255         * epsilon=[exx eyy exy exz eyz]
     
    12711271
    12721272        /*Get strain rate assuming that epsilon has been allocated*/
    1273         vx_input->GetVxStrainRate3dPattyn(epsilonvx,xyz_list,gauss);
    1274         vy_input->GetVyStrainRate3dPattyn(epsilonvy,xyz_list,gauss);
     1273        vx_input->GetVxStrainRate3dHO(epsilonvx,xyz_list,gauss);
     1274        vy_input->GetVyStrainRate3dHO(epsilonvy,xyz_list,gauss);
    12751275
    12761276        /*Sum all contributions*/
     
    19731973                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum));
    19741974                }
    1975                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==PattynApproximationEnum){
    1976                         this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum));
    1977                 }
    1978                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealPattynApproximationEnum){
    1979                         this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealPattynApproximationEnum));
    1980                 }
    1981                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HutterApproximationEnum){
    1982                         this->inputs->AddInput(new IntInput(ApproximationEnum,HutterApproximationEnum));
     1975                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HOApproximationEnum){
     1976                        this->inputs->AddInput(new IntInput(ApproximationEnum,HOApproximationEnum));
     1977                }
     1978                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealHOApproximationEnum){
     1979                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealHOApproximationEnum));
     1980                }
     1981                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==SIAApproximationEnum){
     1982                        this->inputs->AddInput(new IntInput(ApproximationEnum,SIAApproximationEnum));
    19831983                }
    19841984                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==L1L2ApproximationEnum){
    19851985                        this->inputs->AddInput(new IntInput(ApproximationEnum,L1L2ApproximationEnum));
    19861986                }
    1987                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==StokesApproximationEnum){
    1988                         this->inputs->AddInput(new IntInput(ApproximationEnum,StokesApproximationEnum));
    1989                 }
    1990                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealStokesApproximationEnum){
    1991                         this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealStokesApproximationEnum));
    1992                 }
    1993                 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==PattynStokesApproximationEnum){
    1994                         this->inputs->AddInput(new IntInput(ApproximationEnum,PattynStokesApproximationEnum));
     1987                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==FSApproximationEnum){
     1988                        this->inputs->AddInput(new IntInput(ApproximationEnum,FSApproximationEnum));
     1989                }
     1990                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealFSApproximationEnum){
     1991                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealFSApproximationEnum));
     1992                }
     1993                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HOFSApproximationEnum){
     1994                        this->inputs->AddInput(new IntInput(ApproximationEnum,HOFSApproximationEnum));
    19951995                }
    19961996                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==NoneApproximationEnum){
     
    20312031                InputUpdateFromSolutionDiagnosticHoriz( solution);
    20322032                break;
    2033         case DiagnosticHutterAnalysisEnum:
    2034                 InputUpdateFromSolutionDiagnosticHutter( solution);
     2033        case DiagnosticSIAAnalysisEnum:
     2034                InputUpdateFromSolutionDiagnosticSIA( solution);
    20352035                break;
    20362036        case DiagnosticVertAnalysisEnum:
     
    20422042                int approximation;
    20432043                inputs->GetInputValue(&approximation,ApproximationEnum);
    2044                 if(approximation==StokesApproximationEnum || approximation==NoneApproximationEnum){
    2045                         InputUpdateFromSolutionAdjointStokes( solution);
     2044                if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
     2045                        InputUpdateFromSolutionAdjointFS( solution);
    20462046                }
    20472047                else{
     
    26512651}
    26522652/*}}}*/
    2653 /*FUNCTION Penta::ReduceMatrixStokes {{{*/
    2654 void Penta::ReduceMatrixStokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp){
     2653/*FUNCTION Penta::ReduceMatrixFS {{{*/
     2654void Penta::ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp){
    26552655
    26562656        int    i,j;
     
    26932693}
    26942694/*}}}*/
    2695 /*FUNCTION Penta::ReduceVectorStokes {{{*/
    2696 void Penta::ReduceVectorStokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp){
     2695/*FUNCTION Penta::ReduceVectorFS {{{*/
     2696void Penta::ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp){
    26972697
    26982698        int    i,j;
     
    27862786        IssmDouble xz_plane[6];
    27872787
    2788         /*For Stokes only: we want the CS to be tangential to the bedrock*/
     2788        /*For FS only: we want the CS to be tangential to the bedrock*/
    27892789        inputs->GetInputValue(&approximation,ApproximationEnum);
    2790         if(IsFloating() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return;
     2790        if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum &&  approximation!=HOFSApproximationEnum)) return;
    27912791
    27922792        /*Get slope on each node*/
     
    28832883        if(analysis_type==DiagnosticHorizAnalysisEnum){
    28842884                inputs->GetInputValue(&approximation,ApproximationEnum);
    2885                 if(approximation==MacAyealPattynApproximationEnum || approximation==MacAyealStokesApproximationEnum){
     2885                if(approximation==MacAyealHOApproximationEnum || approximation==MacAyealFSApproximationEnum){
    28862886                        parameters->FindParam(&numlayers,MeshNumberoflayersEnum);
    28872887                        o_nz += numlayers*3;
     
    31023102        int        stabilization;
    31033103        bool       dakota_analysis;
    3104         bool       isstokes;
     3104        bool       isFS;
    31053105        IssmDouble beta,heatcapacity,referencetemperature,meltingpoint,latentheat;
    31063106
     
    31093109        iomodel->Constant(&stabilization,PrognosticStabilizationEnum);
    31103110        iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
    3111         iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
     3111        iomodel->Constant(&isFS,FlowequationIsFSEnum);
    31123112        iomodel->Constant(&beta,MaterialsBetaEnum);
    31133113        iomodel->Constant(&heatcapacity,MaterialsHeatcapacityEnum);
     
    31753175                                        this->inputs->AddInput(new PentaInput(QmuPressureEnum,nodeinputs,P1Enum));
    31763176                                }
    3177                                 if(isstokes){
     3177                                if(isFS){
    31783178                                        this->inputs->AddInput(new PentaInput(PressureEnum,nodeinputs,P1Enum));
    31793179                                        this->inputs->AddInput(new PentaInput(PressurePicardEnum,nodeinputs,P1Enum));
    31803180                                }
    31813181                        }
    3182                         if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==PattynStokesApproximationEnum){
    3183                                 /*Create VzPattyn and VzStokes Enums*/
    3184                                 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderstokesEnum)){
    3185                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderstokesEnum)[penta_vertex_ids[i]-1];
    3186                                         this->inputs->AddInput(new PentaInput(VzStokesEnum,nodeinputs,P1Enum));
    3187                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderstokesEnum)[penta_vertex_ids[i]-1]);
    3188                                         this->inputs->AddInput(new PentaInput(VzPattynEnum,nodeinputs,P1Enum));
     3182                        if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==HOFSApproximationEnum){
     3183                                /*Create VzHO and VzFS Enums*/
     3184                                if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderFSEnum)){
     3185                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1];
     3186                                        this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum));
     3187                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]);
     3188                                        this->inputs->AddInput(new PentaInput(VzHOEnum,nodeinputs,P1Enum));
    31893189                                }
    31903190                                else{
    31913191                                        for(i=0;i<6;i++)nodeinputs[i]=0;
    3192                                         this->inputs->AddInput(new PentaInput(VzStokesEnum,nodeinputs,P1Enum));
    3193                                         this->inputs->AddInput(new PentaInput(VzPattynEnum,nodeinputs,P1Enum));
     3192                                        this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum));
     3193                                        this->inputs->AddInput(new PentaInput(VzHOEnum,nodeinputs,P1Enum));
    31943194                                }
    31953195                        }
    3196                         if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealStokesApproximationEnum){
    3197                                 /*Create VzMacAyeal and VzStokes Enums*/
    3198                                 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderstokesEnum)){
    3199                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderstokesEnum)[penta_vertex_ids[i]-1];
    3200                                         this->inputs->AddInput(new PentaInput(VzStokesEnum,nodeinputs,P1Enum));
    3201                                         for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderstokesEnum)[penta_vertex_ids[i]-1]);
     3196                        if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealFSApproximationEnum){
     3197                                /*Create VzMacAyeal and VzFS Enums*/
     3198                                if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderFSEnum)){
     3199                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1];
     3200                                        this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum));
     3201                                        for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]);
    32023202                                        this->inputs->AddInput(new PentaInput(VzMacAyealEnum,nodeinputs,P1Enum));
    32033203                                }
    32043204                                else{
    32053205                                        for(i=0;i<6;i++)nodeinputs[i]=0;
    3206                                         this->inputs->AddInput(new PentaInput(VzStokesEnum,nodeinputs,P1Enum));
     3206                                        this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum));
    32073207                                        this->inputs->AddInput(new PentaInput(VzMacAyealEnum,nodeinputs,P1Enum));
    32083208                                }
     
    32893289
    32903290                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    3291                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     3291                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    32923292                GetPhi(&phi, &epsilon[0], viscosity);
    32933293
     
    40674067
    40684068                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    4069                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     4069                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    40704070                GetPhi(&phi, &epsilon[0], viscosity);
    40714071
     
    43234323
    43244324                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    4325                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     4325                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    43264326                GetPhi(&phi, &epsilon[0], viscosity);
    43274327
     
    47764776                case MacAyealApproximationEnum:
    47774777                        return CreateKMatrixAdjointMacAyeal2d();
    4778                 case PattynApproximationEnum:
    4779                         return CreateKMatrixAdjointPattyn();
    4780                 case StokesApproximationEnum:
    4781                         return CreateKMatrixAdjointStokes();
     4778                case HOApproximationEnum:
     4779                        return CreateKMatrixAdjointHO();
     4780                case FSApproximationEnum:
     4781                        return CreateKMatrixAdjointFS();
    47824782                case NoneApproximationEnum:
    47834783                        return NULL;
     
    48214821}
    48224822/*}}}*/
    4823 /*FUNCTION Penta::CreateKMatrixAdjointPattyn{{{*/
    4824 ElementMatrix* Penta::CreateKMatrixAdjointPattyn(void){
     4823/*FUNCTION Penta::CreateKMatrixAdjointHO{{{*/
     4824ElementMatrix* Penta::CreateKMatrixAdjointHO(void){
    48254825
    48264826        /*Intermediaries */
     
    48384838        GaussPenta *gauss=NULL;
    48394839
    4840         /*Initialize Jacobian with regular Pattyn (first part of the Gateau derivative)*/
     4840        /*Initialize Jacobian with regular HO (first part of the Gateau derivative)*/
    48414841        parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum);
    4842         ElementMatrix* Ke=CreateKMatrixDiagnosticPattyn();
     4842        ElementMatrix* Ke=CreateKMatrixDiagnosticHO();
    48434843        if(incomplete_adjoint) return Ke;
    48444844
     
    48574857                GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
    48584858
    4859                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     4859                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    48604860                material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
    48614861                eps1[0]=2*epsilon[0]+epsilon[1];   eps2[0]=epsilon[2];
     
    48864886}
    48874887/*}}}*/
    4888 /*FUNCTION Penta::CreateKMatrixAdjointStokes{{{*/
    4889 ElementMatrix* Penta::CreateKMatrixAdjointStokes(void){
     4888/*FUNCTION Penta::CreateKMatrixAdjointFS{{{*/
     4889ElementMatrix* Penta::CreateKMatrixAdjointFS(void){
    48904890
    48914891        /*Constants*/
     
    49064906        GaussPenta *gauss=NULL;
    49074907
    4908         /*Initialize Jacobian with regular Stokes (first part of the Gateau derivative)*/
     4908        /*Initialize Jacobian with regular FS (first part of the Gateau derivative)*/
    49094909        parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum);
    4910         ElementMatrix* Ke=CreateKMatrixDiagnosticStokes();
     4910        ElementMatrix* Ke=CreateKMatrixDiagnosticFS();
    49114911        if(incomplete_adjoint) return Ke;
    49124912
     
    49264926                GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
    49274927
    4928                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     4928                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    49294929                material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
    49304930                eps1[0]=epsilon[0];   eps2[0]=epsilon[2];   eps3[0]=epsilon[3];
     
    49734973                case MacAyealApproximationEnum:
    49744974                        return CreatePVectorAdjointMacAyeal();
    4975                 case PattynApproximationEnum:
    4976                         return CreatePVectorAdjointPattyn();
     4975                case HOApproximationEnum:
     4976                        return CreatePVectorAdjointHO();
    49774977                case NoneApproximationEnum:
    49784978                        return NULL;
    4979                 case StokesApproximationEnum:
    4980                         return CreatePVectorAdjointStokes();
     4979                case FSApproximationEnum:
     4980                        return CreatePVectorAdjointFS();
    49814981                default:
    49824982                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     
    49984998}
    49994999/*}}}*/
    5000 /*FUNCTION Penta::CreatePVectorAdjointPattyn{{{*/
    5001 ElementVector* Penta::CreatePVectorAdjointPattyn(void){
     5000/*FUNCTION Penta::CreatePVectorAdjointHO{{{*/
     5001ElementVector* Penta::CreatePVectorAdjointHO(void){
    50025002
    50035003        if (!IsOnSurface()) return NULL;
     
    50125012}
    50135013/*}}}*/
    5014 /*FUNCTION Penta::CreatePVectorAdjointStokes{{{*/
    5015 ElementVector* Penta::CreatePVectorAdjointStokes(void){
     5014/*FUNCTION Penta::CreatePVectorAdjointFS{{{*/
     5015ElementVector* Penta::CreatePVectorAdjointFS(void){
    50165016
    50175017        if (!IsOnSurface()) return NULL;
     
    50195019        /*Call Tria function*/
    50205020        Tria* tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
    5021         ElementVector* pe=tria->CreatePVectorAdjointStokes();
     5021        ElementVector* pe=tria->CreatePVectorAdjointFS();
    50225022        delete tria->material; delete tria;
    50235023
     
    50595059                                        GradjDragMacAyeal(gradient,control_index);
    50605060                                        break;
    5061                                 case PattynApproximationEnum:
    5062                                         GradjDragPattyn(gradient,control_index);
     5061                                case HOApproximationEnum:
     5062                                        GradjDragHO(gradient,control_index);
    50635063                                        break;
    5064                                 case StokesApproximationEnum:
    5065                                         GradjDragStokes(gradient,control_index);
     5064                                case FSApproximationEnum:
     5065                                        GradjDragFS(gradient,control_index);
    50665066                                        break;
    50675067                                case NoneApproximationEnum:
     
    50795079                                        GradjBbarMacAyeal(gradient,control_index);
    50805080                                        break;
    5081                                 case PattynApproximationEnum:
    5082                                         GradjBbarPattyn(gradient,control_index);
     5081                                case HOApproximationEnum:
     5082                                        GradjBbarHO(gradient,control_index);
    50835083                                        break;
    5084                                 case StokesApproximationEnum:
    5085                                         GradjBbarStokes(gradient,control_index);
     5084                                case FSApproximationEnum:
     5085                                        GradjBbarFS(gradient,control_index);
    50865086                                        break;
    50875087                                case NoneApproximationEnum:
     
    51435143
    51445144} /*}}}*/
    5145 /*FUNCTION Penta::GradjDragPattyn {{{*/
    5146 void  Penta::GradjDragPattyn(Vector<IssmDouble>* gradient,int control_index){
     5145/*FUNCTION Penta::GradjDragHO {{{*/
     5146void  Penta::GradjDragHO(Vector<IssmDouble>* gradient,int control_index){
    51475147
    51485148        int        i,j;
     
    52145214}
    52155215/*}}}*/
    5216 /*FUNCTION Penta::GradjDragStokes {{{*/
    5217 void  Penta::GradjDragStokes(Vector<IssmDouble>* gradient,int control_index){
     5216/*FUNCTION Penta::GradjDragFS {{{*/
     5217void  Penta::GradjDragFS(Vector<IssmDouble>* gradient,int control_index){
    52185218
    52195219        int        i,j;
     
    53245324
    53255325} /*}}}*/
    5326 /*FUNCTION Penta::GradjBbarPattyn {{{*/
    5327 void  Penta::GradjBbarPattyn(Vector<IssmDouble>* gradient,int control_index){
     5326/*FUNCTION Penta::GradjBbarHO {{{*/
     5327void  Penta::GradjBbarHO(Vector<IssmDouble>* gradient,int control_index){
    53285328
    53295329        /*Gradient is computed on bed only (Bbar)*/
     
    53415341        this->material->inputs->DeleteInput(MaterialsRheologyBbarEnum);
    53425342} /*}}}*/
    5343 /*FUNCTION Penta::GradjBbarStokes {{{*/
    5344 void  Penta::GradjBbarStokes(Vector<IssmDouble>* gradient,int control_index){
     5343/*FUNCTION Penta::GradjBbarFS {{{*/
     5344void  Penta::GradjBbarFS(Vector<IssmDouble>* gradient,int control_index){
    53455345
    53465346        /*Gradient is computed on bed only (Bbar)*/
     
    54035403}
    54045404/*}}}*/
    5405 /*FUNCTION Penta::InputUpdateFromSolutionAdjointStokes {{{*/
    5406 void  Penta::InputUpdateFromSolutionAdjointStokes(IssmDouble* solution){
     5405/*FUNCTION Penta::InputUpdateFromSolutionAdjointFS {{{*/
     5406void  Penta::InputUpdateFromSolutionAdjointFS(IssmDouble* solution){
    54075407
    54085408        const int    numdof=NDOF4*NUMVERTICES;
     
    59515951
    59525952        switch(approximation){
    5953                 case StokesApproximationEnum:
    5954                         return CreateDVectorDiagnosticStokes();
     5953                case FSApproximationEnum:
     5954                        return CreateDVectorDiagnosticFS();
    59555955                default:
    5956                         return NULL; //no need for doftypes outside of stokes approximation
    5957         }
    5958 }
    5959 /*}}}*/
    5960 /*FUNCTION Penta::CreateDVectorDiagnosticStokes{{{*/
    5961 ElementVector* Penta::CreateDVectorDiagnosticStokes(void){
     5956                        return NULL; //no need for doftypes outside of FS approximation
     5957        }
     5958}
     5959/*}}}*/
     5960/*FUNCTION Penta::CreateDVectorDiagnosticFS{{{*/
     5961ElementVector* Penta::CreateDVectorDiagnosticFS(void){
    59625962
    59635963        /*output: */
     
    59695969        /*Initialize Element vector and return if necessary*/
    59705970        inputs->GetInputValue(&approximation,ApproximationEnum);
    5971         if(approximation!=StokesApproximationEnum) return NULL;
    5972 
    5973         De=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     5971        if(approximation!=FSApproximationEnum) return NULL;
     5972
     5973        De=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    59745974
    59755975        for (i=0;i<NUMVERTICES;i++){
     
    59835983}
    59845984/*}}}*/
    5985 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattyn{{{*/
    5986 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattyn(void){
     5985/*FUNCTION Penta::CreateKMatrixCouplingMacAyealHO{{{*/
     5986ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHO(void){
    59875987
    59885988        /*compute all stiffness matrices for this element*/
    5989         ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealPattynViscous();
    5990         ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealPattynFriction();
     5989        ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealHOViscous();
     5990        ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealHOFriction();
    59915991        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
    59925992
     
    59975997}
    59985998/*}}}*/
    5999 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynViscous{{{*/
    6000 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattynViscous(void){
     5999/*FUNCTION Penta::CreateKMatrixCouplingMacAyealHOViscous{{{*/
     6000ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHOViscous(void){
    60016001
    60026002        /*Constants*/
     
    60236023        int         cs_list[numnodes];
    60246024
    6025         /*Find penta on bed as pattyn must be coupled to the dofs on the bed: */
     6025        /*Find penta on bed as HO must be coupled to the dofs on the bed: */
    60266026        Penta* pentabase=GetBasalElement();
    60276027        Tria*  tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     
    60376037        /*Initialize Element matrix*/
    60386038        ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    6039         ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,PattynApproximationEnum);
     6039        ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,HOApproximationEnum);
    60406040        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    60416041        delete Ke1; delete Ke2;
     
    60586058
    60596059                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    6060                 GetBMacAyealPattyn(&B[0][0], &xyz_list[0][0], gauss);
     6060                GetBMacAyealHO(&B[0][0], &xyz_list[0][0], gauss);
    60616061                tria->GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss_tria);
    60626062
    6063                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    6064                 this->GetStrainRate3dPattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
     6063                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     6064                this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
    60656065                material->GetViscosity3d(&viscosity, &epsilon[0]);
    60666066                material->GetViscosity3d(&oldviscosity, &oldepsilon[0]);
     
    60906090}
    60916091/*}}}*/
    6092 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynFriction{{{*/
    6093 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattynFriction(void){
     6092/*FUNCTION Penta::CreateKMatrixCouplingMacAyealHOFriction{{{*/
     6093ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHOFriction(void){
    60946094
    60956095        /*Constants*/
     
    61166116        if(IsFloating() || !IsOnBed()) return NULL;
    61176117        ElementMatrix* Ke1=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    6118         ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
     6118        ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum);
    61196119        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
    61206120        delete Ke1; delete Ke2;
     
    61496149
    61506150                GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
    6151                 GetBPattynFriction(&L[0][0],gauss);
     6151                GetBHOFriction(&L[0][0],gauss);
    61526152
    61536153                DL_scalar=alpha2*gauss->weight*Jdet2d;
     
    61756175}
    61766176/*}}}*/
    6177 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokes{{{*/
    6178 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokes(void){
     6177/*FUNCTION Penta::CreateKMatrixCouplingMacAyealFS{{{*/
     6178ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFS(void){
    61796179
    61806180        /*compute all stiffness matrices for this element*/
    6181         ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealStokesViscous();
    6182         ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealStokesFriction();
     6181        ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealFSViscous();
     6182        ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealFSFriction();
    61836183        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    61846184
     
    61896189}
    61906190/*}}}*/
    6191 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesViscous{{{*/
    6192 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokesViscous(void){
     6191/*FUNCTION Penta::CreateKMatrixCouplingMacAyealFSViscous{{{*/
     6192ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFSViscous(void){
    61936193
    61946194        /*Constants*/
     
    62016201        int         i,j;
    62026202        IssmDouble Jdet;
    6203         IssmDouble viscosity,stokesreconditioning; //viscosity
     6203        IssmDouble viscosity,FSreconditioning; //viscosity
    62046204        IssmDouble epsilon[6]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
    62056205        IssmDouble xyz_list[NUMVERTICES][3];
     
    62206220        int         cs_list[numnodes];
    62216221
    6222         /*Find penta on bed as stokes must be coupled to the dofs on the bed: */
     6222        /*Find penta on bed as FS must be coupled to the dofs on the bed: */
    62236223        Penta* pentabase=GetBasalElement();
    62246224        Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     
    62346234        /*Initialize Element matrix and return if necessary*/
    62356235        ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    6236         ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,StokesApproximationEnum);
     6236        ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,FSApproximationEnum);
    62376237        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
    62386238        delete Ke1; delete Ke2;
     
    62406240        /* Get node coordinates and dof list: */
    62416241        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    6242         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     6242        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    62436243        Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
    62446244        Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
     
    62546254
    62556255                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    6256                 GetBMacAyealStokes(&B[0][0], &xyz_list[0][0], gauss);
    6257                 tria->GetBprimeMacAyealStokes(&Bprime[0][0], &xyz_list[0][0], gauss_tria);
    6258                 tria->GetBMacAyealStokes(&B2[0][0], &xyz_list[0][0], gauss_tria);
    6259                 GetBprimeMacAyealStokes(&Bprime2[0][0], &xyz_list[0][0], gauss);
     6256                GetBMacAyealFS(&B[0][0], &xyz_list[0][0], gauss);
     6257                tria->GetBprimeMacAyealFS(&Bprime[0][0], &xyz_list[0][0], gauss_tria);
     6258                tria->GetBMacAyealFS(&B2[0][0], &xyz_list[0][0], gauss_tria);
     6259                GetBprimeMacAyealFS(&Bprime2[0][0], &xyz_list[0][0], gauss);
    62606260
    62616261                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    6262                 material->GetViscosity3dStokes(&viscosity, &epsilon[0]);
     6262                material->GetViscosity3dFS(&viscosity, &epsilon[0]);
    62636263
    62646264                D_scalar=2*viscosity*gauss->weight*Jdet;
    62656265                for (i=0;i<3;i++) D[i][i]=D_scalar;
    6266                 D[3][3]=-gauss->weight*Jdet*stokesreconditioning;
     6266                D[3][3]=-gauss->weight*Jdet*FSreconditioning;
    62676267                for (i=0;i<3;i++) D2[i][i]=D_scalar;
    62686268
     
    62936293}
    62946294/*}}}*/
    6295 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesFriction {{{*/
    6296 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokesFriction(void){
     6295/*FUNCTION Penta::CreateKMatrixCouplingMacAyealFSFriction {{{*/
     6296ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFSFriction(void){
    62976297
    62986298        /*Constants*/
     
    63076307        int        i,j;
    63086308        int        analysis_type,approximation;
    6309         IssmDouble stokesreconditioning;
     6309        IssmDouble FSreconditioning;
    63106310        IssmDouble viscosity,alpha2_gauss,Jdet2d;
    63116311        IssmDouble bed_normal[3];
     
    63136313        IssmDouble xyz_list[NUMVERTICES][3];
    63146314        IssmDouble xyz_list_tria[NUMVERTICES2D][3];
    6315         IssmDouble LMacAyealStokes[8][numdof2dm];
    6316         IssmDouble LprimeMacAyealStokes[8][numdof2d];
    6317         IssmDouble DLMacAyealStokes[8][8]={0.0};
    6318         IssmDouble LStokesMacAyeal[4][numdof2d];
    6319         IssmDouble LprimeStokesMacAyeal[4][numdof2dm];
    6320         IssmDouble DLStokesMacAyeal[4][4]={0.0};
     6315        IssmDouble LMacAyealFS[8][numdof2dm];
     6316        IssmDouble LprimeMacAyealFS[8][numdof2d];
     6317        IssmDouble DLMacAyealFS[8][8]={0.0};
     6318        IssmDouble LFSMacAyeal[4][numdof2d];
     6319        IssmDouble LprimeFSMacAyeal[4][numdof2dm];
     6320        IssmDouble DLFSMacAyeal[4][4]={0.0};
    63216321        IssmDouble Ke_drag_gaussian[numdof2dm][numdof2d];
    63226322        IssmDouble Ke_drag_gaussian2[numdof2d][numdof2dm];
     
    63266326        int         cs_list[numnodes];
    63276327
    6328         /*If on water or not Stokes, skip stiffness: */
     6328        /*If on water or not FS, skip stiffness: */
    63296329        inputs->GetInputValue(&approximation,ApproximationEnum);
    63306330        if(IsFloating() || !IsOnBed()) return NULL;
    63316331        ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    6332         ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     6332        ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    63336333        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
    63346334        delete Ke1; delete Ke2;
     
    63456345        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    63466346        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    6347         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     6347        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    63486348        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    63496349        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    63616361
    63626362                GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
    6363                 GetLMacAyealStokes(&LMacAyealStokes[0][0], gauss);
    6364                 GetLprimeMacAyealStokes(&LprimeMacAyealStokes[0][0], &xyz_list[0][0], gauss);
    6365                 GetLStokesMacAyeal(&LStokesMacAyeal[0][0], gauss);
    6366                 GetLprimeStokesMacAyeal(&LprimeStokesMacAyeal[0][0], &xyz_list[0][0], gauss);
     6363                GetLMacAyealFS(&LMacAyealFS[0][0], gauss);
     6364                GetLprimeMacAyealFS(&LprimeMacAyealFS[0][0], &xyz_list[0][0], gauss);
     6365                GetLFSMacAyeal(&LFSMacAyeal[0][0], gauss);
     6366                GetLprimeFSMacAyeal(&LprimeFSMacAyeal[0][0], &xyz_list[0][0], gauss);
    63676367
    63686368                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    6369                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     6369                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    63706370
    63716371                BedNormal(&bed_normal[0],xyz_list_tria);
    63726372                friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum);
    63736373
    6374                 DLMacAyealStokes[0][0]=alpha2_gauss*gauss->weight*Jdet2d;
    6375                 DLMacAyealStokes[1][1]=alpha2_gauss*gauss->weight*Jdet2d;
    6376                 DLMacAyealStokes[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];
    6377                 DLMacAyealStokes[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];
    6378                 DLMacAyealStokes[4][4]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[0];
    6379                 DLMacAyealStokes[5][5]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[1];
    6380                 DLMacAyealStokes[6][6]=stokesreconditioning*gauss->weight*Jdet2d*bed_normal[0];
    6381                 DLMacAyealStokes[7][7]=stokesreconditioning*gauss->weight*Jdet2d*bed_normal[1];
    6382 
    6383                 DLStokesMacAyeal[0][0]=alpha2_gauss*gauss->weight*Jdet2d;
    6384                 DLStokesMacAyeal[1][1]=alpha2_gauss*gauss->weight*Jdet2d;
    6385                 DLStokesMacAyeal[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];
    6386                 DLStokesMacAyeal[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];
    6387 
    6388                 TripleMultiply( &LMacAyealStokes[0][0],8,numdof2dm,1,
    6389                                         &DLMacAyealStokes[0][0],8,8,0,
    6390                                         &LprimeMacAyealStokes[0][0],8,numdof2d,0,
     6374                DLMacAyealFS[0][0]=alpha2_gauss*gauss->weight*Jdet2d;
     6375                DLMacAyealFS[1][1]=alpha2_gauss*gauss->weight*Jdet2d;
     6376                DLMacAyealFS[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];
     6377                DLMacAyealFS[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];
     6378                DLMacAyealFS[4][4]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[0];
     6379                DLMacAyealFS[5][5]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[1];
     6380                DLMacAyealFS[6][6]=FSreconditioning*gauss->weight*Jdet2d*bed_normal[0];
     6381                DLMacAyealFS[7][7]=FSreconditioning*gauss->weight*Jdet2d*bed_normal[1];
     6382
     6383                DLFSMacAyeal[0][0]=alpha2_gauss*gauss->weight*Jdet2d;
     6384                DLFSMacAyeal[1][1]=alpha2_gauss*gauss->weight*Jdet2d;
     6385                DLFSMacAyeal[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];
     6386                DLFSMacAyeal[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];
     6387
     6388                TripleMultiply( &LMacAyealFS[0][0],8,numdof2dm,1,
     6389                                        &DLMacAyealFS[0][0],8,8,0,
     6390                                        &LprimeMacAyealFS[0][0],8,numdof2d,0,
    63916391                                        &Ke_drag_gaussian[0][0],0);
    63926392
    6393                 TripleMultiply( &LStokesMacAyeal[0][0],4,numdof2d,1,
    6394                                         &DLStokesMacAyeal[0][0],4,4,0,
    6395                                         &LprimeStokesMacAyeal[0][0],4,numdof2dm,0,
     6393                TripleMultiply( &LFSMacAyeal[0][0],4,numdof2d,1,
     6394                                        &DLFSMacAyeal[0][0],4,4,0,
     6395                                        &LprimeFSMacAyeal[0][0],4,numdof2dm,0,
    63966396                                        &Ke_drag_gaussian2[0][0],0);
    63976397
     
    64096409}
    64106410/*}}}*/
    6411 /*FUNCTION Penta::CreateKMatrixCouplingPattynStokes{{{*/
    6412 ElementMatrix* Penta::CreateKMatrixCouplingPattynStokes(void){
     6411/*FUNCTION Penta::CreateKMatrixCouplingHOFS{{{*/
     6412ElementMatrix* Penta::CreateKMatrixCouplingHOFS(void){
    64136413
    64146414        /*Constants*/
     
    64326432
    64336433        /*compute all stiffness matrices for this element*/
    6434         ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
    6435         ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     6434        ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,HOApproximationEnum);
     6435        ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    64366436        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
    64376437        delete Ke1;
    64386438        delete Ke2;
    6439         Ke1=CreateKMatrixDiagnosticPattyn(); TransformInvStiffnessMatrixCoord(Ke1,this->nodes,NUMVERTICES,XYEnum);
    6440         Ke2=CreateKMatrixDiagnosticStokes(); TransformInvStiffnessMatrixCoord(Ke2,this->nodes,NUMVERTICES,XYZPEnum);
     6439        Ke1=CreateKMatrixDiagnosticHO(); TransformInvStiffnessMatrixCoord(Ke1,this->nodes,NUMVERTICES,XYEnum);
     6440        Ke2=CreateKMatrixDiagnosticFS(); TransformInvStiffnessMatrixCoord(Ke2,this->nodes,NUMVERTICES,XYZPEnum);
    64416441
    64426442        for(i=0;i<numdofs;i++) for(j=0;j<NUMVERTICES;j++){
     
    64696469                case L1L2ApproximationEnum:
    64706470                        return CreateKMatrixDiagnosticL1L2();
    6471                 case PattynApproximationEnum:
    6472                         return CreateKMatrixDiagnosticPattyn();
    6473                 case StokesApproximationEnum:
    6474                         return CreateKMatrixDiagnosticStokes();
    6475                 case HutterApproximationEnum:
     6471                case HOApproximationEnum:
     6472                        return CreateKMatrixDiagnosticHO();
     6473                case FSApproximationEnum:
     6474                        return CreateKMatrixDiagnosticFS();
     6475                case SIAApproximationEnum:
    64766476                        return NULL;
    64776477                case NoneApproximationEnum:
    64786478                        return NULL;
    6479                 case MacAyealPattynApproximationEnum:
    6480                         return CreateKMatrixDiagnosticMacAyealPattyn();
    6481                 case MacAyealStokesApproximationEnum:
    6482                         return CreateKMatrixDiagnosticMacAyealStokes();
    6483                 case PattynStokesApproximationEnum:
    6484                         return CreateKMatrixDiagnosticPattynStokes();
     6479                case MacAyealHOApproximationEnum:
     6480                        return CreateKMatrixDiagnosticMacAyealHO();
     6481                case MacAyealFSApproximationEnum:
     6482                        return CreateKMatrixDiagnosticMacAyealFS();
     6483                case HOFSApproximationEnum:
     6484                        return CreateKMatrixDiagnosticHOFS();
    64856485                default:
    64866486                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     
    64886488}
    64896489/*}}}*/
    6490 /*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{*/
    6491 ElementMatrix* Penta::CreateKMatrixDiagnosticHutter(void){
     6490/*FUNCTION Penta::CreateKMatrixDiagnosticSIA{{{*/
     6491ElementMatrix* Penta::CreateKMatrixDiagnosticSIA(void){
    64926492
    64936493        /*Constants*/
     
    66106610        IssmDouble  viscosity , oldviscosity, newviscosity, viscosity_overshoot;
    66116611        IssmDouble  epsilon[5],oldepsilon[5];       /* epsilon=[exx,eyy,exy,exz,eyz];*/
    6612         IssmDouble  epsilons[6];                    //6 for stokes
     6612        IssmDouble  epsilons[6];                    //6 for FS
    66136613        IssmDouble  xyz_list[NUMVERTICES][3];
    66146614        IssmDouble  B[3][numdof2d];
     
    66226622        GaussTria  *gauss_tria = NULL;
    66236623
    6624         /*Find penta on bed as this is a macayeal elements: */
     6624        /*Find penta on bed as this is a SSA elements: */
    66256625        pentabase=GetBasalElement();
    66266626        tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     
    66516651                tria->GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss_tria);
    66526652
    6653                 if(approximation==MacAyealPattynApproximationEnum){
    6654                         this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    6655                         this->GetStrainRate3dPattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
     6653                if(approximation==MacAyealHOApproximationEnum){
     6654                        this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     6655                        this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
    66566656                        material->GetViscosity3d(&viscosity, &epsilon[0]);
    66576657                        material->GetViscosity3d(&oldviscosity, &oldepsilon[0]);
     
    66596659                        newviscosity=viscosity+viscosity_overshoot*(viscosity-oldviscosity);
    66606660                }
    6661                 else if (approximation==MacAyealStokesApproximationEnum){
     6661                else if (approximation==MacAyealFSApproximationEnum){
    66626662                        this->GetStrainRate3d(&epsilons[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    6663                         material->GetViscosity3dStokes(&newviscosity,&epsilons[0]);
     6663                        material->GetViscosity3dFS(&newviscosity,&epsilons[0]);
    66646664                }
    66656665                else _error_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet");
     
    67046704}
    67056705/*}}}*/
    6706 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealPattyn{{{*/
    6707 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealPattyn(void){
     6706/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealHO{{{*/
     6707ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealHO(void){
    67086708
    67096709        /*compute all stiffness matrices for this element*/
    67106710        ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyeal3d();
    6711         ElementMatrix* Ke2=CreateKMatrixDiagnosticPattyn();
    6712         ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealPattyn();
     6711        ElementMatrix* Ke2=CreateKMatrixDiagnosticHO();
     6712        ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealHO();
    67136713        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3);
    67146714
     
    67206720}
    67216721/*}}}*/
    6722 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealStokes{{{*/
    6723 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealStokes(void){
     6722/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealFS{{{*/
     6723ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealFS(void){
    67246724
    67256725        /*compute all stiffness matrices for this element*/
    67266726        ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyeal3d();
    6727         ElementMatrix* Ke2=CreateKMatrixDiagnosticStokes();
    6728         ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealStokes();
     6727        ElementMatrix* Ke2=CreateKMatrixDiagnosticFS();
     6728        ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealFS();
    67296729        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3);
    67306730
     
    67706770        GaussTria  *gauss_tria = NULL;
    67716771
    6772         /*Find penta on bed as this is a macayeal elements: */
     6772        /*Find penta on bed as this is a SSA elements: */
    67736773        pentabase=GetBasalElement();
    67746774        tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     
    68356835}
    68366836/*}}}*/
    6837 /*FUNCTION Penta::CreateKMatrixDiagnosticPattyn{{{*/
    6838 ElementMatrix* Penta::CreateKMatrixDiagnosticPattyn(void){
     6837/*FUNCTION Penta::CreateKMatrixDiagnosticHO{{{*/
     6838ElementMatrix* Penta::CreateKMatrixDiagnosticHO(void){
    68396839
    68406840        /*compute all stiffness matrices for this element*/
    6841         ElementMatrix* Ke1=CreateKMatrixDiagnosticPattynViscous();
    6842         ElementMatrix* Ke2=CreateKMatrixDiagnosticPattynFriction();
     6841        ElementMatrix* Ke1=CreateKMatrixDiagnosticHOViscous();
     6842        ElementMatrix* Ke2=CreateKMatrixDiagnosticHOFriction();
    68436843        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    68446844
     
    68506850}
    68516851/*}}}*/
    6852 /*FUNCTION Penta::CreateKMatrixDiagnosticPattynViscous{{{*/
    6853 ElementMatrix* Penta::CreateKMatrixDiagnosticPattynViscous(void){
     6852/*FUNCTION Penta::CreateKMatrixDiagnosticHOViscous{{{*/
     6853ElementMatrix* Penta::CreateKMatrixDiagnosticHOViscous(void){
    68546854
    68556855        /*Constants*/
     
    68716871
    68726872        /*Initialize Element matrix*/
    6873         ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
     6873        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum);
    68746874
    68756875        /*Retrieve all inputs and parameters*/
     
    68896889
    68906890                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    6891                 GetBPattyn(&B[0][0], &xyz_list[0][0], gauss);
    6892                 GetBprimePattyn(&Bprime[0][0], &xyz_list[0][0], gauss);
    6893 
    6894                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    6895                 this->GetStrainRate3dPattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
     6891                GetBHO(&B[0][0], &xyz_list[0][0], gauss);
     6892                GetBprimeHO(&Bprime[0][0], &xyz_list[0][0], gauss);
     6893
     6894                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     6895                this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);
    68966896                material->GetViscosity3d(&viscosity, &epsilon[0]);
    68976897                material->GetViscosity3d(&oldviscosity, &oldepsilon[0]);
     
    69156915}
    69166916/*}}}*/
    6917 /*FUNCTION Penta::CreateKMatrixDiagnosticPattynFriction{{{*/
    6918 ElementMatrix* Penta::CreateKMatrixDiagnosticPattynFriction(void){
     6917/*FUNCTION Penta::CreateKMatrixDiagnosticHOFriction{{{*/
     6918ElementMatrix* Penta::CreateKMatrixDiagnosticHOFriction(void){
    69196919
    69206920        /*Constants*/
     
    69376937        if(IsFloating() || !IsOnBed()) return NULL;
    69386938
    6939         ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
     6939        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum);
    69406940
    69416941        /*Retrieve all inputs and parameters*/
     
    69626962
    69636963                GetTriaJacobianDeterminant(&Jdet, &xyz_list_tria[0][0],gauss);
    6964                 GetBPattynFriction(&L[0][0],gauss);
     6964                GetBHOFriction(&L[0][0],gauss);
    69656965
    69666966                friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
     
    69856985}
    69866986/*}}}*/
    6987 /*FUNCTION Penta::CreateKMatrixDiagnosticPattynStokes{{{*/
    6988 ElementMatrix* Penta::CreateKMatrixDiagnosticPattynStokes(void){
     6987/*FUNCTION Penta::CreateKMatrixDiagnosticHOFS{{{*/
     6988ElementMatrix* Penta::CreateKMatrixDiagnosticHOFS(void){
    69896989
    69906990        /*compute all stiffness matrices for this element*/
    6991         ElementMatrix* Ke1=CreateKMatrixDiagnosticPattyn();
    6992         ElementMatrix* Ke2=CreateKMatrixDiagnosticStokes();
    6993         ElementMatrix* Ke3=CreateKMatrixCouplingPattynStokes();
     6991        ElementMatrix* Ke1=CreateKMatrixDiagnosticHO();
     6992        ElementMatrix* Ke2=CreateKMatrixDiagnosticFS();
     6993        ElementMatrix* Ke3=CreateKMatrixCouplingHOFS();
    69946994        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3);
    69956995
     
    70017001}
    70027002/*}}}*/
    7003 /*FUNCTION Penta::CreateKMatrixDiagnosticStokes{{{*/
    7004 ElementMatrix* Penta::CreateKMatrixDiagnosticStokes(void){
    7005 
    7006         int fe_stokes;
     7003/*FUNCTION Penta::CreateKMatrixDiagnosticFS{{{*/
     7004ElementMatrix* Penta::CreateKMatrixDiagnosticFS(void){
     7005
     7006        int fe_FS;
    70077007        ElementMatrix* Ke1;
    70087008        ElementMatrix* Ke2;
    70097009        ElementMatrix* Ke;
    7010         parameters->FindParam(&fe_stokes,FlowequationFeStokesEnum);
    7011 
    7012         switch(fe_stokes){
     7010        parameters->FindParam(&fe_FS,FlowequationFeFSEnum);
     7011
     7012        switch(fe_FS){
    70137013                case 0:
    70147014                        /*compute all stiffness matrices for this element*/
    7015                         Ke1=CreateKMatrixDiagnosticStokesViscous();
    7016                         Ke2=CreateKMatrixDiagnosticStokesFriction();
     7015                        Ke1=CreateKMatrixDiagnosticFSViscous();
     7016                        Ke2=CreateKMatrixDiagnosticFSFriction();
    70177017                        Ke =new ElementMatrix(Ke1,Ke2);
    70187018                        break;
    70197019                case 1:
    70207020                        /*compute all stiffness matrices for this element*/
    7021                         Ke1=CreateKMatrixDiagnosticStokesGLSViscous();
    7022                         Ke2=CreateKMatrixDiagnosticStokesFriction();
     7021                        Ke1=CreateKMatrixDiagnosticFSGLSViscous();
     7022                        Ke2=CreateKMatrixDiagnosticFSFriction();
    70237023                        Ke =new ElementMatrix(Ke1,Ke2);
    70247024                        break;
    70257025                default:
    7026                         _error_("Finite element" << fe_stokes << " not supported yet");
     7026                        _error_("Finite element" << fe_FS << " not supported yet");
    70277027        }
    70287028
     
    70347034}
    70357035/*}}}*/
    7036 /*FUNCTION Penta::CreateKMatrixDiagnosticStokesViscous {{{*/
    7037 ElementMatrix* Penta::CreateKMatrixDiagnosticStokesViscous(void){
     7036/*FUNCTION Penta::CreateKMatrixDiagnosticFSViscous {{{*/
     7037ElementMatrix* Penta::CreateKMatrixDiagnosticFSViscous(void){
    70387038
    70397039        /*Intermediaries */
    70407040        int        i,approximation;
    7041         IssmDouble Jdet,viscosity,stokesreconditioning;
     7041        IssmDouble Jdet,viscosity,FSreconditioning;
    70427042        IssmDouble xyz_list[NUMVERTICES][3];
    70437043        IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
     
    70497049        GaussPenta *gauss=NULL;
    70507050
    7051         /*If on water or not Stokes, skip stiffness: */
     7051        /*If on water or not FS, skip stiffness: */
    70527052        inputs->GetInputValue(&approximation,ApproximationEnum);
    7053         if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    7054         ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7053        if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL;
     7054        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    70557055
    70567056        /*Retrieve all inputs and parameters*/
    70577057        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    7058         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7058        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    70597059        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    70607060        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    70687068
    70697069                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    7070                 GetBStokes(&B[0][0],&xyz_list[0][0],gauss);
    7071                 GetBprimeStokes(&B_prime[0][0],&xyz_list[0][0],gauss);
     7070                GetBFS(&B[0][0],&xyz_list[0][0],gauss);
     7071                GetBprimeFS(&B_prime[0][0],&xyz_list[0][0],gauss);
    70727072
    70737073                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7074                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7074                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    70757075
    70767076                D_scalar=gauss->weight*Jdet;
    70777077                for (i=0;i<6;i++) D[i][i]=D_scalar*2*viscosity;
    7078                 for (i=6;i<8;i++) D[i][i]=-D_scalar*stokesreconditioning;
     7078                for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning;
    70797079
    70807080                TripleMultiply( &B[0][0],8,27,1,
     
    70857085
    70867086        /*Condensation*/
    7087         ReduceMatrixStokes(Ke->values, &Ke_temp[0][0]);
     7087        ReduceMatrixFS(Ke->values, &Ke_temp[0][0]);
    70887088        //Ke->Echo();
    70897089        //_error_("stop");
     
    70977097}
    70987098/*}}}*/
    7099 /*FUNCTION Penta::CreateKMatrixDiagnosticStokesGLSViscous {{{*/
    7100 ElementMatrix* Penta::CreateKMatrixDiagnosticStokesGLSViscous(void){
     7099/*FUNCTION Penta::CreateKMatrixDiagnosticFSGLSViscous {{{*/
     7100ElementMatrix* Penta::CreateKMatrixDiagnosticFSGLSViscous(void){
    71017101
    71027102        int        numdof  = NUMVERTICES*NDOF4;
     
    71047104        /*Intermediaries */
    71057105        int        i,j,approximation;
    7106         IssmDouble Jdet,viscosity,stokesreconditioning,diameter,rigidity;
     7106        IssmDouble Jdet,viscosity,FSreconditioning,diameter,rigidity;
    71077107        IssmDouble xyz_list[NUMVERTICES][3];
    71087108        IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
     
    71287128        int c=3; //index of pressure
    71297129
    7130         /*If on water or not Stokes, skip stiffness: */
     7130        /*If on water or not FS, skip stiffness: */
    71317131        inputs->GetInputValue(&approximation,ApproximationEnum);
    7132         if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    7133         ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7132        if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL;
     7133        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    71347134
    71357135        /*Retrieve all inputs and parameters*/
    71367136        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    7137         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7137        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    71387138        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    71397139        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    71657165
    71667166                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    7167                 GetBStokesGLS(&B[0][0],&xyz_list[0][0],gauss);
    7168                 GetBprimeStokesGLS(&B_prime[0][0],&xyz_list[0][0],gauss);
     7167                GetBFSGLS(&B[0][0],&xyz_list[0][0],gauss);
     7168                GetBprimeFSGLS(&B_prime[0][0],&xyz_list[0][0],gauss);
    71697169
    71707170                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7171                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7171                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    71727172
    71737173                D_scalar=gauss->weight*Jdet;
    71747174                for (i=0;i<6;i++) D[i][i]=D_scalar*2.*2.*viscosity;
    7175                 for (i=6;i<8;i++) D[i][i]=-D_scalar*stokesreconditioning;
     7175                for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning;
    71767176
    71777177                TripleMultiply( &B[0][0],8,24,1,
     
    72357235}
    72367236/*}}}*/
    7237 /*FUNCTION Penta::CreateKMatrixDiagnosticStokesFriction{{{*/
    7238 ElementMatrix* Penta::CreateKMatrixDiagnosticStokesFriction(void){
     7237/*FUNCTION Penta::CreateKMatrixDiagnosticFSFriction{{{*/
     7238ElementMatrix* Penta::CreateKMatrixDiagnosticFSFriction(void){
    72397239
    72407240        /*Constants*/
     
    72467246        int        analysis_type,approximation;
    72477247        IssmDouble alpha2,Jdet2d;
    7248         IssmDouble stokesreconditioning,viscosity;
     7248        IssmDouble FSreconditioning,viscosity;
    72497249        IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
    72507250        IssmDouble xyz_list[NUMVERTICES][3];
    72517251        IssmDouble xyz_list_tria[NUMVERTICES2D][3];
    7252         IssmDouble LStokes[2][numdof2d];
    7253         IssmDouble DLStokes[2][2]={0.0};
     7252        IssmDouble LFS[2][numdof2d];
     7253        IssmDouble DLFS[2][2]={0.0};
    72547254        IssmDouble Ke_drag_gaussian[numdof2d][numdof2d];
    72557255        Friction*  friction=NULL;
    72567256        GaussPenta *gauss=NULL;
    72577257
    7258         /*If on water or not Stokes, skip stiffness: */
     7258        /*If on water or not FS, skip stiffness: */
    72597259        inputs->GetInputValue(&approximation,ApproximationEnum);
    7260         if(IsFloating() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
    7261         ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7260        if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum &&  approximation!=HOFSApproximationEnum)) return NULL;
     7261        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    72627262
    72637263        /*Retrieve all inputs and parameters*/
    72647264        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    72657265        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    7266         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7266        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    72677267        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    72687268        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    72807280
    72817281                GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
    7282                 GetLStokes(&LStokes[0][0], gauss);
     7282                GetLFS(&LFS[0][0], gauss);
    72837283
    72847284                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7285                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7285                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    72867286
    72877287                friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
    72887288
    7289                 DLStokes[0][0] = +alpha2*gauss->weight*Jdet2d; //taub_x = -alpha2 vx
    7290                 DLStokes[1][1] = +alpha2*gauss->weight*Jdet2d; //taub_y = -alpha2 vy
    7291 
    7292                 TripleMultiply( &LStokes[0][0],2,numdof2d,1,
    7293                                         &DLStokes[0][0],2,2,0,
    7294                                         &LStokes[0][0],2,numdof2d,0,
     7289                DLFS[0][0] = +alpha2*gauss->weight*Jdet2d; //taub_x = -alpha2 vx
     7290                DLFS[1][1] = +alpha2*gauss->weight*Jdet2d; //taub_y = -alpha2 vy
     7291
     7292                TripleMultiply( &LFS[0][0],2,numdof2d,1,
     7293                                        &DLFS[0][0],2,2,0,
     7294                                        &LFS[0][0],2,numdof2d,0,
    72957295                                        &Ke_drag_gaussian[0][0],0);
    72967296
     
    74127412}
    74137413/*}}}*/
    7414 /*FUNCTION Penta::CreatePVectorCouplingMacAyealStokes {{{*/
    7415 ElementVector* Penta::CreatePVectorCouplingMacAyealStokes(void){
     7414/*FUNCTION Penta::CreatePVectorCouplingMacAyealFS {{{*/
     7415ElementVector* Penta::CreatePVectorCouplingMacAyealFS(void){
    74167416
    74177417        /*compute all load vectors for this element*/
    7418         ElementVector* pe1=CreatePVectorCouplingMacAyealStokesViscous();
    7419         ElementVector* pe2=CreatePVectorCouplingMacAyealStokesFriction();
     7418        ElementVector* pe1=CreatePVectorCouplingMacAyealFSViscous();
     7419        ElementVector* pe2=CreatePVectorCouplingMacAyealFSFriction();
    74207420        ElementVector* pe =new ElementVector(pe1,pe2);
    74217421
     
    74267426}
    74277427/*}}}*/
    7428 /*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesViscous {{{*/
    7429 ElementVector* Penta::CreatePVectorCouplingMacAyealStokesViscous(void){
     7428/*FUNCTION Penta::CreatePVectorCouplingMacAyealFSViscous {{{*/
     7429ElementVector* Penta::CreatePVectorCouplingMacAyealFSViscous(void){
    74307430
    74317431        /*Constants*/
     
    74367436        int         approximation;
    74377437        IssmDouble  viscosity,Jdet;
    7438         IssmDouble  stokesreconditioning;
     7438        IssmDouble  FSreconditioning;
    74397439        IssmDouble  epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
    74407440        IssmDouble  dw[3];
     
    74467446        /*Initialize Element vector and return if necessary*/
    74477447        inputs->GetInputValue(&approximation,ApproximationEnum);
    7448         if(approximation!=MacAyealStokesApproximationEnum) return NULL;
    7449         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7448        if(approximation!=MacAyealFSApproximationEnum) return NULL;
     7449        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    74507450
    74517451        /*Retrieve all inputs and parameters*/
    74527452        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    7453         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7453        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    74547454        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    74557455        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
    74567456        Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
    7457         Input* vzmacayeal_input=inputs->GetInput(VzMacAyealEnum);   _assert_(vzmacayeal_input);
     7457        Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum);   _assert_(vzSSA_input);
    74587458
    74597459        /* Start  looping on the number of gaussian points: */
     
    74677467                GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss);
    74687468
    7469                 vzmacayeal_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
     7469                vzSSA_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
    74707470
    74717471                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7472                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7472                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    74737473
    74747474                for(i=0;i<NUMVERTICES;i++){
     
    74767476                        pe->values[i*NDOF4+1]+=-Jdet*gauss->weight*viscosity*dw[1]*dbasis[2][i];
    74777477                        pe->values[i*NDOF4+2]+=-Jdet*gauss->weight*viscosity*(dw[0]*dbasis[0][i]+dw[1]*dbasis[1][i]+2*dw[2]*dbasis[2][i]);
    7478                         pe->values[i*NDOF4+3]+=Jdet*gauss->weight*stokesreconditioning*dw[2]*basis[i];
     7478                        pe->values[i*NDOF4+3]+=Jdet*gauss->weight*FSreconditioning*dw[2]*basis[i];
    74797479                }
    74807480        }
     
    74887488}
    74897489/*}}}*/
    7490 /*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesFriction{{{*/
    7491 ElementVector* Penta::CreatePVectorCouplingMacAyealStokesFriction(void){
     7490/*FUNCTION Penta::CreatePVectorCouplingMacAyealFSFriction{{{*/
     7491ElementVector* Penta::CreatePVectorCouplingMacAyealFSFriction(void){
    74927492
    74937493        /*Constants*/
     
    74987498        int         approximation,analysis_type;
    74997499        IssmDouble  Jdet,Jdet2d;
    7500         IssmDouble  stokesreconditioning;
     7500        IssmDouble  FSreconditioning;
    75017501        IssmDouble      bed_normal[3];
    75027502        IssmDouble  epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
     
    75137513        if(!IsOnBed() || IsFloating()) return NULL;
    75147514        inputs->GetInputValue(&approximation,ApproximationEnum);
    7515         if(approximation!=MacAyealStokesApproximationEnum) return NULL;
    7516         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7515        if(approximation!=MacAyealFSApproximationEnum) return NULL;
     7516        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    75177517
    75187518        /*Retrieve all inputs and parameters*/
    75197519        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    75207520        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    7521         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7521        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    75227522        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    75237523        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
    75247524        Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
    7525         Input* vzmacayeal_input=inputs->GetInput(VzMacAyealEnum);   _assert_(vzmacayeal_input);
     7525        Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum);   _assert_(vzSSA_input);
    75267526
    75277527        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
     
    75397539                GetNodalFunctionsP1(basis, gauss);
    75407540
    7541                 vzmacayeal_input->GetInputValue(&w, gauss);
    7542                 vzmacayeal_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
     7541                vzSSA_input->GetInputValue(&w, gauss);
     7542                vzSSA_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
    75437543
    75447544                BedNormal(&bed_normal[0],xyz_list_tria);
    75457545                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7546                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7546                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    75477547                friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum);
    75487548
     
    75637563}
    75647564/*}}}*/
    7565 /*FUNCTION Penta::CreatePVectorCouplingPattynStokes {{{*/
    7566 ElementVector* Penta::CreatePVectorCouplingPattynStokes(void){
     7565/*FUNCTION Penta::CreatePVectorCouplingHOFS {{{*/
     7566ElementVector* Penta::CreatePVectorCouplingHOFS(void){
    75677567
    75687568        /*compute all load vectors for this element*/
    7569         ElementVector* pe1=CreatePVectorCouplingPattynStokesViscous();
    7570         ElementVector* pe2=CreatePVectorCouplingPattynStokesFriction();
     7569        ElementVector* pe1=CreatePVectorCouplingHOFSViscous();
     7570        ElementVector* pe2=CreatePVectorCouplingHOFSFriction();
    75717571        ElementVector* pe =new ElementVector(pe1,pe2);
    75727572
     
    75777577}
    75787578/*}}}*/
    7579 /*FUNCTION Penta::CreatePVectorCouplingPattynStokesViscous {{{*/
    7580 ElementVector* Penta::CreatePVectorCouplingPattynStokesViscous(void){
     7579/*FUNCTION Penta::CreatePVectorCouplingHOFSViscous {{{*/
     7580ElementVector* Penta::CreatePVectorCouplingHOFSViscous(void){
    75817581
    75827582        /*Constants*/
     
    75877587        int         approximation;
    75887588        IssmDouble  viscosity,Jdet;
    7589         IssmDouble  stokesreconditioning;
     7589        IssmDouble  FSreconditioning;
    75907590        IssmDouble  epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
    75917591        IssmDouble  dw[3];
     
    75977597        /*Initialize Element vector and return if necessary*/
    75987598        inputs->GetInputValue(&approximation,ApproximationEnum);
    7599         if(approximation!=PattynStokesApproximationEnum) return NULL;
    7600         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7599        if(approximation!=HOFSApproximationEnum) return NULL;
     7600        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    76017601
    76027602        /*Retrieve all inputs and parameters*/
    76037603        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    7604         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7604        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    76057605        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    76067606        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
    76077607        Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
    7608         Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   _assert_(vzpattyn_input);
     7608        Input* vzHO_input=inputs->GetInput(VzHOEnum);   _assert_(vzHO_input);
    76097609
    76107610        /* Start  looping on the number of gaussian points: */
     
    76187618                GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss);
    76197619
    7620                 vzpattyn_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
     7620                vzHO_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
    76217621
    76227622                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7623                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7623                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    76247624
    76257625                for(i=0;i<NUMVERTICES;i++){
     
    76277627                        pe->values[i*NDOF4+1]+=-Jdet*gauss->weight*viscosity*dw[1]*dbasis[2][i];
    76287628                        pe->values[i*NDOF4+2]+=-Jdet*gauss->weight*viscosity*(dw[0]*dbasis[0][i]+dw[1]*dbasis[1][i]+2*dw[2]*dbasis[2][i]);
    7629                         pe->values[i*NDOF4+3]+=Jdet*gauss->weight*stokesreconditioning*dw[2]*basis[i];
     7629                        pe->values[i*NDOF4+3]+=Jdet*gauss->weight*FSreconditioning*dw[2]*basis[i];
    76307630                }
    76317631        }
     
    76397639}
    76407640/*}}}*/
    7641 /*FUNCTION Penta::CreatePVectorCouplingPattynStokesFriction{{{*/
    7642 ElementVector* Penta::CreatePVectorCouplingPattynStokesFriction(void){
     7641/*FUNCTION Penta::CreatePVectorCouplingHOFSFriction{{{*/
     7642ElementVector* Penta::CreatePVectorCouplingHOFSFriction(void){
    76437643
    76447644        /*Constants*/
     
    76497649        int         approximation,analysis_type;
    76507650        IssmDouble  Jdet,Jdet2d;
    7651         IssmDouble  stokesreconditioning;
     7651        IssmDouble  FSreconditioning;
    76527652        IssmDouble      bed_normal[3];
    76537653        IssmDouble  epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
     
    76647664        if(!IsOnBed() || IsFloating()) return NULL;
    76657665        inputs->GetInputValue(&approximation,ApproximationEnum);
    7666         if(approximation!=PattynStokesApproximationEnum) return NULL;
    7667         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     7666        if(approximation!=HOFSApproximationEnum) return NULL;
     7667        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    76687668
    76697669        /*Retrieve all inputs and parameters*/
    76707670        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    76717671        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    7672         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     7672        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    76737673        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    76747674        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
    76757675        Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
    7676         Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   _assert_(vzpattyn_input);
     7676        Input* vzHO_input=inputs->GetInput(VzHOEnum);   _assert_(vzHO_input);
    76777677
    76787678        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
     
    76907690                GetNodalFunctionsP1(basis, gauss);
    76917691
    7692                 vzpattyn_input->GetInputValue(&w, gauss);
    7693                 vzpattyn_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
     7692                vzHO_input->GetInputValue(&w, gauss);
     7693                vzHO_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
    76947694
    76957695                BedNormal(&bed_normal[0],xyz_list_tria);
    76967696                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    7697                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     7697                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    76987698                friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum);
    76997699
     
    77237723                case MacAyealApproximationEnum:
    77247724                        return CreatePVectorDiagnosticMacAyeal();
    7725                 case PattynApproximationEnum:
    7726                         return CreatePVectorDiagnosticPattyn();
     7725                case HOApproximationEnum:
     7726                        return CreatePVectorDiagnosticHO();
    77277727                case L1L2ApproximationEnum:
    77287728                        return CreatePVectorDiagnosticL1L2();
    7729                 case HutterApproximationEnum:
     7729                case SIAApproximationEnum:
    77307730                        return NULL;
    77317731                case NoneApproximationEnum:
    77327732                        return NULL;
    7733                 case StokesApproximationEnum:
    7734                         return CreatePVectorDiagnosticStokes();
    7735                 case MacAyealPattynApproximationEnum:
    7736                         return CreatePVectorDiagnosticMacAyealPattyn();
    7737                 case MacAyealStokesApproximationEnum:
    7738                         return CreatePVectorDiagnosticMacAyealStokes();
    7739                 case PattynStokesApproximationEnum:
    7740                         return CreatePVectorDiagnosticPattynStokes();
     7733                case FSApproximationEnum:
     7734                        return CreatePVectorDiagnosticFS();
     7735                case MacAyealHOApproximationEnum:
     7736                        return CreatePVectorDiagnosticMacAyealHO();
     7737                case MacAyealFSApproximationEnum:
     7738                        return CreatePVectorDiagnosticMacAyealFS();
     7739                case HOFSApproximationEnum:
     7740                        return CreatePVectorDiagnosticHOFS();
    77417741                default:
    77427742                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     
    77447744}
    77457745/*}}}*/
    7746 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyealPattyn{{{*/
    7747 ElementVector* Penta::CreatePVectorDiagnosticMacAyealPattyn(void){
     7746/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealHO{{{*/
     7747ElementVector* Penta::CreatePVectorDiagnosticMacAyealHO(void){
    77487748
    77497749        /*compute all load vectors for this element*/
    77507750        ElementVector* pe1=CreatePVectorDiagnosticMacAyeal();
    7751         ElementVector* pe2=CreatePVectorDiagnosticPattyn();
     7751        ElementVector* pe2=CreatePVectorDiagnosticHO();
    77527752        ElementVector* pe =new ElementVector(pe1,pe2);
    77537753
     
    77587758}
    77597759/*}}}*/
    7760 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyealStokes{{{*/
    7761 ElementVector* Penta::CreatePVectorDiagnosticMacAyealStokes(void){
     7760/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealFS{{{*/
     7761ElementVector* Penta::CreatePVectorDiagnosticMacAyealFS(void){
    77627762
    77637763        /*compute all load vectors for this element*/
    77647764        ElementVector* pe1=CreatePVectorDiagnosticMacAyeal();
    7765         ElementVector* pe2=CreatePVectorDiagnosticStokes();
    7766         ElementVector* pe3=CreatePVectorCouplingMacAyealStokes();
     7765        ElementVector* pe2=CreatePVectorDiagnosticFS();
     7766        ElementVector* pe3=CreatePVectorCouplingMacAyealFS();
    77677767        ElementVector* pe =new ElementVector(pe1,pe2,pe3);
    77687768
     
    77747774}
    77757775/*}}}*/
    7776 /*FUNCTION Penta::CreatePVectorDiagnosticPattynStokes{{{*/
    7777 ElementVector* Penta::CreatePVectorDiagnosticPattynStokes(void){
     7776/*FUNCTION Penta::CreatePVectorDiagnosticHOFS{{{*/
     7777ElementVector* Penta::CreatePVectorDiagnosticHOFS(void){
    77787778
    77797779        /*compute all load vectors for this element*/
    7780         ElementVector* pe1=CreatePVectorDiagnosticPattyn();
    7781         ElementVector* pe2=CreatePVectorDiagnosticStokes();
    7782         ElementVector* pe3=CreatePVectorCouplingPattynStokes();
     7780        ElementVector* pe1=CreatePVectorDiagnosticHO();
     7781        ElementVector* pe2=CreatePVectorDiagnosticFS();
     7782        ElementVector* pe3=CreatePVectorCouplingHOFS();
    77837783        ElementVector* pe =new ElementVector(pe1,pe2,pe3);
    77847784
     
    77907790}
    77917791/*}}}*/
    7792 /*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{*/
    7793 ElementVector* Penta::CreatePVectorDiagnosticHutter(void){
     7792/*FUNCTION Penta::CreatePVectorDiagnosticSIA{{{*/
     7793ElementVector* Penta::CreatePVectorDiagnosticSIA(void){
    77947794
    77957795        /*Intermediaries*/
     
    79037903}
    79047904/*}}}*/
    7905 /*FUNCTION Penta::CreatePVectorDiagnosticPattyn{{{*/
    7906 ElementVector* Penta::CreatePVectorDiagnosticPattyn(void){
     7905/*FUNCTION Penta::CreatePVectorDiagnosticHO{{{*/
     7906ElementVector* Penta::CreatePVectorDiagnosticHO(void){
    79077907
    79087908        /*compute all load vectors for this element*/
    7909         ElementVector* pe1=CreatePVectorDiagnosticPattynDrivingStress();
    7910         ElementVector* pe2=CreatePVectorDiagnosticPattynFront();
     7909        ElementVector* pe1=CreatePVectorDiagnosticHODrivingStress();
     7910        ElementVector* pe2=CreatePVectorDiagnosticHOFront();
    79117911        ElementVector* pe =new ElementVector(pe1,pe2);
    79127912
     
    79177917}
    79187918/*}}}*/
    7919 /*FUNCTION Penta::CreatePVectorDiagnosticPattynDrivingStress{{{*/
    7920 ElementVector* Penta::CreatePVectorDiagnosticPattynDrivingStress(void){
     7919/*FUNCTION Penta::CreatePVectorDiagnosticHODrivingStress{{{*/
     7920ElementVector* Penta::CreatePVectorDiagnosticHODrivingStress(void){
    79217921
    79227922        /*Constants*/
     
    79337933
    79347934        /*Initialize Element vector*/
    7935         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
     7935        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,HOApproximationEnum);
    79367936
    79377937        /*Retrieve all inputs and parameters*/
     
    79657965}
    79667966/*}}}*/
    7967 /*FUNCTION Penta::CreatePVectorDiagnosticPattynFront{{{*/
    7968 ElementVector* Penta::CreatePVectorDiagnosticPattynFront(void){
     7967/*FUNCTION Penta::CreatePVectorDiagnosticHOFront{{{*/
     7968ElementVector* Penta::CreatePVectorDiagnosticHOFront(void){
    79697969
    79707970        /*Intermediaries */
     
    80008000
    80018001        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    8002         ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,PattynApproximationEnum);
     8002        ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,HOApproximationEnum);
    80038003        Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
    80048004        rho_water=matpar->GetRhoWater();
     
    80438043}
    80448044/*}}}*/
    8045 /*FUNCTION Penta::CreatePVectorDiagnosticStokes {{{*/
    8046 ElementVector* Penta::CreatePVectorDiagnosticStokes(void){
    8047 
    8048         int fe_stokes;
     8045/*FUNCTION Penta::CreatePVectorDiagnosticFS {{{*/
     8046ElementVector* Penta::CreatePVectorDiagnosticFS(void){
     8047
     8048        int fe_FS;
    80498049        ElementVector* pe1;
    80508050        ElementVector* pe2;
    80518051        ElementVector* pe3;
    80528052        ElementVector* pe;
    8053         parameters->FindParam(&fe_stokes,FlowequationFeStokesEnum);
    8054 
    8055         switch(fe_stokes){
     8053        parameters->FindParam(&fe_FS,FlowequationFeFSEnum);
     8054
     8055        switch(fe_FS){
    80568056                case 0:
    80578057                        /*compute all stiffness matrices for this element*/
    8058                         pe1=CreatePVectorDiagnosticStokesViscous();
    8059                         pe2=CreatePVectorDiagnosticStokesShelf();
    8060                         pe3=CreatePVectorDiagnosticStokesFront();
     8058                        pe1=CreatePVectorDiagnosticFSViscous();
     8059                        pe2=CreatePVectorDiagnosticFSShelf();
     8060                        pe3=CreatePVectorDiagnosticFSFront();
    80618061                        pe =new ElementVector(pe1,pe2,pe3);
    80628062                        break;
    80638063                case 1:
    80648064                        /*compute all stiffness matrices for this element*/
    8065                         pe1=CreatePVectorDiagnosticStokesGLSViscous();
    8066                         pe2=CreatePVectorDiagnosticStokesShelf();
    8067                         pe3=CreatePVectorDiagnosticStokesFront();
     8065                        pe1=CreatePVectorDiagnosticFSGLSViscous();
     8066                        pe2=CreatePVectorDiagnosticFSShelf();
     8067                        pe3=CreatePVectorDiagnosticFSFront();
    80688068                        pe =new ElementVector(pe1,pe2,pe3);
    80698069                        break;
    80708070                default:
    8071                         _error_("Finite element" << fe_stokes << " not supported yet");
     8071                        _error_("Finite element" << fe_FS << " not supported yet");
    80728072        }
    80738073
     
    80808080}
    80818081/*}}}*/
    8082 /*FUNCTION Penta::CreatePVectorDiagnosticStokesViscous {{{*/
    8083 ElementVector* Penta::CreatePVectorDiagnosticStokesViscous(void){
     8082/*FUNCTION Penta::CreatePVectorDiagnosticFSViscous {{{*/
     8083ElementVector* Penta::CreatePVectorDiagnosticFSViscous(void){
    80848084
    80858085        /*Constants*/
     
    80908090        int        approximation;
    80918091        IssmDouble Jdet,viscosity;
    8092         IssmDouble gravity,rho_ice,stokesreconditioning;
     8092        IssmDouble gravity,rho_ice,FSreconditioning;
    80938093        IssmDouble forcex,forcey,forcez;
    80948094        IssmDouble xyz_list[NUMVERTICES][3];
     
    81068106        /*Initialize Element vector and return if necessary*/
    81078107        inputs->GetInputValue(&approximation,ApproximationEnum);
    8108         if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    8109         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     8108        if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL;
     8109        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    81108110
    81118111        /*Retrieve all inputs and parameters*/
    8112         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     8112        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    81138113        rho_ice=matpar->GetRhoIce();
    81148114        gravity=matpar->GetG();
     
    81288128
    81298129                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
    8130                 GetBStokes(&B[0][0],&xyz_list[0][0],gauss);
    8131                 GetBprimeStokes(&B_prime[0][0],&xyz_list[0][0], gauss);
     8130                GetBFS(&B[0][0],&xyz_list[0][0],gauss);
     8131                GetBprimeFS(&B_prime[0][0],&xyz_list[0][0], gauss);
    81328132                GetNodalFunctionsMINI(&l1l7[0], gauss);
    81338133
    81348134                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    8135                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     8135                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    81368136
    81378137                loadingforcex_input->GetInputValue(&forcex, gauss);
     
    81518151                D_scalar=gauss->weight*Jdet;
    81528152                for (i=0;i<6;i++) D[i][i]=D_scalar*2*viscosity;
    8153                 for (i=6;i<8;i++) D[i][i]=-D_scalar*stokesreconditioning;
     8153                for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning;
    81548154
    81558155                TripleMultiply(&B[0][0],8,numdofbubble,1,
     
    81608160
    81618161        /*Condensation*/
    8162         ReduceVectorStokes(pe->values, &Ke_temp[0][0], &Pe_gaussian[0]);
     8162        ReduceVectorFS(pe->values, &Ke_temp[0][0], &Pe_gaussian[0]);
    81638163
    81648164        /*Transform coordinate system*/
     
    81708170}
    81718171/*}}}*/
    8172 /*FUNCTION Penta::CreatePVectorDiagnosticStokesFront{{{*/
    8173 ElementVector* Penta::CreatePVectorDiagnosticStokesFront(void){
     8172/*FUNCTION Penta::CreatePVectorDiagnosticFSFront{{{*/
     8173ElementVector* Penta::CreatePVectorDiagnosticFSFront(void){
    81748174
    81758175        /*Intermediaries */
     
    82058205
    82068206        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    8207         ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,StokesApproximationEnum);
     8207        ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,FSApproximationEnum);
    82088208        rho_water=matpar->GetRhoWater();
    82098209        rho_ice  =matpar->GetRhoIce();
     
    82478247}
    82488248/*}}}*/
    8249 /*FUNCTION Penta::CreatePVectorDiagnosticStokesGLSViscous {{{*/
    8250 ElementVector* Penta::CreatePVectorDiagnosticStokesGLSViscous(void){
     8249/*FUNCTION Penta::CreatePVectorDiagnosticFSGLSViscous {{{*/
     8250ElementVector* Penta::CreatePVectorDiagnosticFSGLSViscous(void){
    82518251
    82528252        /*Constants*/
     
    82578257        int        approximation;
    82588258        IssmDouble Jdet,gravity,rho_ice,B,D_scalar_stab,viscosity;
    8259         IssmDouble forcex,forcey,forcez,diameter,stokesreconditioning;
     8259        IssmDouble forcex,forcey,forcez,diameter,FSreconditioning;
    82608260        IssmDouble xyz_list[NUMVERTICES][3];
    82618261        IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
     
    82768276        /*Initialize Element vector and return if necessary*/
    82778277        inputs->GetInputValue(&approximation,ApproximationEnum);
    8278         if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    8279         parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
    8280         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     8278        if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL;
     8279        parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
     8280        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    82818281
    82828282        /*Retrieve all inputs and parameters*/
     
    83188318                GetNodalFunctionsP1(&l1l6[0], gauss);
    83198319                this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
    8320                 material->GetViscosity3dStokes(&viscosity,&epsilon[0]);
     8320                material->GetViscosity3dFS(&viscosity,&epsilon[0]);
    83218321
    83228322                loadingforcex_input->GetInputValue(&forcex, gauss);
     
    83728372}
    83738373/*}}}*/
    8374 /*FUNCTION Penta::CreatePVectorDiagnosticStokesShelf{{{*/
    8375 ElementVector* Penta::CreatePVectorDiagnosticStokesShelf(void){
     8374/*FUNCTION Penta::CreatePVectorDiagnosticFSShelf{{{*/
     8375ElementVector* Penta::CreatePVectorDiagnosticFSShelf(void){
    83768376
    83778377        /*Intermediaries*/
     
    83928392        inputs->GetInputValue(&approximation,ApproximationEnum);
    83938393        this->parameters->FindParam(&shelf_dampening,DiagnosticShelfDampeningEnum);
    8394         if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    8395         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     8394        if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL;
     8395        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    83968396
    83978397        /*Retrieve all inputs and parameters*/
     
    84778477        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    84788478        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
    8479         Input* vzstokes_input=NULL;
    8480         if(approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){
    8481                 vzstokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input);
     8479        Input* vzFS_input=NULL;
     8480        if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){
     8481                vzFS_input=inputs->GetInput(VzFSEnum); _assert_(vzFS_input);
    84828482        }
    84838483
     
    84938493                vx_input->GetInputDerivativeValue(&du[0],&xyz_list[0][0],gauss);
    84948494                vy_input->GetInputDerivativeValue(&dv[0],&xyz_list[0][0],gauss);
    8495                 if(approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){
    8496                         vzstokes_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
     8495                if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){
     8496                        vzFS_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);
    84978497                        dwdz=dw[2];
    84988498                }
     
    85398539        Input* vx_input=inputs->GetInput(VxEnum);                                  _assert_(vx_input);
    85408540        Input* vy_input=inputs->GetInput(VyEnum);                                  _assert_(vy_input);
    8541         Input* vzstokes_input=NULL;
    8542         if(approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){
    8543                 vzstokes_input=inputs->GetInput(VzStokesEnum);       _assert_(vzstokes_input);
     8541        Input* vzFS_input=NULL;
     8542        if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){
     8543                vzFS_input=inputs->GetInput(VzFSEnum);       _assert_(vzFS_input);
    85448544        }
    85458545
     
    85548554                vx_input->GetInputValue(&vx, gauss);
    85558555                vy_input->GetInputValue(&vy, gauss);
    8556                 if(approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){
    8557                         vzstokes_input->GetInputValue(&vz, gauss);
     8556                if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){
     8557                        vzFS_input->GetInputValue(&vz, gauss);
    85588558                }
    85598559                else vz=0;
     
    85818581        switch(approximation){
    85828582                case MacAyealApproximationEnum:
    8583                         return CreateJacobianDiagnosticMacayeal2d();
    8584                 case PattynApproximationEnum:
    8585                         return CreateJacobianDiagnosticPattyn();
    8586                 case StokesApproximationEnum:
    8587                         return CreateJacobianDiagnosticStokes();
     8583                        return CreateJacobianDiagnosticSSA2d();
     8584                case HOApproximationEnum:
     8585                        return CreateJacobianDiagnosticHO();
     8586                case FSApproximationEnum:
     8587                        return CreateJacobianDiagnosticFS();
    85888588                case NoneApproximationEnum:
    85898589                        return NULL;
     
    85938593}
    85948594/*}}}*/
    8595 /*FUNCTION Penta::CreateJacobianDiagnosticMacayeal2d{{{*/
    8596 ElementMatrix* Penta::CreateJacobianDiagnosticMacayeal2d(void){
     8595/*FUNCTION Penta::CreateJacobianDiagnosticSSA2d{{{*/
     8596ElementMatrix* Penta::CreateJacobianDiagnosticSSA2d(void){
    85978597
    85988598        /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the
     
    86168616        /*Call Tria function*/
    86178617        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    8618         ElementMatrix* Ke=tria->CreateJacobianDiagnosticMacayeal();
     8618        ElementMatrix* Ke=tria->CreateJacobianDiagnosticSSA();
    86198619        delete tria->material; delete tria;
    86208620
     
    86278627}
    86288628/*}}}*/
    8629 /*FUNCTION Penta::CreateJacobianDiagnosticPattyn{{{*/
    8630 ElementMatrix* Penta::CreateJacobianDiagnosticPattyn(void){
     8629/*FUNCTION Penta::CreateJacobianDiagnosticHO{{{*/
     8630ElementMatrix* Penta::CreateJacobianDiagnosticHO(void){
    86318631
    86328632        /*Constants*/
     
    86458645        GaussPenta *gauss=NULL;
    86468646
    8647         /*Initialize Jacobian with regular Pattyn (first part of the Gateau derivative)*/
    8648         ElementMatrix* Ke=CreateKMatrixDiagnosticPattyn();
     8647        /*Initialize Jacobian with regular HO (first part of the Gateau derivative)*/
     8648        ElementMatrix* Ke=CreateKMatrixDiagnosticHO();
    86498649
    86508650        /*Retrieve all inputs and parameters*/
     
    86628662                GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
    86638663
    8664                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     8664                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    86658665                material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
    86668666                eps1[0]=2*epsilon[0]+epsilon[1];   eps2[0]=epsilon[2];
     
    86918691}
    86928692/*}}}*/
    8693 /*FUNCTION Penta::CreateJacobianDiagnosticStokes{{{*/
    8694 ElementMatrix* Penta::CreateJacobianDiagnosticStokes(void){
     8693/*FUNCTION Penta::CreateJacobianDiagnosticFS{{{*/
     8694ElementMatrix* Penta::CreateJacobianDiagnosticFS(void){
    86958695
    86968696        /*Constants*/
     
    87108710        GaussPenta *gauss=NULL;
    87118711
    8712         /*Initialize Jacobian with regular Stokes (first part of the Gateau derivative)*/
    8713         ElementMatrix* Ke=CreateKMatrixDiagnosticStokes();
     8712        /*Initialize Jacobian with regular FS (first part of the Gateau derivative)*/
     8713        ElementMatrix* Ke=CreateKMatrixDiagnosticFS();
    87148714
    87158715        /*Retrieve all inputs and parameters*/
     
    87288728                GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
    87298729
    8730                 this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     8730                this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    87318731                material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
    87328732                eps1[0]=epsilon[0];   eps2[0]=epsilon[2];   eps3[0]=epsilon[3];
     
    87848784
    87858785        /*If the element is a coupling, do nothing: every node is also on an other elements
    8786          * (as coupling is between MacAyeal and Pattyn) so the other element will take care of it*/
     8786         * (as coupling is between MacAyeal and HO) so the other element will take care of it*/
    87878787        GetDofList(&doflist,approximation,GsetEnum);
    87888788
     
    88088808}
    88098809/*}}}*/
    8810 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticHutter{{{*/
    8811 void  Penta::GetSolutionFromInputsDiagnosticHutter(Vector<IssmDouble>* solution){
     8810/*FUNCTION Penta::GetSolutionFromInputsDiagnosticSIA{{{*/
     8811void  Penta::GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution){
    88128812
    88138813        const int    numdof=NDOF2*NUMVERTICES;
     
    88778877}
    88788878/*}}}*/
    8879 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticStokes{{{*/
    8880 void  Penta::GetSolutionFromInputsDiagnosticStokes(Vector<IssmDouble>* solution){
     8879/*FUNCTION Penta::GetSolutionFromInputsDiagnosticFS{{{*/
     8880void  Penta::GetSolutionFromInputsDiagnosticFS(Vector<IssmDouble>* solution){
    88818881
    88828882        const int    numdof=NDOF4*NUMVERTICES;
     
    88858885        int*         doflist=NULL;
    88868886        IssmDouble       vx,vy,vz,p;
    8887         IssmDouble       stokesreconditioning;
     8887        IssmDouble       FSreconditioning;
    88888888        IssmDouble       values[numdof];
    88898889        GaussPenta   *gauss;
    88908890
    88918891        /*Get dof list: */
    8892         GetDofList(&doflist,StokesApproximationEnum,GsetEnum);
     8892        GetDofList(&doflist,FSApproximationEnum,GsetEnum);
    88938893        Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
    88948894        Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
     
    88978897
    88988898        /*Recondition pressure: */
    8899         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     8899        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    89008900
    89018901        /*Ok, we have vx vy vz and P in values, fill in vx vy vz P arrays: */
     
    89118911                values[i*NDOF4+1]=vy;
    89128912                values[i*NDOF4+2]=vz;
    8913                 values[i*NDOF4+3]=p/stokesreconditioning;
     8913                values[i*NDOF4+3]=p/FSreconditioning;
    89148914        }
    89158915
     
    89618961
    89628962        /* Get eps_b*/
    8963         vx_input->GetVxStrainRate3dPattyn(epsilonvx,xyz_list,gauss);
    8964         vy_input->GetVyStrainRate3dPattyn(epsilonvy,xyz_list,gauss);
     8963        vx_input->GetVxStrainRate3dHO(epsilonvx,xyz_list,gauss);
     8964        vy_input->GetVyStrainRate3dHO(epsilonvy,xyz_list,gauss);
    89658965        for(i=0;i<5;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i];
    89668966        eps_b = sqrt(epsilon[0]*epsilon[0] + epsilon[1]*epsilon[1] + epsilon[0]*epsilon[1] + epsilon[2]*epsilon[2]);
     
    90159015                return;
    90169016        }
    9017         else if (approximation==PattynApproximationEnum){
    9018                 InputUpdateFromSolutionDiagnosticPattyn(solution);
    9019         }
    9020         else if (approximation==PattynStokesApproximationEnum){
    9021                 InputUpdateFromSolutionDiagnosticPattynStokes(solution);
    9022         }
    9023         else if (approximation==MacAyealStokesApproximationEnum){
    9024                 InputUpdateFromSolutionDiagnosticMacAyealStokes(solution);
    9025         }
    9026         else if (approximation==StokesApproximationEnum || approximation==NoneApproximationEnum){
    9027                 InputUpdateFromSolutionDiagnosticStokes(solution);
    9028         }
    9029         else if (approximation==MacAyealPattynApproximationEnum){
    9030                 InputUpdateFromSolutionDiagnosticMacAyealPattyn(solution);
     9017        else if (approximation==HOApproximationEnum){
     9018                InputUpdateFromSolutionDiagnosticHO(solution);
     9019        }
     9020        else if (approximation==HOFSApproximationEnum){
     9021                InputUpdateFromSolutionDiagnosticHOFS(solution);
     9022        }
     9023        else if (approximation==MacAyealFSApproximationEnum){
     9024                InputUpdateFromSolutionDiagnosticMacAyealFS(solution);
     9025        }
     9026        else if (approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
     9027                InputUpdateFromSolutionDiagnosticFS(solution);
     9028        }
     9029        else if (approximation==MacAyealHOApproximationEnum){
     9030                InputUpdateFromSolutionDiagnosticMacAyealHO(solution);
    90319031        }
    90329032}
     
    91139113}
    91149114/*}}}*/
    9115 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn {{{*/
    9116 void  Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn(IssmDouble* solution){
     9115/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealHO {{{*/
     9116void  Penta::InputUpdateFromSolutionDiagnosticMacAyealHO(IssmDouble* solution){
    91179117
    91189118        const int    numdof=NDOF2*NUMVERTICES;
     
    91219121        int     i;
    91229122        IssmDouble  rho_ice,g;
    9123         IssmDouble  macayeal_values[numdof];
    9124         IssmDouble  pattyn_values[numdof];
     9123        IssmDouble  SSA_values[numdof];
     9124        IssmDouble  HO_values[numdof];
    91259125        IssmDouble  vx[NUMVERTICES];
    91269126        IssmDouble  vy[NUMVERTICES];
     
    91349134        Penta   *penta   = NULL;
    91359135
    9136         /*OK, we have to add results of this element for pattyn
    9137          * and results from the penta at base for macayeal. Now recover results*/
     9136        /*OK, we have to add results of this element for HO
     9137         * and results from the penta at base for SSA. Now recover results*/
    91389138        penta=GetBasalElement();
    91399139
    9140         /*Get dof listof this element (pattyn dofs) and of the penta at base (macayeal dofs): */
    9141         GetDofList(&doflistp,PattynApproximationEnum,GsetEnum);
     9140        /*Get dof listof this element (HO dofs) and of the penta at base (SSA dofs): */
     9141        GetDofList(&doflistp,HOApproximationEnum,GsetEnum);
    91429142        penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum);
    91439143
     
    91479147        /*Use the dof list to index into the solution vector: */
    91489148        for(i=0;i<numdof2d;i++){
    9149                 pattyn_values[i]=solution[doflistp[i]];
    9150                 macayeal_values[i]=solution[doflistm[i]];
     9149                HO_values[i]=solution[doflistp[i]];
     9150                SSA_values[i]=solution[doflistm[i]];
    91519151        }
    91529152        for(i=numdof2d;i<numdof;i++){
    9153                 pattyn_values[i]=solution[doflistp[i]];
    9154                 macayeal_values[i]=macayeal_values[i-numdof2d];
     9153                HO_values[i]=solution[doflistp[i]];
     9154                SSA_values[i]=SSA_values[i-numdof2d];
    91559155        }
    91569156
    91579157        /*Transform solution in Cartesian Space*/
    9158         TransformSolutionCoord(&macayeal_values[0],penta->nodes,NUMVERTICES,XYEnum);
    9159         TransformSolutionCoord(&pattyn_values[0],   this->nodes,NUMVERTICES,XYEnum);
     9158        TransformSolutionCoord(&SSA_values[0],penta->nodes,NUMVERTICES,XYEnum);
     9159        TransformSolutionCoord(&HO_values[0],   this->nodes,NUMVERTICES,XYEnum);
    91609160
    91619161        /*Ok, we have vx and vy in values, fill in vx and vy arrays: */
    91629162        for(i=0;i<NUMVERTICES;i++){
    9163                 vx[i]=macayeal_values[i*NDOF2+0]+pattyn_values[i*NDOF2+0];
    9164                 vy[i]=macayeal_values[i*NDOF2+1]+pattyn_values[i*NDOF2+1];
     9163                vx[i]=SSA_values[i*NDOF2+0]+HO_values[i*NDOF2+0];
     9164                vy[i]=SSA_values[i*NDOF2+1]+HO_values[i*NDOF2+1];
    91659165
    91669166                /*Check solution*/
     
    91979197}
    91989198/*}}}*/
    9199 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes {{{*/
    9200 void  Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes(IssmDouble* solution){
     9199/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealFS {{{*/
     9200void  Penta::InputUpdateFromSolutionDiagnosticMacAyealFS(IssmDouble* solution){
    92019201
    92029202        const int    numdofm=NDOF2*NUMVERTICES;
     
    92059205
    92069206        int     i;
    9207         IssmDouble  stokesreconditioning;
    9208         IssmDouble  macayeal_values[numdofm];
    9209         IssmDouble  stokes_values[numdofs];
     9207        IssmDouble  FSreconditioning;
     9208        IssmDouble  SSA_values[numdofm];
     9209        IssmDouble  FS_values[numdofs];
    92109210        IssmDouble  vx[NUMVERTICES];
    92119211        IssmDouble  vy[NUMVERTICES];
    92129212        IssmDouble  vz[NUMVERTICES];
    9213         IssmDouble  vzmacayeal[NUMVERTICES];
    9214         IssmDouble  vzstokes[NUMVERTICES];
     9213        IssmDouble  vzSSA[NUMVERTICES];
     9214        IssmDouble  vzFS[NUMVERTICES];
    92159215        IssmDouble  vel[NUMVERTICES];
    92169216        IssmDouble  pressure[NUMVERTICES];
     
    92209220        Penta   *penta          = NULL;
    92219221
    9222         /*OK, we have to add results of this element for macayeal
    9223          * and results from the penta at base for macayeal. Now recover results*/
     9222        /*OK, we have to add results of this element for SSA
     9223         * and results from the penta at base for SSA. Now recover results*/
    92249224        penta=GetBasalElement();
    92259225
    9226         /*Get dof listof this element (macayeal dofs) and of the penta at base (macayeal dofs): */
     9226        /*Get dof listof this element (SSA dofs) and of the penta at base (SSA dofs): */
    92279227        penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum);
    9228         GetDofList(&doflists,StokesApproximationEnum,GsetEnum);
    9229         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     9228        GetDofList(&doflists,FSApproximationEnum,GsetEnum);
     9229        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    92309230
    92319231        /*Get node data: */
     
    92349234        /*Use the dof list to index into the solution vector: */
    92359235        for(i=0;i<numdof2d;i++){
    9236                 macayeal_values[i]=solution[doflistm[i]];
    9237                 macayeal_values[i+numdof2d]=solution[doflistm[i]];
     9236                SSA_values[i]=solution[doflistm[i]];
     9237                SSA_values[i+numdof2d]=solution[doflistm[i]];
    92389238        }
    92399239        for(i=0;i<numdofs;i++){
    9240                 stokes_values[i]=solution[doflists[i]];
     9240                FS_values[i]=solution[doflists[i]];
    92419241        }
    92429242
    92439243        /*Transform solution in Cartesian Space*/
    9244         TransformSolutionCoord(&macayeal_values[0],this->nodes,NUMVERTICES,XYEnum);
    9245         TransformSolutionCoord(&stokes_values[0],this->nodes,NUMVERTICES,XYZPEnum);
     9244        TransformSolutionCoord(&SSA_values[0],this->nodes,NUMVERTICES,XYEnum);
     9245        TransformSolutionCoord(&FS_values[0],this->nodes,NUMVERTICES,XYZPEnum);
    92469246
    92479247        /*Ok, we have vx and vy in values, fill in vx and vy arrays: */
    92489248        for(i=0;i<NUMVERTICES;i++){
    9249                 vx[i]=stokes_values[i*NDOF4+0]+macayeal_values[i*NDOF2+0];
    9250                 vy[i]=stokes_values[i*NDOF4+1]+macayeal_values[i*NDOF2+1];
    9251                 vzstokes[i]=stokes_values[i*NDOF4+2];
    9252                 pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
     9249                vx[i]=FS_values[i*NDOF4+0]+SSA_values[i*NDOF2+0];
     9250                vy[i]=FS_values[i*NDOF4+1]+SSA_values[i*NDOF2+1];
     9251                vzFS[i]=FS_values[i*NDOF4+2];
     9252                pressure[i]=FS_values[i*NDOF4+3]*FSreconditioning;
    92539253
    92549254                /*Check solution*/
    92559255                if(xIsNan<IssmDouble>(vx[i]))       _error_("NaN found in solution vector");
    92569256                if(xIsNan<IssmDouble>(vy[i]))       _error_("NaN found in solution vector");
    9257                 if(xIsNan<IssmDouble>(vzstokes[i])) _error_("NaN found in solution vector");
     9257                if(xIsNan<IssmDouble>(vzFS[i])) _error_("NaN found in solution vector");
    92589258                if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector");
    92599259        }
    92609260
    92619261        /*Get Vz*/
    9262         Input* vzmacayeal_input=inputs->GetInput(VzMacAyealEnum);
    9263         if (vzmacayeal_input){
    9264                 if (vzmacayeal_input->ObjectEnum()!=PentaInputEnum){
    9265                         _error_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzmacayeal_input->ObjectEnum()));
    9266                 }
    9267                 GetInputListOnVertices(&vzmacayeal[0],VzMacAyealEnum);
     9262        Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum);
     9263        if (vzSSA_input){
     9264                if (vzSSA_input->ObjectEnum()!=PentaInputEnum){
     9265                        _error_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzSSA_input->ObjectEnum()));
     9266                }
     9267                GetInputListOnVertices(&vzSSA[0],VzMacAyealEnum);
    92689268        }
    92699269        else{
     
    92739273        /*Now Compute vel*/
    92749274        for(i=0;i<NUMVERTICES;i++) {
    9275                 vz[i]=vzmacayeal[i]+vzstokes[i];
     9275                vz[i]=vzSSA[i]+vzFS[i];
    92769276                vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
    92779277        }
     
    92889288        this->inputs->AddInput(new PentaInput(VyEnum,vy,P1Enum));
    92899289        this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum));
    9290         this->inputs->AddInput(new PentaInput(VzStokesEnum,vzstokes,P1Enum));
     9290        this->inputs->AddInput(new PentaInput(VzFSEnum,vzFS,P1Enum));
    92919291        this->inputs->AddInput(new PentaInput(VelEnum,vel,P1Enum));
    92929292        this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum));
     
    93789378}
    93799379/*}}}*/
    9380 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattyn {{{*/
    9381 void  Penta::InputUpdateFromSolutionDiagnosticPattyn(IssmDouble* solution){
     9380/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHO {{{*/
     9381void  Penta::InputUpdateFromSolutionDiagnosticHO(IssmDouble* solution){
    93829382
    93839383        const int    numdof=NDOF2*NUMVERTICES;
     
    93969396
    93979397        /*Get dof list: */
    9398         GetDofList(&doflist,PattynApproximationEnum,GsetEnum);
     9398        GetDofList(&doflist,HOApproximationEnum,GsetEnum);
    93999399
    94009400        /*Get node data: */
     
    94529452}
    94539453/*}}}*/
    9454 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattynStokes {{{*/
    9455 void  Penta::InputUpdateFromSolutionDiagnosticPattynStokes(IssmDouble* solution){
     9454/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHOFS {{{*/
     9455void  Penta::InputUpdateFromSolutionDiagnosticHOFS(IssmDouble* solution){
    94569456
    94579457        const int    numdofp=NDOF2*NUMVERTICES;
     
    94599459
    94609460        int    i;
    9461         IssmDouble pattyn_values[numdofp];
    9462         IssmDouble stokes_values[numdofs];
     9461        IssmDouble HO_values[numdofp];
     9462        IssmDouble FS_values[numdofs];
    94639463        IssmDouble vx[NUMVERTICES];
    94649464        IssmDouble vy[NUMVERTICES];
    94659465        IssmDouble vz[NUMVERTICES];
    9466         IssmDouble vzpattyn[NUMVERTICES];
    9467         IssmDouble vzstokes[NUMVERTICES];
     9466        IssmDouble vzHO[NUMVERTICES];
     9467        IssmDouble vzFS[NUMVERTICES];
    94689468        IssmDouble vel[NUMVERTICES];
    94699469        IssmDouble pressure[NUMVERTICES];
    94709470        IssmDouble xyz_list[NUMVERTICES][3];
    9471         IssmDouble stokesreconditioning;
     9471        IssmDouble FSreconditioning;
    94729472        int*   doflistp      = NULL;
    94739473        int*   doflists      = NULL;
    94749474        Penta  *penta        = NULL;
    94759475
    9476         /*OK, we have to add results of this element for pattyn
    9477          * and results from the penta at base for macayeal. Now recover results*/
     9476        /*OK, we have to add results of this element for HO
     9477         * and results from the penta at base for SSA. Now recover results*/
    94789478        penta=GetBasalElement();
    94799479
    9480         /*Get dof listof this element (pattyn dofs) and of the penta at base (macayeal dofs): */
    9481         GetDofList(&doflistp,PattynApproximationEnum,GsetEnum);
    9482         GetDofList(&doflists,StokesApproximationEnum,GsetEnum);
    9483         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
     9480        /*Get dof listof this element (HO dofs) and of the penta at base (SSA dofs): */
     9481        GetDofList(&doflistp,HOApproximationEnum,GsetEnum);
     9482        GetDofList(&doflists,FSApproximationEnum,GsetEnum);
     9483        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
    94849484
    94859485        /*Get node data: */
     
    94879487
    94889488        /*Use the dof list to index into the solution vector: */
    9489         for(i=0;i<numdofp;i++) pattyn_values[i]=solution[doflistp[i]];
    9490         for(i=0;i<numdofs;i++) stokes_values[i]=solution[doflists[i]];
     9489        for(i=0;i<numdofp;i++) HO_values[i]=solution[doflistp[i]];
     9490        for(i=0;i<numdofs;i++) FS_values[i]=solution[doflists[i]];
    94919491
    94929492        /*Transform solution in Cartesian Space*/
    9493         TransformSolutionCoord(&pattyn_values[0],this->nodes,NUMVERTICES,XYEnum);
    9494         TransformSolutionCoord(&stokes_values[0],this->nodes,NUMVERTICES,XYZPEnum);
     9493        TransformSolutionCoord(&HO_values[0],this->nodes,NUMVERTICES,XYEnum);
     9494        TransformSolutionCoord(&FS_values[0],this->nodes,NUMVERTICES,XYZPEnum);
    94959495
    94969496        /*Ok, we have vx and vy in values, fill in vx and vy arrays: */
    94979497        for(i=0;i<NUMVERTICES;i++){
    9498                 vx[i]=stokes_values[i*NDOF4+0]+pattyn_values[i*NDOF2+0];
    9499                 vy[i]=stokes_values[i*NDOF4+1]+pattyn_values[i*NDOF2+1];
    9500                 vzstokes[i]=stokes_values[i*NDOF4+2];
    9501                 pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
     9498                vx[i]=FS_values[i*NDOF4+0]+HO_values[i*NDOF2+0];
     9499                vy[i]=FS_values[i*NDOF4+1]+HO_values[i*NDOF2+1];
     9500                vzFS[i]=FS_values[i*NDOF4+2];
     9501                pressure[i]=FS_values[i*NDOF4+3]*FSreconditioning;
    95029502
    95039503                /*Check solution*/
    95049504                if(xIsNan<IssmDouble>(vx[i]))       _error_("NaN found in solution vector");
    95059505                if(xIsNan<IssmDouble>(vy[i]))       _error_("NaN found in solution vector");
    9506                 if(xIsNan<IssmDouble>(vzstokes[i])) _error_("NaN found in solution vector");
     9506                if(xIsNan<IssmDouble>(vzFS[i])) _error_("NaN found in solution vector");
    95079507                if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector");
    95089508        }
    95099509
    95109510        /*Get Vz*/
    9511         Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);
    9512         if (vzpattyn_input){
    9513                 if (vzpattyn_input->ObjectEnum()!=PentaInputEnum){
    9514                         _error_("Cannot compute Vel as VzPattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));
    9515                 }
    9516                 GetInputListOnVertices(&vzpattyn[0],VzPattynEnum);
     9511        Input* vzHO_input=inputs->GetInput(VzHOEnum);
     9512        if (vzHO_input){
     9513                if (vzHO_input->ObjectEnum()!=PentaInputEnum){
     9514                        _error_("Cannot compute Vel as VzHO is of type " << EnumToStringx(vzHO_input->ObjectEnum()));
     9515                }
     9516                GetInputListOnVertices(&vzHO[0],VzHOEnum);
    95179517        }
    95189518        else{
    9519                 _error_("Cannot update solution as VzPattyn is not present");
     9519                _error_("Cannot update solution as VzHO is not present");
    95209520        }
    95219521
    95229522        /*Now Compute vel*/
    95239523        for(i=0;i<NUMVERTICES;i++) {
    9524                 vz[i]=vzpattyn[i]+vzstokes[i];
     9524                vz[i]=vzHO[i]+vzFS[i];
    95259525                vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
    95269526        }
     
    95379537        this->inputs->AddInput(new PentaInput(VyEnum,vy,P1Enum));
    95389538        this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum));
    9539         this->inputs->AddInput(new PentaInput(VzStokesEnum,vzstokes,P1Enum));
     9539        this->inputs->AddInput(new PentaInput(VzFSEnum,vzFS,P1Enum));
    95409540        this->inputs->AddInput(new PentaInput(VelEnum,vel,P1Enum));
    95419541        this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum));
     
    95469546}
    95479547/*}}}*/
    9548 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHutter {{{*/
    9549 void  Penta::InputUpdateFromSolutionDiagnosticHutter(IssmDouble* solution){
     9548/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticSIA {{{*/
     9549void  Penta::InputUpdateFromSolutionDiagnosticSIA(IssmDouble* solution){
    95509550
    95519551        const int    numdof=NDOF2*NUMVERTICES;
     
    96219621        IssmDouble   vy[NUMVERTICES];
    96229622        IssmDouble   vz[NUMVERTICES];
    9623         IssmDouble   vzmacayeal[NUMVERTICES];
    9624         IssmDouble   vzpattyn[NUMVERTICES];
    9625         IssmDouble   vzstokes[NUMVERTICES];
     9623        IssmDouble   vzSSA[NUMVERTICES];
     9624        IssmDouble   vzHO[NUMVERTICES];
     9625        IssmDouble   vzFS[NUMVERTICES];
    96269626        IssmDouble   vel[NUMVERTICES];
    96279627        IssmDouble   pressure[NUMVERTICES];
     
    96309630        int*     doflist      = NULL;
    96319631
    9632         /*Get the approximation and do nothing if the element in Stokes or None*/
     9632        /*Get the approximation and do nothing if the element in FS or None*/
    96339633        inputs->GetInputValue(&approximation,ApproximationEnum);
    9634         if(approximation==StokesApproximationEnum || approximation==NoneApproximationEnum){
     9634        if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
    96359635                return;
    96369636        }
     
    96539653        GetInputListOnVertices(&vy[0],VyEnum,0.0); //default is 0
    96549654
    9655         /*Do some modifications if we actually have a PattynStokes or MacAyealStokes element*/
    9656         if(approximation==PattynStokesApproximationEnum){
    9657                 Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    9658                 if (vzstokes_input){
    9659                         if (vzstokes_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    9660                         GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    9661                 }
    9662                 else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
     9655        /*Do some modifications if we actually have a HOFS or MacAyealFS element*/
     9656        if(approximation==HOFSApproximationEnum){
     9657                Input* vzFS_input=inputs->GetInput(VzFSEnum);
     9658                if (vzFS_input){
     9659                        if (vzFS_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzFS is of type " << EnumToStringx(vzFS_input->ObjectEnum()));
     9660                        GetInputListOnVertices(&vzFS[0],VzFSEnum);
     9661                }
     9662                else _error_("Cannot compute Vz as VzFS in not present in HOFS element");
    96639663                for(i=0;i<NUMVERTICES;i++){
    9664                         vzpattyn[i]=vz[i];
    9665                         vz[i]=vzpattyn[i]+vzstokes[i];
    9666                 }
    9667         }
    9668         else if(approximation==MacAyealStokesApproximationEnum){
    9669                 Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    9670                 if (vzstokes_input){
    9671                         if (vzstokes_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    9672                         GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    9673                 }
    9674                 else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
     9664                        vzHO[i]=vz[i];
     9665                        vz[i]=vzHO[i]+vzFS[i];
     9666                }
     9667        }
     9668        else if(approximation==MacAyealFSApproximationEnum){
     9669                Input* vzFS_input=inputs->GetInput(VzFSEnum);
     9670                if (vzFS_input){
     9671                        if (vzFS_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzFS is of type " << EnumToStringx(vzFS_input->ObjectEnum()));
     9672                        GetInputListOnVertices(&vzFS[0],VzFSEnum);
     9673                }
     9674                else _error_("Cannot compute Vz as VzFS in not present in MacAyealFS element");
    96759675                for(i=0;i<NUMVERTICES;i++){
    9676                         vzmacayeal[i]=vz[i];
    9677                         vz[i]=vzmacayeal[i]+vzstokes[i];
     9676                        vzSSA[i]=vz[i];
     9677                        vz[i]=vzSSA[i]+vzFS[i];
    96789678                }
    96799679        }
     
    96839683
    96849684        /*For pressure: we have not computed pressure in this analysis, for this element. We are in 3D,
    9685          *so the pressure is just the pressure at the z elevation: except it this is a PattynStokes element */
    9686         if(approximation!=PattynStokesApproximationEnum &&  approximation!=MacAyealStokesApproximationEnum){
     9685         *so the pressure is just the pressure at the z elevation: except it this is a HOFS element */
     9686        if(approximation!=HOFSApproximationEnum &&  approximation!=MacAyealFSApproximationEnum){
    96879687                rho_ice=matpar->GetRhoIce();
    96889688                g=matpar->GetG();
     
    96959695        this->inputs->ChangeEnum(VzEnum,VzPicardEnum);
    96969696
    9697         if(approximation!=PattynStokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum){
     9697        if(approximation!=HOFSApproximationEnum && approximation!=MacAyealFSApproximationEnum){
    96989698                this->inputs->ChangeEnum(PressureEnum,PressurePicardEnum);
    96999699                this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum));
    97009700        }
    9701         else if(approximation==PattynStokesApproximationEnum){
    9702                 this->inputs->AddInput(new PentaInput(VzPattynEnum,vzpattyn,P1Enum));
    9703         }
    9704         else if(approximation==MacAyealStokesApproximationEnum){
    9705                 this->inputs->AddInput(new PentaInput(VzMacAyealEnum,vzmacayeal,P1Enum));
     9701        else if(approximation==HOFSApproximationEnum){
     9702                this->inputs->AddInput(new PentaInput(VzHOEnum,vzHO,P1Enum));
     9703        }
     9704        else if(approximation==MacAyealFSApproximationEnum){
     9705                this->inputs->AddInput(new PentaInput(VzMacAyealEnum,vzSSA,P1Enum));
    97069706        }
    97079707        this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum));
     
    97129712}
    97139713/*}}}*/
    9714 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticStokes {{{*/
    9715 void  Penta::InputUpdateFromSolutionDiagnosticStokes(IssmDouble* solution){
     9714/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticFS {{{*/
     9715void  Penta::InputUpdateFromSolutionDiagnosticFS(IssmDouble* solution){
    97169716
    97179717        const int numdof=NDOF4*NUMVERTICES;
     
    97249724        IssmDouble  vel[NUMVERTICES];
    97259725        IssmDouble  pressure[NUMVERTICES];
    9726         IssmDouble  stokesreconditioning;
     9726        IssmDouble  FSreconditioning;
    97279727        int*    doflist=NULL;
    97289728
    97299729        /*Get dof list: */
    9730         GetDofList(&doflist,StokesApproximationEnum,GsetEnum);
     9730        GetDofList(&doflist,FSApproximationEnum,GsetEnum);
    97319731
    97329732        /*Use the dof list to index into the solution vector: */
     
    97519751
    97529752        /*Recondition pressure and compute vel: */
    9753         this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
    9754         for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]*stokesreconditioning;
     9753        this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum);
     9754        for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]*FSreconditioning;
    97559755        for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
    97569756
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r15538 r15564  
    145145                void   Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index);
    146146                void   GradjDragMacAyeal(Vector<IssmDouble>* gradient,int control_index);
    147                 void   GradjDragPattyn(Vector<IssmDouble>* gradient,int control_index);
    148                 void   GradjDragStokes(Vector<IssmDouble>* gradient,int control_index);
     147                void   GradjDragHO(Vector<IssmDouble>* gradient,int control_index);
     148                void   GradjDragFS(Vector<IssmDouble>* gradient,int control_index);
    149149                void   GradjBbarMacAyeal(Vector<IssmDouble>* gradient,int control_index);
    150                 void   GradjBbarPattyn(Vector<IssmDouble>* gradient,int control_index);
    151                 void   GradjBbarStokes(Vector<IssmDouble>* gradient,int control_index);
     150                void   GradjBbarHO(Vector<IssmDouble>* gradient,int control_index);
     151                void   GradjBbarFS(Vector<IssmDouble>* gradient,int control_index);
    152152                void   GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data);
    153153                void   SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index);
     
    197197                void             GetSolutionFromInputsEnthalpy(Vector<IssmDouble>* solutiong);
    198198                IssmDouble     GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa);
    199                 void    GetStrainRate3dPattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);
     199                void    GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);
    200200                void    GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input);
    201201                Penta*  GetUpperElement(void);
     
    215215                bool    IsOnWater(void);
    216216                IssmDouble  MinEdgeLength(IssmDouble xyz_list[6][3]);
    217                 void      ReduceMatrixStokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp);
    218                 void      ReduceVectorStokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);
     217                void      ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp);
     218                void      ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);
    219219                void      SetClone(int* minranks);
    220220                Tria*     SpawnTria(int g0, int g1, int g2);
     
    223223
    224224                #ifdef _HAVE_DIAGNOSTIC_
    225                 ElementMatrix* CreateKMatrixCouplingMacAyealPattyn(void);
    226                 ElementMatrix* CreateKMatrixCouplingMacAyealPattynViscous(void);
    227                 ElementMatrix* CreateKMatrixCouplingMacAyealPattynFriction(void);
    228                 ElementMatrix* CreateKMatrixCouplingMacAyealStokes(void);
    229                 ElementMatrix* CreateKMatrixCouplingMacAyealStokesViscous(void);
    230                 ElementMatrix* CreateKMatrixCouplingMacAyealStokesFriction(void);
    231                 ElementMatrix* CreateKMatrixCouplingPattynStokes(void);
     225                ElementMatrix* CreateKMatrixCouplingMacAyealHO(void);
     226                ElementMatrix* CreateKMatrixCouplingMacAyealHOViscous(void);
     227                ElementMatrix* CreateKMatrixCouplingMacAyealHOFriction(void);
     228                ElementMatrix* CreateKMatrixCouplingMacAyealFS(void);
     229                ElementMatrix* CreateKMatrixCouplingMacAyealFSViscous(void);
     230                ElementMatrix* CreateKMatrixCouplingMacAyealFSFriction(void);
     231                ElementMatrix* CreateKMatrixCouplingHOFS(void);
    232232                ElementMatrix* CreateKMatrixDiagnosticHoriz(void);
    233233                ElementMatrix* CreateKMatrixAdjointHoriz(void);
    234234                ElementVector* CreateDVectorDiagnosticHoriz(void);
    235                 ElementVector* CreateDVectorDiagnosticStokes(void);
    236                 ElementMatrix* CreateKMatrixDiagnosticHutter(void);
     235                ElementVector* CreateDVectorDiagnosticFS(void);
     236                ElementMatrix* CreateKMatrixDiagnosticSIA(void);
    237237                ElementMatrix* CreateKMatrixDiagnosticMacAyeal2d(void);
    238238                ElementMatrix* CreateKMatrixDiagnosticMacAyeal3d(void);
    239239                ElementMatrix* CreateKMatrixDiagnosticMacAyeal3dViscous(void);
    240240                ElementMatrix* CreateKMatrixDiagnosticMacAyeal3dFriction(void);
    241                 ElementMatrix* CreateKMatrixDiagnosticMacAyealPattyn(void);
    242                 ElementMatrix* CreateKMatrixDiagnosticMacAyealStokes(void);
     241                ElementMatrix* CreateKMatrixDiagnosticMacAyealHO(void);
     242                ElementMatrix* CreateKMatrixDiagnosticMacAyealFS(void);
    243243                ElementMatrix* CreateKMatrixDiagnosticL1L2(void);
    244244                ElementMatrix* CreateKMatrixDiagnosticL1L2Viscous(void);
    245245                ElementMatrix* CreateKMatrixDiagnosticL1L2Friction(void);
    246                 ElementMatrix* CreateKMatrixDiagnosticPattyn(void);
    247                 ElementMatrix* CreateKMatrixDiagnosticPattynViscous(void);
    248                 ElementMatrix* CreateKMatrixDiagnosticPattynFriction(void);
    249                 ElementMatrix* CreateKMatrixDiagnosticPattynStokes(void);
    250                 ElementMatrix* CreateKMatrixDiagnosticStokes(void);
    251                 ElementMatrix* CreateKMatrixDiagnosticStokesViscous(void);
    252                 ElementMatrix* CreateKMatrixDiagnosticStokesGLSViscous(void);
    253                 ElementMatrix* CreateKMatrixDiagnosticStokesFriction(void);
    254                 ElementMatrix* CreateKMatrixDiagnosticStokesGLSFriction(void);
     246                ElementMatrix* CreateKMatrixDiagnosticHO(void);
     247                ElementMatrix* CreateKMatrixDiagnosticHOViscous(void);
     248                ElementMatrix* CreateKMatrixDiagnosticHOFriction(void);
     249                ElementMatrix* CreateKMatrixDiagnosticHOFS(void);
     250                ElementMatrix* CreateKMatrixDiagnosticFS(void);
     251                ElementMatrix* CreateKMatrixDiagnosticFSViscous(void);
     252                ElementMatrix* CreateKMatrixDiagnosticFSGLSViscous(void);
     253                ElementMatrix* CreateKMatrixDiagnosticFSFriction(void);
     254                ElementMatrix* CreateKMatrixDiagnosticFSGLSFriction(void);
    255255                ElementMatrix* CreateKMatrixDiagnosticVert(void);
    256256                ElementMatrix* CreateKMatrixDiagnosticVertVolume(void);
    257257                ElementMatrix* CreateKMatrixDiagnosticVertSurface(void);
    258258                ElementMatrix* CreateJacobianDiagnosticHoriz(void);
    259                 ElementMatrix* CreateJacobianDiagnosticMacayeal2d(void);
    260                 ElementMatrix* CreateJacobianDiagnosticPattyn(void);
    261                 ElementMatrix* CreateJacobianDiagnosticStokes(void);
     259                ElementMatrix* CreateJacobianDiagnosticSSA2d(void);
     260                ElementMatrix* CreateJacobianDiagnosticHO(void);
     261                ElementMatrix* CreateJacobianDiagnosticFS(void);
    262262                void           InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solutiong);
    263263                void           InputUpdateFromSolutionDiagnosticMacAyeal( IssmDouble* solutiong);
    264                 void           InputUpdateFromSolutionDiagnosticMacAyealPattyn( IssmDouble* solutiong);
    265                 void           InputUpdateFromSolutionDiagnosticMacAyealStokes( IssmDouble* solutiong);
     264                void           InputUpdateFromSolutionDiagnosticMacAyealHO( IssmDouble* solutiong);
     265                void           InputUpdateFromSolutionDiagnosticMacAyealFS( IssmDouble* solutiong);
    266266                void           InputUpdateFromSolutionDiagnosticL1L2( IssmDouble* solutiong);
    267                 void           InputUpdateFromSolutionDiagnosticPattyn( IssmDouble* solutiong);
    268                 void           InputUpdateFromSolutionDiagnosticPattynStokes( IssmDouble* solutiong);
    269                 void           InputUpdateFromSolutionDiagnosticHutter( IssmDouble* solutiong);
     267                void           InputUpdateFromSolutionDiagnosticHO( IssmDouble* solutiong);
     268                void           InputUpdateFromSolutionDiagnosticHOFS( IssmDouble* solutiong);
     269                void           InputUpdateFromSolutionDiagnosticSIA( IssmDouble* solutiong);
    270270                void           InputUpdateFromSolutionDiagnosticVert( IssmDouble* solutiong);
    271                 void           InputUpdateFromSolutionDiagnosticStokes( IssmDouble* solutiong);
     271                void           InputUpdateFromSolutionDiagnosticFS( IssmDouble* solutiong);
    272272                void             GetSolutionFromInputsDiagnosticHoriz(Vector<IssmDouble>* solutiong);
    273                 void             GetSolutionFromInputsDiagnosticHutter(Vector<IssmDouble>* solutiong);
    274                 void             GetSolutionFromInputsDiagnosticStokes(Vector<IssmDouble>* solutiong);
     273                void             GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solutiong);
     274                void             GetSolutionFromInputsDiagnosticFS(Vector<IssmDouble>* solutiong);
    275275                void             GetSolutionFromInputsDiagnosticVert(Vector<IssmDouble>* solutiong);
    276                 ElementVector* CreatePVectorCouplingMacAyealStokes(void);
    277                 ElementVector* CreatePVectorCouplingMacAyealStokesViscous(void);
    278                 ElementVector* CreatePVectorCouplingMacAyealStokesFriction(void);
    279                 ElementVector* CreatePVectorCouplingPattynStokes(void);
    280                 ElementVector* CreatePVectorCouplingPattynStokesViscous(void);
    281                 ElementVector* CreatePVectorCouplingPattynStokesFriction(void);
     276                ElementVector* CreatePVectorCouplingMacAyealFS(void);
     277                ElementVector* CreatePVectorCouplingMacAyealFSViscous(void);
     278                ElementVector* CreatePVectorCouplingMacAyealFSFriction(void);
     279                ElementVector* CreatePVectorCouplingHOFS(void);
     280                ElementVector* CreatePVectorCouplingHOFSViscous(void);
     281                ElementVector* CreatePVectorCouplingHOFSFriction(void);
    282282                ElementVector* CreatePVectorDiagnosticHoriz(void);
    283                 ElementVector* CreatePVectorDiagnosticHutter(void);
     283                ElementVector* CreatePVectorDiagnosticSIA(void);
    284284                ElementVector* CreatePVectorDiagnosticMacAyeal(void);
    285                 ElementVector* CreatePVectorDiagnosticMacAyealPattyn(void);
    286                 ElementVector* CreatePVectorDiagnosticMacAyealStokes(void);
     285                ElementVector* CreatePVectorDiagnosticMacAyealHO(void);
     286                ElementVector* CreatePVectorDiagnosticMacAyealFS(void);
    287287                ElementVector* CreatePVectorDiagnosticL1L2(void);
    288                 ElementVector* CreatePVectorDiagnosticPattyn(void);
    289                 ElementVector* CreatePVectorDiagnosticPattynDrivingStress(void);
    290                 ElementVector* CreatePVectorDiagnosticPattynFront(void);
    291                 ElementVector* CreatePVectorDiagnosticPattynStokes(void);
    292                 ElementVector* CreatePVectorDiagnosticStokes(void);
    293                 ElementVector* CreatePVectorDiagnosticStokesFront(void);
    294                 ElementVector* CreatePVectorDiagnosticStokesViscous(void);
    295                 ElementVector* CreatePVectorDiagnosticStokesGLSViscous(void);
    296                 ElementVector* CreatePVectorDiagnosticStokesShelf(void);
     288                ElementVector* CreatePVectorDiagnosticHO(void);
     289                ElementVector* CreatePVectorDiagnosticHODrivingStress(void);
     290                ElementVector* CreatePVectorDiagnosticHOFront(void);
     291                ElementVector* CreatePVectorDiagnosticHOFS(void);
     292                ElementVector* CreatePVectorDiagnosticFS(void);
     293                ElementVector* CreatePVectorDiagnosticFSFront(void);
     294                ElementVector* CreatePVectorDiagnosticFSViscous(void);
     295                ElementVector* CreatePVectorDiagnosticFSGLSViscous(void);
     296                ElementVector* CreatePVectorDiagnosticFSShelf(void);
    297297                ElementVector* CreatePVectorDiagnosticVert(void);
    298298                ElementVector* CreatePVectorDiagnosticVertVolume(void);
     
    304304                ElementVector* CreatePVectorAdjointHoriz(void);
    305305                ElementMatrix* CreateKMatrixAdjointMacAyeal2d(void);
    306                 ElementMatrix* CreateKMatrixAdjointPattyn(void);
    307                 ElementMatrix* CreateKMatrixAdjointStokes(void);
     306                ElementMatrix* CreateKMatrixAdjointHO(void);
     307                ElementMatrix* CreateKMatrixAdjointFS(void);
    308308                ElementVector* CreatePVectorAdjointMacAyeal(void);
    309                 ElementVector* CreatePVectorAdjointPattyn(void);
    310                 ElementVector* CreatePVectorAdjointStokes(void);
     309                ElementVector* CreatePVectorAdjointHO(void);
     310                ElementVector* CreatePVectorAdjointFS(void);
    311311                void    InputUpdateFromSolutionAdjointHoriz( IssmDouble* solutiong);
    312                 void    InputUpdateFromSolutionAdjointStokes( IssmDouble* solutiong);
     312                void    InputUpdateFromSolutionAdjointFS( IssmDouble* solutiong);
    313313                #endif
    314314
  • issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp

    r15511 r15564  
    5454
    5555/*Reference Element numerics*/
    56 /*FUNCTION PentaRef::GetBMacAyealPattyn {{{*/
    57 void PentaRef::GetBMacAyealPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
     56/*FUNCTION PentaRef::GetBMacAyealHO {{{*/
     57void PentaRef::GetBMacAyealHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
    5858        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    5959         * For node i, Bi can be expressed in the actual coordinate system
     
    8585}
    8686/*}}}*/
    87 /*FUNCTION PentaRef::GetBMacAyealStokes{{{*/
    88 void PentaRef::GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
     87/*FUNCTION PentaRef::GetBMacAyealFS{{{*/
     88void PentaRef::GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
    8989        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    9090         * For node i, Bi can be expressed in the actual coordinate system
     
    131131}
    132132/*}}}*/
    133 /*FUNCTION PentaRef::GetBPattyn {{{*/
    134 void PentaRef::GetBPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
     133/*FUNCTION PentaRef::GetBHO {{{*/
     134void PentaRef::GetBHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
    135135        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    136136         * For node i, Bi can be expressed in the actual coordinate system
     
    171171}
    172172/*}}}*/
    173 /*FUNCTION PentaRef::GetBprimePattyn {{{*/
    174 void PentaRef::GetBprimePattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss_coord){
     173/*FUNCTION PentaRef::GetBprimeHO {{{*/
     174void PentaRef::GetBprimeHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss_coord){
    175175        /*Compute B  prime matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2.
    176176         * For node i, Bi can be expressed in the actual coordinate system
     
    209209}
    210210/*}}}*/
    211 /*FUNCTION PentaRef::GetBprimeMacAyealStokes{{{*/
    212 void PentaRef::GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss){
     211/*FUNCTION PentaRef::GetBprimeMacAyealFS{{{*/
     212void PentaRef::GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss){
    213213        /*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*NDOF2.
    214214         * For node i, Bprimei can be expressed in the actual coordinate system
     
    249249}
    250250/*}}}*/
    251 /*FUNCTION PentaRef::GetBStokes {{{*/
    252 void PentaRef::GetBStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
     251/*FUNCTION PentaRef::GetBFS {{{*/
     252void PentaRef::GetBFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
    253253
    254254        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4.
     
    316316}
    317317/*}}}*/
    318 /*FUNCTION PentaRef::GetBStokesGLS {{{*/
    319 void PentaRef::GetBStokesGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
     318/*FUNCTION PentaRef::GetBFSGLS {{{*/
     319void PentaRef::GetBFSGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
    320320
    321321        /*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4.
     
    382382}
    383383/*}}}*/
    384 /*FUNCTION PentaRef::GetBprimeStokes {{{*/
    385 void PentaRef::GetBprimeStokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){
     384/*FUNCTION PentaRef::GetBprimeFS {{{*/
     385void PentaRef::GetBprimeFS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){
    386386        /*      Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2.
    387387         *      For node i, Bi' can be expressed in the actual coordinate system
     
    449449}
    450450/*}}}*/
    451 /*FUNCTION PentaRef::GetBprimeStokesGLS {{{*/
    452 void PentaRef::GetBprimeStokesGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){
     451/*FUNCTION PentaRef::GetBprimeFSGLS {{{*/
     452void PentaRef::GetBprimeFSGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){
    453453        /*      Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2.
    454454         *      For node i, Bi' can be expressed in the actual coordinate system
     
    618618}
    619619/*}}}*/
    620 /*FUNCTION PentaRef::GetBPattynFriction{{{*/
    621 void PentaRef::GetBPattynFriction(IssmDouble* B, GaussPenta* gauss){
     620/*FUNCTION PentaRef::GetBHOFriction{{{*/
     621void PentaRef::GetBHOFriction(IssmDouble* B, GaussPenta* gauss){
    622622        /*Compute B  matrix. B=[B1 B2 B3] where Bi is square and of size 2x2.
    623623         ** For node i, Bi can be expressed in the actual coordinate system
     
    642642}
    643643/*}}}*/
    644 /*FUNCTION PentaRef::GetLStokes{{{*/
    645 void PentaRef::GetLStokes(IssmDouble* LStokes, GaussPenta* gauss){
     644/*FUNCTION PentaRef::GetLFS{{{*/
     645void PentaRef::GetLFS(IssmDouble* LFS, GaussPenta* gauss){
    646646        /* Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    647647         * For node i, Li can be expressed in the actual coordinate system
     
    655655
    656656        const int num_dof=4;
    657         IssmDouble l1l2l3[NUMNODESP1_2d];
    658 
    659         /*Get l1l2l3 in actual coordinate system: */
    660         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    661         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    662         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    663 
    664         /*Build LStokes: */
     657        IssmDouble L1L2l3[NUMNODESP1_2d];
     658
     659        /*Get L1L2l3 in actual coordinate system: */
     660        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     661        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     662        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     663
     664        /*Build LFS: */
    665665        for(int i=0;i<3;i++){
    666                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];
    667                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
    668                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
    669                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
    670 
    671                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
    672                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];
    673                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
    674                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
    675         }
    676 }
    677 /*}}}*/
    678 /*FUNCTION PentaRef::GetLprimeStokes {{{*/
    679 void PentaRef::GetLprimeStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
     666                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i];
     667                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
     668                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
     669                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
     670
     671                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
     672                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i];
     673                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
     674                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
     675        }
     676}
     677/*}}}*/
     678/*FUNCTION PentaRef::GetLprimeFS {{{*/
     679void PentaRef::GetLprimeFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){
    680680        /* Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    681681         * For node i, Lpi can be expressed in the actual coordinate system
     
    715715        int num_dof=4;
    716716
    717         IssmDouble l1l2l3[NUMNODESP1_2d];
     717        IssmDouble L1L2l3[NUMNODESP1_2d];
    718718        IssmDouble dbasis[3][NUMNODESP1];
    719719
    720         /*Get l1l2l3 in actual coordinate system: */
    721         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    722         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    723         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     720        /*Get L1L2l3 in actual coordinate system: */
     721        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     722        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     723        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    724724
    725725        GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss);
    726726
    727         /*Build LprimeStokes: */
     727        /*Build LprimeFS: */
    728728        for(int i=0;i<3;i++){
    729                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0]  = l1l2l3[i];
    730                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1]  = 0.;
    731                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2]  = 0.;
    732                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3]  = 0.;
    733                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0]  = 0.;
    734                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1]  = l1l2l3[i];
    735                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2]  = 0.;
    736                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3]  = 0.;
    737                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0]  = l1l2l3[i];
    738                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1]  = 0.;
    739                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2]  = 0.;
    740                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3]  = 0.;
    741                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0]  = 0.;
    742                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1]  = l1l2l3[i];
    743                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2]  = 0.;
    744                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3]  = 0.;
    745                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0]  = 0.;
    746                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1]  = 0.;
    747                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+2]  = l1l2l3[i];
    748                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+3]  = 0.;
    749                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0]  = 0.;
    750                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1]  = 0.;
    751                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+2]  = l1l2l3[i];
    752                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+3]  = 0.;
    753                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0]  = 0.;
    754                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1]  = 0.;
    755                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+2]  = dbasis[2][i];
    756                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+3]  = 0.;
    757                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0]  = 0.;
    758                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1]  = 0.;
    759                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+2]  = dbasis[2][i];
    760                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+3]  = 0.;
    761                 LprimeStokes[num_dof*NUMNODESP1_2d*8+num_dof*i+0]  = 0.;
    762                 LprimeStokes[num_dof*NUMNODESP1_2d*8+num_dof*i+1]  = 0.;
    763                 LprimeStokes[num_dof*NUMNODESP1_2d*8+num_dof*i+2]  = dbasis[2][i];
    764                 LprimeStokes[num_dof*NUMNODESP1_2d*8+num_dof*i+3]  = 0.;
    765                 LprimeStokes[num_dof*NUMNODESP1_2d*9+num_dof*i+0]  = dbasis[2][i];
    766                 LprimeStokes[num_dof*NUMNODESP1_2d*9+num_dof*i+1]  = 0.;
    767                 LprimeStokes[num_dof*NUMNODESP1_2d*9+num_dof*i+2]  = dbasis[0][i];
    768                 LprimeStokes[num_dof*NUMNODESP1_2d*9+num_dof*i+3]  = 0.;
    769                 LprimeStokes[num_dof*NUMNODESP1_2d*10+num_dof*i+0] = 0.;
    770                 LprimeStokes[num_dof*NUMNODESP1_2d*10+num_dof*i+1] = dbasis[2][i];
    771                 LprimeStokes[num_dof*NUMNODESP1_2d*10+num_dof*i+2] = dbasis[1][i];
    772                 LprimeStokes[num_dof*NUMNODESP1_2d*10+num_dof*i+3] = 0.;
    773                 LprimeStokes[num_dof*NUMNODESP1_2d*11+num_dof*i+0] = 0.;
    774                 LprimeStokes[num_dof*NUMNODESP1_2d*11+num_dof*i+1] = 0.;
    775                 LprimeStokes[num_dof*NUMNODESP1_2d*11+num_dof*i+2] = 0.;
    776                 LprimeStokes[num_dof*NUMNODESP1_2d*11+num_dof*i+3] = l1l2l3[i];
    777                 LprimeStokes[num_dof*NUMNODESP1_2d*12+num_dof*i+0] = 0.;
    778                 LprimeStokes[num_dof*NUMNODESP1_2d*12+num_dof*i+1] = 0.;
    779                 LprimeStokes[num_dof*NUMNODESP1_2d*12+num_dof*i+2] = 0.;
    780                 LprimeStokes[num_dof*NUMNODESP1_2d*12+num_dof*i+3] = l1l2l3[i];
    781                 LprimeStokes[num_dof*NUMNODESP1_2d*13+num_dof*i+0] = 0.;
    782                 LprimeStokes[num_dof*NUMNODESP1_2d*13+num_dof*i+1] = 0;
    783                 LprimeStokes[num_dof*NUMNODESP1_2d*13+num_dof*i+2] = 0;
    784                 LprimeStokes[num_dof*NUMNODESP1_2d*13+num_dof*i+3] = l1l2l3[i];
    785         }
    786 }
    787 /*}}}*/
    788 /*FUNCTION PentaRef::GetLMacAyealStokes {{{*/
    789 void PentaRef::GetLMacAyealStokes(IssmDouble* LStokes, GaussPenta* gauss){
     729                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0]  = L1L2l3[i];
     730                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1]  = 0.;
     731                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2]  = 0.;
     732                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3]  = 0.;
     733                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0]  = 0.;
     734                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1]  = L1L2l3[i];
     735                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2]  = 0.;
     736                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3]  = 0.;
     737                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0]  = L1L2l3[i];
     738                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1]  = 0.;
     739                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2]  = 0.;
     740                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3]  = 0.;
     741                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0]  = 0.;
     742                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1]  = L1L2l3[i];
     743                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2]  = 0.;
     744                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3]  = 0.;
     745                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0]  = 0.;
     746                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1]  = 0.;
     747                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+2]  = L1L2l3[i];
     748                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+3]  = 0.;
     749                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0]  = 0.;
     750                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1]  = 0.;
     751                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+2]  = L1L2l3[i];
     752                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+3]  = 0.;
     753                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0]  = 0.;
     754                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1]  = 0.;
     755                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+2]  = dbasis[2][i];
     756                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+3]  = 0.;
     757                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0]  = 0.;
     758                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1]  = 0.;
     759                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+2]  = dbasis[2][i];
     760                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+3]  = 0.;
     761                LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+0]  = 0.;
     762                LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+1]  = 0.;
     763                LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+2]  = dbasis[2][i];
     764                LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+3]  = 0.;
     765                LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+0]  = dbasis[2][i];
     766                LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+1]  = 0.;
     767                LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+2]  = dbasis[0][i];
     768                LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+3]  = 0.;
     769                LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+0] = 0.;
     770                LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+1] = dbasis[2][i];
     771                LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+2] = dbasis[1][i];
     772                LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+3] = 0.;
     773                LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+0] = 0.;
     774                LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+1] = 0.;
     775                LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+2] = 0.;
     776                LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+3] = L1L2l3[i];
     777                LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+0] = 0.;
     778                LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+1] = 0.;
     779                LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+2] = 0.;
     780                LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+3] = L1L2l3[i];
     781                LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+0] = 0.;
     782                LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+1] = 0;
     783                LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+2] = 0;
     784                LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+3] = L1L2l3[i];
     785        }
     786}
     787/*}}}*/
     788/*FUNCTION PentaRef::GetLMacAyealFS {{{*/
     789void PentaRef::GetLMacAyealFS(IssmDouble* LFS, GaussPenta* gauss){
    790790        /*
    791791         * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
     
    804804
    805805        int num_dof=2;
    806         IssmDouble l1l2l3[NUMNODESP1_2d];
    807 
    808         /*Get l1l2l3 in actual coordinate system: */
    809         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    810         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    811         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    812 
    813         /*Build LStokes: */
     806        IssmDouble L1L2l3[NUMNODESP1_2d];
     807
     808        /*Get L1L2l3 in actual coordinate system: */
     809        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     810        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     811        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     812
     813        /*Build LFS: */
    814814        for(int i=0;i<3;i++){
    815                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];
    816                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0;
    817                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0;
    818                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];
    819                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = l1l2l3[i];
    820                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0;
    821                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0;
    822                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = l1l2l3[i];
    823                 LStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = l1l2l3[i];
    824                 LStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0;
    825                 LStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0;
    826                 LStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = l1l2l3[i];
    827                 LStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = l1l2l3[i];
    828                 LStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0;
    829                 LStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0;
    830                 LStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = l1l2l3[i];
    831         }
    832 }
    833 /*}}}*/
    834 /*FUNCTION PentaRef::GetLprimeMacAyealStokes {{{*/
    835 void PentaRef::GetLprimeMacAyealStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
     815                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i];
     816                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0;
     817                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0;
     818                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i];
     819                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = L1L2l3[i];
     820                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0;
     821                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0;
     822                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = L1L2l3[i];
     823                LFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = L1L2l3[i];
     824                LFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0;
     825                LFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0;
     826                LFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = L1L2l3[i];
     827                LFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = L1L2l3[i];
     828                LFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0;
     829                LFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0;
     830                LFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = L1L2l3[i];
     831        }
     832}
     833/*}}}*/
     834/*FUNCTION PentaRef::GetLprimeMacAyealFS {{{*/
     835void PentaRef::GetLprimeMacAyealFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){
    836836        /* Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    837837         * For node i, Lpi can be expressed in the actual coordinate system
     
    848848         */
    849849        int num_dof=4;
    850         IssmDouble l1l2l3[NUMNODESP1_2d];
     850        IssmDouble L1L2l3[NUMNODESP1_2d];
    851851        IssmDouble dbasis[3][NUMNODESP1];
    852852
    853         /*Get l1l2l3 in actual coordinate system: */
    854         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    855         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    856         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     853        /*Get L1L2l3 in actual coordinate system: */
     854        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     855        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     856        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    857857
    858858        GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss);
    859859
    860         /*Build LprimeStokes: */
     860        /*Build LprimeFS: */
    861861        for(int i=0;i<3;i++){
    862                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];
    863                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
    864                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
    865                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
    866                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
    867                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];
    868                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
    869                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
    870                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;
    871                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
    872                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = l1l2l3[i];
    873                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;
    874                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
    875                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;
    876                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = l1l2l3[i];
    877                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;
    878                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.;
    879                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.;
    880                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = dbasis[2][i];
    881                 LprimeStokes[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.;
    882                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.;
    883                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.;
    884                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = dbasis[2][i];
    885                 LprimeStokes[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.;
    886                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.;
    887                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.;
    888                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = 0.;
    889                 LprimeStokes[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = l1l2l3[i];
    890                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.;
    891                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.;
    892                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = 0.;
    893                 LprimeStokes[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = l1l2l3[i];
    894         }
    895 }
    896 /*}}}*/
    897 /*FUNCTION PentaRef::GetLStokesMacAyeal {{{*/
    898 void PentaRef::GetLStokesMacAyeal(IssmDouble* LStokes, GaussPenta* gauss){
     862                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i];
     863                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
     864                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
     865                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
     866                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
     867                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i];
     868                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
     869                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
     870                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;
     871                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
     872                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = L1L2l3[i];
     873                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;
     874                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
     875                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;
     876                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = L1L2l3[i];
     877                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;
     878                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.;
     879                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.;
     880                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = dbasis[2][i];
     881                LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.;
     882                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.;
     883                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.;
     884                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = dbasis[2][i];
     885                LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.;
     886                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.;
     887                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.;
     888                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = 0.;
     889                LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = L1L2l3[i];
     890                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.;
     891                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.;
     892                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = 0.;
     893                LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = L1L2l3[i];
     894        }
     895}
     896/*}}}*/
     897/*FUNCTION PentaRef::GetLFSMacAyeal {{{*/
     898void PentaRef::GetLFSMacAyeal(IssmDouble* LFS, GaussPenta* gauss){
    899899        /* Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof.
    900900         * For node i, Li can be expressed in the actual coordinate system
     
    908908
    909909        int num_dof=4;
    910         IssmDouble l1l2l3[NUMNODESP1_2d];
    911 
    912         /*Get l1l2l3 in actual coordinate system: */
    913         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    914         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    915         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    916 
    917         /*Build LStokes: */
     910        IssmDouble L1L2l3[NUMNODESP1_2d];
     911
     912        /*Get L1L2l3 in actual coordinate system: */
     913        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     914        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     915        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     916
     917        /*Build LFS: */
    918918        for(int i=0;i<3;i++){
    919                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];
    920                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
    921                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
    922                 LStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
    923                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
    924                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];
    925                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
    926                 LStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
    927                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;
    928                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
    929                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = l1l2l3[i];
    930                 LStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;
    931                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
    932                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;
    933                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = l1l2l3[i];
    934                 LStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;
    935         }
    936 }
    937 /*}}}*/
    938 /*FUNCTION PentaRef::GetLprimeStokesMacAyeal {{{*/
    939 void PentaRef::GetLprimeStokesMacAyeal(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
     919                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i];
     920                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
     921                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;
     922                LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;
     923                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
     924                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i];
     925                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;
     926                LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;
     927                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;
     928                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
     929                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = L1L2l3[i];
     930                LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;
     931                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
     932                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;
     933                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = L1L2l3[i];
     934                LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;
     935        }
     936}
     937/*}}}*/
     938/*FUNCTION PentaRef::GetLprimeFSMacAyeal {{{*/
     939void PentaRef::GetLprimeFSMacAyeal(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){
    940940        /* Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
    941941         * For node i, Lpi can be expressed in the actual coordinate system
     
    948948         */
    949949        int num_dof=2;
    950         IssmDouble l1l2l3[NUMNODESP1_2d];
     950        IssmDouble L1L2l3[NUMNODESP1_2d];
    951951        IssmDouble dbasis[3][NUMNODESP1];
    952952
    953         /*Get l1l2l3 in actual coordinate system: */
    954         l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
    955         l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
    956         l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
     953        /*Get L1L2l3 in actual coordinate system: */
     954        L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
     955        L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;
     956        L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;
    957957        GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss);
    958958
    959         /*Build LprimeStokes: */
     959        /*Build LprimeFS: */
    960960        for(int i=0;i<3;i++){
    961                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];
    962                 LprimeStokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
    963                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
    964                 LprimeStokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];
    965                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = l1l2l3[i];
    966                 LprimeStokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
    967                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
    968                 LprimeStokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = l1l2l3[i];
     961                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i];
     962                LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;
     963                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;
     964                LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i];
     965                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = L1L2l3[i];
     966                LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;
     967                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;
     968                LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = L1L2l3[i];
    969969        }
    970970}
  • issm/trunk-jpl/src/c/classes/Elements/PentaRef.h

    r15425 r15564  
    3838                void GetSegmentJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss);
    3939                void GetJacobianInvert(IssmDouble*  Jinv, IssmDouble* xyz_list,GaussPenta* gauss);
    40                 void GetBMacAyealPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    41                 void GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    42                 void GetBPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    43                 void GetBStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    44                 void GetBStokesGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    45                 void GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss);
    46                 void GetBprimePattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    47                 void GetBprimeStokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);
    48                 void GetBprimeStokesGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);
     40                void GetBMacAyealHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     41                void GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     42                void GetBHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     43                void GetBFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     44                void GetBFSGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     45                void GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss);
     46                void GetBprimeHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
     47                void GetBprimeFS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);
     48                void GetBprimeFSGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);
    4949                void GetBprimeVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    5050                void GetBAdvec(IssmDouble* B_advec, IssmDouble* xyz_list, GaussPenta* gauss);
     
    5252                void GetBVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
    5353                void GetBprimeAdvec(IssmDouble* Bprime_advec, IssmDouble* xyz_list, GaussPenta* gauss);
    54                 void GetBPattynFriction(IssmDouble* L, GaussPenta* gauss);
    55                 void GetLStokes(IssmDouble* LStokes, GaussPenta* gauss);
    56                 void GetLprimeStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss);
    57                 void GetLMacAyealStokes(IssmDouble* LMacAyealStokes, GaussPenta* gauss);
    58                 void GetLprimeMacAyealStokes(IssmDouble* LprimeMacAyealStokes, IssmDouble* xyz_list, GaussPenta* gauss);
    59                 void GetLStokesMacAyeal(IssmDouble* LStokesMacAyeal, GaussPenta* gauss);
    60                 void GetLprimeStokesMacAyeal(IssmDouble* LprimeStokesMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);
     54                void GetBHOFriction(IssmDouble* L, GaussPenta* gauss);
     55                void GetLFS(IssmDouble* LFS, GaussPenta* gauss);
     56                void GetLprimeFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss);
     57                void GetLMacAyealFS(IssmDouble* LMacAyealFS, GaussPenta* gauss);
     58                void GetLprimeMacAyealFS(IssmDouble* LprimeMacAyealFS, IssmDouble* xyz_list, GaussPenta* gauss);
     59                void GetLFSMacAyeal(IssmDouble* LFSMacAyeal, GaussPenta* gauss);
     60                void GetLprimeFSMacAyeal(IssmDouble* LprimeFSMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);
    6161                void GetInputValue(IssmDouble* pvalue,IssmDouble* plist, GaussPenta* gauss);
    6262                void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15544 r15564  
    193193                        Ke=CreateKMatrixDiagnosticMacAyeal();
    194194                        break;
    195                 case DiagnosticHutterAnalysisEnum:
    196                         Ke=CreateKMatrixDiagnosticHutter();
     195                case DiagnosticSIAAnalysisEnum:
     196                        Ke=CreateKMatrixDiagnosticSIA();
    197197                        break;
    198198                 #endif
     
    306306                        pe=CreatePVectorDiagnosticMacAyeal();
    307307                        break;
    308                 case DiagnosticHutterAnalysisEnum:
    309                         pe=CreatePVectorDiagnosticHutter();
     308                case DiagnosticSIAAnalysisEnum:
     309                        pe=CreatePVectorDiagnosticSIA();
    310310                        break;
    311311                #endif
     
    423423#ifdef _HAVE_DIAGNOSTIC_
    424424                case DiagnosticHorizAnalysisEnum:
    425                         Ke=CreateJacobianDiagnosticMacayeal();
     425                        Ke=CreateJacobianDiagnosticSSA();
    426426                        break;
    427427#endif
     
    12011201                GetSolutionFromInputsDiagnosticHoriz(solution);
    12021202                break;
    1203         case DiagnosticHutterAnalysisEnum:
    1204                 GetSolutionFromInputsDiagnosticHutter(solution);
     1203        case DiagnosticSIAAnalysisEnum:
     1204                GetSolutionFromInputsDiagnosticSIA(solution);
    12051205                break;
    12061206        #endif
     
    15221522                        InputUpdateFromSolutionDiagnosticHoriz(solution);
    15231523                        break;
    1524                 case DiagnosticHutterAnalysisEnum:
     1524                case DiagnosticSIAAnalysisEnum:
    15251525                        InputUpdateFromSolutionDiagnosticHoriz(solution);
    15261526                        break;
     
    23432343        iomodel->Constant(&progstabilization,PrognosticStabilizationEnum);
    23442344        iomodel->Constant(&balancestabilization,BalancethicknessStabilizationEnum);
    2345         iomodel->Constant(&fe_ssa,FlowequationFeSsaEnum);
     2345        iomodel->Constant(&fe_ssa,FlowequationFeSSAEnum);
    23462346        iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
    23472347
     
    30553055}
    30563056/*}}}*/
    3057 /*FUNCTION Tria::CreateKMatrixDiagnosticHutter{{{*/
    3058 ElementMatrix* Tria::CreateKMatrixDiagnosticHutter(void){
     3057/*FUNCTION Tria::CreateKMatrixDiagnosticSIA{{{*/
     3058ElementMatrix* Tria::CreateKMatrixDiagnosticSIA(void){
    30593059
    30603060        /*Intermediaries*/
     
    32243224}
    32253225/*}}}*/
    3226 /*FUNCTION Tria::CreatePVectorDiagnosticHutter{{{*/
    3227 ElementVector* Tria::CreatePVectorDiagnosticHutter(void){
     3226/*FUNCTION Tria::CreatePVectorDiagnosticSIA{{{*/
     3227ElementVector* Tria::CreatePVectorDiagnosticSIA(void){
    32283228
    32293229        /*Intermediaries */
     
    32743274}
    32753275/*}}}*/
    3276 /*FUNCTION Tria::CreateJacobianDiagnosticMacayeal{{{*/
    3277 ElementMatrix* Tria::CreateJacobianDiagnosticMacayeal(void){
     3276/*FUNCTION Tria::CreateJacobianDiagnosticSSA{{{*/
     3277ElementMatrix* Tria::CreateJacobianDiagnosticSSA(void){
    32783278
    32793279        /*Intermediaries */
     
    33823382}
    33833383/*}}}*/
    3384 /*FUNCTION Tria::GetSolutionFromInputsDiagnosticHutter{{{*/
    3385 void  Tria::GetSolutionFromInputsDiagnosticHutter(Vector<IssmDouble>* solution){
     3384/*FUNCTION Tria::GetSolutionFromInputsDiagnosticSIA{{{*/
     3385void  Tria::GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution){
    33863386
    33873387        const int    numdof=NDOF2*NUMVERTICES;
     
    34943494}
    34953495/*}}}*/
    3496 /*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHutter {{{*/
    3497 void  Tria::InputUpdateFromSolutionDiagnosticHutter(IssmDouble* solution){
     3496/*FUNCTION Tria::InputUpdateFromSolutionDiagnosticSIA {{{*/
     3497void  Tria::InputUpdateFromSolutionDiagnosticSIA(IssmDouble* solution){
    34983498
    34993499        int        i;
     
    51375137}
    51385138/*}}}*/
    5139 /*FUNCTION Tria::CreatePVectorAdjointStokes{{{*/
    5140 ElementVector* Tria::CreatePVectorAdjointStokes(void){
     5139/*FUNCTION Tria::CreatePVectorAdjointFS{{{*/
     5140ElementVector* Tria::CreatePVectorAdjointFS(void){
    51415141
    51425142        /*Intermediaries */
     
    51565156
    51575157        /*Initialize Element vector*/
    5158         ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     5158        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum);
    51595159
    51605160        /*Retrieve all inputs and parameters*/
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r15517 r15564  
    147147                void   GradjZMacAyeal(Vector<IssmDouble>* gradient,int control_index);
    148148                void   GradjDragMacAyeal(Vector<IssmDouble>* gradient,int control_index);
    149                 void   GradjDragStokes(Vector<IssmDouble>* gradient,int control_index);
     149                void   GradjDragFS(Vector<IssmDouble>* gradient,int control_index);
    150150                void   GradjDragGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index);
    151151                void   GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index);
     
    223223                ElementMatrix* CreateKMatrixDiagnosticMacAyealViscous(void);
    224224                ElementMatrix* CreateKMatrixDiagnosticMacAyealFriction(void);
    225                 ElementMatrix* CreateKMatrixDiagnosticHutter(void);
     225                ElementMatrix* CreateKMatrixDiagnosticSIA(void);
    226226                ElementVector* CreatePVectorDiagnosticMacAyeal(void);
    227227                ElementVector* CreatePVectorDiagnosticMacAyealDrivingStress(void);
    228228                ElementVector* CreatePVectorDiagnosticMacAyealFront(void);
    229                 ElementVector* CreatePVectorDiagnosticHutter(void);
    230                 ElementMatrix* CreateJacobianDiagnosticMacayeal(void);
     229                ElementVector* CreatePVectorDiagnosticSIA(void);
     230                ElementMatrix* CreateJacobianDiagnosticSSA(void);
    231231                void      GetSolutionFromInputsDiagnosticHoriz(Vector<IssmDouble>* solution);
    232                 void      GetSolutionFromInputsDiagnosticHutter(Vector<IssmDouble>* solution);
     232                void      GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution);
    233233                void      InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solution);
    234                 void      InputUpdateFromSolutionDiagnosticHutter( IssmDouble* solution);
     234                void      InputUpdateFromSolutionDiagnosticSIA( IssmDouble* solution);
    235235                #endif
    236236
     
    239239                ElementMatrix* CreateKMatrixAdjointMacAyeal(void);
    240240                ElementVector* CreatePVectorAdjointHoriz(void);
    241                 ElementVector* CreatePVectorAdjointStokes(void);
     241                ElementVector* CreatePVectorAdjointFS(void);
    242242                ElementVector* CreatePVectorAdjointBalancethickness(void);
    243243                void      InputUpdateFromSolutionAdjointBalancethickness( IssmDouble* solution);
  • issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp

    r15496 r15564  
    114114}
    115115/*}}}*/
    116 /*FUNCTION TriaRef::GetBMacAyealStokes {{{*/
    117 void TriaRef::GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){
     116/*FUNCTION TriaRef::GetBMacAyealFS {{{*/
     117void TriaRef::GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){
    118118
    119119        /*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
     
    265265}
    266266/*}}}*/
    267 /*FUNCTION TriaRef::GetBprimeMacAyealStokes {{{*/
    268 void TriaRef::GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){
     267/*FUNCTION TriaRef::GetBprimeMacAyealFS {{{*/
     268void TriaRef::GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){
    269269        /*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*NDOF2.
    270270         * For node i, Bprimei can be expressed in the actual coordinate system
  • issm/trunk-jpl/src/c/classes/Elements/TriaRef.h

    r15326 r15564  
    2424                /*Numerics*/
    2525                void GetBMacAyeal(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss);
    26                 void GetBMacAyealStokes(IssmDouble* B , IssmDouble* xyz_list, GaussTria* gauss);
     26                void GetBMacAyealFS(IssmDouble* B , IssmDouble* xyz_list, GaussTria* gauss);
    2727                void GetBprimeMacAyeal(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
    28                 void GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
     28                void GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
    2929                void GetBprimePrognostic(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
    3030                void GetBPrognostic(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss);
  • issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h

    r15130 r15564  
    6262                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6363                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void ChangeEnum(int newenumtype);
    6767                void SquareMin(IssmDouble* psquaremin, Parameters* parameters);
  • issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h

    r15417 r15564  
    6767                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6868                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    69                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    70                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     69                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     70                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    7171                void ChangeEnum(int newenumtype){_error_("not implemented yet");};
    7272                void SquareMin(IssmDouble* psquaremin,Parameters* parameters){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h

    r15130 r15564  
    6161                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6262                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    63                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    64                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     63                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6565                void ChangeEnum(int newenumtype){_error_("not implemented yet");};
    6666                void SquareMin(IssmDouble* psquaremin,Parameters* parameters){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp

    r15417 r15564  
    156156}
    157157/*}}}*/
    158 /*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
    159 void DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
     158/*FUNCTION DoubleInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
     159void DoubleInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
    160160        /*Epsilon is zero as vx is constant over the element*/
    161161        for(int i=0;i<5;i++) epsilonvx[i]=0;
    162162}
    163163/*}}}*/
    164 /*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
    165 void DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
     164/*FUNCTION DoubleInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
     165void DoubleInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
    166166        /*Epsilon is zero as vy is constant over the element*/
    167167        for(int i=0;i<5;i++) epsilonvy[i]=0;
  • issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h

    r15130 r15564  
    6161                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
    6262                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss);
    63                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
    64                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
     63                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
     64                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
    6565                void ChangeEnum(int newenumtype);
    6666                void SquareMin(IssmDouble* psquaremin,Parameters* parameters);
  • issm/trunk-jpl/src/c/classes/Inputs/Input.h

    r15130 r15564  
    4444                virtual void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;
    4545                virtual void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss)=0;
    46                 virtual void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0;
    47                 virtual void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;
     46                virtual void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0;
     47                virtual void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;
    4848                virtual void ChangeEnum(int newenumtype)=0;
    4949                virtual void Configure(Parameters* parameters)=0;
  • issm/trunk-jpl/src/c/classes/Inputs/IntInput.h

    r15130 r15564  
    6363                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6464                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    65                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    66                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     66                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6767                void ChangeEnum(int newenumtype);
    6868                void SquareMin(IssmDouble* psquaremin,Parameters* parameters);
  • issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp

    r15417 r15564  
    145145
    146146        /*Get B matrix: */
    147         GetBStokes(&B[0][0], xyz_list, gauss);
     147        GetBFS(&B[0][0], xyz_list, gauss);
    148148
    149149        /*Create a reduced matrix of B to get rid of pressure */
     
    193193
    194194        /*Get B matrix: */
    195         GetBStokes(&B[0][0], xyz_list, gauss);
     195        GetBFS(&B[0][0], xyz_list, gauss);
    196196        /*Create a reduced matrix of B to get rid of pressure */
    197197        for (i=0;i<6;i++){
     
    238238
    239239        /*Get B matrix: */
    240         GetBStokes(&B[0][0], xyz_list, gauss);
     240        GetBFS(&B[0][0], xyz_list, gauss);
    241241
    242242        _assert_(this->NumberofNodes()==6); //Check Tria too
     
    276276}
    277277/*}}}*/
    278 /*FUNCTION PentaInput::GetVxStrainRate3dPattyn{{{*/
    279 void PentaInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
     278/*FUNCTION PentaInput::GetVxStrainRate3dHO{{{*/
     279void PentaInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
    280280
    281281        int i;
     
    285285
    286286        /*Get B matrix: */
    287         GetBPattyn(&B[0][0], xyz_list, gauss);
     287        GetBHO(&B[0][0], xyz_list, gauss);
    288288
    289289        _assert_(this->NumberofNodes()==6); //Check Tria too
     
    303303}
    304304/*}}}*/
    305 /*FUNCTION PentaInput::GetVyStrainRate3dPattyn{{{*/
    306 void PentaInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
     305/*FUNCTION PentaInput::GetVyStrainRate3dHO{{{*/
     306void PentaInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
    307307
    308308        int i;
     
    312312
    313313        /*Get B matrix: */
    314         GetBPattyn(&B[0][0], xyz_list, gauss);
     314        GetBHO(&B[0][0], xyz_list, gauss);
    315315
    316316        _assert_(this->NumberofNodes()==6); //Check Tria too
  • issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h

    r15417 r15564  
    6262                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
    6363                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss);
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
     64                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
     65                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
    6666                void ChangeEnum(int newenumtype);
    6767
  • issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h

    r15130 r15564  
    6565                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    67                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    68                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     67                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     68                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6969                void ChangeEnum(int newenumtype);
    7070
  • issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h

    r15417 r15564  
    6262                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6363                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void ChangeEnum(int newenumtype);
    6767
  • issm/trunk-jpl/src/c/classes/Loads/Icefront.cpp

    r15508 r15564  
    7575                icefront_vertex_ids[1]=reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1));
    7676        }
    77         else if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){
     77        else if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){
    7878                numnodes    = 4;
    7979                numvertices = 4;
     
    158158//              icefront_vertex_ids[1]=reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1));
    159159        }
    160         else if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){
     160        else if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){
    161161//              icefront_node_ids[0]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0));
    162162//              icefront_node_ids[1]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1));
     
    170170        else _error_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
    171171
    172         if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){
     172        if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){
    173173                numnodes=4;
    174174                numvertices=4;
     
    380380                        return;
    381381#ifdef _HAVE_3D_
    382                 case PattynIceFrontEnum:
    383                 case StokesIceFrontEnum:
     382                case HOIceFrontEnum:
     383                case FSIceFrontEnum:
    384384                        for(int i=0;i<NUMVERTICESQUA;i++) sidlist[i]=nodes[i]->Sid();
    385385                        return;
     
    402402                case MacAyeal3dIceFrontEnum:
    403403                        return NUMVERTICESSEG;
    404                 case PattynIceFrontEnum:
     404                case HOIceFrontEnum:
    405405                        return NUMVERTICESQUA;
    406                 case StokesIceFrontEnum:
     406                case FSIceFrontEnum:
    407407                        return NUMVERTICESQUA;
    408408#endif
     
    564564                case MacAyeal3dIceFrontEnum:
    565565                        return CreatePVectorDiagnosticMacAyeal3d();
    566                 case PattynIceFrontEnum:
    567                         return CreatePVectorDiagnosticPattyn();
    568                 case StokesIceFrontEnum:
    569                         return CreatePVectorDiagnosticStokes();
     566                case HOIceFrontEnum:
     567                        return CreatePVectorDiagnosticHO();
     568                case FSIceFrontEnum:
     569                        return CreatePVectorDiagnosticFS();
    570570            #endif
    571571                default:
     
    696696}
    697697/*}}}*/
    698 /*FUNCTION Icefront::CreatePVectorDiagnosticPattyn{{{*/
    699 ElementVector* Icefront::CreatePVectorDiagnosticPattyn(void){
     698/*FUNCTION Icefront::CreatePVectorDiagnosticHO{{{*/
     699ElementVector* Icefront::CreatePVectorDiagnosticHO(void){
    700700
    701701        /*Constants*/
     
    717717        /*Initialize Element vector and return if necessary*/
    718718        if(penta->IsOnWater()) return NULL;
    719         ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,PattynApproximationEnum);
     719        ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,HOApproximationEnum);
    720720
    721721        /*Retrieve all inputs and parameters*/
     
    773773}
    774774/*}}}*/
    775 /*FUNCTION Icefront::CreatePVectorDiagnosticStokes{{{*/
    776 ElementVector* Icefront::CreatePVectorDiagnosticStokes(void){
     775/*FUNCTION Icefront::CreatePVectorDiagnosticFS{{{*/
     776ElementVector* Icefront::CreatePVectorDiagnosticFS(void){
    777777
    778778        /*Constants*/
     
    794794        /*Initialize Element vector and return if necessary*/
    795795        if(penta->IsOnWater()) return NULL;
    796         ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,StokesApproximationEnum);
     796        ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,FSApproximationEnum);
    797797
    798798        /*Retrieve all inputs and parameters*/
     
    833833                }
    834834                air_pressure=0;
    835                 pressure = water_pressure + air_pressure; //no ice pressure fore Stokes
     835                pressure = water_pressure + air_pressure; //no ice pressure fore FS
    836836
    837837                for(i=0;i<NUMVERTICESQUA;i++){
  • issm/trunk-jpl/src/c/classes/Loads/Icefront.h

    r15509 r15564  
    9797        #ifdef _HAVE_3D_
    9898                ElementVector* CreatePVectorDiagnosticMacAyeal3d(void);
    99                 ElementVector* CreatePVectorDiagnosticPattyn(void);
    100                 ElementVector* CreatePVectorDiagnosticStokes(void);
     99                ElementVector* CreatePVectorDiagnosticHO(void);
     100                ElementVector* CreatePVectorDiagnosticFS(void);
    101101            #endif
    102102                /*}}}*/
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp

    r15428 r15564  
    223223                #ifdef _HAVE_DIAGNOSTIC_
    224224                case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum:
    225                         Ke=PenaltyCreateKMatrixDiagnosticStokes(kmax);
     225                        Ke=PenaltyCreateKMatrixDiagnosticFS(kmax);
    226226                        break;
    227227                #endif
     
    449449/*}}}*/
    450450#ifdef _HAVE_DIAGNOSTIC_
    451 /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{*/
    452 ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax){
     451/*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticFS {{{*/
     452ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax){
    453453
    454454        const int numdof = NUMVERTICES *NDOF4;
     
    461461        /*Initialize Element vector and return if necessary*/
    462462        penta->inputs->GetInputValue(&approximation,ApproximationEnum);
    463         if(approximation!=StokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum) return NULL;
    464         ElementMatrix* Ke=new ElementMatrix(&node,1,this->parameters,StokesApproximationEnum);
     463        if(approximation!=FSApproximationEnum &&  approximation!=HOFSApproximationEnum) return NULL;
     464        ElementMatrix* Ke=new ElementMatrix(&node,1,this->parameters,FSApproximationEnum);
    465465
    466466        /*Retrieve all inputs and parameters*/
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.h

    r14769 r15564  
    8888                /*Pengrid management {{{*/
    8989                #ifdef _HAVE_DIAGNOSTIC_
    90                 ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax);
     90                ElementMatrix* PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax);
    9191                #endif
    9292                #ifdef _HAVE_THERMAL_
  • issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp

    r15104 r15564  
    301301                case MacAyealApproximationEnum:
    302302                        switch(approximation1){
    303                                 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    304                                 case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
     303                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax);
     304                                case HOApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax);
    305305                                default: _error_("not supported yet");
    306306                        }
    307                 case PattynApproximationEnum:
     307                case HOApproximationEnum:
    308308                        switch(approximation1){
    309                                 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    310                                 case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
     309                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax);
     310                                case HOApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax);
    311311                                default: _error_("not supported yet");
    312312                        }
    313                 case StokesApproximationEnum:
     313                case FSApproximationEnum:
    314314                        switch(approximation1){
    315                                 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    316                                 case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
     315                                case FSApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax);
     316                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticFS(kmax);
    317317                                default: _error_("not supported yet");
    318318                        }
    319319                case NoneApproximationEnum:
    320320                        switch(approximation1){
    321                                 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    322                                 case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
     321                                case FSApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax);
     322                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticFS(kmax);
    323323                                default: _error_("not supported yet");
    324324                        }
     
    327327}
    328328/*}}}*/
    329 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn {{{*/
    330 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn(IssmDouble kmax){
     329/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealHO {{{*/
     330ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealHO(IssmDouble kmax){
    331331
    332332        const int numdof=NUMVERTICES*NDOF2;
     
    354354}
    355355/*}}}*/
    356 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticStokes {{{*/
    357 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax){
     356/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticFS {{{*/
     357ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax){
    358358
    359359        const int numdof=NUMVERTICES*NDOF4;
  • issm/trunk-jpl/src/c/classes/Loads/Penpair.h

    r13925 r15564  
    6868                        /*Penpair management: {{{*/
    6969                ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax);
    70                 ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealPattyn(IssmDouble kmax);
    71                 ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax);
     70                ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealHO(IssmDouble kmax);
     71                ElementMatrix* PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax);
    7272                ElementMatrix* PenaltyCreateKMatrixPrognostic(IssmDouble kmax);
    7373                /*}}}*/
  • issm/trunk-jpl/src/c/classes/Materials/Matdamageice.cpp

    r15428 r15564  
    351351}
    352352/*}}}*/
    353 /*FUNCTION Matdamageice::GetViscosity3dStokes {{{*/
    354 void  Matdamageice::GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){
     353/*FUNCTION Matdamageice::GetViscosity3dFS {{{*/
     354void  Matdamageice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){
    355355        /*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]:
    356356         *
  • issm/trunk-jpl/src/c/classes/Materials/Matdamageice.h

    r13414 r15564  
    5252                void   GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon);
    5353                void   GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon);
    54                 void   GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon);
     54                void   GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon);
    5555                void   GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon);
    5656                void   GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon);
  • issm/trunk-jpl/src/c/classes/Materials/Material.h

    r15067 r15564  
    2828                virtual void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon)=0;
    2929                virtual void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon)=0;
    30                 virtual void       GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0;
     30                virtual void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0;
    3131                virtual void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0;
    3232                virtual void       GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0;
  • issm/trunk-jpl/src/c/classes/Materials/Matice.cpp

    r15428 r15564  
    342342}
    343343/*}}}*/
    344 /*FUNCTION Matice::GetViscosity3dStokes {{{*/
    345 void  Matice::GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){
     344/*FUNCTION Matice::GetViscosity3dFS {{{*/
     345void  Matice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){
    346346        /*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]:
    347347         *
  • issm/trunk-jpl/src/c/classes/Materials/Matice.h

    r15012 r15564  
    5959                void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon);
    6060                void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon);
    61                 void       GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon);
     61                void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon);
    6262                void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon);
    6363                void GetViscosityZComplement(IssmDouble*, IssmDouble*){_error_("not supported");};
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r15375 r15564  
    8989                void       GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");};
    9090                void       GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon){_error_("not supported");};
    91                 void       GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");};
     91                void       GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");};
    9292                void       GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");};
    9393                void       GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");};
  • issm/trunk-jpl/src/c/classes/Node.cpp

    r15533 r15564  
    8383                                this->Deactivate();
    8484                        }
    85                         if(node_type==MacAyealPattynApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){
     85                        if(node_type==MacAyealHOApproximationEnum && reCast<int>(iomodel->Data(FlowequationBorderSSAEnum)[io_index])){
    8686                                if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    8787                                        this->Deactivate();
    8888                                }
    8989                        }
    90                         if(node_type==MacAyealStokesApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){
     90                        if(node_type==MacAyealFSApproximationEnum && reCast<int>(iomodel->Data(FlowequationBorderSSAEnum)[io_index])){
    9191                                if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    9292                                        for(k=1;k<=2;k++) this->FreezeDof(k);
     
    9494                        }
    9595                }
    96                 /*spc all nodes on hutter*/
    97                 if(node_type==HutterApproximationEnum){
     96                /*spc all nodes on SIA*/
     97                if(node_type==SIAApproximationEnum){
    9898                        this->Deactivate();
    9999                }
     
    101101        #endif
    102102
    103         /*Diagnostic Hutter*/
    104         if(analysis_type==DiagnosticHutterAnalysisEnum){
     103        /*Diagnostic SIA*/
     104        if(analysis_type==DiagnosticSIAAnalysisEnum){
    105105                _assert_(iomodel->Data(FlowequationVertexEquationEnum));
    106                 /*Constrain all nodes that are not Hutter*/
    107                 if(reCast<int>(node_type)!=HutterApproximationEnum){
     106                /*Constrain all nodes that are not SIA*/
     107                if(reCast<int>(node_type)!=SIAApproximationEnum){
    108108                        this->Deactivate();
    109109                }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp

    r15465 r15564  
    5555                        break;
    5656
    57                 case DiagnosticHutterAnalysisEnum:
    58                         CreateNodesDiagnosticHutter(pnodes, iomodel);
    59                         CreateConstraintsDiagnosticHutter(pconstraints,iomodel);
    60                         CreateLoadsDiagnosticHutter(ploads,iomodel);
    61                         UpdateElementsDiagnosticHutter(elements,iomodel,analysis_counter,analysis_type);
     57                case DiagnosticSIAAnalysisEnum:
     58                        CreateNodesDiagnosticSIA(pnodes, iomodel);
     59                        CreateConstraintsDiagnosticSIA(pconstraints,iomodel);
     60                        CreateLoadsDiagnosticSIA(ploads,iomodel);
     61                        UpdateElementsDiagnosticSIA(elements,iomodel,analysis_counter,analysis_type);
    6262                        break;
    6363                #endif
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r15504 r15564  
    4545        /*Copy some constants from iomodel */
    4646        parameters->AddObject(iomodel->CopyConstantObject(MeshDimensionEnum));
    47         parameters->AddObject(iomodel->CopyConstantObject(FlowequationIshutterEnum));
    48         parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsmacayealEnum));
    49         parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsl1l2Enum));
    50         parameters->AddObject(iomodel->CopyConstantObject(FlowequationIspattynEnum));
    51         parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsstokesEnum));
    52         parameters->AddObject(iomodel->CopyConstantObject(FlowequationFeStokesEnum));
     47        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsSIAEnum));
     48        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsSSAEnum));
     49        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsL1L2Enum));
     50        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsHOEnum));
     51        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsFSEnum));
     52        parameters->AddObject(iomodel->CopyConstantObject(FlowequationFeFSEnum));
    5353        parameters->AddObject(iomodel->CopyConstantObject(SettingsOutputFrequencyEnum));
    5454        parameters->AddObject(iomodel->CopyConstantObject(DiagnosticRestolEnum));
     
    8282        parameters->AddObject(iomodel->CopyConstantObject(ThermalPenaltyLockEnum));
    8383        parameters->AddObject(iomodel->CopyConstantObject(DiagnosticRiftPenaltyThresholdEnum));
    84         parameters->AddObject(iomodel->CopyConstantObject(DiagnosticStokesreconditioningEnum));
     84        parameters->AddObject(iomodel->CopyConstantObject(DiagnosticFSreconditioningEnum));
    8585        parameters->AddObject(iomodel->CopyConstantObject(DiagnosticShelfDampeningEnum));
    8686        parameters->AddObject(iomodel->CopyConstantObject(DiagnosticViscosityOvershootEnum));
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r15504 r15564  
    1616        IssmDouble g;
    1717        IssmDouble rho_ice;
    18         IssmDouble stokesreconditioning;
    19         bool       ismacayeal,isl1l2,ispattyn,isstokes;
     18        IssmDouble FSreconditioning;
     19        bool       isSSA,isL1L2,isHO,isFS;
    2020        int        fe_ssa;
    2121        bool       spcpresent = false;
     
    2626        IssmDouble *spcvy          = NULL;
    2727        IssmDouble *spcvz          = NULL;
    28         IssmDouble *nodeonmacayeal = NULL;
    29         IssmDouble *nodeonpattyn   = NULL;
    30         IssmDouble *nodeonstokes   = NULL;
     28        IssmDouble *nodeonSSA = NULL;
     29        IssmDouble *nodeonHO   = NULL;
     30        IssmDouble *nodeonFS   = NULL;
    3131        IssmDouble *nodeonbed      = NULL;
    3232        IssmDouble *nodeonicesheet = NULL;
     
    4747        iomodel->Constant(&g,ConstantsGEnum);
    4848        iomodel->Constant(&rho_ice,MaterialsRhoIceEnum);
    49         iomodel->Constant(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
    50         iomodel->Constant(&ismacayeal,FlowequationIsmacayealEnum);
    51         iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    52         iomodel->Constant(&ispattyn,FlowequationIspattynEnum);
    53         iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
    54         iomodel->Constant(&fe_ssa,FlowequationFeSsaEnum);
     49        iomodel->Constant(&FSreconditioning,DiagnosticFSreconditioningEnum);
     50        iomodel->Constant(&isSSA,FlowequationIsSSAEnum);
     51        iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum);
     52        iomodel->Constant(&isHO,FlowequationIsHOEnum);
     53        iomodel->Constant(&isFS,FlowequationIsFSEnum);
     54        iomodel->Constant(&fe_ssa,FlowequationFeSSAEnum);
    5555
    5656        /*Recover pointer: */
    5757        constraints=*pconstraints;
    5858
    59         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    60         if(!ismacayeal & !ispattyn & !isstokes & !isl1l2){
     59        /*Now, is the flag macayaealHO on? otherwise, do nothing: */
     60        if(!isSSA & !isHO & !isFS & !isL1L2){
    6161                *pconstraints=constraints;
    6262                return;
     
    6767        iomodel->FetchData(&spcvy,&My,&Ny,DiagnosticSpcvyEnum);
    6868        iomodel->FetchData(&spcvz,&Mz,&Nz,DiagnosticSpcvzEnum);
    69         iomodel->FetchData(&nodeonmacayeal,NULL,NULL,FlowequationBordermacayealEnum);
    70         if(iomodel->dim==3)iomodel->FetchData(&nodeonpattyn,NULL,NULL,FlowequationBorderpattynEnum);
    71         if(iomodel->dim==3)iomodel->FetchData(&nodeonstokes,NULL,NULL,FlowequationBorderstokesEnum);
     69        iomodel->FetchData(&nodeonSSA,NULL,NULL,FlowequationBorderSSAEnum);
     70        if(iomodel->dim==3)iomodel->FetchData(&nodeonHO,NULL,NULL,FlowequationBorderHOEnum);
     71        if(iomodel->dim==3)iomodel->FetchData(&nodeonFS,NULL,NULL,FlowequationBorderFSEnum);
    7272        if(iomodel->dim==3)iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum);
    7373        if(iomodel->dim==3)iomodel->FetchData(&nodeonicesheet,NULL,NULL,MaskVertexongroundediceEnum);
     
    9999                if(iomodel->my_vertices[i]){
    100100
    101                         /*Start with adding spcs of coupling: zero at the border macayeal/pattyn for the appropriate dofs*/
    102                         if (reCast<int,IssmDouble>(vertices_type[i]==MacAyealPattynApproximationEnum)){
    103                                 /*If grionmacayeal, spc pattyn dofs: 3 & 4*/
    104                                         if (reCast<int,IssmDouble>(nodeonpattyn[i])){
     101                        /*Start with adding spcs of coupling: zero at the border SSA/HO for the appropriate dofs*/
     102                        if (reCast<int,IssmDouble>(vertices_type[i]==MacAyealHOApproximationEnum)){
     103                                /*If grionSSA, spc HO dofs: 3 & 4*/
     104                                        if (reCast<int,IssmDouble>(nodeonHO[i])){
    105105                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    106106                                                count++;
     
    117117
    118118                                        }
    119                                         else if (reCast<int,IssmDouble>(nodeonmacayeal[i])){
     119                                        else if (reCast<int,IssmDouble>(nodeonSSA[i])){
    120120                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    121121                                                count++;
     
    132132
    133133                                        }
    134                                         else _error_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
    135                         }
    136                         /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    137                         else if (reCast<int,IssmDouble>(vertices_type[i])==PattynStokesApproximationEnum){
    138                                 /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    139                                         if (reCast<int,IssmDouble>(nodeonpattyn[i])){
     134                                        else _error_("if vertices_type is MacAyealHO, you shoud have nodeonHO or nodeonSSA");
     135                        }
     136                        /*Also add spcs of coupling: zero at the border HO/FS for the appropriate dofs*/
     137                        else if (reCast<int,IssmDouble>(vertices_type[i])==HOFSApproximationEnum){
     138                                /*If grion,HO spc FS dofs: 3 4 & 5*/
     139                                        if (reCast<int,IssmDouble>(nodeonHO[i])){
    140140                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    141141                                                count++;
     
    154154
    155155                                        }
    156                                         else if (reCast<int,IssmDouble>(nodeonstokes[i])){ //spc pattyn nodes: 1 & 2
     156                                        else if (reCast<int,IssmDouble>(nodeonFS[i])){ //spc HO nodes: 1 & 2
    157157                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    158158                                                count++;
     
    172172                                                }
    173173                                        }
    174                                         else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
    175                         }
    176                         /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    177                         else if (reCast<int,IssmDouble>(vertices_type[i])==MacAyealStokesApproximationEnum){
    178                                 /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    179                                         if (reCast<int,IssmDouble>(nodeonmacayeal[i])){
     174                                        else _error_("if vertices_type is HOFS, you shoud have nodeonHO or nodeonFS");
     175                        }
     176                        /*Also add spcs of coupling: zero at the border HO/FS for the appropriate dofs*/
     177                        else if (reCast<int,IssmDouble>(vertices_type[i])==MacAyealFSApproximationEnum){
     178                                /*If grion,HO spc FS dofs: 3 4 & 5*/
     179                                        if (reCast<int,IssmDouble>(nodeonSSA[i])){
    180180                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    181181                                                count++;
     
    194194
    195195                                        }
    196                                         else if (reCast<int,IssmDouble>(nodeonstokes[i])){ //spc macayeal nodes: 1 & 2
     196                                        else if (reCast<int,IssmDouble>(nodeonFS[i])){ //spc SSA nodes: 1 & 2
    197197                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    198198                                                count++;
     
    212212                                                }
    213213                                        }
    214                                         else _error_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
     214                                        else _error_("if vertices_type is MacAyealFS, you shoud have nodeonSSA or nodeonFS");
    215215                        }
    216216                        /*Now add the regular spcs*/
     
    236236                                        xDelete<IssmDouble>(values);
    237237                                }
    238                                 else if (vertices_type[i]==HutterApproximationEnum){
     238                                else if (vertices_type[i]==SIAApproximationEnum){
    239239                                        constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,DiagnosticHorizAnalysisEnum));
    240240                                        count++;
     
    259259                                        xDelete<IssmDouble>(values);
    260260                                }
    261                                 else if (vertices_type[i]==HutterApproximationEnum){
     261                                else if (vertices_type[i]==SIAApproximationEnum){
    262262                                        constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,DiagnosticHorizAnalysisEnum));
    263263                                        count++;
    264264                                }
    265265
    266                                 if (reCast<int,IssmDouble>(vertices_type[i])==StokesApproximationEnum ||  (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum)){
     266                                if (reCast<int,IssmDouble>(vertices_type[i])==FSApproximationEnum ||  (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum)){
    267267                                        if (Mz==iomodel->numberofvertices && !xIsNan<IssmDouble>(spcvz[i])){
    268268                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
     
    286286                                }
    287287                                if (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum){
    288                                         constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,g*rho_ice*(surface[i]-z[i])/stokesreconditioning,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
     288                                        constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,g*rho_ice*(surface[i]-z[i])/FSreconditioning,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
    289289                                        count++;
    290290                                }
     
    292292
    293293                        /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/
    294                         if (iomodel->dim==3) if(reCast<int,IssmDouble>(nodeonbed[i]) && reCast<int,IssmDouble>(nodeonicesheet[i]) && reCast<int,IssmDouble>(nodeonstokes[i])){
     294                        if (iomodel->dim==3) if(reCast<int,IssmDouble>(nodeonbed[i]) && reCast<int,IssmDouble>(nodeonicesheet[i]) && reCast<int,IssmDouble>(nodeonFS[i])){
    295295                                 switch(reCast<int,IssmDouble>(vertices_type[i])){
    296                                         case MacAyealStokesApproximationEnum:
     296                                        case MacAyealFSApproximationEnum:
    297297                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0.,DiagnosticHorizAnalysisEnum));
    298298                                                count++;
    299299                                                break;
    300                                         case PattynStokesApproximationEnum:
     300                                        case HOFSApproximationEnum:
    301301                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0.,DiagnosticHorizAnalysisEnum));
    302302                                                count++;
    303303                                                break;
    304                                         case StokesApproximationEnum:
     304                                        case FSApproximationEnum:
    305305                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0.,DiagnosticHorizAnalysisEnum));
    306306                                                count++;
     
    313313
    314314        /*SPC Quadratic elements*/
    315         if(ismacayeal && fe_ssa==1){
     315        if(isSSA && fe_ssa==1){
    316316
    317317                int   v1,v2;
     
    338338                                        count++;
    339339                                }
    340                                 if (reCast<int,IssmDouble>(vertices_type[v1])==StokesApproximationEnum ||  (reCast<int,IssmDouble>(vertices_type[v1])==NoneApproximationEnum)){
     340                                if (reCast<int,IssmDouble>(vertices_type[v1])==FSApproximationEnum ||  (reCast<int,IssmDouble>(vertices_type[v1])==NoneApproximationEnum)){
    341341                                        if(!xIsNan<IssmDouble>(spcvz[v1]) && !xIsNan<IssmDouble>(spcvz[v2])){
    342342                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+iomodel->numberofvertices+i+1,
     
    356356        iomodel->DeleteData(spcvy,DiagnosticSpcvyEnum);
    357357        iomodel->DeleteData(spcvz,DiagnosticSpcvzEnum);
    358         iomodel->DeleteData(nodeonmacayeal,FlowequationBordermacayealEnum);
    359         if(iomodel->dim==3)iomodel->DeleteData(nodeonpattyn,FlowequationBorderpattynEnum);
    360         if(iomodel->dim==3)iomodel->DeleteData(nodeonstokes,FlowequationBorderstokesEnum);
     358        iomodel->DeleteData(nodeonSSA,FlowequationBorderSSAEnum);
     359        if(iomodel->dim==3)iomodel->DeleteData(nodeonHO,FlowequationBorderHOEnum);
     360        if(iomodel->dim==3)iomodel->DeleteData(nodeonFS,FlowequationBorderFSEnum);
    361361        if(iomodel->dim==3)iomodel->DeleteData(nodeonbed,MeshVertexonbedEnum);
    362362        if(iomodel->dim==3)iomodel->DeleteData(nodeonicesheet,MaskVertexongroundediceEnum);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r15539 r15564  
    1919        int         count;
    2020        int         penpair_ids[2];
    21         bool        ismacayeal,isl1l2,ispattyn,isstokes;
     21        bool        isSSA,isL1L2,isHO,isFS;
    2222        int         numpenalties,numberofpressureloads,numrifts,numriftsegments;
    2323        IssmDouble *pressureload   = NULL;
     
    2626        IssmDouble *riftinfo       = NULL;
    2727        IssmDouble *nodeonbed      = NULL;
    28         IssmDouble *nodeonstokes   = NULL;
     28        IssmDouble *nodeonFS   = NULL;
    2929        IssmDouble *nodeonicesheet = NULL;
    3030        IssmDouble *vertices_type  = NULL;
     
    3232
    3333        /*Fetch parameters: */
    34         iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    35         iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
    36         iomodel->Constant(&ismacayeal,FlowequationIsmacayealEnum);
    37         iomodel->Constant(&ispattyn,FlowequationIspattynEnum);
     34        iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum);
     35        iomodel->Constant(&isFS,FlowequationIsFSEnum);
     36        iomodel->Constant(&isSSA,FlowequationIsSSAEnum);
     37        iomodel->Constant(&isHO,FlowequationIsHOEnum);
    3838        iomodel->Constant(&numrifts,RiftsNumriftsEnum);
    3939
     
    4141        Loads* loads=*ploads;
    4242
    43         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    44         if(!ismacayeal & !ispattyn & !isstokes & !isl1l2) return;
     43        /*Now, is the flag macayaealHO on? otherwise, do nothing: */
     44        if(!isSSA & !isHO & !isFS & !isL1L2) return;
    4545
    4646        /*Initialize counter: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp

    r15504 r15564  
    1212
    1313        /*Intermediary*/
    14         bool   ismacayeal,isl1l2,ispattyn,isstokes;
     14        bool   isSSA,isL1L2,isHO,isFS;
    1515        int    finiteelementssa;
    1616
    1717        /*Fetch parameters: */
    18         iomodel->Constant(&ismacayeal,FlowequationIsmacayealEnum);
    19         iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    20         iomodel->Constant(&ispattyn,FlowequationIspattynEnum);
    21         iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
    22         iomodel->Constant(&finiteelementssa,FlowequationFeSsaEnum);
     18        iomodel->Constant(&isSSA,FlowequationIsSSAEnum);
     19        iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum);
     20        iomodel->Constant(&isHO,FlowequationIsHOEnum);
     21        iomodel->Constant(&isFS,FlowequationIsFSEnum);
     22        iomodel->Constant(&finiteelementssa,FlowequationFeSSAEnum);
    2323
    24         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    25         if(!ismacayeal & !isl1l2 & !ispattyn & !isstokes) return;
     24        /*Now, is the flag macayaealHO on? otherwise, do nothing: */
     25        if(!isSSA & !isL1L2 & !isHO & !isFS) return;
    2626
    2727        /*Create nodes: */
    28         iomodel->FetchData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBordermacayealEnum,FlowequationBorderstokesEnum,
     28        iomodel->FetchData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,
    2929                                MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);
    3030        if(finiteelementssa==0){
     
    3737                _error_("finite element not supported yet");
    3838        }
    39         iomodel->DeleteData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBordermacayealEnum,FlowequationBorderstokesEnum,
     39        iomodel->DeleteData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,
    4040                                MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);
    4141}
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r15523 r15564  
    1717
    1818        int    materials_type;
    19         bool   ismacayeal,isl1l2,ispattyn,isstokes;
     19        bool   isSSA,isL1L2,isHO,isFS;
    2020        bool   control_analysis;
    2121        bool   dakota_analysis;
    2222
    2323        /*Fetch constants needed: */
    24         iomodel->Constant(&ismacayeal,FlowequationIsmacayealEnum);
    25         iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    26         iomodel->Constant(&ispattyn,FlowequationIspattynEnum);
    27         iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
     24        iomodel->Constant(&isSSA,FlowequationIsSSAEnum);
     25        iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum);
     26        iomodel->Constant(&isHO,FlowequationIsHOEnum);
     27        iomodel->Constant(&isFS,FlowequationIsFSEnum);
    2828        iomodel->Constant(&control_analysis,InversionIscontrolEnum);
    2929        iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
    3030        iomodel->Constant(&materials_type,MaterialsEnum);
    3131
    32         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    33         if(!ismacayeal & !isl1l2 & !ispattyn & !isstokes) return;
     32        /*Now, is the flag macayaealHO on? otherwise, do nothing: */
     33        if(!isSSA & !isL1L2 & !isHO & !isFS) return;
    3434
    3535        /*Fetch data needed: */
     
    7272                iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
    7373                iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
    74                 iomodel->FetchDataToInput(elements,FlowequationBorderstokesEnum);
     74                iomodel->FetchDataToInput(elements,FlowequationBorderFSEnum);
    7575                iomodel->FetchDataToInput(elements,LoadingforceZEnum);
    7676        }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r15465 r15564  
    11/*
    2  * CreateConstraintsDiagnosticHutter.c:
     2 * CreateConstraintsDiagnosticSIA.c:
    33 */
    44
     
    88#include "../ModelProcessorx.h"
    99
    10 void    CreateConstraintsDiagnosticHutter(Constraints** pconstraints, IoModel* iomodel){
     10void    CreateConstraintsDiagnosticSIA(Constraints** pconstraints, IoModel* iomodel){
    1111
    1212        /*Intermediary*/
    1313        int        count;
    1414        IssmDouble yts;
    15         bool       ishutter;
     15        bool       isSIA;
    1616
    1717        /*Output*/
     
    2424        /*Fetch parameters: */
    2525        iomodel->Constant(&yts,ConstantsYtsEnum);
    26         iomodel->Constant(&ishutter,FlowequationIshutterEnum);
     26        iomodel->Constant(&isSIA,FlowequationIsSIAEnum);
    2727
    28         /*Now, is the flag ishutter on? otherwise, do nothing: */
    29         if (!ishutter) return;
     28        /*Now, is the flag isSIA on? otherwise, do nothing: */
     29        if (!isSIA) return;
    3030
    3131        /*Fetch data: */
     
    3535        count=0;
    3636
    37         /*vx and vy are spc'd if we are not on nodeonhutter: */
     37        /*vx and vy are spc'd if we are not on nodeonSIA: */
    3838        for(int i=0;i<iomodel->numberofvertices;i++){
    3939                /*keep only this partition's nodes:*/
    4040                if((iomodel->my_vertices[i])){
    41                         if (!reCast<int,IssmDouble>(iomodel->Data(FlowequationVertexEquationEnum)[i])==HutterApproximationEnum){
     41                        if (!reCast<int,IssmDouble>(iomodel->Data(FlowequationVertexEquationEnum)[i])==SIAApproximationEnum){
    4242
    43                                 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHutterAnalysisEnum));
     43                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticSIAAnalysisEnum));
    4444                                count++;
    4545
    46                                 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticHutterAnalysisEnum));
     46                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticSIAAnalysisEnum));
    4747                                count++;
    4848                        }
    4949                        else{
    5050                                if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvxEnum)[i])){
    51                                         constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(DiagnosticSpcvxEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
     51                                        constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(DiagnosticSpcvxEnum)[i]/yts,DiagnosticSIAAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    5252                                        count++;
    5353                                }
    5454
    5555                                if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvyEnum)[i])){
    56                                         constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(DiagnosticSpcvyEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
     56                                        constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(DiagnosticSpcvyEnum)[i]/yts,DiagnosticSIAAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
    5757                                        count++;
    5858                                }
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp

    r15465 r15564  
    1 /*! \file CreateLoadsDiagnosticHutter.c:
     1/*! \file CreateLoadsDiagnosticSIA.c:
    22 */
    33
     
    77#include "../ModelProcessorx.h"
    88
    9 void    CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel){
     9void    CreateLoadsDiagnosticSIA(Loads** ploads, IoModel* iomodel){
    1010
    1111        /*No loads*/
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp

    r15464 r15564  
    11/*
    2  * CreateNodesDiagnosticHutter.c:
     2 * CreateNodesDiagnosticSIA.c:
    33 */
    44
     
    99#include "../ModelProcessorx.h"
    1010
    11 void    CreateNodesDiagnosticHutter(Nodes** pnodes, IoModel* iomodel){
     11void    CreateNodesDiagnosticSIA(Nodes** pnodes, IoModel* iomodel){
    1212
    1313        /*Fetch parameters: */
    14         bool ishutter;
    15         iomodel->Constant(&ishutter,FlowequationIshutterEnum);
     14        bool isSIA;
     15        iomodel->Constant(&isSIA,FlowequationIsSIAEnum);
    1616
    17         /*Now, is the flag ishutter on? otherwise, do nothing: */
    18         if(!ishutter) return;
     17        /*Now, is the flag isSIA on? otherwise, do nothing: */
     18        if(!isSIA) return;
    1919
    2020        iomodel->FetchData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
    21         CreateNodes(pnodes,iomodel,DiagnosticHutterAnalysisEnum,P1Enum);
     21        CreateNodes(pnodes,iomodel,DiagnosticSIAAnalysisEnum,P1Enum);
    2222        iomodel->DeleteData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
    2323}
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp

    r15450 r15564  
    11/*
    2  * UpdateElementsDiagnosticHutter:
     2 * UpdateElementsDiagnosticSIA:
    33 */
    44
     
    99#include "../ModelProcessorx.h"
    1010
    11 void    UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
     11void    UpdateElementsDiagnosticSIA(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
    1212
    1313        /*Fetch data needed: */
    14         bool   ishutter;
    15         iomodel->Constant(&ishutter,FlowequationIshutterEnum);
     14        bool   isSIA;
     15        iomodel->Constant(&isSIA,FlowequationIsSIAEnum);
    1616
    17         /*Now, is the flag hutter on? otherwise, do nothing: */
    18         if (!ishutter)return;
     17        /*Now, is the flag SIA on? otherwise, do nothing: */
     18        if (!isSIA)return;
    1919
    2020        iomodel->FetchData(1,FlowequationElementEquationEnum);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r15465 r15564  
    2424
    2525        /*Fetch data: */
    26         iomodel->FetchData(2,DiagnosticSpcvzEnum,FlowequationBorderstokesEnum);
     26        iomodel->FetchData(2,DiagnosticSpcvzEnum,FlowequationBorderFSEnum);
    2727
    2828        /*Initialize counter*/
     
    3535                if(iomodel->my_vertices[i]){
    3636
    37                         if (reCast<int,IssmDouble>(iomodel->Data(FlowequationBorderstokesEnum)[i])){
    38                                 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes
     37                        if (reCast<int,IssmDouble>(iomodel->Data(FlowequationBorderFSEnum)[i])){
     38                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for FS
    3939                                count++;
    4040                        }
     
    4949
    5050        /*Free data: */
    51         iomodel->DeleteData(2,DiagnosticSpcvzEnum,FlowequationBorderstokesEnum);
     51        iomodel->DeleteData(2,DiagnosticSpcvzEnum,FlowequationBorderFSEnum);
    5252
    5353        /*Assign output pointer: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp

    r15464 r15564  
    1111void    CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel){
    1212
    13         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
     13        /*Now, is the flag macayaealHO on? otherwise, do nothing: */
    1414        if(iomodel->dim==2) return;
    1515
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp

    r15533 r15564  
    2424                                        numdofs=2;
    2525                                        break;
    26                                 case PattynApproximationEnum:
     26                                case HOApproximationEnum:
    2727                                        numdofs=2;
    2828                                        break;
    29                                 case HutterApproximationEnum:
     29                                case SIAApproximationEnum:
    3030                                        numdofs=2;
    3131                                        break;
    32                                 case StokesApproximationEnum:
     32                                case FSApproximationEnum:
    3333                                        numdofs=4;
    3434                                        break;
     
    3636                                        numdofs=4;
    3737                                        break;
    38                                 case MacAyealPattynApproximationEnum:
     38                                case MacAyealHOApproximationEnum:
    3939                                        numdofs=4;
    4040                                        doftype=xNew<int>(numdofs);
    4141                                        doftype[0]=MacAyealApproximationEnum;
    4242                                        doftype[1]=MacAyealApproximationEnum;
    43                                         doftype[2]=PattynApproximationEnum;
    44                                         doftype[3]=PattynApproximationEnum;
     43                                        doftype[2]=HOApproximationEnum;
     44                                        doftype[3]=HOApproximationEnum;
    4545                                        break;
    46                                 case PattynStokesApproximationEnum:
     46                                case HOFSApproximationEnum:
    4747                                        numdofs=6;
    4848                                        doftype=xNew<int>(numdofs);
    49                                         doftype[0]=PattynApproximationEnum;
    50                                         doftype[1]=PattynApproximationEnum;
    51                                         doftype[2]=StokesApproximationEnum;
    52                                         doftype[3]=StokesApproximationEnum;
    53                                         doftype[4]=StokesApproximationEnum;
    54                                         doftype[5]=StokesApproximationEnum;
     49                                        doftype[0]=HOApproximationEnum;
     50                                        doftype[1]=HOApproximationEnum;
     51                                        doftype[2]=FSApproximationEnum;
     52                                        doftype[3]=FSApproximationEnum;
     53                                        doftype[4]=FSApproximationEnum;
     54                                        doftype[5]=FSApproximationEnum;
    5555                                        break;
    56                                 case MacAyealStokesApproximationEnum:
     56                                case MacAyealFSApproximationEnum:
    5757                                        numdofs=6;
    5858                                        doftype=xNew<int>(numdofs);
    5959                                        doftype[0]=MacAyealApproximationEnum;
    6060                                        doftype[1]=MacAyealApproximationEnum;
    61                                         doftype[2]=StokesApproximationEnum;
    62                                         doftype[3]=StokesApproximationEnum;
    63                                         doftype[4]=StokesApproximationEnum;
    64                                         doftype[5]=StokesApproximationEnum;
     61                                        doftype[2]=FSApproximationEnum;
     62                                        doftype[3]=FSApproximationEnum;
     63                                        doftype[4]=FSApproximationEnum;
     64                                        doftype[5]=FSApproximationEnum;
    6565                                        break;
    6666                                default:
     
    7272                        numdofs=1;
    7373                        break;
    74                 case DiagnosticHutterAnalysisEnum:
     74                case DiagnosticSIAAnalysisEnum:
    7575                        numdofs=2;
    7676                        break;
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp

    r15423 r15564  
    5959                if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHorizAnalysisEnum && isdiagnostic==false) continue;
    6060                if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticVertAnalysisEnum && isdiagnostic==false) continue;
    61                 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHutterAnalysisEnum && isdiagnostic==false) continue;
     61                if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticSIAAnalysisEnum && isdiagnostic==false) continue;
    6262                if(solution_type==SteadystateSolutionEnum && analysis_type==ThermalAnalysisEnum && isenthalpy==true) continue;
    6363                if(solution_type==SteadystateSolutionEnum && analysis_type==MeltingAnalysisEnum && isenthalpy==true) continue;
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h

    r15533 r15564  
    3939void UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type);
    4040
    41 /*diagnostic hutter*/
    42 void CreateNodesDiagnosticHutter(Nodes** pnodes,IoModel* iomodel);
    43 void CreateConstraintsDiagnosticHutter(Constraints** pconstraints,IoModel* iomodel);
    44 void CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel);
    45 void UpdateElementsDiagnosticHutter(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type);
     41/*diagnostic SIA*/
     42void CreateNodesDiagnosticSIA(Nodes** pnodes,IoModel* iomodel);
     43void CreateConstraintsDiagnosticSIA(Constraints** pconstraints,IoModel* iomodel);
     44void CreateLoadsDiagnosticSIA(Loads** ploads, IoModel* iomodel);
     45void UpdateElementsDiagnosticSIA(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type);
    4646
    4747#ifdef _HAVE_GIA_
  • issm/trunk-jpl/src/c/modules/ResetCoordinateSystemx/ResetCoordinateSystemx.cpp

    r14917 r15564  
    11/*!\file ResetCoordinateSystemx
    2  * \brief: reset coordinate system for full-Stokes: tangential to the bedrock
     2 * \brief: reset coordinate system for full-FS: tangential to the bedrock
    33 */
    44
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r15530 r15564  
    5757        DiagnosticSpcvyEnum,
    5858        DiagnosticSpcvzEnum,
    59         DiagnosticStokesreconditioningEnum,
     59        DiagnosticFSreconditioningEnum,
    6060        DiagnosticVertexPairingEnum,
    6161        DiagnosticViscosityOvershootEnum,
     
    6363        LoadingforceYEnum,
    6464        LoadingforceZEnum,
    65         FlowequationBordermacayealEnum,
    66         FlowequationBorderpattynEnum,
    67         FlowequationBorderstokesEnum,
     65        FlowequationBorderSSAEnum,
     66        FlowequationBorderHOEnum,
     67        FlowequationBorderFSEnum,
    6868        FlowequationElementEquationEnum,
    69         FlowequationIshutterEnum,
    70         FlowequationIsmacayealEnum,
    71         FlowequationIsl1l2Enum,
    72         FlowequationIspattynEnum,
    73         FlowequationIsstokesEnum,
    74         FlowequationFeStokesEnum,
    75         FlowequationFeSsaEnum,
     69        FlowequationIsSIAEnum,
     70        FlowequationIsSSAEnum,
     71        FlowequationIsL1L2Enum,
     72        FlowequationIsHOEnum,
     73        FlowequationIsFSEnum,
     74        FlowequationFeFSEnum,
     75        FlowequationFeSSAEnum,
    7676        FlowequationVertexEquationEnum,
    7777        FrictionCoefficientEnum,
     
    282282        BedSlopeYAnalysisEnum,
    283283        DiagnosticHorizAnalysisEnum,
    284         DiagnosticHutterAnalysisEnum,
     284        DiagnosticSIAAnalysisEnum,
    285285        DiagnosticSolutionEnum,
    286286        DiagnosticVertAnalysisEnum,
     
    310310        ApproximationEnum,
    311311        NoneApproximationEnum,
    312         HutterApproximationEnum,
     312        SIAApproximationEnum,
    313313        MacAyealApproximationEnum,
    314         MacAyealPattynApproximationEnum,
    315         MacAyealStokesApproximationEnum,
     314        MacAyealHOApproximationEnum,
     315        MacAyealFSApproximationEnum,
    316316        L1L2ApproximationEnum,
    317         PattynApproximationEnum,
    318         PattynStokesApproximationEnum,
    319         StokesApproximationEnum,
     317        HOApproximationEnum,
     318        HOFSApproximationEnum,
     319        FSApproximationEnum,
    320320        /*}}}*/
    321321        /*Datasets {{{*/
     
    366366        ParamEnum,
    367367        L1L2IceFrontEnum,
    368         PattynIceFrontEnum,
     368        HOIceFrontEnum,
    369369        PengridEnum,
    370370        PenpairEnum,
     
    382382        SpcStaticEnum,
    383383        SpcTransientEnum,
    384         StokesIceFrontEnum,
     384        FSIceFrontEnum,
    385385        StringArrayParamEnum,
    386386        StringParamEnum,
     
    461461        VzEnum,
    462462        VzMacAyealEnum,
    463         VzPattynEnum,
     463        VzHOEnum,
    464464        VzPicardEnum,
    465         VzStokesEnum,
     465        VzFSEnum,
    466466        VxMeshEnum,
    467467        VyMeshEnum,
     
    553553        /*}}}*/
    554554        /*Solver{{{*/
    555         StokesSolverEnum,
     555        FSSolverEnum,
    556556        /*}}}*/
    557557        /*Parameters{{{*/
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r15530 r15564  
    6565                case DiagnosticSpcvyEnum : return "DiagnosticSpcvy";
    6666                case DiagnosticSpcvzEnum : return "DiagnosticSpcvz";
    67                 case DiagnosticStokesreconditioningEnum : return "DiagnosticStokesreconditioning";
     67                case DiagnosticFSreconditioningEnum : return "DiagnosticFSreconditioning";
    6868                case DiagnosticVertexPairingEnum : return "DiagnosticVertexPairing";
    6969                case DiagnosticViscosityOvershootEnum : return "DiagnosticViscosityOvershoot";
     
    7171                case LoadingforceYEnum : return "LoadingforceY";
    7272                case LoadingforceZEnum : return "LoadingforceZ";
    73                 case FlowequationBordermacayealEnum : return "FlowequationBordermacayeal";
    74                 case FlowequationBorderpattynEnum : return "FlowequationBorderpattyn";
    75                 case FlowequationBorderstokesEnum : return "FlowequationBorderstokes";
     73                case FlowequationBorderSSAEnum : return "FlowequationBorderSSA";
     74                case FlowequationBorderHOEnum : return "FlowequationBorderHO";
     75                case FlowequationBorderFSEnum : return "FlowequationBorderFS";
    7676                case FlowequationElementEquationEnum : return "FlowequationElementEquation";
    77                 case FlowequationIshutterEnum : return "FlowequationIshutter";
    78                 case FlowequationIsmacayealEnum : return "FlowequationIsmacayeal";
    79                 case FlowequationIsl1l2Enum : return "FlowequationIsl1l2";
    80                 case FlowequationIspattynEnum : return "FlowequationIspattyn";
    81                 case FlowequationIsstokesEnum : return "FlowequationIsstokes";
    82                 case FlowequationFeStokesEnum : return "FlowequationFeStokes";
    83                 case FlowequationFeSsaEnum : return "FlowequationFeSsa";
     77                case FlowequationIsSIAEnum : return "FlowequationIsSIA";
     78                case FlowequationIsSSAEnum : return "FlowequationIsSSA";
     79                case FlowequationIsL1L2Enum : return "FlowequationIsL1L2";
     80                case FlowequationIsHOEnum : return "FlowequationIsHO";
     81                case FlowequationIsFSEnum : return "FlowequationIsFS";
     82                case FlowequationFeFSEnum : return "FlowequationFeFS";
     83                case FlowequationFeSSAEnum : return "FlowequationFeSSA";
    8484                case FlowequationVertexEquationEnum : return "FlowequationVertexEquation";
    8585                case FrictionCoefficientEnum : return "FrictionCoefficient";
     
    288288                case BedSlopeYAnalysisEnum : return "BedSlopeYAnalysis";
    289289                case DiagnosticHorizAnalysisEnum : return "DiagnosticHorizAnalysis";
    290                 case DiagnosticHutterAnalysisEnum : return "DiagnosticHutterAnalysis";
     290                case DiagnosticSIAAnalysisEnum : return "DiagnosticSIAAnalysis";
    291291                case DiagnosticSolutionEnum : return "DiagnosticSolution";
    292292                case DiagnosticVertAnalysisEnum : return "DiagnosticVertAnalysis";
     
    314314                case ApproximationEnum : return "Approximation";
    315315                case NoneApproximationEnum : return "NoneApproximation";
    316                 case HutterApproximationEnum : return "HutterApproximation";
     316                case SIAApproximationEnum : return "SIAApproximation";
    317317                case MacAyealApproximationEnum : return "MacAyealApproximation";
    318                 case MacAyealPattynApproximationEnum : return "MacAyealPattynApproximation";
    319                 case MacAyealStokesApproximationEnum : return "MacAyealStokesApproximation";
     318                case MacAyealHOApproximationEnum : return "MacAyealHOApproximation";
     319                case MacAyealFSApproximationEnum : return "MacAyealFSApproximation";
    320320                case L1L2ApproximationEnum : return "L1L2Approximation";
    321                 case PattynApproximationEnum : return "PattynApproximation";
    322                 case PattynStokesApproximationEnum : return "PattynStokesApproximation";
    323                 case StokesApproximationEnum : return "StokesApproximation";
     321                case HOApproximationEnum : return "HOApproximation";
     322                case HOFSApproximationEnum : return "HOFSApproximation";
     323                case FSApproximationEnum : return "FSApproximation";
    324324                case ConstraintsEnum : return "Constraints";
    325325                case LoadsEnum : return "Loads";
     
    366366                case ParamEnum : return "Param";
    367367                case L1L2IceFrontEnum : return "L1L2IceFront";
    368                 case PattynIceFrontEnum : return "PattynIceFront";
     368                case HOIceFrontEnum : return "HOIceFront";
    369369                case PengridEnum : return "Pengrid";
    370370                case PenpairEnum : return "Penpair";
     
    382382                case SpcStaticEnum : return "SpcStatic";
    383383                case SpcTransientEnum : return "SpcTransient";
    384                 case StokesIceFrontEnum : return "StokesIceFront";
     384                case FSIceFrontEnum : return "FSIceFront";
    385385                case StringArrayParamEnum : return "StringArrayParam";
    386386                case StringParamEnum : return "StringParam";
     
    455455                case VzEnum : return "Vz";
    456456                case VzMacAyealEnum : return "VzMacAyeal";
    457                 case VzPattynEnum : return "VzPattyn";
     457                case VzHOEnum : return "VzHO";
    458458                case VzPicardEnum : return "VzPicard";
    459                 case VzStokesEnum : return "VzStokes";
     459                case VzFSEnum : return "VzFS";
    460460                case VxMeshEnum : return "VxMesh";
    461461                case VyMeshEnum : return "VyMesh";
     
    535535                case SubelementMigration2Enum : return "SubelementMigration2";
    536536                case GLlevelsetEnum : return "GLlevelset";
    537                 case StokesSolverEnum : return "StokesSolver";
     537                case FSSolverEnum : return "FSSolver";
    538538                case AdjointEnum : return "Adjoint";
    539539                case ColinearEnum : return "Colinear";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r15530 r15564  
    6565              else if (strcmp(name,"DiagnosticSpcvy")==0) return DiagnosticSpcvyEnum;
    6666              else if (strcmp(name,"DiagnosticSpcvz")==0) return DiagnosticSpcvzEnum;
    67               else if (strcmp(name,"DiagnosticStokesreconditioning")==0) return DiagnosticStokesreconditioningEnum;
     67              else if (strcmp(name,"DiagnosticFSreconditioning")==0) return DiagnosticFSreconditioningEnum;
    6868              else if (strcmp(name,"DiagnosticVertexPairing")==0) return DiagnosticVertexPairingEnum;
    6969              else if (strcmp(name,"DiagnosticViscosityOvershoot")==0) return DiagnosticViscosityOvershootEnum;
     
    7171              else if (strcmp(name,"LoadingforceY")==0) return LoadingforceYEnum;
    7272              else if (strcmp(name,"LoadingforceZ")==0) return LoadingforceZEnum;
    73               else if (strcmp(name,"FlowequationBordermacayeal")==0) return FlowequationBordermacayealEnum;
    74               else if (strcmp(name,"FlowequationBorderpattyn")==0) return FlowequationBorderpattynEnum;
    75               else if (strcmp(name,"FlowequationBorderstokes")==0) return FlowequationBorderstokesEnum;
     73              else if (strcmp(name,"FlowequationBorderSSA")==0) return FlowequationBorderSSAEnum;
     74              else if (strcmp(name,"FlowequationBorderHO")==0) return FlowequationBorderHOEnum;
     75              else if (strcmp(name,"FlowequationBorderFS")==0) return FlowequationBorderFSEnum;
    7676              else if (strcmp(name,"FlowequationElementEquation")==0) return FlowequationElementEquationEnum;
    77               else if (strcmp(name,"FlowequationIshutter")==0) return FlowequationIshutterEnum;
    78               else if (strcmp(name,"FlowequationIsmacayeal")==0) return FlowequationIsmacayealEnum;
    79               else if (strcmp(name,"FlowequationIsl1l2")==0) return FlowequationIsl1l2Enum;
    80               else if (strcmp(name,"FlowequationIspattyn")==0) return FlowequationIspattynEnum;
    81               else if (strcmp(name,"FlowequationIsstokes")==0) return FlowequationIsstokesEnum;
    82               else if (strcmp(name,"FlowequationFeStokes")==0) return FlowequationFeStokesEnum;
    83               else if (strcmp(name,"FlowequationFeSsa")==0) return FlowequationFeSsaEnum;
     77              else if (strcmp(name,"FlowequationIsSIA")==0) return FlowequationIsSIAEnum;
     78              else if (strcmp(name,"FlowequationIsSSA")==0) return FlowequationIsSSAEnum;
     79              else if (strcmp(name,"FlowequationIsL1L2")==0) return FlowequationIsL1L2Enum;
     80              else if (strcmp(name,"FlowequationIsHO")==0) return FlowequationIsHOEnum;
     81              else if (strcmp(name,"FlowequationIsFS")==0) return FlowequationIsFSEnum;
     82              else if (strcmp(name,"FlowequationFeFS")==0) return FlowequationFeFSEnum;
     83              else if (strcmp(name,"FlowequationFeSSA")==0) return FlowequationFeSSAEnum;
    8484              else if (strcmp(name,"FlowequationVertexEquation")==0) return FlowequationVertexEquationEnum;
    8585              else if (strcmp(name,"FrictionCoefficient")==0) return FrictionCoefficientEnum;
     
    294294              else if (strcmp(name,"BedSlopeYAnalysis")==0) return BedSlopeYAnalysisEnum;
    295295              else if (strcmp(name,"DiagnosticHorizAnalysis")==0) return DiagnosticHorizAnalysisEnum;
    296               else if (strcmp(name,"DiagnosticHutterAnalysis")==0) return DiagnosticHutterAnalysisEnum;
     296              else if (strcmp(name,"DiagnosticSIAAnalysis")==0) return DiagnosticSIAAnalysisEnum;
    297297              else if (strcmp(name,"DiagnosticSolution")==0) return DiagnosticSolutionEnum;
    298298              else if (strcmp(name,"DiagnosticVertAnalysis")==0) return DiagnosticVertAnalysisEnum;
     
    320320              else if (strcmp(name,"Approximation")==0) return ApproximationEnum;
    321321              else if (strcmp(name,"NoneApproximation")==0) return NoneApproximationEnum;
    322               else if (strcmp(name,"HutterApproximation")==0) return HutterApproximationEnum;
     322              else if (strcmp(name,"SIAApproximation")==0) return SIAApproximationEnum;
    323323              else if (strcmp(name,"MacAyealApproximation")==0) return MacAyealApproximationEnum;
    324               else if (strcmp(name,"MacAyealPattynApproximation")==0) return MacAyealPattynApproximationEnum;
    325               else if (strcmp(name,"MacAyealStokesApproximation")==0) return MacAyealStokesApproximationEnum;
     324              else if (strcmp(name,"MacAyealHOApproximation")==0) return MacAyealHOApproximationEnum;
     325              else if (strcmp(name,"MacAyealFSApproximation")==0) return MacAyealFSApproximationEnum;
    326326              else if (strcmp(name,"L1L2Approximation")==0) return L1L2ApproximationEnum;
    327               else if (strcmp(name,"PattynApproximation")==0) return PattynApproximationEnum;
    328               else if (strcmp(name,"PattynStokesApproximation")==0) return PattynStokesApproximationEnum;
    329               else if (strcmp(name,"StokesApproximation")==0) return StokesApproximationEnum;
     327              else if (strcmp(name,"HOApproximation")==0) return HOApproximationEnum;
     328              else if (strcmp(name,"HOFSApproximation")==0) return HOFSApproximationEnum;
     329              else if (strcmp(name,"FSApproximation")==0) return FSApproximationEnum;
    330330              else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
    331331              else if (strcmp(name,"Loads")==0) return LoadsEnum;
     
    372372              else if (strcmp(name,"Param")==0) return ParamEnum;
    373373              else if (strcmp(name,"L1L2IceFront")==0) return L1L2IceFrontEnum;
    374               else if (strcmp(name,"PattynIceFront")==0) return PattynIceFrontEnum;
     374              else if (strcmp(name,"HOIceFront")==0) return HOIceFrontEnum;
    375375              else if (strcmp(name,"Pengrid")==0) return PengridEnum;
    376376              else if (strcmp(name,"Penpair")==0) return PenpairEnum;
     
    391391              else if (strcmp(name,"SpcStatic")==0) return SpcStaticEnum;
    392392              else if (strcmp(name,"SpcTransient")==0) return SpcTransientEnum;
    393               else if (strcmp(name,"StokesIceFront")==0) return StokesIceFrontEnum;
     393              else if (strcmp(name,"FSIceFront")==0) return FSIceFrontEnum;
    394394              else if (strcmp(name,"StringArrayParam")==0) return StringArrayParamEnum;
    395395              else if (strcmp(name,"StringParam")==0) return StringParamEnum;
     
    464464              else if (strcmp(name,"Vz")==0) return VzEnum;
    465465              else if (strcmp(name,"VzMacAyeal")==0) return VzMacAyealEnum;
    466               else if (strcmp(name,"VzPattyn")==0) return VzPattynEnum;
     466              else if (strcmp(name,"VzHO")==0) return VzHOEnum;
    467467              else if (strcmp(name,"VzPicard")==0) return VzPicardEnum;
    468               else if (strcmp(name,"VzStokes")==0) return VzStokesEnum;
     468              else if (strcmp(name,"VzFS")==0) return VzFSEnum;
    469469              else if (strcmp(name,"VxMesh")==0) return VxMeshEnum;
    470470              else if (strcmp(name,"VyMesh")==0) return VyMeshEnum;
     
    547547              else if (strcmp(name,"SubelementMigration2")==0) return SubelementMigration2Enum;
    548548              else if (strcmp(name,"GLlevelset")==0) return GLlevelsetEnum;
    549               else if (strcmp(name,"StokesSolver")==0) return StokesSolverEnum;
     549              else if (strcmp(name,"FSSolver")==0) return FSSolverEnum;
    550550              else if (strcmp(name,"Adjoint")==0) return AdjointEnum;
    551551              else if (strcmp(name,"Colinear")==0) return ColinearEnum;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp

    r15104 r15564  
    1 /*!\file: solutionsequence_stokescoupling_nonlinear.cpp
    2  * \brief: core of the coupling between stokes and macayealpattyn
     1/*!\file: solutionsequence_FScoupling_nonlinear.cpp
     2 * \brief: core of the coupling between FS and SSAHO
    33 */
    44
     
    99#include "../modules/modules.h"
    1010
    11 void solutionsequence_stokescoupling_nonlinear(FemModel* femmodel,bool conserve_loads){
     11void solutionsequence_FScoupling_nonlinear(FemModel* femmodel,bool conserve_loads){
    1212
    1313        /*intermediary: */
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequences.h

    r15055 r15564  
    1616void solutionsequence_nonlinear(FemModel* femmodel,bool conserve_loads);
    1717void solutionsequence_newton(FemModel* femmodel);
    18 void solutionsequence_stokescoupling_nonlinear(FemModel* femmodel,bool conserve_loads);
     18void solutionsequence_FScoupling_nonlinear(FemModel* femmodel,bool conserve_loads);
    1919void solutionsequence_linear(FemModel* femmodel);
    2020void solutionsequence_adjoint_linear(FemModel* femmodel);
  • issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp

    r14960 r15564  
    5252        #endif
    5353
    54         /*Stokes: */
     54        /*FS: */
    5555        IS         isv=NULL;
    5656        IS         isp=NULL;
     
    118118        }
    119119
    120         /*Stokes: */
    121         if (solver_type==StokesSolverEnum){
     120        /*FS: */
     121        if (solver_type==FSSolverEnum){
    122122                /*Make indices out of doftypes: */
    123                 if(!df)_error_("need doftypes for Stokes solver!\n");
    124                 DofTypesToIndexSet(&isv,&isp,df,StokesSolverEnum);
     123                if(!df)_error_("need doftypes for FS solver!\n");
     124                DofTypesToIndexSet(&isv,&isp,df,FSSolverEnum);
    125125
    126126                /*Set field splits: */
     
    179179        int      velocity_count=0;
    180180
    181         if(typeenum==StokesSolverEnum){
     181        if(typeenum==FSSolverEnum){
    182182
    183183                /*Ok, recover doftypes vector values and indices: */
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp

    r14917 r15564  
    6060
    6161        PetscOptionsGetString(PETSC_NULL,"-issm_option_solver",&option[0],100,&flag);
    62         if (strcmp(option,"stokes")==0){
    63                 solver_type=StokesSolverEnum;
     62        if (strcmp(option,"FS")==0){
     63                solver_type=FSSolverEnum;
    6464        }
    6565
  • issm/trunk-jpl/src/m/classes/diagnostic.m

    r15445 r15564  
    1313                abstol                   = 0;
    1414                isnewton                 = 0;
    15                 stokesreconditioning     = 0;
     15                FSreconditioning     = 0;
    1616                viscosity_overshoot      = 0;
    1717                icefront                 = NaN;
     
    4545                         obj.abstol=10;
    4646
    47                          obj.stokesreconditioning=10^13;
     47                         obj.FSreconditioning=10^13;
    4848                         obj.shelf_dampening=0;
    4949
     
    7878                        md = checkfield(md,'diagnostic.abstol','size',[1 1]);
    7979                        md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0 1 2]);
    80                         md = checkfield(md,'diagnostic.stokesreconditioning','size',[1 1],'NaN',1);
     80                        md = checkfield(md,'diagnostic.FSreconditioning','size',[1 1],'NaN',1);
    8181                        md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1 1],'NaN',1);
    8282                        if md.mesh.dimension==2,
     
    109109                        end
    110110                        %CHECK THAT NO rotation specified for FS Grounded ice at base
    111                         if md.mesh.dimension==3 & md.flowequation.isstokes,
     111                        if md.mesh.dimension==3 & md.flowequation.isFS,
    112112                                pos=find(md.mask.vertexongroundedice & md.mesh.vertexonbed);
    113113                                if any(~isnan(md.diagnostic.referential(pos,:))),
    114114                                        md = checkmessage(md,['no referential should be specified for basal vertices of grounded ice']);
    115115                                end
    116                                 md = checkfield(md,'diagnostic.stokesreconditioning','>',0);
     116                                md = checkfield(md,'diagnostic.FSreconditioning','>',0);
    117117                        end
    118118                end % }}}
     
    144144
    145145                        disp(sprintf('\n      %s','Other:'));
    146                         fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for Stokes model');
    147                         fielddisplay(obj,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model');
     146                        fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for FS model');
     147                        fielddisplay(obj,'FSreconditioning','multiplier for incompressibility equation. Only for FS model');
    148148                        fielddisplay(obj,'referential','local referential');
    149149                        fielddisplay(obj,'loadingforce','loading force applied on each point [N/m^3]');
     
    159159                        WriteData(fid,'object',obj,'fieldname','abstol','format','Double');
    160160                        WriteData(fid,'object',obj,'fieldname','isnewton','format','Integer');
    161                         WriteData(fid,'object',obj,'fieldname','stokesreconditioning','format','Double');
     161                        WriteData(fid,'object',obj,'fieldname','FSreconditioning','format','Double');
    162162                        WriteData(fid,'object',obj,'fieldname','viscosity_overshoot','format','Double');
    163163                        WriteData(fid,'object',obj,'fieldname','maxiter','format','Integer');
  • issm/trunk-jpl/src/m/classes/diagnostic.py

    r15133 r15564  
    2323                self.abstol                   = 0
    2424                self.isnewton                 = 0
    25                 self.stokesreconditioning     = 0
     25                self.FSreconditioning     = 0
    2626                self.viscosity_overshoot      = 0
    2727                self.icefront                 = float('NaN')
     
    6666
    6767                string="%s\n%s"%(string,'\n      Other:')
    68                 string="%s\n%s"%(string,fielddisplay(self,'shelf_dampening','use dampening for floating ice ? Only for Stokes model'))
    69                 string="%s\n%s"%(string,fielddisplay(self,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'))
     68                string="%s\n%s"%(string,fielddisplay(self,'shelf_dampening','use dampening for floating ice ? Only for FS model'))
     69                string="%s\n%s"%(string,fielddisplay(self,'FSreconditioning','multiplier for incompressibility equation. Only for FS model'))
    7070                string="%s\n%s"%(string,fielddisplay(self,'referential','local referential'))
    7171                string="%s\n%s"%(string,fielddisplay(self,'loadingforce','loading force applied on each point [N/m^3]'))
     
    8383                self.abstol=10
    8484
    85                 self.stokesreconditioning=10**13
     85                self.FSreconditioning=10**13
    8686                self.shelf_dampening=0
    8787
     
    120120                md = checkfield(md,'diagnostic.abstol','size',[1])
    121121                md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0,1,2])
    122                 md = checkfield(md,'diagnostic.stokesreconditioning','size',[1],'NaN',1)
     122                md = checkfield(md,'diagnostic.FSreconditioning','size',[1],'NaN',1)
    123123                md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1],'NaN',1)
    124124                if md.mesh.dimension==2:
     
    152152                                        md.checkmessage("Vectors in diagnostic.referential (columns 1 to 3 and 4 to 6) must be orthogonal")
    153153                #CHECK THAT NO rotation specified for FS Grounded ice at base
    154 #               if md.mesh.dimension==3 & md.flowequation.isstokes,
    155                 if md.mesh.dimension==3 and md.flowequation.isstokes:
     154#               if md.mesh.dimension==3 & md.flowequation.isFS,
     155                if md.mesh.dimension==3 and md.flowequation.isFS:
    156156                        pos=numpy.nonzero(numpy.logical_and(md.mask.vertexongroundedice,md.mesh.vertexonbed))
    157157                        if numpy.any(numpy.logical_not(numpy.isnan(md.diagnostic.referential[pos,:]))):
     
    168168                WriteData(fid,'object',self,'fieldname','abstol','format','Double')
    169169                WriteData(fid,'object',self,'fieldname','isnewton','format','Integer')
    170                 WriteData(fid,'object',self,'fieldname','stokesreconditioning','format','Double')
     170                WriteData(fid,'object',self,'fieldname','FSreconditioning','format','Double')
    171171                WriteData(fid,'object',self,'fieldname','viscosity_overshoot','format','Double')
    172172                WriteData(fid,'object',self,'fieldname','maxiter','format','Integer')
  • issm/trunk-jpl/src/m/classes/flowequation.m

    r15527 r15564  
    66classdef flowequation
    77        properties (SetAccess=public)
    8                 ismacayeal       = 0;
    9                 ispattyn         = 0;
    10                 ishutter         = 0;
    11                 isl1l2           = 0;
    12                 isstokes         = 0;
    13                 fe_stokes        = 0;
    14                 fe_ssa           = 0;
     8                isSIA            = 0;
     9                isSSA            = 0;
     10                isL1L2           = 0;
     11                isHO             = 0;
     12                isFS             = 0;
     13                fe_SSA           = 0;
     14                fe_FS            = 0;
    1515                vertex_equation  = NaN;
    1616                element_equation = NaN;
    17                 bordermacayeal   = NaN;
    18                 borderpattyn     = NaN;
    19                 borderstokes     = NaN;
     17                borderSSA        = NaN;
     18                borderHO         = NaN;
     19                borderFS         = NaN;
     20        end
     21        methods (Static)
     22                function obj = loadobj(obj) % {{{
     23                        % This function is directly called by matlab when a model object is
     24                        % loaded. If the input is a struct it is an old version of this class and
     25                        % old fields must be recovered (make sure they are in the deprecated
     26                        % model properties)
     27
     28                        if verLessThan('matlab','7.9'),
     29                                disp('Warning: your matlab version is old and there is a risk that load does not work correctly');
     30                                disp('         if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it');
     31
     32                                % This is a Matlab bug: all the fields of md have their default value
     33                                % Example of error message:
     34                                % Warning: Error loading an object of class 'model':
     35                                % Undefined function or method 'exist' for input arguments of type 'cell'
     36                                %
     37                                % This has been fixed in MATLAB 7.9 (R2009b) and later versions
     38                        end
     39
     40                        if isstruct(obj)
     41                                disp('Recovering flowequation from older version');
     42                                objstruct = obj;
     43                                obj = structtoobj(flowequation(),objstruct);
     44
     45                                %2013 July 23rd
     46                                if isfield(objstruct,'isSIA'),          obj.isSIA     = objstruct.isSIA;         end;
     47                                if isfield(objstruct,'isSSA'),          obj.isSSA     = objstruct.isSSA;         end;
     48                                if isfield(objstruct,'isL1L2'),         obj.isL1L2    = objstruct.isL1L2;        end;
     49                                if isfield(objstruct,'isHO'),           obj.isHO      = objstruct.isHO;          end;
     50                                if isfield(objstruct,'isFS'),           obj.isFS      = objstruct.isFS;          end;
     51                                if isfield(objstruct,'fe_FS'),      obj.fe_FS     = objstruct.fe_FS;     end;
     52                                if isfield(objstruct,'borderSSA'), obj.borderSSA = objstruct.borderSSA;end;
     53                                if isfield(objstruct,'borderHO'),   obj.borderHO  = objstruct.borderHO;  end;
     54                                if isfield(objstruct,'borderFS'),   obj.borderFS  = objstruct.borderFS;  end;
     55                        end
     56
     57                end% }}}
    2058        end
    2159        methods
     
    3573                        if ismember(DiagnosticHorizAnalysisEnum(),analyses),
    3674
    37                                 md = checkfield(md,'flowequation.ishutter','numel',[1],'values',[0 1]);
    38                                 md = checkfield(md,'flowequation.ismacayeal','numel',[1],'values',[0 1]);
    39                                 md = checkfield(md,'flowequation.isl1l2','numel',[1],'values',[0 1]);
    40                                 md = checkfield(md,'flowequation.ispattyn','numel',[1],'values',[0 1]);
    41                                 md = checkfield(md,'flowequation.isstokes','numel',[1],'values',[0 1]);
    42                                 md = checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    43                                 md = checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    44                                 md = checkfield(md,'flowequation.borderstokes','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     75                                md = checkfield(md,'flowequation.isSIA','numel',[1],'values',[0 1]);
     76                                md = checkfield(md,'flowequation.isSSA','numel',[1],'values',[0 1]);
     77                                md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0 1]);
     78                                md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0 1]);
     79                                md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0 1]);
     80                                md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     81                                md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     82                                md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    4583                                if (md.mesh.dimension==2),
    4684                                        md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[1:2]);
     
    5088                                        md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:8]);
    5189                                end
    52                                 if ~(obj.ishutter || obj.ismacayeal || obj.isl1l2 || obj.ispattyn || obj.isstokes),
     90                                if ~(obj.isSIA || obj.isSSA || obj.isL1L2 || obj.isHO || obj.isFS),
    5391                                        md = checkmessage(md,['no element types set for this model']);
    5492                                end
    5593                        end
    56                         if ismember(DiagnosticHutterAnalysisEnum(),analyses),
     94                        if ismember(DiagnosticSIAAnalysisEnum(),analyses),
    5795                                if any(obj.element_equation==1),
    5896                                        if(obj.element_equation & md.mask.elementonfloatingice),
    59                                                 disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
     97                                                disp(sprintf('\n !!! Warning: SIA''s model is not consistent on ice shelves !!!\n'));
    6098                                        end
    6199                                end
     
    66104                        disp(sprintf('   flow equation parameters:'));
    67105
    68                         fielddisplay(obj,'ishutter','is the shallow ice approximation used ?');
    69                         fielddisplay(obj,'ismacayeal','is the macayeal approximation used ?');
    70                         fielddisplay(obj,'isl1l2','is the l1l2 approximation used ?');
    71                         fielddisplay(obj,'ispattyn','is the pattyn approximation used ?');
    72                         fielddisplay(obj,'isstokes','are the Full-Stokes equations used ?');
    73                         fielddisplay(obj,'fe_ssa','Finite Element for SSA   0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)');
     106                        fielddisplay(obj,'isSIA','is the Shallow Ice Approximation (SIA) used ?');
     107                        fielddisplay(obj,'isSSA','is the Shelfy-Stream Approximation (SSA) used ?');
     108                        fielddisplay(obj,'isL1L2','is the L1L2 approximation used ?');
     109                        fielddisplay(obj,'isHO','is the Higher-Order (HO) approximation used ?');
     110                        fielddisplay(obj,'isFS','are the Full-FS (FS) equations used ?');
     111                        fielddisplay(obj,'fe_SSA','Finite Element for SSA   0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)');
    74112                        fielddisplay(obj,'vertex_equation','flow equation for each vertex');
    75113                        fielddisplay(obj,'element_equation','flow equation for each element');
    76                         fielddisplay(obj,'bordermacayeal','vertices on MacAyeal''s border (for tiling)');
    77                         fielddisplay(obj,'borderpattyn','vertices on Pattyn''s border (for tiling)');
    78                         fielddisplay(obj,'borderstokes','vertices on Stokes'' border (for tiling)');
     114                        fielddisplay(obj,'borderSSA','vertices on SSA''s border (for tiling)');
     115                        fielddisplay(obj,'borderHO','vertices on HO''s border (for tiling)');
     116                        fielddisplay(obj,'borderFS','vertices on FS'' border (for tiling)');
    79117
    80118                end % }}}
    81119                function marshall(obj,md,fid) % {{{
    82                         WriteData(fid,'object',obj,'fieldname','ishutter','format','Boolean');
    83                         WriteData(fid,'object',obj,'fieldname','ismacayeal','format','Boolean');
    84                         WriteData(fid,'object',obj,'fieldname','isl1l2','format','Boolean');
    85                         WriteData(fid,'object',obj,'fieldname','ispattyn','format','Boolean');
    86                         WriteData(fid,'object',obj,'fieldname','isstokes','format','Boolean');
    87                         WriteData(fid,'object',obj,'fieldname','fe_stokes','format','Integer');
    88                         WriteData(fid,'object',obj,'fieldname','fe_ssa','format','Integer');
    89                         WriteData(fid,'object',obj,'fieldname','bordermacayeal','format','DoubleMat','mattype',1);
    90                         WriteData(fid,'object',obj,'fieldname','borderpattyn','format','DoubleMat','mattype',1);
    91                         WriteData(fid,'object',obj,'fieldname','borderstokes','format','DoubleMat','mattype',1);
     120                        WriteData(fid,'object',obj,'fieldname','isSIA','format','Boolean');
     121                        WriteData(fid,'object',obj,'fieldname','isSSA','format','Boolean');
     122                        WriteData(fid,'object',obj,'fieldname','isL1L2','format','Boolean');
     123                        WriteData(fid,'object',obj,'fieldname','isHO','format','Boolean');
     124                        WriteData(fid,'object',obj,'fieldname','isFS','format','Boolean');
     125                        WriteData(fid,'object',obj,'fieldname','fe_FS','format','Integer');
     126                        WriteData(fid,'object',obj,'fieldname','fe_SSA','format','Integer');
     127                        WriteData(fid,'object',obj,'fieldname','borderSSA','format','DoubleMat','mattype',1);
     128                        WriteData(fid,'object',obj,'fieldname','borderHO','format','DoubleMat','mattype',1);
     129                        WriteData(fid,'object',obj,'fieldname','borderFS','format','DoubleMat','mattype',1);
    92130                        %convert approximations to enums
    93131                        data=obj.vertex_equation;
    94132                        pos=find(data==0); data(pos,end)=NoneApproximationEnum();
    95                         pos=find(data==1); data(pos,end)=HutterApproximationEnum();
     133                        pos=find(data==1); data(pos,end)=SIAApproximationEnum();
    96134                        pos=find(data==2); data(pos,end)=MacAyealApproximationEnum();
    97                         pos=find(data==3); data(pos,end)=PattynApproximationEnum();
    98                         pos=find(data==4); data(pos,end)=StokesApproximationEnum();
    99                         pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum();
    100                         pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum();
    101                         pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum();
     135                        pos=find(data==3); data(pos,end)=HOApproximationEnum();
     136                        pos=find(data==4); data(pos,end)=FSApproximationEnum();
     137                        pos=find(data==5); data(pos,end)=MacAyealHOApproximationEnum();
     138                        pos=find(data==6); data(pos,end)=MacAyealFSApproximationEnum();
     139                        pos=find(data==7); data(pos,end)=HOFSApproximationEnum();
    102140                        pos=find(data==8); data(pos,end)=L1L2ApproximationEnum();
    103141                        WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1);
    104142                        data=obj.element_equation;
    105143                        pos=find(data==0); data(pos,end)=NoneApproximationEnum();
    106                         pos=find(data==1); data(pos,end)=HutterApproximationEnum();
     144                        pos=find(data==1); data(pos,end)=SIAApproximationEnum();
    107145                        pos=find(data==2); data(pos,end)=MacAyealApproximationEnum();
    108                         pos=find(data==3); data(pos,end)=PattynApproximationEnum();
    109                         pos=find(data==4); data(pos,end)=StokesApproximationEnum();
    110                         pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum();
    111                         pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum();
    112                         pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum();
     146                        pos=find(data==3); data(pos,end)=HOApproximationEnum();
     147                        pos=find(data==4); data(pos,end)=FSApproximationEnum();
     148                        pos=find(data==5); data(pos,end)=MacAyealHOApproximationEnum();
     149                        pos=find(data==6); data(pos,end)=MacAyealFSApproximationEnum();
     150                        pos=find(data==7); data(pos,end)=HOFSApproximationEnum();
    113151                        pos=find(data==8); data(pos,end)=L1L2ApproximationEnum();
    114152                        WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2);
  • issm/trunk-jpl/src/m/classes/flowequation.py

    r15528 r15564  
    1616        def __init__(self): # {{{
    1717               
    18                 self.ishutter         = 0
    19                 self.ismacayeal       = 0
    20                 self.isl1l2           = 0
    21                 self.ispattyn         = 0
    22                 self.isstokes         = 0
    23                 self.fe_stokes        = 0
    24                 self.fe_ssa           = 0
     18                self.isSIA            = 0
     19                self.isSSA            = 0
     20                self.isL1L2           = 0
     21                self.isHO             = 0
     22                self.isFS             = 0
     23                self.fe_SSA           = 0
     24                self.fe_FS            = 0
    2525                self.vertex_equation  = float('NaN')
    2626                self.element_equation = float('NaN')
    27                 self.bordermacayeal   = float('NaN')
    28                 self.borderpattyn     = float('NaN')
    29                 self.borderstokes     = float('NaN')
     27                self.borderSSA        = float('NaN')
     28                self.borderHO         = float('NaN')
     29                self.borderFS         = float('NaN')
    3030
    3131                #set defaults
     
    3636                string='   flow equation parameters:'
    3737
    38                 string="%s\n%s"%(string,fielddisplay(self,'ishutter',"is the shallow ice approximation used ?"))
    39                 string="%s\n%s"%(string,fielddisplay(self,'ismacayeal',"is the macayeal approximation used ?"))
    40                 string="%s\n%s"%(string,fielddisplay(self,'isl1l2',"are l1l2 equations used ?"))
    41                 string="%s\n%s"%(string,fielddisplay(self,'ispattyn',"is the pattyn approximation used ?"))
    42                 string="%s\n%s"%(string,fielddisplay(self,'isstokes',"are the Full-Stokes equations used ?"))
    43                 string="%s\n%s"%(string,fielddisplay(self,'fe_ssa',"Finite Element for SSA   0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)"))
     38                string="%s\n%s"%(string,fielddisplay(self,'isSIA',"is the Shallow Ice Approximation (SIA) used ?"))
     39                string="%s\n%s"%(string,fielddisplay(self,'isSSA',"is the Shelfy-Stream Approximation (SSA) used ?"))
     40                string="%s\n%s"%(string,fielddisplay(self,'isL1L2',"are L1L2 equations used ?"))
     41                string="%s\n%s"%(string,fielddisplay(self,'isHO',"is the Higher-Order (HO) approximation used ?"))
     42                string="%s\n%s"%(string,fielddisplay(self,'isFS',"are the Full-FS (FS) equations used ?"))
     43                string="%s\n%s"%(string,fielddisplay(self,'fe_SSA',"Finite Element for SSA   0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)"))
    4444                string="%s\n%s"%(string,fielddisplay(self,'vertex_equation',"flow equation for each vertex"))
    4545                string="%s\n%s"%(string,fielddisplay(self,'element_equation',"flow equation for each element"))
    46                 string="%s\n%s"%(string,fielddisplay(self,'bordermacayeal',"vertices on MacAyeal's border (for tiling)"))
    47                 string="%s\n%s"%(string,fielddisplay(self,'borderpattyn',"vertices on Pattyn's border (for tiling)"))
    48                 string="%s\n%s"%(string,fielddisplay(self,'borderstokes',"vertices on Stokes' border (for tiling)"))
     46                string="%s\n%s"%(string,fielddisplay(self,'borderSSA',"vertices on SSA's border (for tiling)"))
     47                string="%s\n%s"%(string,fielddisplay(self,'borderHO',"vertices on HO's border (for tiling)"))
     48                string="%s\n%s"%(string,fielddisplay(self,'borderFS',"vertices on FS' border (for tiling)"))
    4949                return string
    5050                #}}}
     
    5555
    5656                if DiagnosticHorizAnalysisEnum() in analyses:
    57                         md = checkfield(md,'flowequation.ishutter','numel',[1],'values',[0,1])
    58                         md = checkfield(md,'flowequation.ismacayeal','numel',[1],'values',[0,1])
    59                         md = checkfield(md,'flowequation.isl1l2','numel',[1],'values',[0,1])
    60                         md = checkfield(md,'flowequation.ispattyn','numel',[1],'values',[0,1])
    61                         md = checkfield(md,'flowequation.isstokes','numel',[1],'values',[0,1])
    62                         md = checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices],'values',[0,1])
    63                         md = checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices],'values',[0,1])
    64                         md = checkfield(md,'flowequation.borderstokes','size',[md.mesh.numberofvertices],'values',[0,1])
     57                        md = checkfield(md,'flowequation.isSIA','numel',[1],'values',[0,1])
     58                        md = checkfield(md,'flowequation.isSSA','numel',[1],'values',[0,1])
     59                        md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0,1])
     60                        md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0,1])
     61                        md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0,1])
     62                        md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1])
     63                        md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1])
     64                        md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices],'values',[0,1])
    6565                        if md.mesh.dimension==2:
    6666                                md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',[1,2])
     
    6969                                md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',numpy.arange(0,8+1))
    7070                                md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements],'values',numpy.arange(0,8+1))
    71                         if not (self.ishutter or self.ismacayeal or self.isl1l2 or self.ispattyn or self.isstokes):
     71                        if not (self.isSIA or self.isSSA or self.isL1L2 or self.isHO or self.isFS):
    7272                                md.checkmessage("no element types set for this model")
    7373
    74                 if DiagnosticHutterAnalysisEnum() in analyses:
     74                if DiagnosticSIAAnalysisEnum() in analyses:
    7575                        if any(self.element_equation==1):
    7676                                if numpy.any(numpy.logical_and(self.element_equation,md.mask.elementonfloatingice)):
    77                                         print "\n !!! Warning: Hutter's model is not consistent on ice shelves !!!\n"
     77                                        print "\n !!! Warning: SIA's model is not consistent on ice shelves !!!\n"
    7878
    7979                return md
    8080        # }}}
    8181        def marshall(self,md,fid):    # {{{
    82                 WriteData(fid,'object',self,'fieldname','ishutter','format','Boolean')
    83                 WriteData(fid,'object',self,'fieldname','ismacayeal','format','Boolean')
    84                 WriteData(fid,'object',self,'fieldname','isl1l2','format','Boolean')
    85                 WriteData(fid,'object',self,'fieldname','ispattyn','format','Boolean')
    86                 WriteData(fid,'object',self,'fieldname','isstokes','format','Boolean')
    87                 WriteData(fid,'object',self,'fieldname','fe_stokes','format','Integer')
    88                 WriteData(fid,'object',self,'fieldname','fe_ssa','format','Integer')
    89                 WriteData(fid,'object',self,'fieldname','bordermacayeal','format','DoubleMat','mattype',1)
    90                 WriteData(fid,'object',self,'fieldname','borderpattyn','format','DoubleMat','mattype',1)
    91                 WriteData(fid,'object',self,'fieldname','borderstokes','format','DoubleMat','mattype',1)
     82                WriteData(fid,'object',self,'fieldname','isSIA','format','Boolean')
     83                WriteData(fid,'object',self,'fieldname','isSSA','format','Boolean')
     84                WriteData(fid,'object',self,'fieldname','isL1L2','format','Boolean')
     85                WriteData(fid,'object',self,'fieldname','isHO','format','Boolean')
     86                WriteData(fid,'object',self,'fieldname','isFS','format','Boolean')
     87                WriteData(fid,'object',self,'fieldname','fe_FS','format','Integer')
     88                WriteData(fid,'object',self,'fieldname','fe_SSA','format','Integer')
     89                WriteData(fid,'object',self,'fieldname','borderSSA','format','DoubleMat','mattype',1)
     90                WriteData(fid,'object',self,'fieldname','borderHO','format','DoubleMat','mattype',1)
     91                WriteData(fid,'object',self,'fieldname','borderFS','format','DoubleMat','mattype',1)
    9292                #convert approximations to enums
    9393                data=copy.deepcopy(self.vertex_equation)
    9494                data[numpy.nonzero(data==0)]=NoneApproximationEnum()
    95                 data[numpy.nonzero(data==1)]=HutterApproximationEnum()
     95                data[numpy.nonzero(data==1)]=SIAApproximationEnum()
    9696                data[numpy.nonzero(data==2)]=MacAyealApproximationEnum()
    97                 data[numpy.nonzero(data==3)]=PattynApproximationEnum()
    98                 data[numpy.nonzero(data==4)]=StokesApproximationEnum()
    99                 data[numpy.nonzero(data==5)]=MacAyealPattynApproximationEnum()
    100                 data[numpy.nonzero(data==6)]=MacAyealStokesApproximationEnum()
    101                 data[numpy.nonzero(data==7)]=PattynStokesApproximationEnum()
     97                data[numpy.nonzero(data==3)]=HOApproximationEnum()
     98                data[numpy.nonzero(data==4)]=FSApproximationEnum()
     99                data[numpy.nonzero(data==5)]=MacAyealHOApproximationEnum()
     100                data[numpy.nonzero(data==6)]=MacAyealFSApproximationEnum()
     101                data[numpy.nonzero(data==7)]=HOFSApproximationEnum()
    102102                data[numpy.nonzero(data==8)]=L1L2ApproximationEnum()
    103103                WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1)
    104104                data=copy.deepcopy(self.element_equation)
    105105                data[numpy.nonzero(data==0)]=NoneApproximationEnum()
    106                 data[numpy.nonzero(data==1)]=HutterApproximationEnum()
     106                data[numpy.nonzero(data==1)]=SIAApproximationEnum()
    107107                data[numpy.nonzero(data==2)]=MacAyealApproximationEnum()
    108                 data[numpy.nonzero(data==3)]=PattynApproximationEnum()
    109                 data[numpy.nonzero(data==4)]=StokesApproximationEnum()
    110                 data[numpy.nonzero(data==5)]=MacAyealPattynApproximationEnum()
    111                 data[numpy.nonzero(data==6)]=MacAyealStokesApproximationEnum()
    112                 data[numpy.nonzero(data==7)]=PattynStokesApproximationEnum()
     108                data[numpy.nonzero(data==3)]=HOApproximationEnum()
     109                data[numpy.nonzero(data==4)]=FSApproximationEnum()
     110                data[numpy.nonzero(data==5)]=MacAyealHOApproximationEnum()
     111                data[numpy.nonzero(data==6)]=MacAyealFSApproximationEnum()
     112                data[numpy.nonzero(data==7)]=HOFSApproximationEnum()
    113113                data[numpy.nonzero(data==8)]=L1L2ApproximationEnum()
    114114                WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2)
  • issm/trunk-jpl/src/m/classes/model/model.m

    r15504 r15564  
    171171                                md.flowequation.element_equation=project2d(md,md.flowequation.element_equation,1);
    172172                                md.flowequation.vertex_equation=project2d(md,md.flowequation.vertex_equation,1);
    173                                 md.flowequation.bordermacayeal=project2d(md,md.flowequation.bordermacayeal,1);
    174                                 md.flowequation.borderpattyn=project2d(md,md.flowequation.borderpattyn,1);
    175                                 md.flowequation.borderstokes=project2d(md,md.flowequation.borderstokes,1);
     173                                md.flowequation.borderSSA=project2d(md,md.flowequation.borderSSA,1);
     174                                md.flowequation.borderHO=project2d(md,md.flowequation.borderHO,1);
     175                                md.flowequation.borderFS=project2d(md,md.flowequation.borderFS,1);
    176176                        end     
    177177
     
    262262                        %   It can either be a domain file (argus type, .exp extension), or an array of element flags.
    263263                        %   If user wants every element outside the domain to be
    264                         %   extract2d, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     264                        %   extract2d, add '~' to the name of the domain file (ex: '~HO.exp');
    265265                        %   an empty string '' will be considered as an empty domain
    266266                        %   a string 'all' will be considered as the entire domain
     
    718718                                md.flowequation.vertex_equation=project3d(md,'vector',oldvertices_type,'type','node');
    719719                        end
    720                         md.flowequation.bordermacayeal=project3d(md,'vector',md.flowequation.bordermacayeal,'type','node');
    721                         md.flowequation.borderpattyn=project3d(md,'vector',md.flowequation.borderpattyn,'type','node');
    722                         md.flowequation.borderstokes=project3d(md,'vector',md.flowequation.borderstokes,'type','node');
     720                        md.flowequation.borderSSA=project3d(md,'vector',md.flowequation.borderSSA,'type','node');
     721                        md.flowequation.borderHO=project3d(md,'vector',md.flowequation.borderHO,'type','node');
     722                        md.flowequation.borderFS=project3d(md,'vector',md.flowequation.borderFS,'type','node');
    723723
    724724                        %boundary conditions
     
    882882                        if isfield(structmd,'artificial_diffusivity'), md.balancethickness.stabilization=structmd.artificial_diffusivity; end
    883883                        if isfield(structmd,'dhdt'), md.balancethickness.thickening_rate=structmd.dhdt; end
    884                         if isfield(structmd,'ishutter'), md.flowequation.ishutter=structmd.ishutter; end
    885                         if isfield(structmd,'isstokes'), md.flowequation.isstokes=structmd.isstokes; end
     884                        if isfield(structmd,'isSIA'), md.flowequation.isSIA=structmd.isSIA; end
     885                        if isfield(structmd,'isFS'), md.flowequation.isFS=structmd.isFS; end
    886886                        if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd.elements_type; end
    887887                        if isfield(structmd,'vertices_type'), md.flowequation.vertex_equation=structmd.vertices_type; end
  • issm/trunk-jpl/src/m/classes/model/model.py

    r14901 r15564  
    177177                   It can either be a domain file (argus type, .exp extension), or an array of element flags.
    178178                   If user wants every element outside the domain to be
    179                    extract2d, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     179                   extract2d, add '~' to the name of the domain file (ex: '~HO.exp');
    180180                   an empty string '' will be considered as an empty domain
    181181                   a string 'all' will be considered as the entire domain
     
    613613                        md.flowequation.vertex_equation=project3d(md,'vector',oldvertices_type,'type','node')
    614614
    615                 md.flowequation.bordermacayeal=project3d(md,'vector',md.flowequation.bordermacayeal,'type','node')
    616                 md.flowequation.borderpattyn=project3d(md,'vector',md.flowequation.borderpattyn,'type','node')
    617                 md.flowequation.borderstokes=project3d(md,'vector',md.flowequation.borderstokes,'type','node')
     615                md.flowequation.borderSSA=project3d(md,'vector',md.flowequation.borderSSA,'type','node')
     616                md.flowequation.borderHO=project3d(md,'vector',md.flowequation.borderHO,'type','node')
     617                md.flowequation.borderFS=project3d(md,'vector',md.flowequation.borderFS,'type','node')
    618618
    619619                #boundary conditions
  • issm/trunk-jpl/src/m/classes/toolkits.m

    r14881 r15564  
    2222                 function obj = addoptions(obj,analysis,varargin) % {{{
    2323                 % Usage example:
    24                  %    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),stokesoptions());
     24                 %    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),FSoptions());
    2525                 %    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum());
    2626
  • issm/trunk-jpl/src/m/classes/toolkits.py

    r14933 r15564  
    3939        def addoptions(self,analysis,*args):    # {{{
    4040                # Usage example:
    41                 #    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),stokesoptions());
     41                #    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),FSoptions());
    4242                #    md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum());
    4343
  • issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m

    r15339 r15564  
    4747        case DiagnosticSolutionEnum(),
    4848                numanalyses=5;
    49                 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticHutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum()];
     49                analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum()];
    5050
    5151        case SteadystateSolutionEnum(),
    5252                numanalyses=7;
    53                 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticHutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum()];
     53                analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum()];
    5454
    5555        case ThermalSolutionEnum(),
     
    8787        case TransientSolutionEnum(),
    8888                numanalyses=9;
    89                 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticHutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum();EnthalpyAnalysisEnum();PrognosticAnalysisEnum()];
     89                analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum();EnthalpyAnalysisEnum();PrognosticAnalysisEnum()];
    9090
    9191        case FlaimSolutionEnum(),
  • issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.py

    r14771 r15564  
    1212        if   solutiontype == DiagnosticSolutionEnum():
    1313                numanalyses=5
    14                 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticHutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum()]
     14                analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum()]
    1515
    1616        elif solutiontype == SteadystateSolutionEnum():
    1717                numanalyses=7
    18                 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticHutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum()]
     18                analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum()]
    1919
    2020        elif solutiontype == ThermalSolutionEnum():
     
    4848        elif solutiontype == TransientSolutionEnum():
    4949                numanalyses=9
    50                 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticHutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum(),EnthalpyAnalysisEnum(),PrognosticAnalysisEnum()]
     50                analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum(),EnthalpyAnalysisEnum(),PrognosticAnalysisEnum()]
    5151
    5252        elif solutiontype == FlaimSolutionEnum():
  • issm/trunk-jpl/src/m/contrib/hack/sia.m

    r13009 r15564  
    22%BALVEL - computation of Shallow Ice velocities
    33%
    4 %   This routine uses the model of Hutter to compute the velocities
     4%   This routine uses the model of SIA to compute the velocities
    55%   of a 2d model using the surface slope
    66%
  • issm/trunk-jpl/src/m/enum/EnumDefinitions.py

    r15530 r15564  
    681681        return StringToEnum('DiagnosticSpcvz')[0]
    682682
    683 def DiagnosticStokesreconditioningEnum():
    684         """
    685         DIAGNOSTICSTOKESRECONDITIONINGENUM - Enum of DiagnosticStokesreconditioning
    686 
    687         WARNING: DO NOT MODIFY THIS FILE
    688                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    689                                 Please read src/c/shared/Enum/README for more information
    690 
    691            Usage:
    692               macro=DiagnosticStokesreconditioningEnum()
    693         """
    694 
    695         return StringToEnum('DiagnosticStokesreconditioning')[0]
     683def DiagnosticFSreconditioningEnum():
     684        """
     685        DIAGNOSTICFSRECONDITIONINGENUM - Enum of DiagnosticFSreconditioning
     686
     687        WARNING: DO NOT MODIFY THIS FILE
     688                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     689                                Please read src/c/shared/Enum/README for more information
     690
     691           Usage:
     692              macro=DiagnosticFSreconditioningEnum()
     693        """
     694
     695        return StringToEnum('DiagnosticFSreconditioning')[0]
    696696
    697697def DiagnosticVertexPairingEnum():
     
    765765        return StringToEnum('LoadingforceZ')[0]
    766766
    767 def FlowequationBordermacayealEnum():
    768         """
    769         FLOWEQUATIONBORDERMACAYEALENUM - Enum of FlowequationBordermacayeal
    770 
    771         WARNING: DO NOT MODIFY THIS FILE
    772                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    773                                 Please read src/c/shared/Enum/README for more information
    774 
    775            Usage:
    776               macro=FlowequationBordermacayealEnum()
    777         """
    778 
    779         return StringToEnum('FlowequationBordermacayeal')[0]
    780 
    781 def FlowequationBorderpattynEnum():
    782         """
    783         FLOWEQUATIONBORDERPATTYNENUM - Enum of FlowequationBorderpattyn
    784 
    785         WARNING: DO NOT MODIFY THIS FILE
    786                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    787                                 Please read src/c/shared/Enum/README for more information
    788 
    789            Usage:
    790               macro=FlowequationBorderpattynEnum()
    791         """
    792 
    793         return StringToEnum('FlowequationBorderpattyn')[0]
    794 
    795 def FlowequationBorderstokesEnum():
    796         """
    797         FLOWEQUATIONBORDERSTOKESENUM - Enum of FlowequationBorderstokes
    798 
    799         WARNING: DO NOT MODIFY THIS FILE
    800                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    801                                 Please read src/c/shared/Enum/README for more information
    802 
    803            Usage:
    804               macro=FlowequationBorderstokesEnum()
    805         """
    806 
    807         return StringToEnum('FlowequationBorderstokes')[0]
     767def FlowequationBorderSSAEnum():
     768        """
     769        FLOWEQUATIONBORDERSSAENUM - Enum of FlowequationBorderSSA
     770
     771        WARNING: DO NOT MODIFY THIS FILE
     772                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     773                                Please read src/c/shared/Enum/README for more information
     774
     775           Usage:
     776              macro=FlowequationBorderSSAEnum()
     777        """
     778
     779        return StringToEnum('FlowequationBorderSSA')[0]
     780
     781def FlowequationBorderHOEnum():
     782        """
     783        FLOWEQUATIONBORDERHOENUM - Enum of FlowequationBorderHO
     784
     785        WARNING: DO NOT MODIFY THIS FILE
     786                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     787                                Please read src/c/shared/Enum/README for more information
     788
     789           Usage:
     790              macro=FlowequationBorderHOEnum()
     791        """
     792
     793        return StringToEnum('FlowequationBorderHO')[0]
     794
     795def FlowequationBorderFSEnum():
     796        """
     797        FLOWEQUATIONBORDERFSENUM - Enum of FlowequationBorderFS
     798
     799        WARNING: DO NOT MODIFY THIS FILE
     800                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     801                                Please read src/c/shared/Enum/README for more information
     802
     803           Usage:
     804              macro=FlowequationBorderFSEnum()
     805        """
     806
     807        return StringToEnum('FlowequationBorderFS')[0]
    808808
    809809def FlowequationElementEquationEnum():
     
    821821        return StringToEnum('FlowequationElementEquation')[0]
    822822
    823 def FlowequationIshutterEnum():
    824         """
    825         FLOWEQUATIONISHUTTERENUM - Enum of FlowequationIshutter
    826 
    827         WARNING: DO NOT MODIFY THIS FILE
    828                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    829                                 Please read src/c/shared/Enum/README for more information
    830 
    831            Usage:
    832               macro=FlowequationIshutterEnum()
    833         """
    834 
    835         return StringToEnum('FlowequationIshutter')[0]
    836 
    837 def FlowequationIsmacayealEnum():
    838         """
    839         FLOWEQUATIONISMACAYEALENUM - Enum of FlowequationIsmacayeal
    840 
    841         WARNING: DO NOT MODIFY THIS FILE
    842                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    843                                 Please read src/c/shared/Enum/README for more information
    844 
    845            Usage:
    846               macro=FlowequationIsmacayealEnum()
    847         """
    848 
    849         return StringToEnum('FlowequationIsmacayeal')[0]
    850 
    851 def FlowequationIsl1l2Enum():
    852         """
    853         FLOWEQUATIONISL1L2ENUM - Enum of FlowequationIsl1l2
    854 
    855         WARNING: DO NOT MODIFY THIS FILE
    856                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    857                                 Please read src/c/shared/Enum/README for more information
    858 
    859            Usage:
    860               macro=FlowequationIsl1l2Enum()
    861         """
    862 
    863         return StringToEnum('FlowequationIsl1l2')[0]
    864 
    865 def FlowequationIspattynEnum():
    866         """
    867         FLOWEQUATIONISPATTYNENUM - Enum of FlowequationIspattyn
    868 
    869         WARNING: DO NOT MODIFY THIS FILE
    870                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    871                                 Please read src/c/shared/Enum/README for more information
    872 
    873            Usage:
    874               macro=FlowequationIspattynEnum()
    875         """
    876 
    877         return StringToEnum('FlowequationIspattyn')[0]
    878 
    879 def FlowequationIsstokesEnum():
    880         """
    881         FLOWEQUATIONISSTOKESENUM - Enum of FlowequationIsstokes
    882 
    883         WARNING: DO NOT MODIFY THIS FILE
    884                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    885                                 Please read src/c/shared/Enum/README for more information
    886 
    887            Usage:
    888               macro=FlowequationIsstokesEnum()
    889         """
    890 
    891         return StringToEnum('FlowequationIsstokes')[0]
    892 
    893 def FlowequationFeStokesEnum():
    894         """
    895         FLOWEQUATIONFESTOKESENUM - Enum of FlowequationFeStokes
    896 
    897         WARNING: DO NOT MODIFY THIS FILE
    898                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    899                                 Please read src/c/shared/Enum/README for more information
    900 
    901            Usage:
    902               macro=FlowequationFeStokesEnum()
    903         """
    904 
    905         return StringToEnum('FlowequationFeStokes')[0]
    906 
    907 def FlowequationFeSsaEnum():
    908         """
    909         FLOWEQUATIONFESSAENUM - Enum of FlowequationFeSsa
    910 
    911         WARNING: DO NOT MODIFY THIS FILE
    912                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    913                                 Please read src/c/shared/Enum/README for more information
    914 
    915            Usage:
    916               macro=FlowequationFeSsaEnum()
    917         """
    918 
    919         return StringToEnum('FlowequationFeSsa')[0]
     823def FlowequationIsSIAEnum():
     824        """
     825        FLOWEQUATIONISSIAENUM - Enum of FlowequationIsSIA
     826
     827        WARNING: DO NOT MODIFY THIS FILE
     828                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     829                                Please read src/c/shared/Enum/README for more information
     830
     831           Usage:
     832              macro=FlowequationIsSIAEnum()
     833        """
     834
     835        return StringToEnum('FlowequationIsSIA')[0]
     836
     837def FlowequationIsSSAEnum():
     838        """
     839        FLOWEQUATIONISSSAENUM - Enum of FlowequationIsSSA
     840
     841        WARNING: DO NOT MODIFY THIS FILE
     842                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     843                                Please read src/c/shared/Enum/README for more information
     844
     845           Usage:
     846              macro=FlowequationIsSSAEnum()
     847        """
     848
     849        return StringToEnum('FlowequationIsSSA')[0]
     850
     851def FlowequationIsL1L2Enum():
     852        """
     853        FLOWEQUATIONISL1L2ENUM - Enum of FlowequationIsL1L2
     854
     855        WARNING: DO NOT MODIFY THIS FILE
     856                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     857                                Please read src/c/shared/Enum/README for more information
     858
     859           Usage:
     860              macro=FlowequationIsL1L2Enum()
     861        """
     862
     863        return StringToEnum('FlowequationIsL1L2')[0]
     864
     865def FlowequationIsHOEnum():
     866        """
     867        FLOWEQUATIONISHOENUM - Enum of FlowequationIsHO
     868
     869        WARNING: DO NOT MODIFY THIS FILE
     870                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     871                                Please read src/c/shared/Enum/README for more information
     872
     873           Usage:
     874              macro=FlowequationIsHOEnum()
     875        """
     876
     877        return StringToEnum('FlowequationIsHO')[0]
     878
     879def FlowequationIsFSEnum():
     880        """
     881        FLOWEQUATIONISFSENUM - Enum of FlowequationIsFS
     882
     883        WARNING: DO NOT MODIFY THIS FILE
     884                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     885                                Please read src/c/shared/Enum/README for more information
     886
     887           Usage:
     888              macro=FlowequationIsFSEnum()
     889        """
     890
     891        return StringToEnum('FlowequationIsFS')[0]
     892
     893def FlowequationFeFSEnum():
     894        """
     895        FLOWEQUATIONFEFSENUM - Enum of FlowequationFeFS
     896
     897        WARNING: DO NOT MODIFY THIS FILE
     898                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     899                                Please read src/c/shared/Enum/README for more information
     900
     901           Usage:
     902              macro=FlowequationFeFSEnum()
     903        """
     904
     905        return StringToEnum('FlowequationFeFS')[0]
     906
     907def FlowequationFeSSAEnum():
     908        """
     909        FLOWEQUATIONFESSAENUM - Enum of FlowequationFeSSA
     910
     911        WARNING: DO NOT MODIFY THIS FILE
     912                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     913                                Please read src/c/shared/Enum/README for more information
     914
     915           Usage:
     916              macro=FlowequationFeSSAEnum()
     917        """
     918
     919        return StringToEnum('FlowequationFeSSA')[0]
    920920
    921921def FlowequationVertexEquationEnum():
     
    38033803        return StringToEnum('DiagnosticHorizAnalysis')[0]
    38043804
    3805 def DiagnosticHutterAnalysisEnum():
    3806         """
    3807         DIAGNOSTICHUTTERANALYSISENUM - Enum of DiagnosticHutterAnalysis
    3808 
    3809         WARNING: DO NOT MODIFY THIS FILE
    3810                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    3811                                 Please read src/c/shared/Enum/README for more information
    3812 
    3813            Usage:
    3814               macro=DiagnosticHutterAnalysisEnum()
    3815         """
    3816 
    3817         return StringToEnum('DiagnosticHutterAnalysis')[0]
     3805def DiagnosticSIAAnalysisEnum():
     3806        """
     3807        DIAGNOSTICSIAANALYSISENUM - Enum of DiagnosticSIAAnalysis
     3808
     3809        WARNING: DO NOT MODIFY THIS FILE
     3810                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     3811                                Please read src/c/shared/Enum/README for more information
     3812
     3813           Usage:
     3814              macro=DiagnosticSIAAnalysisEnum()
     3815        """
     3816
     3817        return StringToEnum('DiagnosticSIAAnalysis')[0]
    38183818
    38193819def DiagnosticSolutionEnum():
     
    41674167        return StringToEnum('NoneApproximation')[0]
    41684168
    4169 def HutterApproximationEnum():
    4170         """
    4171         HUTTERAPPROXIMATIONENUM - Enum of HutterApproximation
    4172 
    4173         WARNING: DO NOT MODIFY THIS FILE
    4174                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4175                                 Please read src/c/shared/Enum/README for more information
    4176 
    4177            Usage:
    4178               macro=HutterApproximationEnum()
    4179         """
    4180 
    4181         return StringToEnum('HutterApproximation')[0]
     4169def SIAApproximationEnum():
     4170        """
     4171        SIAAPPROXIMATIONENUM - Enum of SIAApproximation
     4172
     4173        WARNING: DO NOT MODIFY THIS FILE
     4174                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4175                                Please read src/c/shared/Enum/README for more information
     4176
     4177           Usage:
     4178              macro=SIAApproximationEnum()
     4179        """
     4180
     4181        return StringToEnum('SIAApproximation')[0]
    41824182
    41834183def MacAyealApproximationEnum():
     
    41954195        return StringToEnum('MacAyealApproximation')[0]
    41964196
    4197 def MacAyealPattynApproximationEnum():
    4198         """
    4199         MACAYEALPATTYNAPPROXIMATIONENUM - Enum of MacAyealPattynApproximation
    4200 
    4201         WARNING: DO NOT MODIFY THIS FILE
    4202                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4203                                 Please read src/c/shared/Enum/README for more information
    4204 
    4205            Usage:
    4206               macro=MacAyealPattynApproximationEnum()
    4207         """
    4208 
    4209         return StringToEnum('MacAyealPattynApproximation')[0]
    4210 
    4211 def MacAyealStokesApproximationEnum():
    4212         """
    4213         MACAYEALSTOKESAPPROXIMATIONENUM - Enum of MacAyealStokesApproximation
    4214 
    4215         WARNING: DO NOT MODIFY THIS FILE
    4216                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4217                                 Please read src/c/shared/Enum/README for more information
    4218 
    4219            Usage:
    4220               macro=MacAyealStokesApproximationEnum()
    4221         """
    4222 
    4223         return StringToEnum('MacAyealStokesApproximation')[0]
     4197def MacAyealHOApproximationEnum():
     4198        """
     4199        MACAYEALHOAPPROXIMATIONENUM - Enum of MacAyealHOApproximation
     4200
     4201        WARNING: DO NOT MODIFY THIS FILE
     4202                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4203                                Please read src/c/shared/Enum/README for more information
     4204
     4205           Usage:
     4206              macro=MacAyealHOApproximationEnum()
     4207        """
     4208
     4209        return StringToEnum('MacAyealHOApproximation')[0]
     4210
     4211def MacAyealFSApproximationEnum():
     4212        """
     4213        MACAYEALFSAPPROXIMATIONENUM - Enum of MacAyealFSApproximation
     4214
     4215        WARNING: DO NOT MODIFY THIS FILE
     4216                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4217                                Please read src/c/shared/Enum/README for more information
     4218
     4219           Usage:
     4220              macro=MacAyealFSApproximationEnum()
     4221        """
     4222
     4223        return StringToEnum('MacAyealFSApproximation')[0]
    42244224
    42254225def L1L2ApproximationEnum():
     
    42374237        return StringToEnum('L1L2Approximation')[0]
    42384238
    4239 def PattynApproximationEnum():
    4240         """
    4241         PATTYNAPPROXIMATIONENUM - Enum of PattynApproximation
    4242 
    4243         WARNING: DO NOT MODIFY THIS FILE
    4244                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4245                                 Please read src/c/shared/Enum/README for more information
    4246 
    4247            Usage:
    4248               macro=PattynApproximationEnum()
    4249         """
    4250 
    4251         return StringToEnum('PattynApproximation')[0]
    4252 
    4253 def PattynStokesApproximationEnum():
    4254         """
    4255         PATTYNSTOKESAPPROXIMATIONENUM - Enum of PattynStokesApproximation
    4256 
    4257         WARNING: DO NOT MODIFY THIS FILE
    4258                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4259                                 Please read src/c/shared/Enum/README for more information
    4260 
    4261            Usage:
    4262               macro=PattynStokesApproximationEnum()
    4263         """
    4264 
    4265         return StringToEnum('PattynStokesApproximation')[0]
    4266 
    4267 def StokesApproximationEnum():
    4268         """
    4269         STOKESAPPROXIMATIONENUM - Enum of StokesApproximation
    4270 
    4271         WARNING: DO NOT MODIFY THIS FILE
    4272                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4273                                 Please read src/c/shared/Enum/README for more information
    4274 
    4275            Usage:
    4276               macro=StokesApproximationEnum()
    4277         """
    4278 
    4279         return StringToEnum('StokesApproximation')[0]
     4239def HOApproximationEnum():
     4240        """
     4241        HOAPPROXIMATIONENUM - Enum of HOApproximation
     4242
     4243        WARNING: DO NOT MODIFY THIS FILE
     4244                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4245                                Please read src/c/shared/Enum/README for more information
     4246
     4247           Usage:
     4248              macro=HOApproximationEnum()
     4249        """
     4250
     4251        return StringToEnum('HOApproximation')[0]
     4252
     4253def HOFSApproximationEnum():
     4254        """
     4255        HOFSAPPROXIMATIONENUM - Enum of HOFSApproximation
     4256
     4257        WARNING: DO NOT MODIFY THIS FILE
     4258                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4259                                Please read src/c/shared/Enum/README for more information
     4260
     4261           Usage:
     4262              macro=HOFSApproximationEnum()
     4263        """
     4264
     4265        return StringToEnum('HOFSApproximation')[0]
     4266
     4267def FSApproximationEnum():
     4268        """
     4269        FSAPPROXIMATIONENUM - Enum of FSApproximation
     4270
     4271        WARNING: DO NOT MODIFY THIS FILE
     4272                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4273                                Please read src/c/shared/Enum/README for more information
     4274
     4275           Usage:
     4276              macro=FSApproximationEnum()
     4277        """
     4278
     4279        return StringToEnum('FSApproximation')[0]
    42804280
    42814281def ConstraintsEnum():
     
    48954895        return StringToEnum('L1L2IceFront')[0]
    48964896
    4897 def PattynIceFrontEnum():
    4898         """
    4899         PATTYNICEFRONTENUM - Enum of PattynIceFront
    4900 
    4901         WARNING: DO NOT MODIFY THIS FILE
    4902                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    4903                                 Please read src/c/shared/Enum/README for more information
    4904 
    4905            Usage:
    4906               macro=PattynIceFrontEnum()
    4907         """
    4908 
    4909         return StringToEnum('PattynIceFront')[0]
     4897def HOIceFrontEnum():
     4898        """
     4899        HOICEFRONTENUM - Enum of HOIceFront
     4900
     4901        WARNING: DO NOT MODIFY THIS FILE
     4902                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     4903                                Please read src/c/shared/Enum/README for more information
     4904
     4905           Usage:
     4906              macro=HOIceFrontEnum()
     4907        """
     4908
     4909        return StringToEnum('HOIceFront')[0]
    49104910
    49114911def PengridEnum():
     
    51195119        return StringToEnum('SpcTransient')[0]
    51205120
    5121 def StokesIceFrontEnum():
    5122         """
    5123         STOKESICEFRONTENUM - Enum of StokesIceFront
    5124 
    5125         WARNING: DO NOT MODIFY THIS FILE
    5126                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    5127                                 Please read src/c/shared/Enum/README for more information
    5128 
    5129            Usage:
    5130               macro=StokesIceFrontEnum()
    5131         """
    5132 
    5133         return StringToEnum('StokesIceFront')[0]
     5121def FSIceFrontEnum():
     5122        """
     5123        FSICEFRONTENUM - Enum of FSIceFront
     5124
     5125        WARNING: DO NOT MODIFY THIS FILE
     5126                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     5127                                Please read src/c/shared/Enum/README for more information
     5128
     5129           Usage:
     5130              macro=FSIceFrontEnum()
     5131        """
     5132
     5133        return StringToEnum('FSIceFront')[0]
    51345134
    51355135def StringArrayParamEnum():
     
    61416141        return StringToEnum('VzMacAyeal')[0]
    61426142
    6143 def VzPattynEnum():
    6144         """
    6145         VZPATTYNENUM - Enum of VzPattyn
    6146 
    6147         WARNING: DO NOT MODIFY THIS FILE
    6148                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    6149                                 Please read src/c/shared/Enum/README for more information
    6150 
    6151            Usage:
    6152               macro=VzPattynEnum()
    6153         """
    6154 
    6155         return StringToEnum('VzPattyn')[0]
     6143def VzHOEnum():
     6144        """
     6145        VZHOENUM - Enum of VzHO
     6146
     6147        WARNING: DO NOT MODIFY THIS FILE
     6148                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     6149                                Please read src/c/shared/Enum/README for more information
     6150
     6151           Usage:
     6152              macro=VzHOEnum()
     6153        """
     6154
     6155        return StringToEnum('VzHO')[0]
    61566156
    61576157def VzPicardEnum():
     
    61696169        return StringToEnum('VzPicard')[0]
    61706170
    6171 def VzStokesEnum():
    6172         """
    6173         VZSTOKESENUM - Enum of VzStokes
    6174 
    6175         WARNING: DO NOT MODIFY THIS FILE
    6176                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    6177                                 Please read src/c/shared/Enum/README for more information
    6178 
    6179            Usage:
    6180               macro=VzStokesEnum()
    6181         """
    6182 
    6183         return StringToEnum('VzStokes')[0]
     6171def VzFSEnum():
     6172        """
     6173        VZFSENUM - Enum of VzFS
     6174
     6175        WARNING: DO NOT MODIFY THIS FILE
     6176                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     6177                                Please read src/c/shared/Enum/README for more information
     6178
     6179           Usage:
     6180              macro=VzFSEnum()
     6181        """
     6182
     6183        return StringToEnum('VzFS')[0]
    61846184
    61856185def VxMeshEnum():
     
    72617261        return StringToEnum('GLlevelset')[0]
    72627262
    7263 def StokesSolverEnum():
    7264         """
    7265         STOKESSOLVERENUM - Enum of StokesSolver
    7266 
    7267         WARNING: DO NOT MODIFY THIS FILE
    7268                                 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
    7269                                 Please read src/c/shared/Enum/README for more information
    7270 
    7271            Usage:
    7272               macro=StokesSolverEnum()
    7273         """
    7274 
    7275         return StringToEnum('StokesSolver')[0]
     7263def FSSolverEnum():
     7264        """
     7265        FSSOLVERENUM - Enum of FSSolver
     7266
     7267        WARNING: DO NOT MODIFY THIS FILE
     7268                                this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
     7269                                Please read src/c/shared/Enum/README for more information
     7270
     7271           Usage:
     7272              macro=FSSolverEnum()
     7273        """
     7274
     7275        return StringToEnum('FSSolver')[0]
    72767276
    72777277def AdjointEnum():
  • issm/trunk-jpl/src/m/mech/mechanicalproperties.m

    r14296 r15564  
    2121end
    2222if any(md.flowequation.element_equation~=2),
    23         disp('Warning: the model has some non macayeal elements. These will be treated like MacAyeal''s elements');
     23        disp('Warning: the model has some non SSA elements. These will be treated like MacAyeal''s elements');
    2424end
    2525
  • issm/trunk-jpl/src/m/mech/strainrateuncert.m

    r14296 r15564  
    3636end
    3737if any(md.flowequation.element_equation~=2),
    38         disp('Warning: the model has some non macayeal elements. These will be treated like MacAyeal''s elements');
     38        disp('Warning: the model has some non SSA elements. These will be treated like MacAyeal''s elements');
    3939end
    4040
  • issm/trunk-jpl/src/m/miscellaneous/issmdoc.m

    r13962 r15564  
    1111disp(sprintf('%-63s %s','       md=setmask(md,''all'','''');','%defines the glacier system as an ice shelf (no island)'));
    1212disp(sprintf('%-63s %s','       md=parameterize(md,''Square.par'');','%fills all the other fields of the model'));
    13 disp(sprintf('%-63s %s','       md=setflowequation(md,''macayeal'',''all'');','%defines all elements as MacAyeal''s SSA'));
     13disp(sprintf('%-63s %s','       md=setflowequation(md,''SSA'',''all'');','%defines all elements as MacAyeal''s SSA'));
    1414disp(sprintf('%-63s %s','       md=solve(md,DiagnosticSolutionEnum());','%solve for stress balance'));
    1515disp(sprintf('%-63s %s','       plotmodel(md,''data'',md.results.DiagnosticSolution.Vel);','%displays the velocity (type plotdoc for plotmodel help)'));
  • issm/trunk-jpl/src/m/parameterization/setflowequation.m

    r15504 r15564  
    33%
    44%   This routine works like plotmodel: it works with an even number of inputs
    5 %   'hutter','macayeal','l1l2','pattyn','stokes' and 'fill' are the possible options
     5%   'SIA','SSA','L1L2','HO','FS' and 'fill' are the possible options
    66%   that must be followed by the corresponding exp file or flags list
    77%   It can either be a domain file (argus type, .exp extension), or an array of element flags.
    88%   If user wants every element outside the domain to be
    9 %   setflowequationd, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     9%   setflowequationd, add '~' to the name of the domain file (ex: '~HO.exp');
    1010%   an empty string '' will be considered as an empty domain
    1111%   a string 'all' will be considered as the entire domain
    1212%   You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling'
    13 %   NB: l1l2 cannot currently be coupled to any other ice flow model
     13%   NB: L1L2 cannot currently be coupled to any other ice flow model
    1414%
    1515%   Usage:
     
    1717%
    1818%   Example:
    19 %      md=setflowequation(md,'pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');
    20 %      md=setflowequation(md,'pattyn','Pattyn.exp',fill','hutter','coupling','tiling');
     19%      md=setflowequation(md,'HO','HO.exp','SSA',md.mask.elementonfloatingice,'fill','SIA');
     20%      md=setflowequation(md,'HO','HO.exp',fill','SIA','coupling','tiling');
    2121
    2222%some checks on list of arguments
     
    3636
    3737%recover elements distribution
    38 hutterflag   = FlagElements(md,getfieldvalue(options,'hutter',''));
    39 macayealflag = FlagElements(md,getfieldvalue(options,'macayeal',''));
    40 pattynflag   = FlagElements(md,getfieldvalue(options,'pattyn',''));
    41 l1l2flag     = FlagElements(md,getfieldvalue(options,'l1l2',''));
    42 stokesflag   = FlagElements(md,getfieldvalue(options,'stokes',''));
    43 filltype     = getfieldvalue(options,'fill','none');
     38SIAflag  = FlagElements(md,getfieldvalue(options,'SIA',''));
     39SSAflag  = FlagElements(md,getfieldvalue(options,'SSA',''));
     40HOflag   = FlagElements(md,getfieldvalue(options,'HO',''));
     41L1L2flag = FlagElements(md,getfieldvalue(options,'L1L2',''));
     42FSflag   = FlagElements(md,getfieldvalue(options,'FS',''));
     43filltype = getfieldvalue(options,'fill','none');
     44displayunused(options);
    4445
    4546%Flag the elements that have not been flagged as filltype
    46 if strcmpi(filltype,'hutter'),
    47         hutterflag(find(~(macayealflag | pattynflag)))=1;
    48 elseif strcmpi(filltype,'macayeal'),
    49         macayealflag(find(~(hutterflag | pattynflag | stokesflag)))=1;
    50 elseif strcmpi(filltype,'pattyn'),
    51         pattynflag(find(~(hutterflag | macayealflag | stokesflag)))=1;
     47if strcmpi(filltype,'SIA'),
     48        SIAflag(find(~(SSAflag | HOflag)))=1;
     49elseif strcmpi(filltype,'SSA'),
     50        SSAflag(find(~(SIAflag | HOflag | FSflag)))=1;
     51elseif strcmpi(filltype,'HO'),
     52        HOflag(find(~(SIAflag | SSAflag | FSflag)))=1;
    5253end
    5354
    5455%check that each element has at least one flag
    55 if any(hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag==0),
     56if any(SIAflag+SSAflag+HOflag+L1L2flag+FSflag==0),
    5657        error('elements type not assigned, must be specified')
    5758end
    5859
    5960%check that each element has only one flag
    60 if any(hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag>1),
     61if any(SIAflag+SSAflag+HOflag+L1L2flag+FSflag>1),
    6162        disp('setflowequation warning message: some elements have several types, higher order type is used for them')
    62         hutterflag(find(hutterflag & macayealflag))=0;
    63         hutterflag(find(hutterflag & pattynflag))=0;
    64         macayealflag(find(macayealflag & pattynflag))=0;
    65 end
    66 
    67 %check that l1l2 is not coupled to any other model for now
    68 if any(l1l2flag) & any(hutterflag | macayealflag | pattynflag | stokesflag)
    69         error('l1l2 cannot be coupled to any other model');
    70 end
    71 
    72 %Check that no l1l2 or pattyn or stokes for 2d mesh
     63        SIAflag(find(SIAflag & SSAflag))=0;
     64        SIAflag(find(SIAflag & HOflag))=0;
     65        SSAflag(find(SSAflag & HOflag))=0;
     66end
     67
     68%check that L1L2 is not coupled to any other model for now
     69if any(L1L2flag) & any(SIAflag | SSAflag | HOflag | FSflag)
     70        error('L1L2 cannot be coupled to any other model');
     71end
     72
     73%Check that no L1L2 or HO or FS for 2d mesh
    7374if (md.mesh.dimension==2),
    74         if any(l1l2flag | stokesflag | pattynflag)
    75                 error('stokes and pattyn elements not allowed in 2d mesh, extrude it first')
    76         end
    77 end
    78 
    79 %Stokes can only be used alone for now:
    80 if any(stokesflag) &any(hutterflag),
    81         error('stokes cannot be used with any other model for now, put stokes everywhere')
     75        if any(L1L2flag | FSflag | HOflag)
     76                error('FS and HO elements not allowed in 2d mesh, extrude it first')
     77        end
     78end
     79
     80%FS can only be used alone for now:
     81if any(FSflag) &any(SIAflag),
     82        error('FS cannot be used with any other model for now, put FS everywhere')
    8283end
    8384
    8485%Initialize node fields
    85 nodeonhutter=zeros(md.mesh.numberofvertices,1);
    86 nodeonhutter(md.mesh.elements(find(hutterflag),:))=1;
    87 nodeonmacayeal=zeros(md.mesh.numberofvertices,1);
    88 nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
    89 nodeonpattyn=zeros(md.mesh.numberofvertices,1);
    90 nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
    91 nodeonl1l2=zeros(md.mesh.numberofvertices,1);
    92 nodeonl1l2(md.mesh.elements(find(l1l2flag),:))=1;
    93 nodeonstokes=zeros(md.mesh.numberofvertices,1);
     86nodeonSIA=zeros(md.mesh.numberofvertices,1);
     87nodeonSIA(md.mesh.elements(find(SIAflag),:))=1;
     88nodeonSSA=zeros(md.mesh.numberofvertices,1);
     89nodeonSSA(md.mesh.elements(find(SSAflag),:))=1;
     90nodeonHO=zeros(md.mesh.numberofvertices,1);
     91nodeonHO(md.mesh.elements(find(HOflag),:))=1;
     92nodeonL1L2=zeros(md.mesh.numberofvertices,1);
     93nodeonL1L2(md.mesh.elements(find(L1L2flag),:))=1;
     94nodeonFS=zeros(md.mesh.numberofvertices,1);
    9495noneflag=zeros(md.mesh.numberofelements,1);
    9596
    96 %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
    97 if any(stokesflag),
    98         fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonpattyn & nodeonstokes));         %find all the nodes on the boundary of the domain without icefront
     97%First modify FSflag to get rid of elements contrained everywhere (spc + border with HO or SSA)
     98if any(FSflag),
     99        fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonHO & nodeonFS));         %find all the nodes on the boundary of the domain without icefront
    99100        fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6);         %find all the nodes on the boundary of the domain without icefront
    100         stokesflag(find(fullspcelems))=0;
    101         nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
    102 end
    103 
    104 %Then complete with NoneApproximation or the other model used if there is no stokes
    105 if any(stokesflag),
    106         if any(pattynflag), %fill with pattyn
    107                 pattynflag(~stokesflag)=1;
    108                 nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
    109         elseif any(macayealflag), %fill with macayeal
    110                 macayealflag(~stokesflag)=1;
    111                 nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
     101        FSflag(find(fullspcelems))=0;
     102        nodeonFS(md.mesh.elements(find(FSflag),:))=1;
     103end
     104
     105%Then complete with NoneApproximation or the other model used if there is no FS
     106if any(FSflag),
     107        if any(HOflag), %fill with HO
     108                HOflag(~FSflag)=1;
     109                nodeonHO(md.mesh.elements(find(HOflag),:))=1;
     110        elseif any(SSAflag), %fill with SSA
     111                SSAflag(~FSflag)=1;
     112                nodeonSSA(md.mesh.elements(find(SSAflag),:))=1;
    112113        else %fill with none
    113                 noneflag(find(~stokesflag))=1;
    114         end
    115 end
    116 
    117 %Now take care of the coupling between MacAyeal and Pattyn
     114                noneflag(find(~FSflag))=1;
     115        end
     116end
     117
     118%Now take care of the coupling between MacAyeal and HO
    118119md.diagnostic.vertex_pairing=[];
    119 nodeonmacayealpattyn=zeros(md.mesh.numberofvertices,1);
    120 nodeonpattynstokes=zeros(md.mesh.numberofvertices,1);
    121 nodeonmacayealstokes=zeros(md.mesh.numberofvertices,1);
    122 macayealpattynflag=zeros(md.mesh.numberofelements,1);
    123 macayealstokesflag=zeros(md.mesh.numberofelements,1);
    124 pattynstokesflag=zeros(md.mesh.numberofelements,1);
     120nodeonSSAHO=zeros(md.mesh.numberofvertices,1);
     121nodeonHOFS=zeros(md.mesh.numberofvertices,1);
     122nodeonSSAFS=zeros(md.mesh.numberofvertices,1);
     123SSAHOflag=zeros(md.mesh.numberofelements,1);
     124SSAFSflag=zeros(md.mesh.numberofelements,1);
     125HOFSflag=zeros(md.mesh.numberofelements,1);
    125126if strcmpi(coupling_method,'penalties'),
    126         %Create the border nodes between Pattyn and MacAyeal and extrude them
     127        %Create the border nodes between HO and MacAyeal and extrude them
    127128        numnodes2d=md.mesh.numberofvertices2d;
    128129        numlayers=md.mesh.numberoflayers;
    129         bordernodes2d=find(nodeonpattyn(1:numnodes2d) & nodeonmacayeal(1:numnodes2d)); %Nodes connected to two different types of elements
     130        bordernodes2d=find(nodeonHO(1:numnodes2d) & nodeonSSA(1:numnodes2d)); %Nodes connected to two different types of elements
    130131
    131132        %initialize and fill in penalties structure
     
    138139        end
    139140elseif strcmpi(coupling_method,'tiling'),
    140         if any(macayealflag) & any(pattynflag), %coupling macayeal pattyn
     141        if any(SSAflag) & any(HOflag), %coupling SSA HO
    141142                %Find node at the border
    142                 nodeonmacayealpattyn(find(nodeonmacayeal & nodeonpattyn))=1;
    143                 %Macayeal elements in contact with this layer become MacAyealPattyn elements
    144                 matrixelements=ismember(md.mesh.elements,find(nodeonmacayealpattyn));
     143                nodeonSSAHO(find(nodeonSSA & nodeonHO))=1;
     144                %SSA elements in contact with this layer become MacAyealHO elements
     145                matrixelements=ismember(md.mesh.elements,find(nodeonSSAHO));
    145146                commonelements=sum(matrixelements,2)~=0;
    146                 commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
    147                 macayealflag(find(commonelements))=0; %these elements are now macayealpattynelements
    148                 macayealpattynflag(find(commonelements))=1;
    149                 nodeonmacayeal(:)=0;
    150                 nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
     147                commonelements(find(HOflag))=0; %only one layer: the elements previously in SSA
     148                SSAflag(find(commonelements))=0; %these elements are now SSAHOelements
     149                SSAHOflag(find(commonelements))=1;
     150                nodeonSSA(:)=0;
     151                nodeonSSA(md.mesh.elements(find(SSAflag),:))=1;
    151152
    152153                %rule out elements that don't touch the 2 boundaries
    153                 pos=find(macayealpattynflag);
     154                pos=find(SSAHOflag);
    154155                elist=zeros(length(pos),1);
    155                 elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
    156                 elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:))  ,2),2);
     156                elist = elist + any(sum(nodeonSSA(md.mesh.elements(pos,:)),2),2);
     157                elist = elist - any(sum(nodeonHO(md.mesh.elements(pos,:))  ,2),2);
    157158                pos1=find(elist==1);
    158                 macayealflag(pos(pos1))=1;
    159                 macayealpattynflag(pos(pos1))=0;
     159                SSAflag(pos(pos1))=1;
     160                SSAHOflag(pos(pos1))=0;
    160161                pos2=find(elist==-1);
    161                 pattynflag(pos(pos2))=1;
    162                 macayealpattynflag(pos(pos2))=0;
     162                HOflag(pos(pos2))=1;
     163                SSAHOflag(pos(pos2))=0;
    163164
    164165                %Recompute nodes associated to these elements
    165                 nodeonmacayeal(:)=0;
    166                 nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
    167                 nodeonpattyn(:)=0;
    168                 nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
    169                 nodeonmacayealpattyn(:)=0;
    170                 nodeonmacayealpattyn(md.mesh.elements(find(macayealpattynflag),:))=1;
    171 
    172         elseif any(pattynflag) & any(stokesflag), %coupling pattyn stokes
     166                nodeonSSA(:)=0;
     167                nodeonSSA(md.mesh.elements(find(SSAflag),:))=1;
     168                nodeonHO(:)=0;
     169                nodeonHO(md.mesh.elements(find(HOflag),:))=1;
     170                nodeonSSAHO(:)=0;
     171                nodeonSSAHO(md.mesh.elements(find(SSAHOflag),:))=1;
     172
     173        elseif any(HOflag) & any(FSflag), %coupling HO FS
    173174                %Find node at the border
    174                 nodeonpattynstokes(find(nodeonpattyn & nodeonstokes))=1;
    175                 %Stokes elements in contact with this layer become PattynStokes elements
    176                 matrixelements=ismember(md.mesh.elements,find(nodeonpattynstokes));
     175                nodeonHOFS(find(nodeonHO & nodeonFS))=1;
     176                %FS elements in contact with this layer become HOFS elements
     177                matrixelements=ismember(md.mesh.elements,find(nodeonHOFS));
    177178                commonelements=sum(matrixelements,2)~=0;
    178                 commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
    179                 stokesflag(find(commonelements))=0; %these elements are now macayealpattynelements
    180                 pattynstokesflag(find(commonelements))=1;
    181                 nodeonstokes=zeros(md.mesh.numberofvertices,1);
    182                 nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
     179                commonelements(find(HOflag))=0; %only one layer: the elements previously in SSA
     180                FSflag(find(commonelements))=0; %these elements are now SSAHOelements
     181                HOFSflag(find(commonelements))=1;
     182                nodeonFS=zeros(md.mesh.numberofvertices,1);
     183                nodeonFS(md.mesh.elements(find(FSflag),:))=1;
    183184
    184185                %rule out elements that don't touch the 2 boundaries
    185                 pos=find(pattynstokesflag);
     186                pos=find(HOFSflag);
    186187                elist=zeros(length(pos),1);
    187                 elist = elist + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2);
    188                 elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2);
     188                elist = elist + any(sum(nodeonFS(md.mesh.elements(pos,:)),2),2);
     189                elist = elist - any(sum(nodeonHO(md.mesh.elements(pos,:)),2),2);
    189190                pos1=find(elist==1);
    190                 stokesflag(pos(pos1))=1;
    191                 pattynstokesflag(pos(pos1))=0;
     191                FSflag(pos(pos1))=1;
     192                HOFSflag(pos(pos1))=0;
    192193                pos2=find(elist==-1);
    193                 pattynflag(pos(pos2))=1;
    194                 pattynstokesflag(pos(pos2))=0;
     194                HOflag(pos(pos2))=1;
     195                HOFSflag(pos(pos2))=0;
    195196
    196197                %Recompute nodes associated to these elements
    197                 nodeonstokes(:)=0;
    198                 nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
    199                 nodeonpattyn(:)=0;
    200                 nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
    201                 nodeonpattynstokes(:)=0;
    202                 nodeonpattynstokes(md.mesh.elements(find(pattynstokesflag),:))=1;
    203 
    204         elseif any(stokesflag) & any(macayealflag),
     198                nodeonFS(:)=0;
     199                nodeonFS(md.mesh.elements(find(FSflag),:))=1;
     200                nodeonHO(:)=0;
     201                nodeonHO(md.mesh.elements(find(HOflag),:))=1;
     202                nodeonHOFS(:)=0;
     203                nodeonHOFS(md.mesh.elements(find(HOFSflag),:))=1;
     204
     205        elseif any(FSflag) & any(SSAflag),
    205206                %Find node at the border
    206                 nodeonmacayealstokes(find(nodeonmacayeal & nodeonstokes))=1;
    207                 %Stokes elements in contact with this layer become MacAyealStokes elements
    208                 matrixelements=ismember(md.mesh.elements,find(nodeonmacayealstokes));
     207                nodeonSSAFS(find(nodeonSSA & nodeonFS))=1;
     208                %FS elements in contact with this layer become MacAyealFS elements
     209                matrixelements=ismember(md.mesh.elements,find(nodeonSSAFS));
    209210                commonelements=sum(matrixelements,2)~=0;
    210                 commonelements(find(macayealflag))=0; %only one layer: the elements previously in macayeal
    211                 stokesflag(find(commonelements))=0; %these elements are now macayealmacayealelements
    212                 macayealstokesflag(find(commonelements))=1;
    213                 nodeonstokes=zeros(md.mesh.numberofvertices,1);
    214                 nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
     211                commonelements(find(SSAflag))=0; %only one layer: the elements previously in SSA
     212                FSflag(find(commonelements))=0; %these elements are now SSASSAelements
     213                SSAFSflag(find(commonelements))=1;
     214                nodeonFS=zeros(md.mesh.numberofvertices,1);
     215                nodeonFS(md.mesh.elements(find(FSflag),:))=1;
    215216
    216217                %rule out elements that don't touch the 2 boundaries
    217                 pos=find(macayealstokesflag);
     218                pos=find(SSAFSflag);
    218219                elist=zeros(length(pos),1);
    219                 elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
    220                 elist = elist - any(sum(nodeonstokes(md.mesh.elements(pos,:))  ,2),2);
     220                elist = elist + any(sum(nodeonSSA(md.mesh.elements(pos,:)),2),2);
     221                elist = elist - any(sum(nodeonFS(md.mesh.elements(pos,:))  ,2),2);
    221222                pos1=find(elist==1);
    222                 macayealflag(pos(pos1))=1;
    223                 macayealstokesflag(pos(pos1))=0;
     223                SSAflag(pos(pos1))=1;
     224                SSAFSflag(pos(pos1))=0;
    224225                pos2=find(elist==-1);
    225                 stokesflag(pos(pos2))=1;
    226                 macayealstokesflag(pos(pos2))=0;
     226                FSflag(pos(pos2))=1;
     227                SSAFSflag(pos(pos2))=0;
    227228
    228229                %Recompute nodes associated to these elements
    229                 nodeonmacayeal(:)=0;
    230                 nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
    231                 nodeonstokes(:)=0;
    232                 nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
    233                 nodeonmacayealstokes(:)=0;
    234                 nodeonmacayealstokes(md.mesh.elements(find(macayealstokesflag),:))=1;
    235 
    236         elseif any(stokesflag) & any(hutterflag),
     230                nodeonSSA(:)=0;
     231                nodeonSSA(md.mesh.elements(find(SSAflag),:))=1;
     232                nodeonFS(:)=0;
     233                nodeonFS(md.mesh.elements(find(FSflag),:))=1;
     234                nodeonSSAFS(:)=0;
     235                nodeonSSAFS(md.mesh.elements(find(SSAFSflag),:))=1;
     236
     237        elseif any(FSflag) & any(SIAflag),
    237238                error('type of coupling not supported yet');
    238239        end
    239240end
    240241
    241 %Create MacaAyealPattynApproximation where needed
     242%Create MacaAyealHOApproximation where needed
    242243md.flowequation.element_equation=zeros(md.mesh.numberofelements,1);
    243244md.flowequation.element_equation(find(noneflag))=0;
    244 md.flowequation.element_equation(find(hutterflag))=1;
    245 md.flowequation.element_equation(find(macayealflag))=2;
    246 md.flowequation.element_equation(find(l1l2flag))=8;
    247 md.flowequation.element_equation(find(pattynflag))=3;
    248 md.flowequation.element_equation(find(stokesflag))=4;
    249 md.flowequation.element_equation(find(macayealpattynflag))=5;
    250 md.flowequation.element_equation(find(macayealstokesflag))=6;
    251 md.flowequation.element_equation(find(pattynstokesflag))=7;
     245md.flowequation.element_equation(find(SIAflag))=1;
     246md.flowequation.element_equation(find(SSAflag))=2;
     247md.flowequation.element_equation(find(L1L2flag))=8;
     248md.flowequation.element_equation(find(HOflag))=3;
     249md.flowequation.element_equation(find(FSflag))=4;
     250md.flowequation.element_equation(find(SSAHOflag))=5;
     251md.flowequation.element_equation(find(SSAFSflag))=6;
     252md.flowequation.element_equation(find(HOFSflag))=7;
    252253
    253254%border
    254 md.flowequation.borderpattyn=nodeonpattyn;
    255 md.flowequation.bordermacayeal=nodeonmacayeal;
    256 md.flowequation.borderstokes=nodeonstokes;
     255md.flowequation.borderHO=nodeonHO;
     256md.flowequation.borderSSA=nodeonSSA;
     257md.flowequation.borderFS=nodeonFS;
    257258
    258259%Create vertices_type
    259260md.flowequation.vertex_equation=zeros(md.mesh.numberofvertices,1);
    260 pos=find(nodeonmacayeal);
     261pos=find(nodeonSSA);
    261262md.flowequation.vertex_equation(pos)=2;
    262 pos=find(nodeonl1l2);
     263pos=find(nodeonL1L2);
    263264md.flowequation.vertex_equation(pos)=8;
    264 pos=find(nodeonpattyn);
     265pos=find(nodeonHO);
    265266md.flowequation.vertex_equation(pos)=3;
    266 pos=find(nodeonhutter);
     267pos=find(nodeonSIA);
    267268md.flowequation.vertex_equation(pos)=1;
    268 pos=find(nodeonmacayealpattyn);
     269pos=find(nodeonSSAHO);
    269270md.flowequation.vertex_equation(pos)=5;
    270 pos=find(nodeonstokes);
     271pos=find(nodeonFS);
    271272md.flowequation.vertex_equation(pos)=4;
    272 if any(stokesflag),
    273         pos=find(~nodeonstokes);
    274         if(~any(pattynflag) & ~any(macayealflag)),
     273if any(FSflag),
     274        pos=find(~nodeonFS);
     275        if(~any(HOflag) & ~any(SSAflag)),
    275276                md.flowequation.vertex_equation(pos)=0;
    276277        end
    277278end
    278 pos=find(nodeonpattynstokes);
     279pos=find(nodeonHOFS);
    279280md.flowequation.vertex_equation(pos)=7;
    280 pos=find(nodeonmacayealstokes);
     281pos=find(nodeonSSAFS);
    281282md.flowequation.vertex_equation(pos)=6;
    282283
    283284%figure out solution types
    284 md.flowequation.ishutter=double(any(md.flowequation.element_equation==1));
    285 md.flowequation.ismacayeal=double(any(md.flowequation.element_equation==2));
    286 md.flowequation.ispattyn=double(any(md.flowequation.element_equation==3));
    287 md.flowequation.isl1l2=double(any(md.flowequation.element_equation==8));
    288 md.flowequation.isstokes=double(any(md.flowequation.element_equation==4));
     285md.flowequation.isSIA  = double(any(md.flowequation.element_equation == 1));
     286md.flowequation.isSSA  = double(any(md.flowequation.element_equation == 2));
     287md.flowequation.isHO   = double(any(md.flowequation.element_equation == 3));
     288md.flowequation.isL1L2 = double(any(md.flowequation.element_equation == 8));
     289md.flowequation.isFS   = double(any(md.flowequation.element_equation == 4));
    289290
    290291return
    291292
    292293%Check that tiling can work:
    293 if any(md.flowequation.bordermacayeal) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.bordermacayeal ~=1),
     294if any(md.flowequation.borderSSA) & any(md.flowequation.borderHO) & any(md.flowequation.borderHO + md.flowequation.borderSSA ~=1),
    294295        error('error coupling domain too irregular');
    295296end
    296 if any(md.flowequation.bordermacayeal) & any(md.flowequation.borderstokes) & any(md.flowequation.borderstokes + md.flowequation.bordermacayeal ~=1),
     297if any(md.flowequation.borderSSA) & any(md.flowequation.borderFS) & any(md.flowequation.borderFS + md.flowequation.borderSSA ~=1),
    297298        error('error coupling domain too irregular');
    298299end
    299 if any(md.flowequation.borderstokes) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.borderstokes~=1),
     300if any(md.flowequation.borderFS) & any(md.flowequation.borderHO) & any(md.flowequation.borderHO + md.flowequation.borderFS~=1),
    300301        error('error coupling domain too irregular');
    301302end
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r15504 r15564  
    1111
    1212           This routine works like plotmodel: it works with an even number of inputs
    13            'hutter','macayeal','pattyn','l1l2','stokes' and 'fill' are the possible options
     13           'SIA','SSA','HO','L1L2','FS' and 'fill' are the possible options
    1414           that must be followed by the corresponding exp file or flags list
    1515           It can either be a domain file (argus type, .exp extension), or an array of element flags.
    1616           If user wants every element outside the domain to be
    17            setflowequationd, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     17           setflowequationd, add '~' to the name of the domain file (ex: '~HO.exp');
    1818           an empty string '' will be considered as an empty domain
    1919           a string 'all' will be considered as the entire domain
     
    2424
    2525           Example:
    26               md=setflowequation(md,'pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');
    27               md=setflowequation(md,'pattyn','Pattyn.exp',fill','hutter','coupling','tiling');
     26              md=setflowequation(md,'HO','HO.exp','SSA',md.mask.elementonfloatingice,'fill','SIA');
     27              md=setflowequation(md,'HO','HO.exp',fill','SIA','coupling','tiling');
    2828        """
    2929
     
    4242
    4343        #recover elements distribution
    44         hutterflag   = FlagElements(md,options.getfieldvalue('hutter',''))
    45         macayealflag = FlagElements(md,options.getfieldvalue('macayeal',''))
    46         pattynflag   = FlagElements(md,options.getfieldvalue('pattyn',''))
    47         l1l2flag     = FlagElements(md,options.getfieldvalue('l1l2',''))
    48         stokesflag   = FlagElements(md,options.getfieldvalue('stokes',''))
     44        SIAflag   = FlagElements(md,options.getfieldvalue('SIA',''))
     45        SSAflag = FlagElements(md,options.getfieldvalue('SSA',''))
     46        HOflag   = FlagElements(md,options.getfieldvalue('HO',''))
     47        L1L2flag     = FlagElements(md,options.getfieldvalue('L1L2',''))
     48        FSflag   = FlagElements(md,options.getfieldvalue('FS',''))
    4949        filltype     = options.getfieldvalue('fill','none')
    5050
    5151        #Flag the elements that have not been flagged as filltype
    52         if   strcmpi(filltype,'hutter'):
    53                 hutterflag[numpy.nonzero(numpy.logical_not(logical_or_n(macayealflag,pattynflag)))]=True
    54         elif strcmpi(filltype,'macayeal'):
    55                 macayealflag[numpy.nonzero(numpy.logical_not(logical_or_n(hutterflag,pattynflag,stokesflag)))]=True
    56         elif strcmpi(filltype,'pattyn'):
    57                 pattynflag[numpy.nonzero(numpy.logical_not(logical_or_n(hutterflag,macayealflag,stokesflag)))]=True
     52        if   strcmpi(filltype,'SIA'):
     53                SIAflag[numpy.nonzero(numpy.logical_not(logical_or_n(SSAflag,HOflag)))]=True
     54        elif strcmpi(filltype,'SSA'):
     55                SSAflag[numpy.nonzero(numpy.logical_not(logical_or_n(SIAflag,HOflag,FSflag)))]=True
     56        elif strcmpi(filltype,'HO'):
     57                HOflag[numpy.nonzero(numpy.logical_not(logical_or_n(SIAflag,SSAflag,FSflag)))]=True
    5858
    5959        #check that each element has at least one flag
    60         if not any(hutterflag+macayealflag+l1l2flag+pattynflag+stokesflag):
     60        if not any(SIAflag+SSAflag+L1L2flag+HOflag+FSflag):
    6161                raise TypeError("elements type not assigned, must be specified")
    6262
    6363        #check that each element has only one flag
    64         if any(hutterflag+macayealflag+l1l2flag+pattynflag+stokesflag>1):
     64        if any(SIAflag+SSAflag+L1L2flag+HOflag+FSflag>1):
    6565                print "setflowequation warning message: some elements have several types, higher order type is used for them"
    66                 hutterflag[numpy.nonzero(numpy.logical_and(hutterflag,macayealflag))]=False
    67                 hutterflag[numpy.nonzero(numpy.logical_and(hutterflag,pattynflag))]=False
    68                 macayealflag[numpy.nonzero(numpy.logical_and(macayealflag,pattynflag))]=False
    69 
    70         #Check that no pattyn or stokes for 2d mesh
     66                SIAflag[numpy.nonzero(numpy.logical_and(SIAflag,SSAflag))]=False
     67                SIAflag[numpy.nonzero(numpy.logical_and(SIAflag,HOflag))]=False
     68                SSAflag[numpy.nonzero(numpy.logical_and(SSAflag,HOflag))]=False
     69
     70        #Check that no HO or FS for 2d mesh
    7171        if md.mesh.dimension==2:
    72                 if numpy.any(logical_or_n(l1l2flag,stokesflag,pattynflag)):
    73                         raise TypeError("stokes and pattyn elements not allowed in 2d mesh, extrude it first")
    74 
    75         #Stokes can only be used alone for now:
    76         if any(stokesflag) and any(hutterflag):
    77                 raise TypeError("stokes cannot be used with any other model for now, put stokes everywhere")
     72                if numpy.any(logical_or_n(L1L2flag,FSflag,HOflag)):
     73                        raise TypeError("FS and HO elements not allowed in 2d mesh, extrude it first")
     74
     75        #FS can only be used alone for now:
     76        if any(FSflag) and any(SIAflag):
     77                raise TypeError("FS cannot be used with any other model for now, put FS everywhere")
    7878
    7979        #Initialize node fields
    80         nodeonhutter=numpy.zeros(md.mesh.numberofvertices,bool)
    81         nodeonhutter[md.mesh.elements[numpy.nonzero(hutterflag),:]-1]=True
    82         nodeonmacayeal=numpy.zeros(md.mesh.numberofvertices,bool)
    83         nodeonmacayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True
    84         nodeonl1l2=numpy.zeros(md.mesh.numberofvertices,bool)
    85         nodeonl1l2[md.mesh.elements[numpy.nonzero(l1l2flag),:]-1]=True
    86         nodeonpattyn=numpy.zeros(md.mesh.numberofvertices,bool)
    87         nodeonpattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True
    88         nodeonstokes=numpy.zeros(md.mesh.numberofvertices,bool)
     80        nodeonSIA=numpy.zeros(md.mesh.numberofvertices,bool)
     81        nodeonSIA[md.mesh.elements[numpy.nonzero(SIAflag),:]-1]=True
     82        nodeonSSA=numpy.zeros(md.mesh.numberofvertices,bool)
     83        nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True
     84        nodeonL1L2=numpy.zeros(md.mesh.numberofvertices,bool)
     85        nodeonL1L2[md.mesh.elements[numpy.nonzero(L1L2flag),:]-1]=True
     86        nodeonHO=numpy.zeros(md.mesh.numberofvertices,bool)
     87        nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True
     88        nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool)
    8989        noneflag=numpy.zeros(md.mesh.numberofelements,bool)
    9090
    91         #First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
    92         if any(stokesflag):
    93 #               fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonpattyn & nodeonstokes));         %find all the nodes on the boundary of the domain without icefront
     91        #First modify FSflag to get rid of elements contrained everywhere (spc + border with HO or SSA)
     92        if any(FSflag):
     93#               fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonHO & nodeonFS));         %find all the nodes on the boundary of the domain without icefront
    9494                fullspcnodes=numpy.logical_or(numpy.logical_not(numpy.isnan(md.diagnostic.spcvx)).astype(int)+ \
    9595                                              numpy.logical_not(numpy.isnan(md.diagnostic.spcvy)).astype(int)+ \
    9696                                              numpy.logical_not(numpy.isnan(md.diagnostic.spcvz)).astype(int)==3, \
    97                                               numpy.logical_and(nodeonpattyn,nodeonstokes).reshape(-1,1)).astype(int)    #find all the nodes on the boundary of the domain without icefront
     97                                              numpy.logical_and(nodeonHO,nodeonFS).reshape(-1,1)).astype(int)    #find all the nodes on the boundary of the domain without icefront
    9898#               fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6);         %find all the nodes on the boundary of the domain without icefront
    9999                fullspcelems=(numpy.sum(fullspcnodes[md.mesh.elements-1],axis=1)==6).astype(int)    #find all the nodes on the boundary of the domain without icefront
    100                 stokesflag[numpy.nonzero(fullspcelems.reshape(-1))]=False
    101                 nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True
    102 
    103         #Then complete with NoneApproximation or the other model used if there is no stokes
    104         if any(stokesflag):
    105                 if   any(pattynflag):    #fill with pattyn
    106                         pattynflag[numpy.logical_not(stokesflag)]=True
    107                         nodeonpattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True
    108                 elif any(macayealflag):    #fill with macayeal
    109                         macayealflag[numpy.logical_not(stokesflag)]=True
    110                         nodeonmacayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True
     100                FSflag[numpy.nonzero(fullspcelems.reshape(-1))]=False
     101                nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True
     102
     103        #Then complete with NoneApproximation or the other model used if there is no FS
     104        if any(FSflag):
     105                if   any(HOflag):    #fill with HO
     106                        HOflag[numpy.logical_not(FSflag)]=True
     107                        nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True
     108                elif any(SSAflag):    #fill with SSA
     109                        SSAflag[numpy.logical_not(FSflag)]=True
     110                        nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True
    111111                else:    #fill with none
    112                         noneflag[numpy.nonzero(numpy.logical_not(stokesflag))]=True
    113 
    114         #Now take care of the coupling between MacAyeal and Pattyn
     112                        noneflag[numpy.nonzero(numpy.logical_not(FSflag))]=True
     113
     114        #Now take care of the coupling between MacAyeal and HO
    115115        md.diagnostic.vertex_pairing=numpy.array([])
    116         nodeonmacayealpattyn=numpy.zeros(md.mesh.numberofvertices,bool)
    117         nodeonpattynstokes=numpy.zeros(md.mesh.numberofvertices,bool)
    118         nodeonmacayealstokes=numpy.zeros(md.mesh.numberofvertices,bool)
    119         macayealpattynflag=numpy.zeros(md.mesh.numberofelements,bool)
    120         macayealstokesflag=numpy.zeros(md.mesh.numberofelements,bool)
    121         pattynstokesflag=numpy.zeros(md.mesh.numberofelements,bool)
     116        nodeonSSAHO=numpy.zeros(md.mesh.numberofvertices,bool)
     117        nodeonHOFS=numpy.zeros(md.mesh.numberofvertices,bool)
     118        nodeonSSAFS=numpy.zeros(md.mesh.numberofvertices,bool)
     119        SSAHOflag=numpy.zeros(md.mesh.numberofelements,bool)
     120        SSAFSflag=numpy.zeros(md.mesh.numberofelements,bool)
     121        HOFSflag=numpy.zeros(md.mesh.numberofelements,bool)
    122122        if   strcmpi(coupling_method,'penalties'):
    123                 #Create the border nodes between Pattyn and MacAyeal and extrude them
     123                #Create the border nodes between HO and MacAyeal and extrude them
    124124                numnodes2d=md.mesh.numberofvertices2d
    125125                numlayers=md.mesh.numberoflayers
    126                 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonpattyn[0:numnodes2d],nodeonmacayeal[0:numnodes2d]))[0]+1    #Nodes connected to two different types of elements
     126                bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonHO[0:numnodes2d],nodeonSSA[0:numnodes2d]))[0]+1    #Nodes connected to two different types of elements
    127127
    128128                #initialize and fill in penalties structure
     
    134134
    135135        elif strcmpi(coupling_method,'tiling'):
    136                 if   any(macayealflag) and any(pattynflag):    #coupling macayeal pattyn
     136                if   any(SSAflag) and any(HOflag):    #coupling SSA HO
    137137                        #Find node at the border
    138                         nodeonmacayealpattyn[numpy.nonzero(numpy.logical_and(nodeonmacayeal,nodeonpattyn))]=True
    139                         #Macayeal elements in contact with this layer become MacAyealPattyn elements
    140                         matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonmacayealpattyn)[0])
     138                        nodeonSSAHO[numpy.nonzero(numpy.logical_and(nodeonSSA,nodeonHO))]=True
     139                        #SSA elements in contact with this layer become MacAyealHO elements
     140                        matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonSSAHO)[0])
    141141                        commonelements=numpy.sum(matrixelements,axis=1)!=0
    142                         commonelements[numpy.nonzero(pattynflag)]=False    #only one layer: the elements previously in macayeal
    143                         macayealflag[numpy.nonzero(commonelements)]=False    #these elements are now macayealpattynelements
    144                         macayealpattynflag[numpy.nonzero(commonelements)]=True
    145                         nodeonmacayeal[:]=False
    146                         nodeonmacayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True
     142                        commonelements[numpy.nonzero(HOflag)]=False    #only one layer: the elements previously in SSA
     143                        SSAflag[numpy.nonzero(commonelements)]=False    #these elements are now SSAHOelements
     144                        SSAHOflag[numpy.nonzero(commonelements)]=True
     145                        nodeonSSA[:]=False
     146                        nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True
    147147
    148148                        #rule out elements that don't touch the 2 boundaries
    149                         pos=numpy.nonzero(macayealpattynflag)[0]
     149                        pos=numpy.nonzero(SSAHOflag)[0]
    150150                        elist=numpy.zeros(numpy.size(pos),dtype=int)
    151                         elist = elist + numpy.sum(nodeonmacayeal[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
    152                         elist = elist - numpy.sum(nodeonpattyn[md.mesh.elements[pos,:]-1]  ,axis=1).astype(bool)
     151                        elist = elist + numpy.sum(nodeonSSA[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
     152                        elist = elist - numpy.sum(nodeonHO[md.mesh.elements[pos,:]-1]  ,axis=1).astype(bool)
    153153                        pos1=numpy.nonzero(elist==1)[0]
    154                         macayealflag[pos[pos1]]=True
    155                         macayealpattynflag[pos[pos1]]=False
     154                        SSAflag[pos[pos1]]=True
     155                        SSAHOflag[pos[pos1]]=False
    156156                        pos2=numpy.nonzero(elist==-1)[0]
    157                         pattynflag[pos[pos2]]=True
    158                         macayealpattynflag[pos[pos2]]=False
     157                        HOflag[pos[pos2]]=True
     158                        SSAHOflag[pos[pos2]]=False
    159159
    160160                        #Recompute nodes associated to these elements
    161                         nodeonmacayeal[:]=False
    162                         nodeonmacayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True
    163                         nodeonpattyn[:]=False
    164                         nodeonpattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True
    165                         nodeonmacayealpattyn[:]=False
    166                         nodeonmacayealpattyn[md.mesh.elements[numpy.nonzero(macayealpattynflag),:]-1]=True
    167 
    168                 elif any(pattynflag) and any(stokesflag):    #coupling pattyn stokes
     161                        nodeonSSA[:]=False
     162                        nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True
     163                        nodeonHO[:]=False
     164                        nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True
     165                        nodeonSSAHO[:]=False
     166                        nodeonSSAHO[md.mesh.elements[numpy.nonzero(SSAHOflag),:]-1]=True
     167
     168                elif any(HOflag) and any(FSflag):    #coupling HO FS
    169169                        #Find node at the border
    170                         nodeonpattynstokes[numpy.nonzero(numpy.logical_and(nodeonpattyn,nodeonstokes))]=True
    171                         #Stokes elements in contact with this layer become PattynStokes elements
    172                         matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonpattynstokes)[0])
     170                        nodeonHOFS[numpy.nonzero(numpy.logical_and(nodeonHO,nodeonFS))]=True
     171                        #FS elements in contact with this layer become HOFS elements
     172                        matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonHOFS)[0])
    173173                        commonelements=numpy.sum(matrixelements,axis=1)!=0
    174                         commonelements[numpy.nonzero(pattynflag)]=False    #only one layer: the elements previously in macayeal
    175                         stokesflag[numpy.nonzero(commonelements)]=False    #these elements are now macayealpattynelements
    176                         pattynstokesflag[numpy.nonzero(commonelements)]=True
    177                         nodeonstokes=numpy.zeros(md.mesh.numberofvertices,bool)
    178                         nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True
     174                        commonelements[numpy.nonzero(HOflag)]=False    #only one layer: the elements previously in SSA
     175                        FSflag[numpy.nonzero(commonelements)]=False    #these elements are now SSAHOelements
     176                        HOFSflag[numpy.nonzero(commonelements)]=True
     177                        nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool)
     178                        nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True
    179179
    180180                        #rule out elements that don't touch the 2 boundaries
    181                         pos=numpy.nonzero(pattynstokesflag)[0]
     181                        pos=numpy.nonzero(HOFSflag)[0]
    182182                        elist=numpy.zeros(numpy.size(pos),dtype=int)
    183                         elist = elist + numpy.sum(nodeonstokes[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
    184                         elist = elist - numpy.sum(nodeonpattyn[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
     183                        elist = elist + numpy.sum(nodeonFS[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
     184                        elist = elist - numpy.sum(nodeonHO[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
    185185                        pos1=numpy.nonzero(elist==1)[0]
    186                         stokesflag[pos[pos1]]=True
    187                         pattynstokesflag[pos[pos1]]=False
     186                        FSflag[pos[pos1]]=True
     187                        HOFSflag[pos[pos1]]=False
    188188                        pos2=numpy.nonzero(elist==-1)[0]
    189                         pattynflag[pos[pos2]]=True
    190                         pattynstokesflag[pos[pos2]]=False
     189                        HOflag[pos[pos2]]=True
     190                        HOFSflag[pos[pos2]]=False
    191191
    192192                        #Recompute nodes associated to these elements
    193                         nodeonstokes[:]=False
    194                         nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True
    195                         nodeonpattyn[:]=False
    196                         nodeonpattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True
    197                         nodeonpattynstokes[:]=False
    198                         nodeonpattynstokes[md.mesh.elements[numpy.nonzero(pattynstokesflag),:]-1]=True
    199 
    200                 elif any(stokesflag) and any(macayealflag):
     193                        nodeonFS[:]=False
     194                        nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True
     195                        nodeonHO[:]=False
     196                        nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True
     197                        nodeonHOFS[:]=False
     198                        nodeonHOFS[md.mesh.elements[numpy.nonzero(HOFSflag),:]-1]=True
     199
     200                elif any(FSflag) and any(SSAflag):
    201201                        #Find node at the border
    202                         nodeonmacayealstokes[numpy.nonzero(numpy.logical_and(nodeonmacayeal,nodeonstokes))]=True
    203                         #Stokes elements in contact with this layer become MacAyealStokes elements
    204                         matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonmacayealstokes)[0])
     202                        nodeonSSAFS[numpy.nonzero(numpy.logical_and(nodeonSSA,nodeonFS))]=True
     203                        #FS elements in contact with this layer become MacAyealFS elements
     204                        matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonSSAFS)[0])
    205205                        commonelements=numpy.sum(matrixelements,axis=1)!=0
    206                         commonelements[numpy.nonzero(macayealflag)]=False    #only one layer: the elements previously in macayeal
    207                         stokesflag[numpy.nonzero(commonelements)]=False    #these elements are now macayealmacayealelements
    208                         macayealstokesflag[numpy.nonzero(commonelements)]=True
    209                         nodeonstokes=numpy.zeros(md.mesh.numberofvertices,bool)
    210                         nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True
     206                        commonelements[numpy.nonzero(SSAflag)]=False    #only one layer: the elements previously in SSA
     207                        FSflag[numpy.nonzero(commonelements)]=False    #these elements are now SSASSAelements
     208                        SSAFSflag[numpy.nonzero(commonelements)]=True
     209                        nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool)
     210                        nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True
    211211
    212212                        #rule out elements that don't touch the 2 boundaries
    213                         pos=numpy.nonzero(macayealstokesflag)[0]
     213                        pos=numpy.nonzero(SSAFSflag)[0]
    214214                        elist=numpy.zeros(numpy.size(pos),dtype=int)
    215                         elist = elist + numpy.sum(nodeonmacayeal[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
    216                         elist = elist - numpy.sum(nodeonstokes[md.mesh.elements[pos,:]-1]  ,axis=1).astype(bool)
     215                        elist = elist + numpy.sum(nodeonSSA[md.mesh.elements[pos,:]-1],axis=1).astype(bool)
     216                        elist = elist - numpy.sum(nodeonFS[md.mesh.elements[pos,:]-1]  ,axis=1).astype(bool)
    217217                        pos1=numpy.nonzero(elist==1)[0]
    218                         macayealflag[pos[pos1]]=True
    219                         macayealstokesflag[pos[pos1]]=False
     218                        SSAflag[pos[pos1]]=True
     219                        SSAFSflag[pos[pos1]]=False
    220220                        pos2=numpy.nonzero(elist==-1)[0]
    221                         stokesflag[pos[pos2]]=True
    222                         macayealstokesflag[pos[pos2]]=False
     221                        FSflag[pos[pos2]]=True
     222                        SSAFSflag[pos[pos2]]=False
    223223
    224224                        #Recompute nodes associated to these elements
    225                         nodeonmacayeal[:]=False
    226                         nodeonmacayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True
    227                         nodeonstokes[:]=False
    228                         nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True
    229                         nodeonmacayealstokes[:]=False
    230                         nodeonmacayealstokes[md.mesh.elements[numpy.nonzero(macayealstokesflag),:]-1]=True
    231 
    232                 elif any(stokesflag) and any(hutterflag):
     225                        nodeonSSA[:]=False
     226                        nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True
     227                        nodeonFS[:]=False
     228                        nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True
     229                        nodeonSSAFS[:]=False
     230                        nodeonSSAFS[md.mesh.elements[numpy.nonzero(SSAFSflag),:]-1]=True
     231
     232                elif any(FSflag) and any(SIAflag):
    233233                        raise TypeError("type of coupling not supported yet")
    234234
    235         #Create MacAyealPattynApproximation where needed
     235        #Create MacAyealHOApproximation where needed
    236236        md.flowequation.element_equation=numpy.zeros(md.mesh.numberofelements,int)
    237237        md.flowequation.element_equation[numpy.nonzero(noneflag)]=0
    238         md.flowequation.element_equation[numpy.nonzero(hutterflag)]=1
    239         md.flowequation.element_equation[numpy.nonzero(macayealflag)]=2
    240         md.flowequation.element_equation[numpy.nonzero(l1l2flag)]=8
    241         md.flowequation.element_equation[numpy.nonzero(pattynflag)]=3
    242         md.flowequation.element_equation[numpy.nonzero(stokesflag)]=4
    243         md.flowequation.element_equation[numpy.nonzero(macayealpattynflag)]=5
    244         md.flowequation.element_equation[numpy.nonzero(macayealstokesflag)]=6
    245         md.flowequation.element_equation[numpy.nonzero(pattynstokesflag)]=7
     238        md.flowequation.element_equation[numpy.nonzero(SIAflag)]=1
     239        md.flowequation.element_equation[numpy.nonzero(SSAflag)]=2
     240        md.flowequation.element_equation[numpy.nonzero(L1L2flag)]=8
     241        md.flowequation.element_equation[numpy.nonzero(HOflag)]=3
     242        md.flowequation.element_equation[numpy.nonzero(FSflag)]=4
     243        md.flowequation.element_equation[numpy.nonzero(SSAHOflag)]=5
     244        md.flowequation.element_equation[numpy.nonzero(SSAFSflag)]=6
     245        md.flowequation.element_equation[numpy.nonzero(HOFSflag)]=7
    246246
    247247        #border
    248         md.flowequation.borderpattyn=nodeonpattyn
    249         md.flowequation.bordermacayeal=nodeonmacayeal
    250         md.flowequation.borderstokes=nodeonstokes
     248        md.flowequation.borderHO=nodeonHO
     249        md.flowequation.borderSSA=nodeonSSA
     250        md.flowequation.borderFS=nodeonFS
    251251
    252252        #Create vertices_type
    253253        md.flowequation.vertex_equation=numpy.zeros(md.mesh.numberofvertices,int)
    254         pos=numpy.nonzero(nodeonmacayeal)
     254        pos=numpy.nonzero(nodeonSSA)
    255255        md.flowequation.vertex_equation[pos]=2
    256         pos=numpy.nonzero(nodeonl1l2)
     256        pos=numpy.nonzero(nodeonL1L2)
    257257        md.flowequation.vertex_equation[pos]=8
    258         pos=numpy.nonzero(nodeonpattyn)
     258        pos=numpy.nonzero(nodeonHO)
    259259        md.flowequation.vertex_equation[pos]=3
    260         pos=numpy.nonzero(nodeonhutter)
     260        pos=numpy.nonzero(nodeonSIA)
    261261        md.flowequation.vertex_equation[pos]=1
    262         pos=numpy.nonzero(nodeonmacayealpattyn)
     262        pos=numpy.nonzero(nodeonSSAHO)
    263263        md.flowequation.vertex_equation[pos]=5
    264         pos=numpy.nonzero(nodeonstokes)
     264        pos=numpy.nonzero(nodeonFS)
    265265        md.flowequation.vertex_equation[pos]=4
    266         if any(stokesflag):
    267                 pos=numpy.nonzero(numpy.logical_not(nodeonstokes))
    268                 if not (any(pattynflag) or any(macayealflag)):
     266        if any(FSflag):
     267                pos=numpy.nonzero(numpy.logical_not(nodeonFS))
     268                if not (any(HOflag) or any(SSAflag)):
    269269                        md.flowequation.vertex_equation[pos]=0
    270         pos=numpy.nonzero(nodeonpattynstokes)
     270        pos=numpy.nonzero(nodeonHOFS)
    271271        md.flowequation.vertex_equation[pos]=7
    272         pos=numpy.nonzero(nodeonmacayealstokes)
     272        pos=numpy.nonzero(nodeonSSAFS)
    273273        md.flowequation.vertex_equation[pos]=6
    274274
    275275        #figure out solution types
    276         md.flowequation.ishutter=any(md.flowequation.element_equation==1)
    277         md.flowequation.ismacayeal=any(md.flowequation.element_equation==2)
    278         md.flowequation.isl1l2=any(md.flowequation.element_equation==8)
    279         md.flowequation.ispattyn=any(md.flowequation.element_equation==3)
    280         md.flowequation.isstokes=any(md.flowequation.element_equation==4)
     276        md.flowequation.isSIA=any(md.flowequation.element_equation==1)
     277        md.flowequation.isSSA=any(md.flowequation.element_equation==2)
     278        md.flowequation.isL1L2=any(md.flowequation.element_equation==8)
     279        md.flowequation.isHO=any(md.flowequation.element_equation==3)
     280        md.flowequation.isFS=any(md.flowequation.element_equation==4)
    281281
    282282        return md
    283283
    284284        #Check that tiling can work:
    285         if any(md.flowequation.bordermacayeal) and any(md.flowequation.borderpattyn) and any(md.flowequation.borderpattyn + md.flowequation.bordermacayeal !=1):
     285        if any(md.flowequation.borderSSA) and any(md.flowequation.borderHO) and any(md.flowequation.borderHO + md.flowequation.borderSSA !=1):
    286286                raise TypeError("error coupling domain too irregular")
    287         if any(md.flowequation.bordermacayeal) and any(md.flowequation.borderstokes) and any(md.flowequation.borderstokes + md.flowequation.bordermacayeal !=1):
     287        if any(md.flowequation.borderSSA) and any(md.flowequation.borderFS) and any(md.flowequation.borderFS + md.flowequation.borderSSA !=1):
    288288                raise TypeError("error coupling domain too irregular")
    289         if any(md.flowequation.borderstokes) and any(md.flowequation.borderpattyn) and any(md.flowequation.borderpattyn + md.flowequation.borderstokes !=1):
     289        if any(md.flowequation.borderFS) and any(md.flowequation.borderHO) and any(md.flowequation.borderHO + md.flowequation.borderFS !=1):
    290290                raise TypeError("error coupling domain too irregular")
    291291
  • issm/trunk-jpl/src/m/plot/plot_elementstype.m

    r13730 r15564  
    1818
    1919if is2d
    20         %Hutter elements
     20        %SIA elements
    2121        posH=find(data==1);
    2222        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3);
     
    2626        A=elements(posM,1); B=elements(posM,2); C=elements(posM,3);
    2727        p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',2,'FaceColor','flat','EdgeColor',edgecolor);
    28         %Pattyn element
     28        %HO element
    2929        posP=find(data==3);
    3030        A=elements(posP,1); B=elements(posP,2); C=elements(posP,3);
    3131        p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',3,'FaceColor','flat','EdgeColor',edgecolor);
    32         %MacAyealPattyn element
     32        %MacAyealHO element
    3333        posMP=find(data==5);
    3434        A=elements(posMP,1); B=elements(posMP,2); C=elements(posMP,3);
    3535        p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',5,'FaceColor','flat','EdgeColor',edgecolor);
    36         %Stokes elements
     36        %FS elements
    3737        posS=find(data==4);
    3838        A=elements(posS,1); B=elements(posS,2); C=elements(posS,3);
    3939        p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',4,'FaceColor','flat','EdgeColor',edgecolor);
    40         %MacAyealStokes elements
     40        %MacAyealFS elements
    4141        posMS=find(data==6);
    4242        A=elements(posMS,1); B=elements(posMS,2); C=elements(posMS,3);
    4343        p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',6,'FaceColor','flat','EdgeColor',edgecolor);
    44         %PattynStokes elements
     44        %HOFS elements
    4545        posPS=find(data==7);
    4646        A=elements(posPS,1); B=elements(posPS,2); C=elements(posPS,3);
     
    5252
    5353        legend([p1 p2 p3 p5 p6 p7 p8 p9],...
    54                 'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements',...
    55                 'MacAyealPattyn''s elements','Stokes''s elements','MacAyealStokes''s elements','PattynStokes''s elements','None element');
     54                'SIA''s elements','MacAyeal''s elements','HO''s elements',...
     55                'MacAyealHO''s elements','FS''s elements','MacAyealFS''s elements','HOFS''s elements','None element');
    5656
    5757else
    58         %Hutter elements
     58        %SIA elements
    5959        posH=find(data==1);
    6060        A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); D=elements(posH,4); E=elements(posH,5); F=elements(posH,6);
     
    7272        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
    7373        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
    74         %Pattyn elements
     74        %HO elements
    7575        posP=find(data==3);
    7676        A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6);
     
    8080        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
    8181        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
    82         %Stokes elements
     82        %FS elements
    8383        posS=find(data==4);
    8484        A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6);
     
    8888        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
    8989        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
    90         %MacAyealPattyn elements
     90        %MacAyealHO elements
    9191        posP=find(data==5);
    9292        A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6);
     
    9696        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
    9797        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
    98         %PattynStokes elements
     98        %HOFS elements
    9999        PosPS=find(data==7);
    100100        A=elements(PosPS,1); B=elements(PosPS,2); C=elements(PosPS,3); D=elements(PosPS,4); E=elements(PosPS,5); F=elements(PosPS,6);
     
    104104        patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
    105105        patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
    106         %MacAyealStokes elements
     106        %MacAyealFS elements
    107107        PosMS=find(data==6);
    108108        A=elements(PosMS,1); B=elements(PosMS,2); C=elements(PosMS,3); D=elements(PosMS,4); E=elements(PosMS,5); F=elements(PosMS,6);
     
    122122
    123123        legend([p1 p2 p3 p4 p5 p6 p7 p8],...
    124                 'Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements',...
    125                 'MacAyealPattyn''s elements','PattynStokes''s elements','MacAyealStokes''s elements','None elements');
     124                'SIA''s elements','MacAyeal''s elements','HO''s elements','FS''s elements',...
     125                'MacAyealHO''s elements','HOFS''s elements','MacAyealFS''s elements','None elements');
    126126end
    127127
  • issm/trunk-jpl/src/m/plot/plot_penalties.m

    r13730 r15564  
    4040                P2=plot3(x(md.penalties(i,:)),y(md.penalties(i,:)),z(md.penalties(i,:)),'bo-','LineWidth',2,'MarkerSize',8,'MarkerFaceColor','b');
    4141        end
    42         legend([P1 P2],'MacAyeal''s penalized nodes','Pattyn''s penalized nodes');
     42        legend([P1 P2],'MacAyeal''s penalized nodes','HO''s penalized nodes');
    4343end
    4444
  • issm/trunk-jpl/src/m/qmu/qmuresponse.m

    r15504 r15564  
    2828        m_dhu=models.dhu;
    2929        m_ds=models.ds;
    30         ishutter=m_dhu.parameters.ishutter;
    31         ismacayeal=m_dh.parameters.ismacayeal;
    32         ispattyn=m_dh.parameters.ispattyn;
    33         isstokes=m_ds.parameters.isstokes;
    34         if ishutter,
     30        isSIA=m_dhu.parameters.isSIA;
     31        isSSA=m_dh.parameters.isSSA;
     32        isHO=m_dh.parameters.isHO;
     33        isFS=m_ds.parameters.isFS;
     34        if isSIA,
    3535
    3636% for now, separate all segments from double array for parallel to make cells
     
    5858                end
    5959
    60         elseif ismacayeal || ispattyn,
     60        elseif isSSA || isHO,
    6161
    6262% for now, separate all segments from double array for parallel to make cells
     
    8484                end
    8585
    86         elseif isstokes,
     86        elseif isFS,
    8787
    8888% for now, separate all segments from double array for parallel to make cells
  • issm/trunk-jpl/src/m/solvers/stokesoptions.m

    r14610 r15564  
    1 function stokes=stokesoptions(varargin)
     1function FS=FSoptions(varargin)
    22%STOKESOPTIONS - return STOKES multi-physics solver petsc options
    33%
    44%   Usage:
    5 %      options=stokesoptions;
     5%      options=FSoptions;
    66
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
    9 stokes=struct();
     9FS=struct();
    1010
    11 %default stokes options
     11%default FS options
    1212PETSC_VERSION=petscversion();
    1313if PETSC_VERSION==2,
    14         error('stokesoptions error message: multi-physics options not supported in Petsc 2');
     14        error('FSoptions error message: multi-physics options not supported in Petsc 2');
    1515end
    1616if PETSC_VERSION==3,
    17         stokes.toolkit='petsc';
    18         stokes.mat_type=getfieldvalue(options,'mat_type','mpiaij');
    19         stokes.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
    20         stokes.ksp_type=getfieldvalue(options,'ksp_type','gmres');
    21         stokes.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
    22         stokes.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
    23         stokes.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
    24         stokes.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
    25         stokes.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
    26         stokes.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
    27         stokes.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
    28         stokes.issm_option_solver=getfieldvalue(options,'issm_option_solver','stokes');
     17        FS.toolkit='petsc';
     18        FS.mat_type=getfieldvalue(options,'mat_type','mpiaij');
     19        FS.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
     20        FS.ksp_type=getfieldvalue(options,'ksp_type','gmres');
     21        FS.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
     22        FS.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
     23        FS.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
     24        FS.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
     25        FS.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
     26        FS.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
     27        FS.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
     28        FS.issm_option_solver=getfieldvalue(options,'issm_option_solver','FS');
    2929end
  • issm/trunk-jpl/src/m/solvers/stokesoptions.py

    r14610 r15564  
    33from petscversion  import *
    44#}}}
    5 def stokesoptions(*args):
     5def FSoptions(*args):
    66        #STOKESOPTIONS - return STOKES multi-physics solver petsc options
    77        #
    88        #   Usage:
    9         #      options=stokesoptions;
     9        #      options=FSoptions;
    1010       
    1111        #retrieve options provided in varargin
     
    1313
    1414
    15         #default stokes options
     15        #default FS options
    1616        PETSC_VERSION=petscversion()
    1717
    1818        if PETSC_VERSION==2:
    19                 raise RuntimeError('stokesoptions error message: multi-physics options not supported in Petsc 2')
     19                raise RuntimeError('FSoptions error message: multi-physics options not supported in Petsc 2')
    2020        if PETSC_VERSION==3:
    2121                options=[['toolkit','petsc'],['mat_type','mpiaij'],['ksp_max_it',1000],['ksp_type','gmres'],['pc_type','fieldsplit'],['pc_field_split_type','schur'],\
    2222        ['fieldsplit_0_pc_type','hypre'],['fieldsplit_0_ksp_type','gmres'],['fieldsplit_0_pc_hypre_type','boomerang'],\
    23         ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','stokes']]
     23        ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','FS']]
    2424
    2525        #now, go through our arguments, and write over default options.
Note: See TracChangeset for help on using the changeset viewer.