Changeset 28155


Ignore:
Timestamp:
03/15/24 09:29:34 (13 months ago)
Author:
poinelli
Message:

CHG: edit GetGroundedPart functions in c/classes/Elements/ to accomodate sub-element melt parameterization when using IntrusionMelt module

Location:
issm/trunk-jpl
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp

    r28119 r28155  
    424424        Gauss*      gauss     = NULL;
    425425        if(melt_style==SubelementMelt2Enum){
    426                 basalelement->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     426                basalelement->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    427427                gauss = basalelement->NewGauss(point1,fraction1,fraction2,3);
    428428        }
    429429        if(melt_style==IntrusionMeltEnum){
    430                 basalelement->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     430                basalelement->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,DistanceToGroundinglineEnum,intrusiondist);
    431431                gauss = basalelement->NewGauss(point1,fraction1,fraction2,3);
    432432        }
  • issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp

    r28119 r28155  
    670670        phi=element->GetGroundedPortion(xyz_list);
    671671        if(melt_style==SubelementMelt2Enum){
    672                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     672                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    673673            gauss = element->NewGauss(point1,fraction1,fraction2,3);
    674674        }
    675675        else if(melt_style==IntrusionMeltEnum){
    676             element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
    677        gauss = element->NewGauss(point1,fraction1,fraction2,3);
     676                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,DistanceToGroundinglineEnum,intrusiondist);
     677        gauss = element->NewGauss(point1,fraction1,fraction2,3);
    678678        }
    679679        else{
     
    804804   phi=element->GetGroundedPortion(xyz_list);
    805805   if(melt_style==SubelementMelt2Enum){
    806       element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     806      element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    807807      gauss = element->NewGauss(point1,fraction1,fraction2,3);
    808808   }
    809809   else if(melt_style==IntrusionMeltEnum){
    810             element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     810            element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,DistanceToGroundinglineEnum,intrusiondist);
    811811       gauss = element->NewGauss(point1,fraction1,fraction2,3);
    812812        }
     
    11451145        phi=element->GetGroundedPortion(xyz_list);
    11461146        if(melt_style==SubelementMelt2Enum){
    1147                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     1147                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    11481148           gauss = element->NewGauss(point1,fraction1,fraction2,3);
    11491149        }
  • issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

    r27470 r28155  
    13661366        if(friction_style==SubelementFriction2Enum){
    13671367                gllevelset_input=element->GetInput(MaskOceanLevelsetEnum); _assert_(gllevelset_input);
    1368                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     1368                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating, MaskOceanLevelsetEnum,0);
    13691369           gauss = element->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
    13701370        }
     
    16461646        int ig=-1;// needed for driving stress parameterization
    16471647        if(partly_floating){
    1648                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     1648                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating, MaskOceanLevelsetEnum,0);
    16491649           gauss=element->NewGauss(point1,fraction1,fraction2,3); //considering the entire element
    16501650                gauss_subelem=element->NewGauss(fraction1,fraction2,3);//gauss on each subelement
     
    26822682        if(friction_style==SubelementFriction2Enum){
    26832683                gllevelset_input=element->GetInput(MaskOceanLevelsetEnum); _assert_(gllevelset_input);
    2684                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     2684                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    26852685           gauss = element->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
    26862686        }
     
    33103310        if(friction_style==SubelementFriction2Enum){
    33113311                gllevelset_input=element->GetInput(MaskOceanLevelsetEnum); _assert_(gllevelset_input);
    3312                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     3312                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating, MaskOceanLevelsetEnum,0);
    33133313                gauss = element->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
    33143314        }
     
    50295029                if(domaintype==Domain2DverticalEnum) _error_("Subelement Friction 2 not implemented yet for Flowline");
    50305030                gllevelset_input=element->GetInput(MaskOceanLevelsetEnum); _assert_(gllevelset_input);
    5031                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     5031                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating, MaskOceanLevelsetEnum,0);
    50325032                //gauss = element->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
    50335033                gauss=element->NewGaussBase(3);
     
    52675267                if(domaintype==Domain2DverticalEnum) _error_("Subelement Friction 2 not implemented yet for Flowline");
    52685268                gllevelset_input=element->GetInput(MaskOceanLevelsetEnum); _assert_(gllevelset_input);
    5269                 element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     5269                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating, MaskOceanLevelsetEnum,0);
    52705270                gauss=element->NewGaussBase(3);
    52715271        }
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r27960 r28155  
    273273                virtual int        GetElementType(void)=0;
    274274                virtual IssmDouble GetHorizontalSurfaceArea(void){_error_("not implemented");};
    275                 virtual void       GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating)=0;
     275                virtual void       GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating,int distance_enum, IssmDouble intrusion_distance)=0;
    276276                virtual IssmDouble GetGroundedPortion(IssmDouble* xyz_list)=0;
    277277                virtual void        GetFractionGeometry(IssmDouble* weights, IssmDouble* pphi, int* ppoint1,IssmDouble* pfraction1,IssmDouble* pfraction2, bool* ptrapezeisnegative, IssmDouble* gl)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r28039 r28155  
    14341434}
    14351435/*}}}*/
    1436 void       Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){/*{{{*/
     1436void       Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating, int distance_enum, IssmDouble intrusion_distance){/*{{{*/
    14371437        /*Computeportion of the element that is grounded*/
    14381438
    14391439        bool               floating=true;
    1440         int                point;
     1440        int                point, i;
    14411441        const IssmPDouble  epsilon= 1.e-15;
    14421442        IssmDouble         gl[NUMVERTICES];
     
    14441444
    14451445        /*Recover parameters and values*/
    1446         Element::GetInputListOnVertices(&gl[0],MaskOceanLevelsetEnum);
     1446        Element::GetInputListOnVertices(&gl[0],distance_enum);
     1447
     1448        /*Determine where to apply sub-element melt using intrusion distance*/
     1449        for (i; i<NUMVERTICES; i++){
     1450                gl[i] -= intrusion_distance;
     1451        }
    14471452
    14481453        /*Be sure that values are not zero*/
     
    42494254        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    42504255
    4251         this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     4256        this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    42524257        /* Start  looping on the number of gaussian points: */
    42534258        gauss = this->NewGauss(point1,fraction1,fraction2,1-mainlyfloating,3);
     
    42924297        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    42934298
    4294         this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     4299        this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    42954300        /* Start  looping on the number of gaussian points: */
    42964301        gauss = this->NewGauss(point1,fraction1,fraction2,mainlyfloating,3);
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r28039 r28155  
    8686                Penta*         GetBasalPenta(void);
    8787                int            GetElementType(void);
    88                 void           GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating);
     88                void           GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating, int distance_enum, IssmDouble intrusion_distance);
    8989                IssmDouble     GetGroundedPortion(IssmDouble* xyz_list);
    9090                void           GetFractionGeometry(IssmDouble* weights, IssmDouble* pphi, int* ppoint1,IssmDouble* pfraction1,IssmDouble* pfraction2, bool* ptrapezeisnegative, IssmDouble* gl){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r27852 r28155  
    6262                Element*    GetBasalElement(void){_error_("not implemented yet");};
    6363                int         GetElementType(void){_error_("not implemented yet");};
    64                 void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");};
     64                void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating, int distance_enum, IssmDouble intrusion_distance){_error_("not implemented yet");};
    6565                IssmDouble  GetGroundedPortion(IssmDouble* xyz_list);
    6666                void        GetFractionGeometry(IssmDouble* weights, IssmDouble* pphi, int* ppoint1,IssmDouble* pfraction1,IssmDouble* pfraction2, bool* ptrapezeisnegative, IssmDouble* gl){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.h

    r27852 r28155  
    6767                Element*    GetBasalElement(void){_error_("not implemented yet");};
    6868                int         GetElementType(void);
    69                 void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");};
     69                void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating, int distance_enum, IssmDouble intrusion_distance){_error_("not implemented yet");};
    7070                IssmDouble  GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");};
    7171                void        GetFractionGeometry(IssmDouble* weights, IssmDouble* pphi, int* ppoint1,IssmDouble* pfraction1,IssmDouble* pfraction2, bool* ptrapezeisnegative, IssmDouble* gl){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r28096 r28155  
    20532053}
    20542054/*}}}*/
    2055 void       Tria::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* pmainlyfloating){/*{{{*/
    2056         /*Computeportion of the element that is grounded*/
     2055void       Tria::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* pmainlyfloating, int distance_enum, IssmDouble intrusion_distance){/*{{{*/
     2056        /*Compute portion of the element that is grounded*/
    20572057
    20582058        bool               floating=true;
    2059         int                point;
     2059        int                point, i;
    20602060        const IssmPDouble  epsilon= 1.e-15;
    20612061        IssmDouble         gl[NUMVERTICES];
     
    20632063
    20642064        /*Recover parameters and values*/
    2065         Element::GetInputListOnVertices(&gl[0],MaskOceanLevelsetEnum);
     2065        Element::GetInputListOnVertices(&gl[0],distance_enum);
     2066       
     2067        /*Determine where to apply sub-element melt using intrusion distance*/
     2068        for (i; i<NUMVERTICES; i++){
     2069                gl[i] -= intrusion_distance;
     2070        }
    20662071
    20672072        /*Be sure that values are not zero*/
     
    57615766        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    57625767
    5763         this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     5768        this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    57645769        /* Start  looping on the number of gaussian points: */
    57655770        gauss = this->NewGauss(point1,fraction1,fraction2,1-mainlyfloating,3);
     
    58045809        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    58055810
    5806         this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
     5811        this->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating,MaskOceanLevelsetEnum,0);
    58075812        /* Start  looping on the number of gaussian points: */
    58085813        gauss = this->NewGauss(point1,fraction1,fraction2,mainlyfloating,2);
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r27852 r28155  
    8989                Element*    GetBasalElement(void){_error_("not implemented yet");};
    9090                void        GetLevelsetPositivePart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlynegative,IssmDouble* levelsetvalues);
    91                 void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating);
     91                void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating, int distance_enum, IssmDouble intrusion_distance);
    9292                IssmDouble  GetGroundedPortion(IssmDouble* xyz_list);
    9393                void        GetFractionGeometry(IssmDouble* weights, IssmDouble* pphi, int* ppoint1,IssmDouble* pfraction1,IssmDouble* pfraction2, bool* ptrapezeisnegative, IssmDouble* gl);
Note: See TracChangeset for help on using the changeset viewer.