Changeset 18745
- Timestamp:
- 11/06/14 10:02:00 (10 years ago)
- Location:
- issm/trunk-jpl/src/c/analyses
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r18723 r18745 426 426 IssmDouble epl_head,sediment_head; 427 427 IssmDouble leakage,transfer; 428 IssmDouble continuum, factor; 428 429 HydrologyDCInefficientAnalysis* inefanalysis = NULL; 429 430 … … 448 449 element->FindParam(&leakage,HydrologydcLeakageFactorEnum); 449 450 450 if(epl_head>sediment_head){ 451 /* if(sediment_head>=hmax){ */ 452 /* transfer=0.0; */ 453 /* } */ 454 /* else{ */ 455 /* transfer=(leakage); */ 456 /* } */ 457 transfer=leakage*(1/(1+exp(-20.0*(hmax-sediment_head)))); 458 } 459 else{ 460 transfer=(leakage); 461 462 } 451 //Computing continuum function to apply to transfer term, transfer is null only if 452 // epl_head>sediment_head AND sediment_head>h_max 453 continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head)))); 454 factor=max(continuum,1.0); 455 transfer=leakage*factor; 463 456 break; 464 457 default: … … 474 467 IssmDouble epl_head,sediment_head; 475 468 IssmDouble leakage,transfer; 469 IssmDouble continuum, factor; 476 470 477 471 HydrologyDCInefficientAnalysis* inefanalysis = NULL; … … 497 491 element->FindParam(&leakage,HydrologydcLeakageFactorEnum); 498 492 499 if(epl_head>sediment_head){ 500 /* if(sediment_head>=hmax){ */ 501 /* transfer=0.0; */ 502 /* } */ 503 /* else{ */ 504 /* transfer=(sediment_head*leakage); */ 505 /* } */ 506 transfer=sediment_head*leakage*(1/(1+exp(-20.0*(hmax-sediment_head)))); 507 } 508 else{ 509 transfer=(sediment_head*leakage); 510 } 493 //Computing continuum function to apply to transfer term, transfer is null only if 494 // epl_head>sediment_head AND sediment_head>h_max 495 continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head)))); 496 factor=max(continuum,1.0); 497 transfer=sediment_head*leakage*factor; 498 511 499 break; 512 500 default: … … 738 726 void HydrologyDCEfficientAnalysis::HydrologyEPLGetActive(Vector<IssmDouble>* active_vec, Element* element){ 739 727 /*Constants*/ 740 741 728 int domaintype; 742 729 Element* basalelement=NULL; … … 760 747 761 748 basalelement->GetInputListOnVertices(&active[0],HydrologydcMaskEplactiveNodeEnum); 762 763 749 bool active_element; 764 765 750 Input* active_element_input=basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input); 766 751 active_element_input->GetInputValue(&active_element); 767 768 752 769 753 for(int i=0;i<numnodes;i++) flag+=active[i]; … … 775 759 } 776 760 else if(active_element){ 777 /*Checking Stuff*/778 761 for(int i=0;i<numnodes;i++){ 779 762 active_vec->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); … … 781 764 } 782 765 else{ 783 /*Do not do anything: at least one node was active for this element but this element is not solved for*/766 /*Do not do anything: at least one node is active for this element but this element is not solved for*/ 784 767 } 785 768 if(domaintype!=Domain2DhorizontalEnum){basalelement->DeleteMaterials(); delete basalelement;}; -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r18719 r18745 593 593 IssmDouble epl_head,sediment_head; 594 594 IssmDouble leakage,transfer; 595 595 IssmDouble continuum, factor; 596 596 597 element->FindParam(&transfermethod,HydrologydcTransferFlagEnum); 597 598 … … 611 612 612 613 hmax=GetHydrologyDCInefficientHmax(element, gauss, thick_input, base_input); 613 614 if(epl_head>sediment_head){ 615 /* if(sediment_head>=hmax){ */ 616 /* transfer=0.0; */ 617 /* } */ 618 /* else{ */ 619 /* transfer=(leakage); */ 620 /* } */ 621 transfer=leakage*(1/(1+exp(-20.0*(hmax-sediment_head)))); 622 } 623 else{ 624 transfer=(leakage); 625 } 614 615 //Computing continuum function to apply to transfer term, transfer is null only if 616 //epl_head>sediment_head AND sediment_head>h_max 617 continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head)))); 618 factor=max(continuum,1.0); 619 transfer=leakage*factor; 620 626 621 break; 627 622 default: … … 637 632 IssmDouble epl_head,sediment_head; 638 633 IssmDouble leakage,transfer; 639 634 IssmDouble continuum, factor; 635 640 636 element->FindParam(&transfermethod,HydrologydcTransferFlagEnum); 641 637 … … 656 652 hmax=GetHydrologyDCInefficientHmax(element, gauss, thick_input, base_input); 657 653 658 if(epl_head>sediment_head){ 659 /* if(sediment_head>=hmax){ */ 660 /* transfer=0.0; */ 661 /* } */ 662 /* else{ */ 663 /* transfer=(epl_head*leakage); */ 664 /* } */ 665 transfer=epl_head*leakage*(1/(1+exp(-20.0*(hmax-sediment_head)))); 666 } 667 else{ 668 transfer=(epl_head*leakage); 669 } 654 //Computing continuum function to apply to transfer term, transfer is null only if 655 //epl_head>sediment_head AND sediment_head>h_max 656 continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head)))); 657 factor=max(continuum,1.0); 658 transfer=epl_head*leakage*factor; 670 659 break; 671 660 default:
Note:
See TracChangeset
for help on using the changeset viewer.