Changeset 17351


Ignore:
Timestamp:
02/26/14 09:45:36 (11 years ago)
Author:
bdef
Message:

BUG: fixing analysis related bug in hydrology

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

Legend:

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

    r17349 r17351  
    4848                }
    4949        }
    50 
    5150        iomodel->FetchDataToInput(elements,ThicknessEnum);
    52         iomodel->FetchDataToInput(elements,SurfaceEnum);
    5351        iomodel->FetchDataToInput(elements,BedEnum);
    5452        iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum);
    5553        iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
    56         iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum);
    5754        iomodel->FetchDataToInput(elements,EplHeadEnum);
    5855        iomodel->FetchDataToInput(elements,SedimentHeadEnum);
     
    6057        iomodel->FetchDataToInput(elements,HydrologydcSedimentTransmitivityEnum);
    6158
    62         //      iomodel->FetchDataToInput(elements,HydrologydcMaskEplactiveNodeEnum);
     59        iomodel->FetchDataToInput(elements,HydrologydcMaskEplactiveNodeEnum);
    6360       
    6461        elements->InputDuplicate(HydrologydcEplInitialThicknessEnum,HydrologydcEplThicknessEnum);
     
    131128
    132129        /*Check that all nodes are active, else return empty matrix*/
    133         if(!basalelement->AllActive()) {
     130        if(!basalelement->AllActive()) { /*This could probably replaced by active elt mask*/
    134131        if(meshtype!=Mesh2DhorizontalEnum){
    135132                        basalelement->DeleteMaterials();
     
    327324       
    328325        IssmDouble* eplHeads    = xNew<IssmDouble>(numnodes);
    329         IssmDouble* eplOldHeads    = xNew<IssmDouble>(numnodes);
    330 
    331         /*Get previous water head*/
    332         basalelement->GetInputListOnNodes(&eplOldHeads[0],EplHeadEnum);
    333326
    334327        /*Use the dof list to index into the solution vector: */
     
    347340        if(meshtype!=Mesh2DhorizontalEnum){basalelement->DeleteMaterials(); delete basalelement;};
    348341} /*}}}*/
     342
    349343void HydrologyDCEfficientAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
    350344        /*Default, do nothing*/
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp

    r17349 r17351  
    137137                                delete analysis;
    138138                        }
    139                        
    140139                        sedconverged=false;
    141140                       
     
    175174                        EplConv=1.0;
    176175
     176
    177177                        for(;;){
    178178                                eplconverged=false;
     
    181181
    182182                                /* {{{ *//*Retriev the EPL head slopes and compute EPL Thickness*/
    183                                         if(VerboseSolution()) _printf0_("computing EPL Head slope...\n");
    184                                         femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum);
    185                                         femmodel->UpdateConstraintsL2ProjectionEPLx();
    186                                         femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum);
    187                                         solutionsequence_linear(femmodel);
    188                                         femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum);
    189                                         solutionsequence_linear(femmodel);
    190                                         femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum);
    191                                         femmodel->HydrologyEPLThicknessx();
    192                                        
    193                                         //updating mask after the computation of the epl thickness (Allow to close too thin EPL)
    194                                         femmodel->HydrologyEPLupdateDomainx();
    195 
    196                                         HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis();
    197                                         analysis->ElementizeEplMask(femmodel);
    198                                         delete analysis;
    199                                         /* }}} */
     183                                if(VerboseSolution()) _printf0_("computing EPL Head slope...\n");
     184                                femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum);
     185                                femmodel->UpdateConstraintsL2ProjectionEPLx();
     186                                femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum);
     187                                solutionsequence_linear(femmodel);
     188                                femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum);
     189                                solutionsequence_linear(femmodel);
     190                                femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum);
     191                                femmodel->HydrologyEPLThicknessx();
     192                               
     193                                //updating mask after the computation of the epl thickness (Allow to close too thin EPL)
     194                                femmodel->HydrologyEPLupdateDomainx();
     195                               
     196                                HydrologyDCInefficientAnalysis* analysis = new HydrologyDCInefficientAnalysis();
     197                                analysis->ElementizeEplMask(femmodel);
     198                                delete analysis;
     199                                /* }}} */
    200200                                       
    201201                                if(VerboseSolution()) _printf0_("Building EPL Matrix...\n");
     
    283283        }
    284284        /* }}} */
     285        if(isefficientlayer)InputUpdateFromSolutionx(femmodel,ug_epl);
     286        femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum);
    285287        InputUpdateFromSolutionx(femmodel,ug_sed);
    286         if(isefficientlayer)InputUpdateFromSolutionx(femmodel,ug_epl);
    287288        /*Free ressources: */
    288289        delete ug_epl;
Note: See TracChangeset for help on using the changeset viewer.