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

Method formSensitivityRHS

SRC/analysis/integrator/DisplacementControl.cpp:861–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859
860
861int
862DisplacementControl::formSensitivityRHS(int passedGradNumber)
863{
864 sensitivityFlag = 1;
865 //this->Activatesensitivity();//Abbas
866 // Set a couple of data members
867 gradNumber = passedGradNumber;
868
869 // get model
870 AnalysisModel* theAnalysisModel = this->getAnalysisModel();
871 LinearSOE* theSOE = this->getLinearSOE();
872
873 // Loop through elements
874 FE_Element *elePtr;
875 FE_EleIter &theEles = theAnalysisModel->getFEs();
876
877 while((elePtr = theEles()) != 0) {
878 theSOE->addB(elePtr->getResidual(this) ,elePtr->getID() );
879 }
880
881 // opserr<<" dKdh*deltaUbar after while loop is "<<*dUIJdh<<endln;
882 (*Residual)=theSOE->getB();
883
884 // opserr<<"RHS():getB()............"<<theSOE->getB()<<endln;
885 // (*Residual) += (*dUIJdh);
886
887 // (*Residual2)=theSOE->getB();
888
889 // opserr<<" the new RHS is "<<*Residual<<endln;
890 // opserr<<"where dUIJ is "<<*dUIJdh<<endln;
891
892
893 // if(CallParam==1) {
894 // opserr<<"inside if statement of gradIndex # "<<gradNumber<<endln;
895 // this->formTangDispSensitivity(dUhatdh,gradNumber);
896 // this->formdLambdaDh(gradNumber);
897 // }
898
899
900 // opserr<<"RHS: dLambdaStepdh is "<<(*dLAMBDAdh)(gradNumber)<<endln;
901
902 double CallDlambda1dh=(*dLAMBDAdh)(gradNumber);
903 // opserr<<"RHS:: dphatdh is ....................................//"<<*dphatdh<<endln;
904 Residual->addVector(1.0,*phat, CallDlambda1dh ); //needed to calculate dLambdadh
905 //opserr<<"The residual sensitivity... dRdh= "<<*Residual<<endln;
906 // opserr<<"Pref= "<<*phat<<endln;
907 // opserr<<"dLambdadh= "<<CallDlambda1dh<<endln;
908 //opserr<<" dPrdh after adding dLamdh= "<<*Residual<<endln;
909 Residual->addVector(1.0,*dphatdh, currentLambda ); //needed to calculate dLambdadh
910
911 // Matrix dKdh(size,size);
912 // dKdh.Zero();
913 // dKdh=this->getdKdh();
914 // Residual->addMatrixVector(1.0,dKdh,*deltaUbar,-1.0);
915
916
917 /*
918 Matrix Kt(size,size);

Callers 1

computeSensitivitiesMethod · 0.95

Calls 12

getResidualMethod · 0.80
getIDMethod · 0.80
getBMethod · 0.80
getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
addBMethod · 0.45
addVectorMethod · 0.45
setBMethod · 0.45
getDomainPtrMethod · 0.45
SizeMethod · 0.45
getNodeMethod · 0.45
getDOF_GroupPtrMethod · 0.45

Tested by

no test coverage detected