Changeset 23893
- Timestamp:
- 04/25/19 02:30:22 (6 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r23888 r23893 189 189 IssmDouble lambda1,lambda2,ex,ey,vx,vy,vel; 190 190 IssmDouble B,sigma_max,sigma_max_floating,sigma_max_grounded,n; 191 IssmDouble epse_2,groundedice,bed ;191 IssmDouble epse_2,groundedice,bed,sealevel; 192 192 IssmDouble sigma_vm[NUMVERTICES]; 193 193 … … 209 209 Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input); 210 210 Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input); 211 Input* sl_input = inputs->GetInput(SealevelEnum); _assert_(sl_input); 211 212 212 213 /* Start looping on the number of vertices: */ … … 225 226 smax_gr_input->GetInputValue(&sigma_max_grounded,gauss); 226 227 vel=sqrt(vx*vx+vy*vy)+1.e-14; 228 sl_input->GetInputValue(&sealevel,gauss); 227 229 228 230 /*Compute strain rate and viscosity: */ … … 249 251 250 252 /*Assign values*/ 251 if(bed> 0.){253 if(bed>sealevel){ 252 254 calvingratex[iv]=0.; 253 255 calvingratey[iv]=0.; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r23888 r23893 244 244 IssmDouble sigma_vm[NUMVERTICES]; 245 245 IssmDouble B,sigma_max,sigma_max_floating,sigma_max_grounded,n; 246 IssmDouble epse_2,groundedice,bed; 246 IssmDouble epse_2,groundedice,bed,sealevel; // added sealevel 247 247 248 248 249 /* Get node coordinates and dof list: */ … … 258 259 Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input); 259 260 Input* n_input = inputs->GetInput(MaterialsRheologyNEnum); _assert_(n_input); 261 Input* sl_input = inputs->GetInput(SealevelEnum); _assert_(sl_input); 262 263 260 264 261 265 /* Start looping on the number of vertices: */ … … 270 274 vy_input->GetInputValue(&vy,gauss); 271 275 gr_input->GetInputValue(&groundedice,gauss); 272 bs_input->GetInputValue(&bed,gauss); 276 bs_input->GetInputValue(&bed,gauss); 273 277 smax_fl_input->GetInputValue(&sigma_max_floating,gauss); 274 278 smax_gr_input->GetInputValue(&sigma_max_grounded,gauss); 275 279 vel=sqrt(vx*vx+vy*vy)+1.e-14; 280 sl_input->GetInputValue(&sealevel,gauss); 276 281 277 282 /*Compute strain rate and viscosity: */ … … 301 306 else 302 307 sigma_max = sigma_max_grounded; 303 304 308 /*Assign values*/ 305 if(bed> 0.){309 if(bed>sealevel){ // Changed 0. to sealevel 306 310 calvingratex[iv]=0.; 307 311 calvingratey[iv]=0.; … … 312 316 } 313 317 calvingrate[iv] =sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]); 318 314 319 } 315 320
Note:
See TracChangeset
for help on using the changeset viewer.