Changeset 12654


Ignore:
Timestamp:
07/18/12 15:07:47 (13 years ago)
Author:
Mathieu Morlighem
Message:

Removed commented line and misleading comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/objects/Elements/Tria.cpp

    r12553 r12654  
    53525352                        switch(name){
    53535353                                case ThicknessEnum:
    5354                                         /*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
    53555354                                        IssmDouble  thickness[3];
    53565355                                        IssmDouble  thickness_init[3];
     
    53655364                                        GetInputListOnVertices(&surface[0],SurfaceEnum);
    53665365
    5367                                         /*build new thickness: */
    5368 //                                      for(j=0;j<3;j++)thickness[j]=values[j];
    5369 
    53705366                                        /*build new bed and surface: */
    53715367                                        if (this->IsFloating()){
    53725368                                                /*hydrostatic equilibrium: */
    53735369                                                IssmDouble rho_ice,rho_water,di;
    5374                                                 rho_ice=this->matpar->GetRhoIce();
    5375                                                 rho_water=this->matpar->GetRhoWater();
    5376 
    5377                                                 di=rho_ice/rho_water;
     5370                                                rho_ice   = this->matpar->GetRhoIce();
     5371                                                rho_water = this->matpar->GetRhoWater();
     5372                                                di        = rho_ice/rho_water;
    53785373
    53795374                                                /*build new thickness: */
    53805375                                                for (j=0; j<3; j++) {
    5381                                                 /*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
    5382                                                         if     (hydrostatic_ratio[j] >= 0.)
     5376                                                        /*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
     5377                                                        if (hydrostatic_ratio[j] >= 0.)
    53835378                                                                thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*hydrostatic_ratio[j]*surface[j]/(1.-di);
    5384                                                 /*  for minimum thickness, don't scale  */
     5379                                                        /*  for minimum thickness, don't scale  */
    53855380                                                        else
    53865381                                                                thickness[j]=thickness_init[j];
    53875382
    5388                                                 /*  check the computed thickness and update bed  */
    5389                                                         if (thickness[j] < 0.)
    5390                                                                 thickness[j]=1./(1.-di);
     5383                                                        /*  check the computed thickness and update bed*/
     5384                                                        if (thickness[j] < 0.) thickness[j]=1./(1.-di);
    53915385                                                        bed[j]=surface[j]-thickness[j];
    53925386                                                }
    5393 
    5394 //                                              for(j=0;j<3;j++){
    5395 //                                                      surface[j]=(1-di)*thickness[j];
    5396 //                                                      bed[j]=-di*thickness[j];
    5397 //                                              }
    53985387                                        }
    53995388                                        else{
    54005389                                                /*build new thickness: */
    54015390                                                for (j=0; j<3; j++) {
    5402                                                 /*  for observed thickness, use scaled value  */
     5391                                                        /*  for observed thickness, use scaled value  */
    54035392                                                        if (hydrostatic_ratio[j] >= 0.)
    54045393                                                                thickness[j]=values[j];
    5405                                                 /*  for minimum thickness, don't scale  */
     5394                                                        /*  for minimum thickness, don't scale  */
    54065395                                                        else
    54075396                                                                thickness[j]=thickness_init[j];
     
    54095398
    54105399                                                /*update bed on grounded ice: */
    5411 //                                              for(j=0;j<3;j++)surface[j]=bed[j]+thickness[j];
    54125400                                                for(j=0;j<3;j++)bed[j]=surface[j]-thickness[j];
    54135401                                        }
     
    54185406                                        this->inputs->AddInput(new TriaP1Input(SurfaceEnum,surface));
    54195407
    5420                                         /*}}}*/
    54215408                                        break;
    54225409                                default:
Note: See TracChangeset for help on using the changeset viewer.