source:
issm/oecreview/Archive/23390-24306/ISSM-24063-24064.diff@
24307
Last change on this file since 24307 was 24307, checked in by , 5 years ago | |
---|---|
File size: 2.0 KB |
-
../trunk-jpl/src/c/classes/Loads/Channel.cpp
54 54 int e1 = iomodel->faces[4*index+2]; 55 55 int e2 = iomodel->faces[4*index+3]; 56 56 57 if(e2==-1){ 58 this->boundary = true; 59 } 60 else{ 61 this->boundary = false; 62 } 63 57 64 /*Set Element hook (4th column may be -1 for boundary edges)*/ 58 65 this->helement = new Hook(&e1,1); 59 66 … … 544 551 Ngrad = fabs(dphids); 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*/ 552 558 qc = - Ks * dphids; … … 584 590 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; 590 596 } … … 673 679 IssmDouble beta = 1./(rho_ice*L)*( fabs(lc*qc*dphids) + C*fFactor*dPw ); 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); 677 683 684 /*Make sure Area > 0*/ 685 if(this->S<0.) this->S = 0.; 686 678 687 /*Clean up and return*/ 679 688 delete gauss; 680 689 } -
../trunk-jpl/src/c/classes/Loads/Channel.h
19 19 20 20 private: 21 21 IssmDouble S; 22 bool boundary; 22 23 23 24 public: 24 25 int sid;
Note:
See TracBrowser
for help on using the repository browser.