Changeset 14796


Ignore:
Timestamp:
04/29/13 18:23:28 (12 years ago)
Author:
bdef
Message:

CHG: Hydrologydc have now several ways of fixing the inefficient laer upper limit

Location:
issm/trunk-jpl/src/c
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/objects/Elements/Element.h

    r14761 r14796  
    125125                virtual void   InputControlUpdate(IssmDouble scalar,bool save_parameter)=0;
    126126                #endif
     127
     128                #ifdef _HAVE_HYDROLOGY_
     129                virtual void  GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode)=0;
     130                #endif
    127131};
    128132#endif
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp

    r14763 r14796  
    93399339/*}}}*/
    93409340#endif
     9341#ifdef _HAVE_HYDROLOGY_
     9342/*FUNCTION Penta::GetHydrologyDCInefficientHmax{{{*/
     9343void  Penta::GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode){
     9344        _error_("Hydrological stuff not suported in Penta");
     9345}
     9346/*}}}*/
     9347#endif
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h

    r14761 r14796  
    305305                #ifdef _HAVE_HYDROLOGY_
    306306                void    CreateHydrologyWaterVelocityInput(void);
     307                void    GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode);
    307308                #endif
    308309                #ifdef _HAVE_THERMAL_
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp

    r14783 r14796  
    63386338}
    63396339/*}}}*/
     6340/*FUNCTION Tria::GetHydrologyDCInefficientHmax{{{*/
     6341void  Tria::GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode){
     6342
     6343                int        hmax_flag;
     6344                IssmDouble h_max;
     6345                IssmDouble gravity,rho_ice,rho_water;
     6346                IssmDouble thickness,bed;
     6347
     6348                /*Get the flag to the limitation method*/
     6349                this->parameters->FindParam(&hmax_flag,HydrologydcSedimentlimitFlagEnum);
     6350                /*Switch between the different cases*/
     6351                switch(hmax_flag){
     6352                        case 0:
     6353                                h_max=1.0e+10;
     6354                                break;
     6355                        case 1:
     6356                                parameters->FindParam(&h_max,HydrologydcSedimentlimitEnum);
     6357                                break;
     6358                        case 2:
     6359                                gravity=matpar->GetG();
     6360                                rho_ice=matpar->GetRhoIce();
     6361                                rho_water=matpar->GetRhoFreshwater();
     6362                                this->GetInputValue(&thickness,innode,ThicknessEnum);
     6363                                this->GetInputValue(&bed,innode,BedEnum);
     6364                                h_max=((rho_ice*gravity*thickness)/rho_water)+bed;
     6365                                break;
     6366                        case 3:
     6367                                _error_("Using normal stress  not supported yet");
     6368                                break;
     6369                        default:
     6370                                _error_("no case higher than 3 for SedimentlimitFlag");
     6371                }
     6372
     6373                /*Assign output pointer*/
     6374                *ph_max=h_max;
     6375
     6376}
     6377/*}}}*/
     6378
     6379
    63406380#endif
    63416381
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h

    r14782 r14796  
    197197                ElementVector* CreatePVectorPrognostic_DG(void);
    198198                ElementVector* CreatePVectorSlope(void);
    199                 IssmDouble         GetArea(void);
     199                IssmDouble     GetArea(void);
    200200                int            GetElementType(void);
    201201                void             GetDofList(int** pdoflist,int approximation_enum,int setenum);
     
    253253                void      InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution);
    254254                void      InputUpdateFromSolutionHydrologyDCEfficient(IssmDouble* solution);
     255                void    GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode);
    255256                #endif
    256257                #ifdef _HAVE_BALANCED_
  • issm/trunk-jpl/src/c/classes/objects/Loads/Pengrid.cpp

    r14769 r14796  
    707707        /*Get sediment water head h*/
    708708        element->GetInputValue(&h,node,SedimentHeadEnum);
    709         h_max=10000;
     709        element->GetHydrologyDCInefficientHmax(&h_max,node);
     710        /*printf("hmax %i \n",h_max);*/
    710711
    711712        if (h>h_max)
  • issm/trunk-jpl/src/c/classes/objects/Materials/Matpar.cpp

    r14784 r14796  
    6565                iomodel->Constant(&this->water_compressibility,HydrologydcWaterCompressibilityEnum);
    6666                iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum);
     67               
    6768
    6869                if(isefficientlayer){
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateParametersHydrologyDCInefficient.cpp

    r14769 r14796  
    1616        Parameters *parameters = NULL;
    1717        int         hydrology_model;
     18        int         sedimentlimit_flag;
    1819        bool        isefficientlayer;
     20        IssmDouble  sedimentlimit;
    1921
    2022        /*Get parameters: */
     
    3133
    3234        iomodel->FetchData(&isefficientlayer,HydrologydcIsefficientlayerEnum);
     35        iomodel->FetchData(&sedimentlimit_flag,HydrologydcSedimentlimitFlagEnum);
     36       
     37        if(sedimentlimit_flag==1){
     38                iomodel->FetchData(&sedimentlimit,HydrologydcSedimentlimitEnum);
     39                parameters->AddObject(new DoubleParam(HydrologydcSedimentlimitEnum,sedimentlimit));
     40        }
     41
    3342        parameters->AddObject(new IntParam(HydrologyEnum,hydrology_model));
    3443        parameters->AddObject(new BoolParam(HydrologydcIsefficientlayerEnum,isefficientlayer));
     44        parameters->AddObject(new IntParam(HydrologydcSedimentlimitFlagEnum,sedimentlimit_flag));
    3545
    3646        /*Assign output pointer: */
Note: See TracChangeset for help on using the changeset viewer.