Changeset 16685
- Timestamp:
- 11/08/13 11:50:50 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r16675 r16685 465 465 ./analyses/HydrologyShreveAnalysis.h\ 466 466 ./analyses/HydrologyShreveAnalysis.cpp\ 467 ./analyses/L2ProjectionEPLAnalysis.h\ 468 ./analyses/L2ProjectionEPLAnalysis.cpp\ 467 469 ./cores/hydrology_core.cpp\ 468 470 ./solutionsequences/solutionsequence_hydro_nonlinear.cpp -
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.cpp
r16534 r16685 20 20 case BalancevelocityAnalysisEnum : return new BalancevelocityAnalysis(); 21 21 case L2ProjectionBaseAnalysisEnum : return new L2ProjectionBaseAnalysis(); 22 case L2ProjectionEPLAnalysisEnum : return new L2ProjectionEPLAnalysis(); 22 23 case DamageEvolutionAnalysisEnum : return new DamageEvolutionAnalysis(); 23 24 case StressbalanceAnalysisEnum : return new StressbalanceAnalysis(); -
issm/trunk-jpl/src/c/analyses/analyses.h
r16534 r16685 32 32 #include "./StressbalanceVerticalAnalysis.h" 33 33 #include "./L2ProjectionBaseAnalysis.h" 34 #include "./L2ProjectionEPLAnalysis.h" 34 35 #include "./ThermalAnalysis.h" 35 36 #include "EnumToAnalysis.h" 36 #include "./EnumToAnalysis.h" 37 37 #endif -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16681 r16685 154 154 virtual void HydrologyEPLGetActive(Vector<IssmDouble>* active)=0; 155 155 virtual void ComputeEPLThickness(void)=0; 156 virtual void UpdateConstraintsL2ProjectionEPL(void)=0; 156 157 #endif 157 158 -
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 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16681 r16685 325 325 ElementMatrix* CreateKMatrixHydrologyDCInefficient(void); 326 326 ElementMatrix* CreateKMatrixHydrologyDCEfficient(void); 327 ElementMatrix* CreateEPLDomainMassMatrix(void); 327 328 ElementVector* CreatePVectorHydrologyDCInefficient(void); 328 329 ElementVector* CreatePVectorHydrologyDCEfficient(void); 329 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 330 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); 331 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec); 332 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask); 333 void InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution); 334 void ComputeEPLThickness(void); 330 ElementVector* CreatePVectorL2ProjectionEPL(void); 331 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 332 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); 333 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec); 334 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask); 335 void InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution); 336 void ComputeEPLThickness(void); 337 void UpdateConstraintsL2ProjectionEPL(void); 335 338 #endif 336 339 -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16681 r16685 117 117 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask){_error_("not implemented yet");}; 118 118 void ComputeEPLThickness(void){_error_("not implemented yet");}; 119 void UpdateConstraintsL2ProjectionEPL(){_error_("not implemented");}; 119 120 #endif 120 121 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16681 r16685 288 288 case HydrologyDCEfficientAnalysisEnum: 289 289 return CreateKMatrixHydrologyDCEfficient(); 290 break; 291 case L2ProjectionEPLAnalysisEnum: 292 return CreateEPLDomainMassMatrix(); 290 293 break; 291 294 #endif … … 513 516 return CreatePVectorHydrologyDCEfficient(); 514 517 break; 518 case L2ProjectionEPLAnalysisEnum: 519 return CreatePVectorL2ProjectionEPL(); 520 break; 515 521 #endif 516 522 #ifdef _HAVE_BALANCED_ … … 586 592 case BedSlopeXEnum: input2 = inputs->GetInput(BedEnum); _assert_(input2); break; 587 593 case BedSlopeYEnum: input2 = inputs->GetInput(BedEnum); _assert_(input2); break; 588 case EplHeadSlopeXEnum: input2 = inputs->GetInput(EplHeadEnum); _assert_(input2); break;589 case EplHeadSlopeYEnum: input2 = inputs->GetInput(EplHeadEnum); _assert_(input2); break;590 594 default: input = inputs->GetInput(input_enum); 591 595 } … … 602 606 if(input2) input2->GetInputDerivativeValue(&slopes[0],&xyz_list[0][0],gauss); 603 607 switch(input_enum){ 604 case SurfaceSlopeXEnum: case BedSlopeXEnum: case EplHeadSlopeXEnum:value = slopes[0]; break;605 case SurfaceSlopeYEnum: case BedSlopeYEnum: case EplHeadSlopeYEnum:value = slopes[1]; break;608 case SurfaceSlopeXEnum: case BedSlopeXEnum: value = slopes[0]; break; 609 case SurfaceSlopeYEnum: case BedSlopeYEnum: value = slopes[1]; break; 606 610 default: input->GetInputValue(&value,gauss); 607 611 } … … 1784 1788 InputUpdateFromSolutionOneDof(solution,EplHeadEnum); 1785 1789 break; 1790 case L2ProjectionEPLAnalysisEnum: 1791 this->parameters->FindParam(&extrusioninput,InputToL2ProjectEnum); 1792 InputUpdateFromSolutionOneDof(solution,extrusioninput); 1793 break; 1786 1794 #endif 1787 1795 #ifdef _HAVE_DAMAGE_ … … 2901 2909 } 2902 2910 /*}}}*/ 2903 2911 /*FUNCTION Tria::UpdateConstraintsL2ProjectionEPL{{{*/ 2912 void Tria::UpdateConstraintsL2ProjectionEPL(void){ 2913 2914 IssmDouble activeEpl[NUMVERTICES]; 2915 2916 GetInputListOnVertices(&activeEpl[0],HydrologydcMaskEplactiveEnum); 2917 for(int i=0;i<NUMVERTICES;i++){ 2918 if(!activeEpl[i])this->nodes[i]->Deactivate(); 2919 } 2920 } 2921 /*}}}*/ 2904 2922 #ifdef _HAVE_RESPONSES_ 2905 2923 /*FUNCTION Tria::AverageOntoPartition {{{*/ … … 6683 6701 } 6684 6702 /*}}}*/ 6703 6704 /*FUNCTION Tria::CreatEPLDomainMassMatrix {{{*/ 6705 ElementMatrix* Tria::CreateEPLDomainMassMatrix(void){ 6706 6707 /* Intermediaries */ 6708 IssmDouble D,Jdet; 6709 IssmDouble xyz_list[NUMVERTICES][3]; 6710 6711 /*Fetch number of nodes and dof for this finite element*/ 6712 int numnodes = this->NumberofNodes(); 6713 6714 /*Initialize Element matrix and vectors*/ 6715 ElementMatrix* Ke = new ElementMatrix(nodes,numnodes,this->parameters,NoneApproximationEnum); 6716 IssmDouble* basis = xNew<IssmDouble>(numnodes); 6717 6718 /*Retrieve all inputs and parameters*/ 6719 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6720 6721 /* Start looping on the number of gaussian points: */ 6722 GaussTria* gauss=new GaussTria(2); 6723 for(int ig=gauss->begin();ig<gauss->end();ig++){ 6724 6725 gauss->GaussPoint(ig); 6726 6727 GetNodalFunctions(basis,gauss); 6728 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 6729 D=gauss->weight*Jdet; 6730 6731 TripleMultiply(basis,1,numnodes,1, 6732 &D,1,1,0, 6733 basis,1,numnodes,0, 6734 &Ke->values[0],1); 6735 } 6736 6737 /*Clean up and return*/ 6738 delete gauss; 6739 xDelete<IssmDouble>(basis); 6740 return Ke; 6741 } 6742 /*}}}*/ 6685 6743 /*FUNCTION Tria::CreatePVectorHydrologyShreve {{{*/ 6686 6744 ElementVector* Tria::CreatePVectorHydrologyShreve(void){ … … 6708 6766 Input* basal_melting_input=inputs->GetInput(BasalforcingsMeltingRateEnum); _assert_(basal_melting_input); 6709 6767 Input* old_watercolumn_input=inputs->GetInput(WaterColumnOldEnum); _assert_(old_watercolumn_input); 6710 6711 6768 /*Initialize basal_melting_correction_g to 0, do not forget!:*/ 6712 6769 /* Start looping on the number of gaussian points: */ … … 6864 6921 residual_input->GetInputValue(&residual,gauss); 6865 6922 pe->values[iv]+=residual/connectivity; 6923 } 6924 6925 /*Clean up and return*/ 6926 xDelete<IssmDouble>(basis); 6927 delete gauss; 6928 return pe; 6929 } 6930 /*}}}*/ 6931 /*FUNCTION Tria::CreatePVectorL2ProjectionEPL {{{*/ 6932 ElementVector* Tria::CreatePVectorL2ProjectionEPL(void){ 6933 6934 /*Intermediaries */ 6935 int i,input_enum; 6936 IssmDouble Jdet,value; 6937 IssmDouble xyz_list[NUMVERTICES][3]; 6938 IssmDouble slopes[2]; 6939 Input* input = NULL; 6940 Input* input2 = NULL; 6941 6942 /*Fetch number of nodes and dof for this finite element*/ 6943 int numnodes = this->NumberofNodes(); 6944 6945 /*Initialize Element vector*/ 6946 ElementVector* pe = new ElementVector(nodes,numnodes,this->parameters); 6947 IssmDouble* basis = xNew<IssmDouble>(numnodes); 6948 6949 /*Retrieve all inputs and parameters*/ 6950 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6951 this->parameters->FindParam(&input_enum,InputToL2ProjectEnum); 6952 switch(input_enum){ 6953 case EplHeadSlopeXEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break; 6954 case EplHeadSlopeYEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break; 6955 default: input = inputs->GetInput(input_enum); 6956 } 6957 6958 /* Start looping on the number of gaussian points: */ 6959 GaussTria* gauss=new GaussTria(2); 6960 for(int ig=gauss->begin();ig<gauss->end();ig++){ 6961 6962 gauss->GaussPoint(ig); 6963 6964 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 6965 GetNodalFunctions(basis,gauss); 6966 6967 if(input2) input2->GetInputDerivativeValue(&slopes[0],&xyz_list[0][0],gauss); 6968 switch(input_enum){ 6969 case EplHeadSlopeXEnum: value = slopes[0]; break; 6970 case EplHeadSlopeYEnum: value = slopes[1]; break; 6971 default: input->GetInputValue(&value,gauss); 6972 } 6973 6974 for(i=0;i<numnodes;i++) pe->values[i]+=Jdet*gauss->weight*value*basis[i]; 6866 6975 } 6867 6976 … … 7127 7236 IssmDouble h_max; 7128 7237 IssmDouble sedheadmin; 7238 IssmDouble epl_thickness[numdof]; 7129 7239 IssmDouble old_active[numdof]; 7130 7240 IssmDouble sedhead[numdof]; … … 7133 7243 7134 7244 GetInputListOnVertices(&old_active[0],HydrologydcMaskEplactiveEnum); 7245 GetInputListOnVertices(&epl_thickness[0],HydrologydcEplThicknessEnum); 7135 7246 GetInputListOnVertices(&sedhead[0],SedimentHeadEnum); 7136 7247 GetInputListOnVertices(&eplhead[0],EplHeadEnum); … … 7149 7260 /*If mask was alread one, keep one*/ 7150 7261 else if(old_active[i]>0.){ 7151 vec_mask->SetValue(nodes[i]->Sid(),1.,INS_VAL); 7152 } 7153 7262 if(epl_thickness[i]>0.0){ 7263 vec_mask->SetValue(nodes[i]->Sid(),1.,INS_VAL); 7264 } 7265 else{ 7266 vec_mask->SetValue(nodes[i]->Sid(),0.,INS_VAL); 7267 } 7268 } 7154 7269 /*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/ 7155 7270 this->GetHydrologyDCInefficientHmax(&h_max,nodes[i]); … … 7217 7332 /*Compute first the effective pressure in the EPL*/ 7218 7333 EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i]))); 7219 7334 if(EPL_N<0.0)EPL_N=0.0; 7220 7335 /*Get then the gradient of EPL heads*/ 7221 7336 EPLgrad = epl_slopeX[i]+epl_slopeY[i]; 7222 7337 7223 7338 /*And proceed to the real thing*/ 7224 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);7225 7339 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))); 7340 if(this->nodes[i]->id==1553)printf("term1 %e, term2 %e\n",+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0), -2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n))); 7226 7341 } 7227 7342 } -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16681 r16685 301 301 ElementMatrix* CreateKMatrixHydrologyDCInefficient(void); 302 302 ElementMatrix* CreateKMatrixHydrologyDCEfficient(void); 303 ElementMatrix* CreateEPLDomainMassMatrix(void); 303 304 ElementVector* CreatePVectorHydrologyShreve(void); 304 305 ElementVector* CreatePVectorHydrologyDCInefficient(void); 305 306 ElementVector* CreatePVectorHydrologyDCEfficient(void); 306 void CreateHydrologyWaterVelocityInput(void); 307 void InputUpdateFromSolutionHydrology(IssmDouble* solution); 308 void InputUpdateFromSolutionHydrologyShreve(IssmDouble* solution); 309 void InputUpdateFromSolutionHydrologyDC(IssmDouble* solution); 310 void InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution); 311 void InputUpdateFromSolutionHydrologyDCEfficient(IssmDouble* solution); 312 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 313 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); 314 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec); 315 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask); 316 void ComputeEPLThickness(void); 317 bool AllActive(void); 318 bool AnyActive(void); 307 ElementVector* CreatePVectorL2ProjectionEPL(void); 308 void CreateHydrologyWaterVelocityInput(void); 309 void InputUpdateFromSolutionHydrology(IssmDouble* solution); 310 void InputUpdateFromSolutionHydrologyShreve(IssmDouble* solution); 311 void InputUpdateFromSolutionHydrologyDC(IssmDouble* solution); 312 void InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution); 313 void InputUpdateFromSolutionHydrologyDCEfficient(IssmDouble* solution); 314 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 315 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); 316 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec); 317 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask); 318 void ComputeEPLThickness(void); 319 void UpdateConstraintsL2ProjectionEPL(void); 320 bool AllActive(void); 321 bool AnyActive(void); 319 322 #endif 320 323 -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r16600 r16685 261 261 * analyses. For example: do a SurfaceSlopeX, SurfaceSlopeY, BedSlopeX and BedSlopeY analysis using the 262 262 * Slope configuration.*/ 263 264 263 int found=-1; 265 264 for(int i=0;i<nummodels;i++){ 265 266 266 if (analysis_type_list[i]==configuration_type){ 267 267 found=i; … … 1420 1420 } 1421 1421 /*}}}*/ 1422 #endif 1422 1423 void FemModel::UpdateConstraintsL2ProjectionEPLx(void){ /*{{{*/ 1424 1425 for(int i=0;i<elements->Size();i++){ 1426 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 1427 element->UpdateConstraintsL2ProjectionEPL(); 1428 } 1429 1430 } 1431 /*}}}*/#endif -
issm/trunk-jpl/src/c/classes/FemModel.h
r16600 r16685 103 103 void HydrologyEPLupdateDomainx(void); 104 104 void HydrologyEPLThicknessx(void); 105 void UpdateConstraintsL2ProjectionEPLx(void); 105 106 #endif 106 107 }; -
issm/trunk-jpl/src/c/cores/AnalysisConfiguration.cpp
r16612 r16685 56 56 57 57 case HydrologySolutionEnum: 58 numanalyses= 4;58 numanalyses=5; 59 59 analyses=xNew<int>(numanalyses); 60 60 analyses[0]=HydrologyShreveAnalysisEnum; … … 62 62 analyses[2]=HydrologyDCEfficientAnalysisEnum; 63 63 analyses[3]=L2ProjectionBaseAnalysisEnum; 64 analyses[4]=L2ProjectionEPLAnalysisEnum; 64 65 break; 65 66 -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
r16638 r16685 46 46 femmodel->parameters->FindParam(&eps_hyd,HydrologydcRelTolEnum); 47 47 femmodel->parameters->FindParam(&time,TimeEnum); 48 /*FIXME, hardcoded, put on an enum*/ 48 49 hydro_maxiter=150; 49 50 hydrocount=1; … … 98 99 if(num_unstable_constraints==0) sedconverged = true; 99 100 if (sedcount>=hydro_maxiter){ 101 /*Hacking to get the results of non converged runs*/ 102 // sedconverged = true; 100 103 _error_(" maximum number of Sediment iterations (" << hydro_maxiter << ") exceeded"); 101 104 } … … 116 119 117 120 /*Start by retrieving the EPL head slopes*/ 118 if(VerboseSolution()) _printf0_("computing EPL Head slope...\n");119 femmodel->SetCurrentConfiguration(L2ProjectionBaseAnalysisEnum);120 femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum);121 solutionsequence_linear(femmodel);122 femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum);123 solutionsequence_linear(femmodel);121 /* if(VerboseSolution()) _printf0_("computing EPL Head slope...\n"); */ 122 /* femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum); */ 123 /* femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum); */ 124 /* solutionsequence_linear(femmodel); */ 125 /* femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum); */ 126 /* solutionsequence_linear(femmodel); */ 124 127 125 128 femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); … … 134 137 eplconverged = false; 135 138 for(;;){ 139 140 /*Start by retrieving the EPL head slopes*/ 141 if(VerboseSolution()) _printf0_("computing EPL Head slope...\n"); 142 femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum); 143 femmodel->UpdateConstraintsL2ProjectionEPLx(); 144 femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum); 145 solutionsequence_linear(femmodel); 146 femmodel->parameters->SetParam(EplHeadSlopeYEnum,InputToL2ProjectEnum); 147 solutionsequence_linear(femmodel); 148 femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); 149 136 150 femmodel->HydrologyEPLThicknessx(); 151 //updating mask after the computation of the epl thickness 152 femmodel->HydrologyEPLupdateDomainx(); 137 153 femmodel->HydrologyTransferx(); 138 154 SystemMatricesx(&Kff,&Kfs,&pf,&df,NULL,femmodel); … … 155 171 if(num_unstable_constraints==0) eplconverged = true; 156 172 if (eplcount>=hydro_maxiter){ 173 /*Hacking to get the results of non converged runs*/ 174 //eplconverged = true; 157 175 _error_(" maximum number of EPL iterations (" << hydro_maxiter << ") exceeded"); 158 176 } … … 214 232 else _printf0_(setw(50) << left << " Convergence criterion:" << ndu_sed/nu_sed*100 << " %\n"); 215 233 if (hydrocount>=hydro_maxiter){ 216 _error_(" maximum number for hydrological global iterations (" << hydro_maxiter << ") exceeded"); 234 /*Hacking to get the results of non converged runs*/ 235 //hydroconverged = true; 236 _error_(" maximum number for hydrological global iterations (" << hydro_maxiter << ") exceeded"); 217 237 } 218 238 }
Note:
See TracChangeset
for help on using the changeset viewer.