Changeset 4175


Ignore:
Timestamp:
06/23/10 15:15:29 (15 years ago)
Author:
Mathieu Morlighem
Message:

UpdateGeometry is now done by the element following hydrostatic equilibrium

Location:
issm/trunk/src/c/objects/Elements
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r4123 r4175  
    628628
    629629        ISSMERROR("not supported yet!");
     630
     631}
     632/*}}}*/
     633/*FUNCTION Penta::UpdateGeometry{{{1*/
     634void  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        }
    630663
    631664}
  • issm/trunk/src/c/objects/Elements/Penta.h

    r4164 r4175  
    4545                Penta(int penta_id,int i, IoModel* iomodel,int nummodels);
    4646                void  Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
    47                 void  UpdateGeometry(void){ISSMERROR("not implemented yet");};
     47                void  UpdateGeometry(void);
    4848                ~Penta();
    4949                /*}}}*/
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4174 r4175  
    556556                rho_water=matpar->GetRhoWater();
    557557
    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
    559567        /*If sheet: surface = bed + thickness*/
    560568        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
    563575}
    564576/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.