Changeset 27518
- Timestamp:
- 01/19/23 03:50:29 (2 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r27177 r27518 297 297 IssmDouble dt,scalar,water_head; 298 298 IssmDouble water_load,transfer,runoff_value; 299 IssmDouble epl_storing ,epl_transmitivity;299 IssmDouble epl_storing; //,epl_transmitivity; 300 300 IssmDouble Jdet,time; 301 301 IssmDouble residual,connectivity; 302 IssmDouble active_node; 302 303 303 304 IssmDouble *xyz_list = NULL; … … 313 314 ElementVector* pe = basalelement->NewElementVector(); 314 315 IssmDouble* basis = xNew<IssmDouble>(numnodes); 316 315 317 316 318 /*Retrieve all inputs and parameters*/ … … 353 355 basalelement ->JacobianDeterminant(&Jdet,xyz_list,gauss); 354 356 basalelement ->NodalFunctions(basis,gauss); 357 //epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input); 355 358 epl_storing = EplStoring(basalelement,gauss,epl_thick_input); 356 epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input);357 359 358 360 /*Loading term*/ … … 362 364 scalar = Jdet*gauss->weight*(water_load+runoff_value); 363 365 if(dt!=0.) scalar = scalar*dt; 364 for(int i=0;i<numnodes;i++)pe->values[i]+=scalar*basis[i]; 365 366 for(int i=0;i<numnodes;i++){ 367 //This is the original 368 pe->values[i]+=scalar*basis[i]; 369 //This is the noded version 370 /* basalelement->GetInputValue(&active_node,basalelement->nodes[i],HydrologydcMaskEplactiveNodeEnum); */ 371 /* if(!reCast<bool>(active_node)){ */ 372 /* pe->values[i]+=scalar*basis[i]; */ 373 //} 374 //if(basalelement->nodes[i]->Sid()==42)_printf_("EPL uni Input "<<scalar*basis[i]<<"\n"); 375 } 366 376 /*Transient and transfer terms*/ 367 377 if(dt!=0.){ … … 379 389 for(int iv=0;iv<numvertices;iv++){ 380 390 gauss->GaussVertex(iv); 381 epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input);391 //epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input); 382 392 connectivity = IssmDouble(basalelement->VertexConnectivity(iv)); 383 393 residual_input->GetInputValue(&residual,gauss); -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r27177 r27518 326 326 /*Intermediaries */ 327 327 bool active_element,isefficientlayer; 328 int smb_model,smb substepping;329 int hydrologysubstepping,smb_averaging;330 IssmDouble dt,scalar, sediment_storing;331 IssmDouble water_head,sediment_transmitivity;328 int smb_model,smb_averaging; 329 int smbsubstepping, hydrologysubstepping; 330 IssmDouble dt,scalar,water_head; 331 IssmDouble sediment_storing,sediment_transmitivity; 332 332 IssmDouble water_load,runoff_value,transfer; 333 333 IssmDouble Jdet,time; 334 IssmDouble active_node; 334 335 335 336 IssmDouble *xyz_list = NULL; … … 401 402 scalar = Jdet*gauss->weight*(water_load+runoff_value); 402 403 if(dt!=0.) scalar = scalar*dt; 403 for(int i=0;i<numnodes;i++){ 404 pe->values[i]+=scalar*basis[i]; 405 } 404 for(int i=0;i<numnodes;i++)pe->values[i]+=scalar*basis[i]; 406 405 } 407 406 else{ … … 414 413 if(dt!=0.) scalar = scalar*dt; 415 414 for(int i=0;i<numnodes;i++){ 415 //This is the original 416 416 pe->values[i]+=scalar*basis[i]; 417 //This is the noded version 418 /* basalelement->GetInputValue(&active_node,basalelement->nodes[i],HydrologydcMaskEplactiveNodeEnum); */ 419 /* if(!reCast<bool>(active_node)){ */ 420 /* pe->values[i]+=scalar*basis[i]; */ 421 /* //if(basalelement->nodes[i]->Sid()==42)_printf_("IDS uni Input "<<scalar*basis[i]<<"\n"); */ 422 //} 417 423 } 418 424 } -
issm/trunk-jpl/src/c/classes/Loads/Moulin.cpp
r26144 r27518 104 104 /*}}}*/ 105 105 void Moulin::Echo(void){/*{{{*/ 106 this->DeepEcho(); 106 107 _printf_("Moulin:\n"); 108 _printf_(" id: " << id << "\n"); 109 hnode->Echo(); 110 hvertex->Echo(); 111 helement->Echo(); 112 _printf_(" parameters\n"); 113 parameters->Echo(); 114 //this->DeepEcho(); 107 115 } 108 116 /*}}}*/ … … 143 151 void Moulin::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 144 152 145 /*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective 153 /*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective 146 154 * datasets, using internal ids and offsets hidden in hooks: */ 147 155 hnode->configure(nodesin); … … 204 212 break; 205 213 case HydrologyDCInefficientAnalysisEnum: 206 pe = CreatePVectorHydrologyDCInefficient();214 pe = this->CreatePVectorHydrologyDCInefficient(); 207 215 break; 208 216 case HydrologyDCEfficientAnalysisEnum: 209 pe = CreatePVectorHydrologyDCEfficient();217 pe = this->CreatePVectorHydrologyDCEfficient(); 210 218 break; 211 219 default: … … 427 435 * mesh), don't add the moulin input a second time*/ 428 436 if(node->IsClone()) return NULL; 429 bool isefficientlayer ;437 bool isefficientlayer, active_element; 430 438 IssmDouble moulin_load,dt; 431 439 IssmDouble epl_active; 432 433 440 /*Initialize Element matrix*/ 434 441 ElementVector* pe=new ElementVector(&node,1,this->parameters); … … 437 444 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 438 445 parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum); 439 // Test version input in EPL when active 446 447 //Test version input in EPL when active 440 448 if(isefficientlayer){ 441 this->element->GetInputValue(&epl_active,node,HydrologydcMaskEplactiveNodeEnum); 442 if(reCast<bool>(epl_active)){ 443 pe->values[0]=moulin_load*0.0; 449 this->element->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 450 if(!active_element){ 451 /* this->element->GetInputValue(&epl_active,node,HydrologydcMaskEplactiveNodeEnum); */ 452 /* if(reCast<bool>(epl_active))pe->values[0]=0.0; */ 453 /* else { */ 454 pe->values[0]=moulin_load*dt; 455 /* if (moulin_load>0)_printf_("MoulinInput in Sed is "<<pe->values[0]<<"\n"); */ 456 /* if (moulin_load>0)pe->Echo(); */ 457 /* } */ 458 //if (node->Sid()==4)_printf_("MoulinInput in Sed is "<<moulin_load*dt<<"\n"); 444 459 } 445 else {446 pe->values[0]=moulin_load*dt;447 }448 } 449 else{450 pe->values[0]=moulin_load*dt;451 } 460 else pe->values[0]=0.0; 461 } 462 else pe->values[0]=moulin_load*dt; 463 464 //Test only input in sed 465 /* pe->values[0]=moulin_load*dt; */ 466 452 467 /*Clean up and return*/ 453 468 return pe; … … 458 473 /*If this node is not the master node (belongs to another partition of the 459 474 * mesh), don't add the moulin input a second time*/ 475 460 476 if(node->IsClone()) return NULL; 461 if(!this->node->IsActive()) return NULL;462 IssmDouble moulin_load,dt;463 477 ElementVector* pe=new ElementVector(&node,1,this->parameters); 464 478 465 this->element->GetInputValue(&moulin_load,node,HydrologydcBasalMoulinInputEnum); 466 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 467 468 pe->values[0]=moulin_load*dt; 469 /*Clean up and return*/ 479 //Test Input in epl if active 480 /* IssmDouble epl_active; */ 481 /* this->element->GetInputValue(&epl_active,node,HydrologydcMaskEplactiveNodeEnum); */ 482 /* //if(node->Sid()==4)_printf_("Activity is "<<epl_active<<" \n"); */ 483 /* if(reCast<bool>(epl_active)){ */ 484 /* IssmDouble moulin_load,dt; */ 485 /* this->element->GetInputValue(&moulin_load,node,HydrologydcBasalMoulinInputEnum); */ 486 /* parameters->FindParam(&dt,TimesteppingTimeStepEnum); */ 487 /* pe->values[0]=moulin_load*dt; */ 488 /* if (moulin_load>0)_printf_("MoulinInput in Epl is "<<pe->values[1]<<"\n"); */ 489 490 /* } */ 491 /* else{ */ 492 /* pe->values[0]=0.0; */ 493 /* } */ 494 // Test element only test 495 bool active_element; 496 this->element->GetInputValue(&active_element,HydrologydcMaskEplactiveEltEnum); 497 if(active_element){ 498 IssmDouble moulin_load,dt; 499 this->element->GetInputValue(&moulin_load,node,HydrologydcBasalMoulinInputEnum); 500 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 501 pe->values[0]=moulin_load*dt; 502 } 503 else pe->values[0]=0.0; 504 505 506 //Test only input is sed 507 /* pe->values[0]=0.0; */ 508 509 //Clean up and return 470 510 return pe; 471 511 }
Note:
See TracChangeset
for help on using the changeset viewer.