source:
issm/oecreview/Archive/15392-16133/ISSM-15972-15973.diff@
16134
Last change on this file since 16134 was 16134, checked in by , 12 years ago | |
---|---|
File size: 2.9 KB |
-
../trunk-jpl/src/c/classes/Elements/Tria.cpp
7302 7302 void Tria::MigrateGroundingLine(IssmDouble* phi_ungrounding){ 7303 7303 7304 7304 int i,migration_style; 7305 bool oldfloating; 7305 7306 bool floatingelement = false; 7306 7307 bool groundedelement = false; 7307 7308 IssmDouble bed_hydro,yts,gl_melting_rate; … … 7319 7320 GetInputListOnVertices(&b[0],BedEnum); 7320 7321 GetInputListOnVertices(&r[0],BathymetryEnum); 7321 7322 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 7325 7327 7326 7328 /*go through vertices, and update inputs, considering them to be TriaVertex type: */ 7327 7329 for(i=0;i<NUMVERTICES;i++){ … … 7392 7394 } 7393 7395 7394 7396 /*Add basal melting rate if element just ungrounded*/ 7395 if(! this->IsFloating()&& floatingelement==true){7397 if(!oldfloating && floatingelement==true){ 7396 7398 for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts; 7397 7399 this->inputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum)); 7398 7400 } -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
11189 11189 void Penta::MigrateGroundingLine(IssmDouble* phi_ungrounding){ 11190 11190 11191 11191 int i,migration_style; 11192 bool oldfloating; 11192 11193 bool floatingelement = false; 11193 11194 bool groundedelement = false; 11194 11195 IssmDouble bed_hydro,yts,gl_melting_rate; … … 11208 11209 GetInputListOnVertices(&b[0],BedEnum); 11209 11210 GetInputListOnVertices(&r[0],BathymetryEnum); 11210 11211 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 11214 11216 11215 11217 /*go through vertices, and update inputs, considering them to be PentaVertex type: */ 11216 11218 for(i=0;i<NUMVERTICES;i++){ … … 11281 11283 } 11282 11284 11283 11285 /*Add basal melting rate if element just ungrounded*/ 11284 if(! this->IsFloating()&& floatingelement==true){11286 if(!oldfloating && floatingelement==true){ 11285 11287 for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts; 11286 11288 this->inputs->AddInput(new PentaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum)); 11287 11289 }
Note:
See TracBrowser
for help on using the repository browser.