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

Method formElementResidual

SRC/analysis/integrator/AlphaOS_TP.cpp:600–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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