MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / getLambdaSensitivity

Method getLambdaSensitivity

SRC/analysis/integrator/DisplacementControl.cpp:794–837  ·  view source on GitHub ↗

dLambdadh of the subsequent iterations (J>1)

Source from the content-addressed store, hash-verified

792
793 // dLambdadh of the subsequent iterations (J>1)
794double
795DisplacementControl::getLambdaSensitivity(int gradNumber)
796{
797
798 //call the tangent displacement component (deltaUhat)
799 // LinearSOE *theLinSOE = this->getLinearSOE();
800
801 // this->formTangent();
802 // theLinSOE->setB(*phat);
803 // if (theLinSOE->solve() < 0) {
804 // opserr << "DisplacementControl::newStep(void) - failed in solver\n";
805 // return -1;
806 // }
807
808 // (*deltaUhat) = theLinSOE->getX();
809
810 Vector &UFT=*deltaUhat;
811 double UFT_Comp=UFT(theDofID);
812
813 //call the derivative of the tangent displacement component (dUftdh).
814 Vector &duHatdh=*dUhatdh;
815 double duHatdh_Comp=duHatdh(theDofID);
816
817 //Call the residual displacement component
818 Vector &dufR=*deltaUbar;
819 double dufR_Comp=dufR(theDofID);
820
821 Vector &dufRdh=*dUIJdh;// component of the dUfrDh: derivative of the residual displacement
822 double dufRdh_Comp=dufRdh(theDofID);
823
824 if(UFT_Comp==0.0 )
825 Dlambdadh=0.0;
826 else
827 // dLambdadh_ij( the sensitivity of the load component to the parameter h)
828 Dlambdadh=((-dufRdh_Comp*UFT_Comp +(dufR_Comp*duHatdh_Comp)))/(UFT_Comp*UFT_Comp); //
829
830 // Now update Lambda_ij
831 if(dLAMBDAdh !=0) {
832 (*dLAMBDAdh)(gradNumber) = (*dLAMBDAdh)(gradNumber)+ Dlambdadh;
833 return (*dLAMBDAdh)(gradNumber);
834 } else {
835 return 0.0;
836 }
837}
838
839
840

Callers 1

computeSensitivitiesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected