Changeset 27289
- Timestamp:
- 09/24/22 10:01:51 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyGlaDSAnalysis.cpp
r27282 r27289 518 518 IssmDouble A,B,n,phi,phi_0; 519 519 IssmDouble alpha,beta; 520 IssmDouble oceanLS,iceLS; 520 521 521 522 /*Fetch number vertices for this element*/ … … 548 549 Input* n_input = element->GetInput(MaterialsRheologyNEnum); _assert_(n_input); 549 550 Input* phi_input = element->GetInput(HydraulicPotentialEnum); _assert_(phi_input); 551 Input* oceanLS_input = element->GetInput(MaskOceanLevelsetEnum); _assert_(oceanLS_input); 552 Input* iceLS_input = element->GetInput(MaskIceLevelsetEnum); _assert_(iceLS_input); 553 550 554 551 555 /* Start looping on the number of gaussian points: */ … … 564 568 b_input->GetInputValue(&b,gauss); 565 569 H_input->GetInputValue(&H,gauss); 570 oceanLS_input->GetInputValue(&oceanLS,gauss); 571 iceLS_input->GetInputValue(&iceLS,gauss); 572 573 /*Set sheet thickness to zero if floating or no ice*/ 574 if(oceanLS<0. || iceLS>0.){ 575 h_new[iv] = 0.; 576 } 577 else{ 566 578 567 579 /*Get values for a few potentials*/ … … 591 603 if(h_new[iv]<AEPS) h_new[iv] = AEPS; 592 604 } 593 605 } 606 594 607 /*Force floating ice to have zero sheet thickness*/ 595 if(element->IsAllFloating() || !element->IsIceInElement()){608 /*if(!element->IsAllGrounded() || !element->IsIceInElement()){ 596 609 for(int iv=0;iv<numvertices;iv++) h_new[iv] = 0.; 597 } 610 }*/ 598 611 599 612 element->AddInput(HydrologySheetThicknessEnum,h_new,P1Enum); … … 616 629 IssmDouble phi_0, phi_m, p_i; 617 630 IssmDouble H,b,phi; 631 IssmDouble oceanLS,iceLS; 618 632 619 633 int numnodes = element->GetNumberOfNodes(); … … 627 641 Input* b_input = element->GetInput(BedEnum); _assert_(b_input); 628 642 Input* phi_input = element->GetInput(HydraulicPotentialEnum); _assert_(phi_input); 643 Input* oceanLS_input = element->GetInput(MaskOceanLevelsetEnum); _assert_(oceanLS_input); 644 Input* iceLS_input = element->GetInput(MaskIceLevelsetEnum); _assert_(iceLS_input); 629 645 630 646 /*Set to 0 if inactive element*/ … … 645 661 b_input->GetInputValue(&b,gauss); 646 662 phi_input->GetInputValue(&phi,gauss); 663 oceanLS_input->GetInputValue(&oceanLS,gauss); 664 iceLS_input->GetInputValue(&iceLS,gauss); 647 665 648 666 /*Elevation potential*/ … … 657 675 /*Calculate effective pressure*/ 658 676 N[iv] = phi_0 - phi; 677 678 /*Make sure that all floating ice and ice free areas have zero effective pressure*/ 679 if(oceanLS<0.0) N[iv] = 0.0; 680 if(iceLS>0.0) N[iv] = 0.0; 659 681 660 682 if(xIsNan<IssmDouble>(N[iv])) _error_("NaN found in solution vector");
Note:
See TracChangeset
for help on using the changeset viewer.