Changeset 16685 for issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
- Timestamp:
- 11/08/13 11:50:50 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16681 r16685 481 481 case HydrologyDCEfficientAnalysisEnum: 482 482 return CreateKMatrixHydrologyDCEfficient(); 483 break; 484 case L2ProjectionEPLAnalysisEnum: 485 return CreateEPLDomainMassMatrix(); 483 486 break; 484 487 #endif … … 697 700 return CreatePVectorHydrologyDCEfficient(); 698 701 break; 702 case L2ProjectionEPLAnalysisEnum: 703 return CreatePVectorL2ProjectionEPL(); 704 break; 699 705 #endif 700 706 default: … … 2258 2264 case HydrologyDCEfficientAnalysisEnum: 2259 2265 InputUpdateFromSolutionOneDofCollapsed(solution,EplHeadEnum); 2266 break; 2267 case L2ProjectionEPLAnalysisEnum: 2268 this->parameters->FindParam(&inputenum,InputToL2ProjectEnum); 2269 InputUpdateFromSolutionOneDofCollapsed(solution,inputenum); 2260 2270 break; 2261 2271 #endif … … 10622 10632 } 10623 10633 /*}}}*/ 10634 /*FUNCTION Penta::CreateEPLDomainMassMatrix {{{*/ 10635 ElementMatrix* 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 /*}}}*/ 10624 10647 /*FUNCTION Penta::CreatePVectorHydrologyDCInefficient {{{*/ 10625 10648 ElementVector* Penta::CreatePVectorHydrologyDCInefficient(void){ … … 10644 10667 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10645 10668 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 {{{*/ 10676 ElementVector* 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(); 10646 10683 delete tria->material; delete tria; 10647 10684 … … 10775 10812 /*Compute first the effective pressure in the EPL*/ 10776 10813 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; 10778 10815 /*Get then the gradient of EPL heads*/ 10779 10816 EPLgrad = epl_slopeX[i]+epl_slopeY[i]; 10780 10817 10781 10818 /*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))); 10783 10820 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]); 10784 10823 } 10785 10824 } … … 10866 10905 /*Free ressources:*/ 10867 10906 xDelete<int>(doflist); 10907 } 10908 /*}}}*/ 10909 /*FUNCTION Penta::UpdateConstraintsL2ProjectionEPL{{{*/ 10910 void 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 } 10868 10924 } 10869 10925 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.