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

Method update

SRC/analysis/integrator/KRAlphaExplicit.cpp:495–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493
494
495int KRAlphaExplicit::update(const Vector &aiPlusOne)
496{
497 updateCount++;
498 if (updateCount > 1) {
499 opserr << "WARNING KRAlphaExplicit::update() - called more than once -";
500 opserr << " KRAlphaExplicit integration scheme requires a LINEAR solution algorithm\n";
501 return -1;
502 }
503
504 AnalysisModel *theModel = this->getAnalysisModel();
505 if (theModel == 0) {
506 opserr << "WARNING KRAlphaExplicit::update() - no AnalysisModel set\n";
507 return -2;
508 }
509
510 // check domainChanged() has been called, i.e. Ut will not be zero
511 if (Ut == 0) {
512 opserr << "WARNING KRAlphaExplicit::update() - domainChange() failed or not called\n";
513 return -3;
514 }
515
516 // check aiPlusOne is of correct size
517 if (aiPlusOne.Size() != U->Size()) {
518 opserr << "WARNING KRAlphaExplicit::update() - Vectors of incompatible size ";
519 opserr << " expecting " << U->Size() << " obtained " << aiPlusOne.Size() << endln;
520 return -4;
521 }
522
523 // determine the response at t+deltaT
524 //U->addVector(1.0, aiPlusOne, c1); // c1 = 0.0
525
526 //Udot->addVector(1.0, aiPlusOne, c2); // c2 = 0.0
527
528 Udotdot->addVector(0.0, aiPlusOne, c3);
529
530 // update the response at the DOFs
531 theModel->setVel(*Udot);
532 theModel->setAccel(*Udotdot);
533 if (theModel->updateDomain() < 0) {
534 opserr << "KRAlphaExplicit::update() - failed to update the domain\n";
535 return -5;
536 }
537 // do not update displacements in elements only at nodes
538 theModel->setDisp(*U);
539
540 return 0;
541}
542
543
544int KRAlphaExplicit::commit(void)

Callers

nothing calls this directly

Calls 7

getAnalysisModelMethod · 0.45
SizeMethod · 0.45
addVectorMethod · 0.45
setVelMethod · 0.45
setAccelMethod · 0.45
updateDomainMethod · 0.45
setDispMethod · 0.45

Tested by

no test coverage detected