/////////////////////////////// Sensitivity Begin///////////////////////////// Added by Abbas obtain the derivative of the tangent displacement (dUhatdh)
| 567 | //Added by Abbas |
| 568 | //obtain the derivative of the tangent displacement (dUhatdh) |
| 569 | void |
| 570 | ArcLength::formTangDispSensitivity(int gradNumber) |
| 571 | { |
| 572 | AnalysisModel *theModel=this->getAnalysisModel(); |
| 573 | int size=theModel->getNumEqn(); |
| 574 | LinearSOE *theLinSOE = this->getLinearSOE(); |
| 575 | // To get the structural stiffness Matrix |
| 576 | //............................................................... |
| 577 | dphatdh->Zero(); |
| 578 | //static Matrix K(size,size); |
| 579 | //K.Zero(); |
| 580 | //this->formTangent(); |
| 581 | //opserr<<" before getK"<<endln; |
| 582 | //K=this->getK(); |
| 583 | //opserr<<"after getK"<<endln; |
| 584 | |
| 585 | /* |
| 586 | opserr<<"the tangent printed from the DisplacementControl.cpp"<<endln; |
| 587 | for(int i=0;i<size;i++) |
| 588 | { |
| 589 | for(int j=0;j<size;j++) |
| 590 | { |
| 591 | opserr<<K(i,j)<<" "; |
| 592 | |
| 593 | } |
| 594 | opserr<<endln; |
| 595 | |
| 596 | } |
| 597 | */ |
| 598 | // ................................................................ |
| 599 | |
| 600 | |
| 601 | //this->formTangentSensitivity(CURRENT_TANGENT); |
| 602 | //static Matrix dKdh(size,size); |
| 603 | //dKdh.Zero(); |
| 604 | //dKdh=this->getdKdh(gradNumber); |
| 605 | // To print dKdh to the Screen |
| 606 | //................................................................ |
| 607 | |
| 608 | //opserr<<"dKdh from the DisplacementControl.cpp"<<endln; |
| 609 | //for(int i=0;i<size;i++) |
| 610 | //{ |
| 611 | //for(int j=0;j<size;j++) |
| 612 | //{ |
| 613 | //opserr<<dKdh(i,j)<<" "; |
| 614 | |
| 615 | //} |
| 616 | //opserr<<endln; |
| 617 | //} |
| 618 | |
| 619 | //form dKdh*Uft |
| 620 | //............................................................... |
| 621 | |
| 622 | //dphatdh->addMatrixVector(1.0,dKdh,*deltaUhat,-1.0); |
| 623 | //call the tangent (K) |
| 624 | this->formTangent(); |
| 625 | theLinSOE->setB(*dphatdh); |
| 626 | if(theLinSOE->solve()<0) { |
no test coverage detected