Changeset 4175
- Timestamp:
- 06/23/10 15:15:29 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4123 r4175 628 628 629 629 ISSMERROR("not supported yet!"); 630 631 } 632 /*}}}*/ 633 /*FUNCTION Penta::UpdateGeometry{{{1*/ 634 void Penta::UpdateGeometry(void){ 635 636 /*Intermediaries*/ 637 int i; 638 double rho_ice,rho_water; 639 640 /*If shelf: hydrostatic equilibrium*/ 641 if (this->GetShelf()){ 642 643 /*recover material parameters: */ 644 rho_ice=matpar->GetRhoIce(); 645 rho_water=matpar->GetRhoWater(); 646 647 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 648 InputDuplicate(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 649 InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di) 650 651 /*Create New Bed b = -rho_ice/rho_water h*/ 652 InputDuplicate(ThicknessEnum,BedEnum); //1: copy thickness into bed 653 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 654 } 655 656 /*If sheet: surface = bed + thickness*/ 657 else{ 658 659 /*The bed does not change, update surface only s = b + h*/ 660 InputDuplicate(BedEnum,SurfaceEnum); //1: copy bed into surface 661 InputAXPY(SurfaceEnum,1.0,ThicknessEnum); //2: surface = surface + 1 * thickness 662 } 630 663 631 664 } -
issm/trunk/src/c/objects/Elements/Penta.h
r4164 r4175 45 45 Penta(int penta_id,int i, IoModel* iomodel,int nummodels); 46 46 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 47 void UpdateGeometry(void) {ISSMERROR("not implemented yet");};47 void UpdateGeometry(void); 48 48 ~Penta(); 49 49 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r4174 r4175 556 556 rho_water=matpar->GetRhoWater(); 557 557 558 } 558 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 559 InputDuplicate(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 560 InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di) 561 562 /*Create New Bed b = -rho_ice/rho_water h*/ 563 InputDuplicate(ThicknessEnum,BedEnum); //1: copy thickness into bed 564 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 565 } 566 559 567 /*If sheet: surface = bed + thickness*/ 560 568 else{ 561 ISSMERROR("not supported yet!"); 562 } 569 570 /*The bed does not change, update surface only s = b + h*/ 571 InputDuplicate(BedEnum,SurfaceEnum); //1: copy bed into surface 572 InputAXPY(SurfaceEnum,1.0,ThicknessEnum); //2: surface = surface + 1 * thickness 573 } 574 563 575 } 564 576 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.