Changeset 24070
- Timestamp:
- 07/09/19 05:22:14 (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
r24069 r24070 48 48 49 49 /*Set channel cross section to 0*/ 50 this->S = 0.; 50 this->S = 0.; 51 this->Sold = 0.; 51 52 52 53 /*Get edge info*/ … … 394 395 IssmDouble tx = xyz_list_tria[index2][0] - xyz_list_tria[index1][0]; 395 396 IssmDouble ty = xyz_list_tria[index2][1] - xyz_list_tria[index1][1]; 396 tx = tx/sqrt(tx*tx+ty*ty); 397 ty = ty/sqrt(tx*tx+ty*ty); 397 IssmDouble Lt = sqrt(tx*tx+ty*ty); 398 tx = tx/Lt; 399 ty = ty/Lt; 398 400 399 401 /* Start looping on the number of gaussian points: */ … … 524 526 IssmDouble tx = xyz_list_tria[index2][0] - xyz_list_tria[index1][0]; 525 527 IssmDouble ty = xyz_list_tria[index2][1] - xyz_list_tria[index1][1]; 526 tx = tx/sqrt(tx*tx+ty*ty); 527 ty = ty/sqrt(tx*tx+ty*ty); 528 IssmDouble Lt = sqrt(tx*tx+ty*ty); 529 tx = tx/Lt; 530 ty = ty/Lt; 528 531 529 532 /* Start looping on the number of gaussian points: */ … … 588 591 } 589 592 /*}}}*/ 593 void Channel::SetChannelCrossSectionOld(void){/*{{{*/ 594 595 this->Sold = this->S; 596 597 } /*}}}*/ 590 598 void Channel::UpdateChannelCrossSection(void){/*{{{*/ 591 599 … … 630 638 IssmDouble tx = xyz_list_tria[index2][0] - xyz_list_tria[index1][0]; 631 639 IssmDouble ty = xyz_list_tria[index2][1] - xyz_list_tria[index1][1]; 632 tx = tx/sqrt(tx*tx+ty*ty); 633 ty = ty/sqrt(tx*tx+ty*ty); 640 IssmDouble Lt = sqrt(tx*tx+ty*ty); 641 tx = tx/Lt; 642 ty = ty/Lt; 634 643 635 644 /*Evaluate fields on center of edge*/ … … 681 690 682 691 /*Solve ODE*/ 683 this->S = ODE1(alpha,beta,this->S ,dt,2);692 this->S = ODE1(alpha,beta,this->Sold,dt,1); 684 693 685 694 /*Make sure Area > 0*/ -
issm/trunk-jpl/src/c/classes/Loads/Channel.h
r24064 r24070 20 20 private: 21 21 IssmDouble S; 22 IssmDouble Sold; 22 23 bool boundary; 23 24 … … 76 77 /*}}}*/ 77 78 /*Channel management:{{{*/ 79 void SetChannelCrossSectionOld(void); 78 80 void UpdateChannelCrossSection(void); 79 81 ElementVector* CreatePVectorHydrologyGlaDS(void);
Note:
See TracChangeset
for help on using the changeset viewer.