source: issm/oecreview/Archive/15392-16133/ISSM-15972-15973.diff@ 16134

Last change on this file since 16134 was 16134, checked in by Mathieu Morlighem, 12 years ago

Added Archive/15392-16133

File size: 2.9 KB
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    73027302void  Tria::MigrateGroundingLine(IssmDouble* phi_ungrounding){
    73037303
    73047304        int        i,migration_style;
     7305        bool       oldfloating;
    73057306        bool       floatingelement = false;
    73067307        bool       groundedelement = false;
    73077308        IssmDouble bed_hydro,yts,gl_melting_rate;
     
    73197320        GetInputListOnVertices(&b[0],BedEnum);
    73207321        GetInputListOnVertices(&r[0],BathymetryEnum);
    73217322        GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum);
    7322         rho_water = matpar->GetRhoWater();
    7323         rho_ice   = matpar->GetRhoIce();
    7324         density   = rho_ice/rho_water;
     7323        rho_water   = matpar->GetRhoWater();
     7324        rho_ice     = matpar->GetRhoIce();
     7325        density     = rho_ice/rho_water;
     7326        oldfloating = this->IsFloating(); //figure out if element is floating before we start to change everything
    73257327
    73267328        /*go through vertices, and update inputs, considering them to be TriaVertex type: */
    73277329        for(i=0;i<NUMVERTICES;i++){
     
    73927394        }
    73937395
    73947396   /*Add basal melting rate if element just ungrounded*/
    7395         if(!this->IsFloating() && floatingelement==true){
     7397        if(!oldfloating && floatingelement==true){
    73967398                for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts;
    73977399                this->inputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
    73987400        }
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    1118911189void  Penta::MigrateGroundingLine(IssmDouble* phi_ungrounding){
    1119011190
    1119111191        int        i,migration_style;
     11192        bool       oldfloating;
    1119211193        bool       floatingelement = false;
    1119311194        bool       groundedelement = false;
    1119411195        IssmDouble bed_hydro,yts,gl_melting_rate;
     
    1120811209        GetInputListOnVertices(&b[0],BedEnum);
    1120911210        GetInputListOnVertices(&r[0],BathymetryEnum);
    1121011211        GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum);
    11211         rho_water = matpar->GetRhoWater();
    11212         rho_ice   = matpar->GetRhoIce();
    11213         density   = rho_ice/rho_water;
     11212        rho_water   = matpar->GetRhoWater();
     11213        rho_ice     = matpar->GetRhoIce();
     11214        density     = rho_ice/rho_water;
     11215        oldfloating = this->IsFloating(); //figure out if the element is floating before starting to change everything
    1121411216
    1121511217        /*go through vertices, and update inputs, considering them to be PentaVertex type: */
    1121611218        for(i=0;i<NUMVERTICES;i++){
     
    1128111283        }
    1128211284
    1128311285   /*Add basal melting rate if element just ungrounded*/
    11284         if(!this->IsFloating() && floatingelement==true){
     11286        if(!oldfloating && floatingelement==true){
    1128511287                for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts;
    1128611288                this->inputs->AddInput(new PentaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
    1128711289        }
Note: See TracBrowser for help on using the repository browser.