Changeset 16600 for issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
- Timestamp:
- 11/01/13 10:09:33 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r16228 r16600 640 640 641 641 // The penalty is stable if it doesn't change during two consecutive iterations. 642 int unstable =0;642 int unstable=0; 643 643 int new_active; 644 int penalty_lock; 644 645 IssmDouble pressure; 645 646 IssmDouble h; … … 656 657 element->GetInputValue(&h,node,SedimentHeadEnum); 657 658 element->GetHydrologyDCInefficientHmax(&h_max,node); 659 parameters->FindParam(&penalty_lock,HydrologydcPenaltyLockEnum); 660 658 661 if (h>h_max) 659 662 new_active=1; … … 661 664 new_active=0; 662 665 663 if(this->active==new_active) 664 unstable=0; 665 else 666 unstable=1; 667 666 if(this->active==new_active){ 667 unstable=0; 668 } 669 else{ 670 unstable=1; 671 if(penalty_lock)zigzag_counter++; 672 } 673 674 /*If penalty keeps zigzagging more than penalty_lock times: */ 675 if(penalty_lock){ 676 if(zigzag_counter>penalty_lock){ 677 unstable=0; 678 active=1; 679 } 680 } 668 681 /*Set penalty flag*/ 669 682 this->active=new_active;
Note:
See TracChangeset
for help on using the changeset viewer.