Changeset 21203


Ignore:
Timestamp:
09/12/16 07:52:45 (9 years ago)
Author:
bdef
Message:

NEW:modification to shift Moulin input to EPL when opened

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

Legend:

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

    r20690 r21203  
    6464        iomodel->FetchDataToInput(elements,"md.initialization.sediment_head",SedimentHeadEnum);
    6565        iomodel->FetchDataToInput(elements,"md.initialization.epl_thickness",HydrologydcEplThicknessEnum);
    66                 if(iomodel->domaintype!=Domain2DhorizontalEnum){
     66        iomodel->FetchDataToInput(elements,"md.hydrology.basal_moulin_input",HydrologydcBasalMoulinInputEnum);
     67        if(iomodel->domaintype!=Domain2DhorizontalEnum){
    6768                iomodel->FetchDataToInput(elements,"md.mesh.vertexonbase",MeshVertexonbaseEnum);
    6869                iomodel->FetchDataToInput(elements,"md.mesh.vertexonsurface",MeshVertexonsurfaceEnum);
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp

    r20827 r21203  
    202202        case HydrologyDCInefficientAnalysisEnum:
    203203                pe = CreatePVectorHydrologyDCInefficient();
     204                break;
     205        case HydrologyDCEfficientAnalysisEnum:
     206                pe = CreatePVectorHydrologyDCEfficient();
    204207                break;
    205208        default:
     
    558561ElementVector* Pengrid::CreatePVectorHydrologyDCInefficient(void){/*{{{*/
    559562
     563        bool active_element,isefficientlayer;
    560564        IssmDouble moulin_load,dt;
     565        IssmDouble epl_active;
    561566
    562567        /*Initialize Element matrix*/
     568        ElementVector* pe=new ElementVector(&node,1,this->parameters);
     569
     570        this->element->GetInputValue(&moulin_load,node,HydrologydcBasalMoulinInputEnum);
     571        parameters->FindParam(&dt,TimesteppingTimeStepEnum);
     572        parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
     573
     574
     575        // Test version input in EPL when active
     576        if(isefficientlayer){
     577                this->element->GetInputValue(&epl_active,node,HydrologydcMaskEplactiveNodeEnum);
     578                if(epl_active){
     579                        pe->values[0]=moulin_load*0.0;
     580                }
     581                else{
     582                        if(dt!=0.0) pe->values[0]=moulin_load*dt;
     583                }
     584        }
     585        else{
     586                        if(dt!=0.0) pe->values[0]=moulin_load*dt;
     587        }
     588
     589        //Initial treatment, allways input in sediment
     590        /* if(dt!=0.0) pe->values[0]=moulin_load*dt; */
     591
     592        /*Clean up and return*/
     593        return pe;
     594 }
     595/*}}}*/
     596ElementVector* Pengrid::CreatePVectorHydrologyDCEfficient(void){/*{{{*/
     597
     598        IssmDouble moulin_load,dt;
     599
     600        /*Initialize Element matrix*/
     601        if(!this->active) return NULL;
    563602        ElementVector* pe=new ElementVector(&node,1,this->parameters);
    564603
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.h

    r20827 r21203  
    8888                void           ConstraintActivateThermal(int* punstable);
    8989                ElementVector* CreatePVectorHydrologyDCInefficient(void);
     90                ElementVector* CreatePVectorHydrologyDCEfficient(void);
    9091                ElementMatrix* PenaltyCreateKMatrixHydrologyDCInefficient(IssmDouble kmax);
    9192                ElementMatrix* PenaltyCreateKMatrixMelting(IssmDouble kmax);
Note: See TracChangeset for help on using the changeset viewer.