Changeset 16788
- Timestamp:
- 11/15/13 15:04:16 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16783 r16788 9519 9519 void Penta::HydrologyEPLGetActive(Vector<IssmDouble>* active_vec){ 9520 9520 9521 if (!IsOnBed())return; 9522 9521 if (!IsOnBed()){ 9522 return; 9523 } 9523 9524 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 9524 9525 tria->HydrologyEPLGetActive(active_vec); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16787 r16788 6989 6989 6990 6990 for(int i=0;i<numdof;i++){ 6991 /*Keeping thickness to 1 if EPL is not active*/ 6992 if(activeEpl[i]==0.0){ 6993 thickness[i]=init_thick; 6994 } 6995 else{ 6996 6991 /*Keeping thickness to initial value if EPL is not active*/ 6992 /* if(activeEpl[i]==0.0){ */ 6993 /* thickness[i]=init_thick; */ 6994 /* } */ 6995 /* else{ */ 6997 6996 /*Compute first the effective pressure in the EPL*/ 6998 6997 EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i]))); … … 7003 7002 /*And proceed to the real thing*/ 7004 7003 thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n))); 7005 }7004 //} 7006 7005 } 7007 7006 this->inputs->AddInput(new TriaInput(HydrologydcEplThicknessEnum,thickness,P1Enum)); -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r16685 r16788 1423 1423 void FemModel::UpdateConstraintsL2ProjectionEPLx(void){ /*{{{*/ 1424 1424 1425 for(int i=0;i<elements->Size();i++){ 1425 Vector<IssmDouble>* active = NULL; 1426 IssmDouble* serial_active = NULL; 1427 1428 /*update node activity. If one element is connected to mask=1, all nodes are active*/ 1429 active=new Vector<IssmDouble>(nodes->NumberOfNodes(HydrologyDCEfficientAnalysisEnum)); 1430 for (int i=0;i<elements->Size();i++){ 1426 1431 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 1427 element->UpdateConstraintsL2ProjectionEPL(); 1428 } 1432 element->HydrologyEPLGetActive(active); 1433 } 1434 1435 /*Assemble and serialize*/ 1436 active->Assemble(); 1437 serial_active=active->ToMPISerial(); 1438 delete active; 1439 1440 /*Update node activation accordingly*/ 1441 int counter =0; 1442 for (int i=0;i<nodes->Size();i++){ 1443 Node* node=dynamic_cast<Node*>(nodes->GetObjectByOffset(i)); 1444 if(node->InAnalysis(L2ProjectionEPLAnalysisEnum)){ 1445 if(serial_active[node->Sid()]==1.){ 1446 node->Activate(); 1447 counter++; 1448 } 1449 else{ 1450 node->Deactivate(); 1451 } 1452 } 1453 } 1454 xDelete<IssmDouble>(serial_active); 1455 int sum_counter; 1456 ISSM_MPI_Reduce(&counter,&sum_counter,1,ISSM_MPI_INT,ISSM_MPI_SUM,0,IssmComm::GetComm() ); 1457 ISSM_MPI_Bcast(&sum_counter,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1458 counter=sum_counter; 1459 if(VerboseSolution()) _printf0_(" Number of active nodes L2 Projection: "<< counter <<"\n"); 1460 1461 /*Update dof indexings*/ 1462 this->UpdateConstraintsx(); 1463 1464 /* for(int i=0;i<elements->Size();i++){ */ 1465 /* Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); */ 1466 /* element->UpdateConstraintsL2ProjectionEPL(); */ 1467 /* } */ 1429 1468 1430 1469 } -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r16783 r16788 648 648 return; 649 649 } 650 if(!element->IsOnBed()){ 651 unstable=0; 652 active=0; 653 *punstable=unstable; 654 return; 655 } 650 656 651 657 /*Get sediment water head h*/ … … 654 660 parameters->FindParam(&penalty_lock,HydrologydcPenaltyLockEnum); 655 661 656 if (h>h_max) 662 if (h>h_max){ 657 663 new_active=1; 658 else 664 } 665 else{ 659 666 new_active=0; 667 } 660 668 661 669 if(this->active==new_active){
Note:
See TracChangeset
for help on using the changeset viewer.