Changeset 10314


Ignore:
Timestamp:
10/26/11 10:38:43 (13 years ago)
Author:
seroussi
Message:

minor agressive GL

File:
1 edited

Legend:

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

    r10310 r10314  
    283283        int     i;
    284284        bool    elementonshelf = false;
    285         double  h[3],s[3],b[3],ba[3];
    286285        double  bed_hydro;
    287286        double  rho_water,rho_ice,density;
     287        double  h[3],s[3],b[3],ba[3];
    288288        double *values         = NULL;
    289289
     290        /*vertices and material parameters: */
    290291        GetInputListOnVertices(&h[0],ThicknessEnum);
    291292        GetInputListOnVertices(&s[0],SurfaceEnum);
    292293        GetInputListOnVertices(&b[0],BedEnum);
    293294        GetInputListOnVertices(&ba[0],BathymetryEnum);
    294 
    295         /*material parameters: */
    296295        rho_water=matpar->GetRhoWater();
    297296        rho_ice=matpar->GetRhoIce();
     
    301300        for(i=0;i<3;i++){
    302301                if (nodes[i]->IsFloating()){
    303                         /*This node is on the shelf. See if its bed is going under the bathymetry: */
    304                         if(b[i]<=ba[i]){ //<= because Neff being 0 when b=ba, drag will be 0 anyway.
    305                                 /*The ice shelf is getting grounded, the thickness is the same, so just update the bed to stick to the bathymetry and elevate the surface accordingly: */
     302                        /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
     303                        if(b[i]<=ba[i]){
    306304                                b[i]=ba[i];
    307305                                s[i]=b[i]+h[i];
    308306                        }
    309                         else{
    310                                 /*do nothing, we are still floating.*/
    311                         }
    312307                }
    313308                else{
    314                         /*This node is on the sheet, near the grounding line. See if wants to unground. To
    315                          * do so, we compute the hydrostatic bed, and if it is > bathymetry, then we unground: */
     309                        /*Ice sheet: if hydrostatic bed above bathymetry, the ice sheet start to unground, elso do nothing */
    316310                        bed_hydro=-density*h[i];
    317311                        if (bed_hydro>ba[i]){
    318                                 /*We are now floating, bed and surface are determined from hydrostatic equilibrium: */
    319312                                s[i]=(1-density)*h[i];
    320313                                b[i]=-density*h[i];
    321                         }
    322                         else{
    323                                 /*do nothing, we are still grounded.*/
    324314                        }
    325315                }
Note: See TracChangeset for help on using the changeset viewer.