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

Method formElementResidual

SRC/analysis/integrator/AlphaOS.cpp:520–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518
519
520int AlphaOS::formElementResidual(void)
521{
522 // calculate Residual Force
523 AnalysisModel *theModel = this->getAnalysisModel();
524 LinearSOE *theSOE = this->getLinearSOE();
525
526 // loop through the FE_Elements and add the residual
527 FE_Element *elePtr;
528 FE_EleIter &theEles = theModel->getFEs();
529 while((elePtr = theEles()) != 0) {
530 if (theSOE->addB(elePtr->getResidual(this), elePtr->getID()) < 0) {
531 opserr << "WARNING AlphaOS::formElementResidual() -";
532 opserr << " failed in addB for ID " << elePtr->getID();
533 return -1;
534 }
535 if (alpha < 1.0) {
536 if (statusFlag == CURRENT_TANGENT) {
537 if (theSOE->addB(elePtr->getK_Force(*Ut-*Upt), elePtr->getID(), alpha-1.0) < 0) {
538 opserr << "WARNING AlphaOS::formElementResidual() -";
539 opserr << " failed in addB for ID " << elePtr->getID();
540 return -2;
541 }
542 } else if (statusFlag == INITIAL_TANGENT) {
543 if (theSOE->addB(elePtr->getKi_Force(*Ut-*Upt), elePtr->getID(), alpha-1.0) < 0) {
544 opserr << "WARNING AlphaOS::formElementResidual() -";
545 opserr << " failed in addB for ID " << elePtr->getID();
546 return -2;
547 }
548 }
549 }
550 }
551
552 return 0;
553}

Callers 8

formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45
formUnbalanceMethod · 0.45

Calls 5

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

Tested by

no test coverage detected