Changeset 24064
- Timestamp:
- 07/04/19 02:12:40 (6 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Loads
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Channel.cpp
r24057 r24064 54 54 int e1 = iomodel->faces[4*index+2]; 55 55 int e2 = iomodel->faces[4*index+3]; 56 57 if(e2==-1){ 58 this->boundary = true; 59 } 60 else{ 61 this->boundary = false; 62 } 56 63 57 64 /*Set Element hook (4th column may be -1 for boundary edges)*/ … … 545 552 if(Ngrad<1.e-12) Ngrad = 1.e-12; 546 553 547 /*Compute the effective conductivity Kc = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/ 548 IssmDouble Kc = kc * pow(this->S,ALPHA_C) * pow(Ngrad,BETA_C-2.); 549 IssmDouble Ks = ks * pow(h ,ALPHA_S) * pow(Ngrad,BETA_S-2.); 554 /*Compute the effective conductivity Ks = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/ 555 IssmDouble Ks = ks * pow(h,ALPHA_S) * pow(Ngrad,BETA_S-2.); 550 556 551 557 /*Approx. discharge in the sheet flowing folwing in the direction of the channel ofver a width lc*/ … … 585 591 /*Initialize Element matrix and return if necessary*/ 586 592 Tria* tria=(Tria*)element; 587 if(!tria->IsIceInElement() ){593 if(!tria->IsIceInElement() || this->boundary){ 588 594 this->S = 0.; 589 595 return; … … 674 680 675 681 /*Solve ODE*/ 676 this->S = ODE1(alpha,beta,this->S,dt,0); 682 this->S = ODE1(alpha,beta,this->S,dt,2); 683 684 /*Make sure Area > 0*/ 685 if(this->S<0.) this->S = 0.; 677 686 678 687 /*Clean up and return*/ -
issm/trunk-jpl/src/c/classes/Loads/Channel.h
r24054 r24064 20 20 private: 21 21 IssmDouble S; 22 bool boundary; 22 23 23 24 public:
Note:
See TracChangeset
for help on using the changeset viewer.