Changeset 10314
- Timestamp:
- 10/26/11 10:38:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r10310 r10314 283 283 int i; 284 284 bool elementonshelf = false; 285 double h[3],s[3],b[3],ba[3];286 285 double bed_hydro; 287 286 double rho_water,rho_ice,density; 287 double h[3],s[3],b[3],ba[3]; 288 288 double *values = NULL; 289 289 290 /*vertices and material parameters: */ 290 291 GetInputListOnVertices(&h[0],ThicknessEnum); 291 292 GetInputListOnVertices(&s[0],SurfaceEnum); 292 293 GetInputListOnVertices(&b[0],BedEnum); 293 294 GetInputListOnVertices(&ba[0],BathymetryEnum); 294 295 /*material parameters: */296 295 rho_water=matpar->GetRhoWater(); 297 296 rho_ice=matpar->GetRhoIce(); … … 301 300 for(i=0;i<3;i++){ 302 301 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]){ 306 304 b[i]=ba[i]; 307 305 s[i]=b[i]+h[i]; 308 306 } 309 else{310 /*do nothing, we are still floating.*/311 }312 307 } 313 308 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 */ 316 310 bed_hydro=-density*h[i]; 317 311 if (bed_hydro>ba[i]){ 318 /*We are now floating, bed and surface are determined from hydrostatic equilibrium: */319 312 s[i]=(1-density)*h[i]; 320 313 b[i]=-density*h[i]; 321 }322 else{323 /*do nothing, we are still grounded.*/324 314 } 325 315 }
Note:
See TracChangeset
for help on using the changeset viewer.