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

Method formElementResidual

SRC/analysis/integrator/AlphaOSGeneralized_TP.cpp:601–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599
600
601int AlphaOSGeneralized_TP::formElementResidual(void)
602{
603 // calculate Residual Force
604 AnalysisModel *theModel = this->getAnalysisModel();
605 LinearSOE *theSOE = this->getLinearSOE();
606
607 // loop through the FE_Elements and add the residual
608 FE_Element *elePtr;
609 FE_EleIter &theEles = theModel->getFEs();
610 while((elePtr = theEles()) != 0) {
611 if (theSOE->addB(elePtr->getResidual(this),elePtr->getID()) < 0) {
612 opserr << "WARNING AlphaOSGeneralized_TP::formElementResidual() -";
613 opserr << " failed in addB for ID " << elePtr->getID();
614 return -1;
615 }
616 if (alphaKU > 0.0) {
617 if (statusFlag == CURRENT_TANGENT) {
618 if (theSOE->addB(elePtr->getK_Force(*Ut-*Upt), elePtr->getID(), -alphaKU) < 0) {
619 opserr << "WARNING AlphaOSGeneralized_TP::formElementResidual() -";
620 opserr << " failed in addB for ID " << elePtr->getID();
621 return -2;
622 }
623 } else if (statusFlag == INITIAL_TANGENT) {
624 if (theSOE->addB(elePtr->getKi_Force(*Ut-*Upt), elePtr->getID(), -alphaKU) < 0) {
625 opserr << "WARNING AlphaOSGeneralized_TP::formElementResidual() -";
626 opserr << " failed in addB for ID " << elePtr->getID();
627 return -2;
628 }
629 }
630 }
631 }
632
633 return 0;
634}

Callers 1

formUnbalanceMethod · 0.95

Calls 5

getResidualMethod · 0.80
getIDMethod · 0.80
getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
addBMethod · 0.45

Tested by

no test coverage detected