- Timestamp:
- 04/01/20 21:54:40 (5 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 24314-24492,24494-24683
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r24313 r24686 9 9 return 1; 10 10 }/*}}}*/ 11 12 11 void HydrologyDCEfficientAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/ 13 12 … … 35 34 parameters->AddObject(new IntParam(HydrologydcEplThickCompEnum,eplthickcomp)); 36 35 }/*}}}*/ 37 38 void HydrologyDCEfficientAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ 36 void HydrologyDCEfficientAnalysis::UpdateElements(Elements* elements,Inputs2* inputs2,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ 39 37 40 38 bool isefficientlayer; … … 54 52 if(iomodel->my_elements[i]){ 55 53 Element* element=(Element*)elements->GetObjectByOffset(counter); 56 element->Update(i ,iomodel,analysis_counter,analysis_type,P1Enum);54 element->Update(inputs2,i,iomodel,analysis_counter,analysis_type,P1Enum); 57 55 counter++; 58 56 } 59 57 } 60 iomodel->FetchDataToInput( elements,"md.geometry.thickness",ThicknessEnum);61 iomodel->FetchDataToInput( elements,"md.geometry.base",BaseEnum);62 iomodel->FetchDataToInput( elements,"md.mask.ice_levelset",MaskIceLevelsetEnum);63 iomodel->FetchDataToInput( elements,"md.initialization.epl_head",EplHeadSubstepEnum);64 iomodel->FetchDataToInput( elements,"md.initialization.sediment_head",SedimentHeadSubstepEnum);65 iomodel->FetchDataToInput( elements,"md.initialization.epl_thickness",HydrologydcEplThicknessSubstepEnum);66 iomodel->FetchDataToInput( elements,"md.hydrology.basal_moulin_input",HydrologydcBasalMoulinInputEnum);58 iomodel->FetchDataToInput(inputs2,elements,"md.geometry.thickness",ThicknessEnum); 59 iomodel->FetchDataToInput(inputs2,elements,"md.geometry.base",BaseEnum); 60 iomodel->FetchDataToInput(inputs2,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 61 iomodel->FetchDataToInput(inputs2,elements,"md.initialization.epl_head",EplHeadSubstepEnum); 62 iomodel->FetchDataToInput(inputs2,elements,"md.initialization.sediment_head",SedimentHeadSubstepEnum); 63 iomodel->FetchDataToInput(inputs2,elements,"md.initialization.epl_thickness",HydrologydcEplThicknessSubstepEnum); 64 iomodel->FetchDataToInput(inputs2,elements,"md.hydrology.basal_moulin_input",HydrologydcBasalMoulinInputEnum); 67 65 if(iomodel->domaintype!=Domain2DhorizontalEnum){ 68 iomodel->FetchDataToInput(elements,"md.mesh.vertexonbase",MeshVertexonbaseEnum); 69 iomodel->FetchDataToInput(elements,"md.mesh.vertexonsurface",MeshVertexonsurfaceEnum); 70 } 71 }/*}}}*/ 72 66 iomodel->FetchDataToInput(inputs2,elements,"md.mesh.vertexonbase",MeshVertexonbaseEnum); 67 iomodel->FetchDataToInput(inputs2,elements,"md.mesh.vertexonsurface",MeshVertexonsurfaceEnum); 68 } 69 }/*}}}*/ 73 70 void HydrologyDCEfficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 74 71 … … 89 86 iomodel->DeleteData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); 90 87 }/*}}}*/ 91 92 88 void HydrologyDCEfficientAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/ 93 89 … … 104 100 IoModelToConstraintsx(constraints,iomodel,"md.hydrology.spcepl_head",HydrologyDCEfficientAnalysisEnum,P1Enum); 105 101 }/*}}}*/ 106 107 102 void HydrologyDCEfficientAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 108 103 … … 139 134 iomodel->DeleteData(1,"md.mesh.vertexonbase"); 140 135 }/*}}}*/ 141 142 136 void HydrologyDCEfficientAnalysis::InitZigZagCounter(FemModel* femmodel){/*{{{*/ 143 137 … … 147 141 xDelete<int>(eplzigzag_counter); 148 142 }/*}}}*/ 149 150 143 void HydrologyDCEfficientAnalysis::ResetCounter(FemModel* femmodel){/*{{{*/ 151 144 … … 163 156 _error_("not implemented"); 164 157 }/*}}}*/ 165 166 158 ElementVector* HydrologyDCEfficientAnalysis::CreateDVector(Element* element){/*{{{*/ 167 159 /*Default, return NULL*/ 168 160 return NULL; 169 161 }/*}}}*/ 170 171 162 ElementMatrix* HydrologyDCEfficientAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/ 172 163 _error_("Not implemented"); 173 164 }/*}}}*/ 174 175 165 ElementMatrix* HydrologyDCEfficientAnalysis::CreateKMatrix(Element* element){/*{{{*/ 176 166 … … 193 183 } 194 184 195 Input* active_element_input = basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 196 active_element_input->GetInputValue(&active_element); 185 basalelement->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 197 186 198 187 /*Check that all nodes are active, else return empty matrix*/ … … 224 213 basalelement->GetVerticesCoordinates(&xyz_list); 225 214 basalelement->FindParam(&dt,TimesteppingTimeStepEnum); 226 227 Input* epl_thick_input = basalelement->GetInput(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input); 228 Input* epl_head_input = basalelement->GetInput(EplHeadSubstepEnum); _assert_(epl_head_input); 229 Input* base_input = basalelement->GetInput(BaseEnum); _assert_(base_input); 215 Input2* epl_thick_input = basalelement->GetInput2(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input); 216 Input2* epl_head_input = basalelement->GetInput2(EplHeadSubstepEnum); _assert_(epl_head_input); 217 Input2* base_input = basalelement->GetInput2(BaseEnum); _assert_(base_input); 230 218 231 219 /* Start looping on the number of gaussian points: */ … … 279 267 return Ke; 280 268 }/*}}}*/ 281 282 269 ElementVector* HydrologyDCEfficientAnalysis::CreatePVector(Element* element){/*{{{*/ 283 270 … … 300 287 } 301 288 302 Input* active_element_input = basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 303 active_element_input->GetInputValue(&active_element); 289 basalelement->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 304 290 305 291 /*Check that all nodes are active, else return empty matrix*/ … … 319 305 IssmDouble residual,connectivity; 320 306 321 IssmDouble *xyz_list= NULL;322 Input * old_wh_input= NULL;323 Input *surface_runoff_input = NULL;307 IssmDouble *xyz_list = NULL; 308 Input2 *old_wh_input = NULL; 309 Input2 *surface_runoff_input = NULL; 324 310 325 311 /*Fetch number of nodes and dof for this finite element*/ … … 336 322 basalelement ->FindParam(&smb_model,SmbEnum); 337 323 338 Input * epl_thick_input = basalelement->GetInput(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input);339 Input * sed_head_input = basalelement->GetInput(SedimentHeadSubstepEnum); _assert_(sed_head_input);340 Input * epl_head_input = basalelement->GetInput(EplHeadSubstepEnum); _assert_(epl_head_input);341 Input * basal_melt_input = basalelement->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(basal_melt_input);342 Input * residual_input = basalelement->GetInput(SedimentHeadResidualEnum); _assert_(residual_input);343 Input * base_input = basalelement->GetInput(BaseEnum); _assert_(base_input);324 Input2* epl_thick_input = basalelement->GetInput2(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input); 325 Input2* sed_head_input = basalelement->GetInput2(SedimentHeadSubstepEnum); _assert_(sed_head_input); 326 Input2* epl_head_input = basalelement->GetInput2(EplHeadSubstepEnum); _assert_(epl_head_input); 327 Input2* basal_melt_input = basalelement->GetInput2(BasalforcingsGroundediceMeltingRateEnum); _assert_(basal_melt_input); 328 Input2* residual_input = basalelement->GetInput2(SedimentHeadResidualEnum); _assert_(residual_input); 329 Input2* base_input = basalelement->GetInput2(BaseEnum); _assert_(base_input); 344 330 345 331 if(dt!= 0.){ 346 old_wh_input = basalelement->GetInput (EplHeadOldEnum); _assert_(old_wh_input);332 old_wh_input = basalelement->GetInput2(EplHeadOldEnum); _assert_(old_wh_input); 347 333 } 348 334 if(smb_model==SMBgradientscomponentsEnum){ 349 surface_runoff_input = basalelement->GetInput (SmbRunoffEnum); _assert_(surface_runoff_input);335 surface_runoff_input = basalelement->GetInput2(SmbRunoffEnum); _assert_(surface_runoff_input); 350 336 } 351 337 … … 397 383 return pe; 398 384 }/*}}}*/ 399 385 void HydrologyDCEfficientAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 386 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 387 * For node i, Bi can be expressed in the actual coordinate system 388 * by: 389 * Bi=[ dN/dx ] 390 * [ dN/dy ] 391 * where N is the finiteelement function for node i. 392 * 393 * We assume B has been allocated already, of size: 3x(NDOF2*numnodes) 394 */ 395 396 /*Fetch number of nodes for this finite element*/ 397 int numnodes = element->GetNumberOfNodes(); 398 399 /*Get nodal functions derivatives*/ 400 IssmDouble* dbasis=xNew<IssmDouble>(2*numnodes); 401 element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss); 402 403 /*Build B: */ 404 for(int i=0;i<numnodes;i++){ 405 B[numnodes*0+i] = dbasis[0*numnodes+i]; 406 B[numnodes*1+i] = dbasis[1*numnodes+i]; 407 } 408 409 /*Clean-up*/ 410 xDelete<IssmDouble>(dbasis); 411 }/*}}}*/ 400 412 void HydrologyDCEfficientAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 401 413 element->GetSolutionFromInputsOneDof(solution,EplHeadSubstepEnum); 402 414 }/*}}}*/ 403 404 415 void HydrologyDCEfficientAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_index){/*{{{*/ 405 416 _error_("Not implemented yet"); 406 417 }/*}}}*/ 407 408 418 void HydrologyDCEfficientAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/ 409 419 /*Intermediaries*/ … … 441 451 } 442 452 /*Add input to the element: */ 443 element->AddBasalInput(EplHeadSubstepEnum,eplHeads,P1Enum); 453 element->AddBasalInput2(EplHeadSubstepEnum,eplHeads,P1Enum); 454 444 455 /*Free ressources:*/ 445 456 xDelete<IssmDouble>(eplHeads); … … 447 458 if(domaintype!=Domain2DhorizontalEnum){basalelement->DeleteMaterials(); delete basalelement;}; 448 459 } /*}}}*/ 449 450 460 void HydrologyDCEfficientAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/ 451 461 /*Default, do nothing*/ … … 454 464 455 465 /*Intermediaries*/ 466 IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input2* epl_thick_input, Input2* epl_head_input, Input2* base_input){/*{{{*/ 467 IssmDouble epl_storing; 468 IssmDouble water_sheet,storing; 469 IssmDouble epl_thickness,prestep_head,base_elev; 470 IssmDouble rho_freshwater = element->FindParam(MaterialsRhoFreshwaterEnum); 471 IssmDouble g = element->FindParam(ConstantsGEnum); 472 IssmDouble epl_porosity = element->FindParam(HydrologydcEplPorosityEnum); 473 IssmDouble epl_compressibility = element->FindParam(HydrologydcEplCompressibilityEnum); 474 IssmDouble water_compressibility = element->FindParam(HydrologydcWaterCompressibilityEnum); 475 476 epl_thick_input->GetInputValue(&epl_thickness,gauss); 477 epl_head_input->GetInputValue(&prestep_head,gauss); 478 base_input->GetInputValue(&base_elev,gauss); 479 water_sheet=max(0.0,(prestep_head-base_elev)); 480 storing=rho_freshwater*g*epl_porosity*epl_thickness*(water_compressibility+(epl_compressibility/epl_porosity)); 481 482 /* //porosity for unconfined region */ 483 /* if (water_sheet<=0.9*epl_thickness){ */ 484 /* epl_storing=epl_porosity; */ 485 /* } */ 486 /* //continuity ramp */ 487 /* else if((water_sheet<epl_thickness) && (water_sheet>0.9*epl_thickness)){ */ 488 /* epl_storing=(epl_thickness-water_sheet)*(epl_porosity-storing)/(0.1*epl_thickness)+storing; */ 489 /* } */ 490 /* //storing coefficient for confined */ 491 /* else{ */ 492 /* epl_storing=storing; */ 493 /* } */ 494 /* return epl_storing; */ 495 return storing; 496 }/*}}}*/ 497 IssmDouble HydrologyDCEfficientAnalysis::EplTransmitivity(Element* element,Gauss* gauss, Input2* epl_thick_input, Input2* epl_head_input, Input2* base_input){/*{{{*/ 498 IssmDouble epl_transmitivity; 499 IssmDouble water_sheet; 500 IssmDouble epl_thickness,base_elev,prestep_head; 501 IssmDouble epl_conductivity = element->FindParam(HydrologydcEplConductivityEnum); 502 epl_thick_input->GetInputValue(&epl_thickness,gauss); 503 epl_head_input->GetInputValue(&prestep_head,gauss); 504 base_input->GetInputValue(&base_elev,gauss); 505 506 water_sheet=max(0.0,(prestep_head-base_elev)); 507 epl_transmitivity=epl_conductivity*epl_thickness; 508 //epl_transmitivity=max(1.0e-6,(epl_conductivity*min(water_sheet,epl_thickness))); 509 return epl_transmitivity; 510 }/*}}}*/ 511 void HydrologyDCEfficientAnalysis::GetHydrologyDCInefficientHmax(IssmDouble* ph_max,Element* element, Node* innode){/*{{{*/ 512 513 int hmax_flag; 514 IssmDouble h_max; 515 IssmDouble rho_ice,rho_water; 516 IssmDouble thickness,bed; 517 /*Get the flag to the limitation method*/ 518 element->FindParam(&hmax_flag,HydrologydcSedimentlimitFlagEnum); 519 520 /*Switch between the different cases*/ 521 switch(hmax_flag){ 522 case 0: 523 h_max=1.0e+10; 524 break; 525 case 1: 526 element->FindParam(&h_max,HydrologydcSedimentlimitEnum); 527 break; 528 case 2: 529 /*Compute max*/ 530 rho_water = element->FindParam(MaterialsRhoFreshwaterEnum); 531 rho_ice = element->FindParam(MaterialsRhoIceEnum); 532 element-> GetInputValue(&thickness,innode,ThicknessEnum); 533 element-> GetInputValue(&bed,innode,BaseEnum); 534 h_max=((rho_ice*thickness)/rho_water)+bed; 535 break; 536 case 3: 537 _error_("Using normal stress not supported yet"); 538 break; 539 default: 540 _error_("no case higher than 3 for SedimentlimitFlag"); 541 } 542 /*Assign output pointer*/ 543 *ph_max=h_max; 544 } 545 /*}}}*/ 456 546 IssmDouble HydrologyDCEfficientAnalysis::GetHydrologyKMatrixTransfer(Element* element){/*{{{*/ 457 547 … … 475 565 return transfer; 476 566 }/*}}}*/ 477 478 IssmDouble HydrologyDCEfficientAnalysis::GetHydrologyPVectorTransfer(Element* element, Gauss* gauss, Input* sed_head_input){/*{{{*/ 567 IssmDouble HydrologyDCEfficientAnalysis::GetHydrologyPVectorTransfer(Element* element, Gauss* gauss, Input2* sed_head_input){/*{{{*/ 479 568 480 569 int transfermethod; … … 501 590 return transfer; 502 591 }/*}}}*/ 503 504 592 void HydrologyDCEfficientAnalysis::ComputeEPLThickness(FemModel* femmodel){/*{{{*/ 505 593 … … 534 622 IssmDouble* bed = xNew<IssmDouble>(numnodes); 535 623 536 Input* active_element_input=element->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 537 active_element_input->GetInputValue(&active_element); 624 element->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 538 625 element->FindParam(&dt,TimesteppingTimeStepEnum); 539 626 … … 590 677 } 591 678 } 592 element->AddInput (HydrologydcEplThicknessSubstepEnum,thickness,element->GetElementType());679 element->AddInput2(HydrologydcEplThicknessSubstepEnum,thickness,element->GetElementType()); 593 680 xDelete<IssmDouble>(thickness); 594 681 xDelete<IssmDouble>(eplhead); … … 602 689 } 603 690 }/*}}}*/ 604 605 void HydrologyDCEfficientAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 606 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 607 * For node i, Bi can be expressed in the actual coordinate system 608 * by: 609 * Bi=[ dN/dx ] 610 * [ dN/dy ] 611 * where N is the finiteelement function for node i. 612 * 613 * We assume B has been allocated already, of size: 3x(NDOF2*numnodes) 614 */ 615 616 /*Fetch number of nodes for this finite element*/ 617 int numnodes = element->GetNumberOfNodes(); 618 619 /*Get nodal functions derivatives*/ 620 IssmDouble* dbasis=xNew<IssmDouble>(2*numnodes); 621 element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss); 622 623 /*Build B: */ 624 for(int i=0;i<numnodes;i++){ 625 B[numnodes*0+i] = dbasis[0*numnodes+i]; 626 B[numnodes*1+i] = dbasis[1*numnodes+i]; 627 } 628 629 /*Clean-up*/ 630 xDelete<IssmDouble>(dbasis); 631 }/*}}}*/ 632 633 void HydrologyDCEfficientAnalysis::HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask, Vector<IssmDouble>* recurence, Element* element){ 691 void HydrologyDCEfficientAnalysis::HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask, Vector<IssmDouble>* recurence, Element* element){/*{{{*/ 634 692 635 693 bool active_element; … … 663 721 IssmDouble colapse_thick =basalelement->FindParam(HydrologydcEplColapseThicknessEnum); 664 722 665 Input* active_element_input=basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 666 active_element_input->GetInputValue(&active_element); 723 basalelement->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 667 724 668 725 basalelement-> GetInputListOnVertices(&old_active[0],HydrologydcMaskEplactiveNodeEnum); … … 712 769 } 713 770 } 714 basalelement->AddInput(HydrologydcEplThicknessSubstepEnum,epl_thickness,basalelement->GetElementType());771 element->AddBasalInput2(HydrologydcEplThicknessSubstepEnum,epl_thickness,basalelement->GetElementType()); 715 772 716 773 if(domaintype!=Domain2DhorizontalEnum){ … … 726 783 } 727 784 /*}}}*/ 728 IssmDouble HydrologyDCEfficientAnalysis::EplStoring(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input){/*{{{*/729 IssmDouble epl_storing;730 IssmDouble water_sheet,storing;731 IssmDouble epl_thickness,prestep_head,base_elev;732 IssmDouble rho_freshwater = element->FindParam(MaterialsRhoFreshwaterEnum);733 IssmDouble g = element->FindParam(ConstantsGEnum);734 IssmDouble epl_porosity = element->FindParam(HydrologydcEplPorosityEnum);735 IssmDouble epl_compressibility = element->FindParam(HydrologydcEplCompressibilityEnum);736 IssmDouble water_compressibility = element->FindParam(HydrologydcWaterCompressibilityEnum);737 738 epl_thick_input->GetInputValue(&epl_thickness,gauss);739 epl_head_input->GetInputValue(&prestep_head,gauss);740 base_input->GetInputValue(&base_elev,gauss);741 water_sheet=max(0.0,(prestep_head-base_elev));742 storing=rho_freshwater*g*epl_porosity*epl_thickness*(water_compressibility+(epl_compressibility/epl_porosity));743 744 /* //porosity for unconfined region */745 /* if (water_sheet<=0.9*epl_thickness){ */746 /* epl_storing=epl_porosity; */747 /* } */748 /* //continuity ramp */749 /* else if((water_sheet<epl_thickness) && (water_sheet>0.9*epl_thickness)){ */750 /* epl_storing=(epl_thickness-water_sheet)*(epl_porosity-storing)/(0.1*epl_thickness)+storing; */751 /* } */752 /* //storing coefficient for confined */753 /* else{ */754 /* epl_storing=storing; */755 /* } */756 /* return epl_storing; */757 return storing;758 }/*}}}*/759 760 IssmDouble HydrologyDCEfficientAnalysis::EplTransmitivity(Element* element,Gauss* gauss, Input* epl_thick_input, Input* epl_head_input, Input* base_input){/*{{{*/761 IssmDouble epl_transmitivity;762 IssmDouble water_sheet;763 IssmDouble epl_thickness,base_elev,prestep_head;764 IssmDouble epl_conductivity = element->FindParam(HydrologydcEplConductivityEnum);765 epl_thick_input->GetInputValue(&epl_thickness,gauss);766 epl_head_input->GetInputValue(&prestep_head,gauss);767 base_input->GetInputValue(&base_elev,gauss);768 769 water_sheet=max(0.0,(prestep_head-base_elev));770 epl_transmitivity=epl_conductivity*epl_thickness;771 //epl_transmitivity=max(1.0e-6,(epl_conductivity*min(water_sheet,epl_thickness)));772 return epl_transmitivity;773 }/*}}}*/774 775 785 void HydrologyDCEfficientAnalysis::HydrologyEPLGetActive(Vector<IssmDouble>* active_vec, Element* element){/*{{{*/ 776 786 /*Constants*/ … … 798 808 /*Pass the activity mask from elements to nodes*/ 799 809 basalelement->GetInputListOnVertices(&active[0],HydrologydcMaskEplactiveNodeEnum); 800 Input* active_element_input=basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 801 active_element_input->GetInputValue(&active_element); 810 basalelement->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 802 811 803 812 for(int i=0;i<numnodes;i++) flag+=active[i]; … … 822 831 } 823 832 /*}}}*/ 824 825 void HydrologyDCEfficientAnalysis::GetHydrologyDCInefficientHmax(IssmDouble* ph_max,Element* element, Node* innode){/*{{{*/826 827 int hmax_flag;828 IssmDouble h_max;829 IssmDouble rho_ice,rho_water;830 IssmDouble thickness,bed;831 /*Get the flag to the limitation method*/832 element->FindParam(&hmax_flag,HydrologydcSedimentlimitFlagEnum);833 834 /*Switch between the different cases*/835 switch(hmax_flag){836 case 0:837 h_max=1.0e+10;838 break;839 case 1:840 element->FindParam(&h_max,HydrologydcSedimentlimitEnum);841 break;842 case 2:843 /*Compute max*/844 rho_water = element->FindParam(MaterialsRhoFreshwaterEnum);845 rho_ice = element->FindParam(MaterialsRhoIceEnum);846 element-> GetInputValue(&thickness,innode,ThicknessEnum);847 element-> GetInputValue(&bed,innode,BaseEnum);848 h_max=((rho_ice*thickness)/rho_water)+bed;849 break;850 case 3:851 _error_("Using normal stress not supported yet");852 break;853 default:854 _error_("no case higher than 3 for SedimentlimitFlag");855 }856 /*Assign output pointer*/857 *ph_max=h_max;858 }859 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.