Changeset 22308
- Timestamp:
- 12/22/17 10:10:23 (7 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp ¶
r22284 r22308 522 522 int iseplthickcomp; 523 523 int domaintype; 524 IssmDouble dt,A ,B;524 IssmDouble dt,A; 525 525 IssmDouble EPLgrad2; 526 526 IssmDouble EPL_N; … … 534 534 Element* element=(Element*)femmodel->elements->GetObjectByOffset(j); 535 535 536 switch(domaintype){ 537 case Domain2DhorizontalEnum: 538 if(!element->IsOnBase()) return; 539 B = element->GetMaterialParameter(MaterialsRheologyBbarEnum); 540 break; 541 case Domain3DEnum: 542 B = element->GetMaterialParameter(MaterialsRheologyBEnum); 543 break; 544 default: 545 _error_("not Implemented Yet"); 546 } 536 /*skip element if 3d and not on base*/ 537 if(domaintype==Domain3DEnum && !element->IsOnBase()) continue; 547 538 548 539 int numnodes = element->GetNumberOfNodes(); 549 540 IssmDouble* thickness = xNew<IssmDouble>(numnodes); 541 IssmDouble* B = xNew<IssmDouble>(numnodes); 550 542 IssmDouble* eplhead = xNew<IssmDouble>(numnodes); 551 543 IssmDouble* epl_slopeX = xNew<IssmDouble>(numnodes); … … 569 561 IssmDouble init_thick = element->GetMaterialParameter(HydrologydcEplInitialThicknessEnum); 570 562 IssmDouble max_thick = element->GetMaterialParameter(HydrologydcEplMaxThicknessEnum); 571 572 A=pow(B,-n); 563 564 switch(domaintype){ 565 case Domain2DhorizontalEnum: element->GetInputListOnVertices(&B[0],MaterialsRheologyBbarEnum); break; 566 case Domain3DEnum: element->GetInputListOnVertices(&B[0],MaterialsRheologyBEnum); break; 567 default: _error_("not Implemented Yet"); 568 } 573 569 574 570 element->GetInputListOnVertices(&eplhead[0],EplHeadEnum); … … 587 583 else{ 588 584 for(int i=0;i<numnodes;i++){ 585 A=pow(B[i],-n); 589 586 /*Compute first the effective pressure in the EPL*/ 590 587 EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i]))); -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Element.cpp ¶
r22277 r22308 1132 1132 1133 1133 _assert_(this->matpar); 1134 switch(enum_in){ // FIXME: change this to material and replace NULL by gauss1134 switch(enum_in){ // FIXME: change this to material 1135 1135 case MaterialsRheologyNEnum: 1136 1136 return this->material->GetN(); 1137 case MaterialsRheologyBEnum:1138 return this->material->GetB(NULL);1139 case MaterialsRheologyBbarEnum:1140 return this->material->GetBbar(NULL);1141 1137 default: 1142 1138 return this->matpar->GetMaterialParameter(enum_in); -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Penta.cpp ¶
r22192 r22308 192 192 IssmDouble calvingrate[NUMVERTICES]; 193 193 IssmDouble lambda1,lambda2,ex,ey,vx,vy,vel; 194 IssmDouble sigma_vm,sigma_max,sigma_max_floating,sigma_max_grounded;194 IssmDouble B,sigma_vm,sigma_max,sigma_max_floating,sigma_max_grounded; 195 195 IssmDouble epse_2,groundedice,bed; 196 196 … … 208 208 Input* gr_input = inputs->GetInput(MaskGroundediceLevelsetEnum); _assert_(gr_input); 209 209 Input* bs_input = inputs->GetInput(BaseEnum); _assert_(bs_input); 210 Input* B_input = inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(B_input); 210 211 Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input); 211 212 Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input); 212 IssmDouble B = this->GetMaterialParameter(MaterialsRheologyBbarEnum);213 213 IssmDouble n = this->GetMaterialParameter(MaterialsRheologyNEnum); 214 214 … … 219 219 220 220 /*Get velocity components and thickness*/ 221 B_input->GetInputValue(&B,gauss); 221 222 vx_input->GetInputValue(&vx,gauss); 222 223 vy_input->GetInputValue(&vy,gauss); -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Tria.cpp ¶
r22266 r22308 217 217 IssmDouble lambda1,lambda2,ex,ey,vx,vy,vel; 218 218 IssmDouble sigma_vm[NUMVERTICES]; 219 IssmDouble sigma_max,sigma_max_floating,sigma_max_grounded;219 IssmDouble B,sigma_max,sigma_max_floating,sigma_max_grounded; 220 220 IssmDouble epse_2,groundedice,bed; 221 221 … … 226 226 Input* vx_input = inputs->GetInput(VxEnum); _assert_(vx_input); 227 227 Input* vy_input = inputs->GetInput(VyEnum); _assert_(vy_input); 228 Input* B_input = inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(B_input); 228 229 Input* gr_input = inputs->GetInput(MaskGroundediceLevelsetEnum); _assert_(gr_input); 229 230 Input* bs_input = inputs->GetInput(BaseEnum); _assert_(bs_input); 230 231 Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input); 231 232 Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input); 232 IssmDouble B = this->GetMaterialParameter(MaterialsRheologyBbarEnum);233 233 IssmDouble n = this->GetMaterialParameter(MaterialsRheologyNEnum); 234 234 … … 239 239 240 240 /*Get velocity components and thickness*/ 241 B_input->GetInputValue(&B,gauss); 241 242 vx_input->GetInputValue(&vx,gauss); 242 243 vy_input->GetInputValue(&vy,gauss); … … 301 302 IssmDouble calvingrate[NUMVERTICES]; 302 303 IssmDouble vx,vy,vel; 303 IssmDouble critical_fraction,water_height;304 IssmDouble rheology_B,critical_fraction,water_height; 304 305 IssmDouble bathymetry,Ho,thickness,float_depth,groundedice; 305 306 IssmDouble surface_crevasse[NUMVERTICES], basal_crevasse[NUMVERTICES], crevasse_depth[NUMVERTICES], H_surf, H_surfbasal; … … 318 319 IssmDouble rho_freshwater = this->GetMaterialParameter(MaterialsRhoFreshwaterEnum); 319 320 IssmDouble constant_g = this->GetMaterialParameter(ConstantsGEnum); 320 IssmDouble rheology_B = this->GetMaterialParameter(MaterialsRheologyBbarEnum);321 321 IssmDouble rheology_n = this->GetMaterialParameter(MaterialsRheologyNEnum); 322 322 323 Input* B_input = inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(B_input); 323 324 Input* H_input = inputs->GetInput(ThicknessEnum); _assert_(H_input); 324 325 Input* bed = inputs->GetInput(BedEnum); _assert_(bed); … … 336 337 gauss->GaussVertex(iv); 337 338 339 B_input->GetInputValue(&rheology_B,gauss); 338 340 H_input->GetInputValue(&thickness,gauss); 339 341 bed->GetInputValue(&bathymetry,gauss);
Note:
See TracChangeset
for help on using the changeset viewer.