Ignore:
Timestamp:
11/08/13 11:50:50 (11 years ago)
Author:
bdef
Message:

Adding stuff to compute Epl slopes only on active EPL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r16681 r16685  
    481481          case HydrologyDCEfficientAnalysisEnum:
    482482                        return CreateKMatrixHydrologyDCEfficient();
     483                        break;
     484          case L2ProjectionEPLAnalysisEnum:
     485                        return CreateEPLDomainMassMatrix();
    483486                        break;
    484487                #endif
     
    697700                        return CreatePVectorHydrologyDCEfficient();
    698701                        break;
     702          case L2ProjectionEPLAnalysisEnum:
     703                        return CreatePVectorL2ProjectionEPL();
     704                        break;
    699705                #endif
    700706                default:
     
    22582264        case HydrologyDCEfficientAnalysisEnum:
    22592265                InputUpdateFromSolutionOneDofCollapsed(solution,EplHeadEnum);
     2266                break;
     2267        case L2ProjectionEPLAnalysisEnum:
     2268                this->parameters->FindParam(&inputenum,InputToL2ProjectEnum);
     2269                InputUpdateFromSolutionOneDofCollapsed(solution,inputenum);
    22602270                break;
    22612271        #endif
     
    1062210632}
    1062310633/*}}}*/
     10634/*FUNCTION Penta::CreateEPLDomainMassMatrix {{{*/
     10635ElementMatrix* Penta::CreateEPLDomainMassMatrix(void){
     10636
     10637        if (!IsOnBed()) return NULL;
     10638
     10639        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
     10640        ElementMatrix* Ke=tria->CreateEPLDomainMassMatrix();
     10641        delete tria->material; delete tria;
     10642
     10643        /*clean up and return*/
     10644        return Ke;
     10645}
     10646/*}}}*/
    1062410647/*FUNCTION Penta::CreatePVectorHydrologyDCInefficient {{{*/
    1062510648ElementVector* Penta::CreatePVectorHydrologyDCInefficient(void){
     
    1064410667        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1064510668        ElementVector* pe=tria->CreatePVectorHydrologyDCEfficient();
     10669        delete tria->material; delete tria;
     10670
     10671        /*Clean up and return*/
     10672        return pe;
     10673}
     10674/*}}}*/
     10675/*FUNCTION Penta::CreatePVectorL@ProjectionEPL {{{*/
     10676ElementVector* Penta::CreatePVectorL2ProjectionEPL(void){
     10677
     10678        if (!IsOnBed()) return NULL;
     10679
     10680        /*Call Tria function*/
     10681        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
     10682        ElementVector* pe=tria->CreatePVectorL2ProjectionEPL();
    1064610683        delete tria->material; delete tria;
    1064710684
     
    1077510812                                /*Compute first the effective pressure in the EPL*/
    1077610813                                EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i])));
    10777                                
     10814                                if(EPL_N<0.0)EPL_N=0.0;
    1077810815                                /*Get then the gradient of EPL heads*/
    1077910816                                EPLgrad = epl_slopeX[i]+epl_slopeY[i];
    1078010817                               
    1078110818                                /*And proceed to the real thing*/
    10782                                 thickness[i] = old_thickness[i]*(1-((rho_water*gravity*dt)/(rho_ice* latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*EPL_N);
     10819                                thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
    1078310820                                thickness[i+numdof2d]=thickness[i];
     10821                                printf("N, %e - thick term2, %e \n",EPL_N,-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
     10822                                printf("old thick, %e - thick , %e \n",old_thickness[i],thickness[i]);
    1078410823                        }
    1078510824                }
     
    1086610905        /*Free ressources:*/
    1086710906        xDelete<int>(doflist);
     10907}
     10908/*}}}*/
     10909/*FUNCTION Penta::UpdateConstraintsL2ProjectionEPL{{{*/
     10910void  Penta::UpdateConstraintsL2ProjectionEPL(void){
     10911
     10912        IssmDouble activeEpl[NUMVERTICES];
     10913
     10914
     10915        if(!IsOnBed()){
     10916                for(int i=0;i<this->NumberofNodes();i++)this->nodes[i]->Deactivate();
     10917        }
     10918        else{
     10919                GetInputListOnVertices(&activeEpl[0],HydrologydcMaskEplactiveEnum);
     10920                for(int i=0;i<3;i++){
     10921                        if(!activeEpl[i])this->nodes[i]->Deactivate();
     10922                }
     10923        }
    1086810924}
    1086910925/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.