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

Method update

SRC/analysis/integrator/AlphaOS_TP.cpp:453–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451
452
453int AlphaOS_TP::update(const Vector &deltaU)
454{
455 updateCount++;
456 if (updateCount > 1) {
457 opserr << "WARNING AlphaOS_TP::update() - called more than once -";
458 opserr << " AlphaOS_TP integration scheme requires a LINEAR solution algorithm\n";
459 return -1;
460 }
461
462 AnalysisModel *theModel = this->getAnalysisModel();
463 if (theModel == 0) {
464 opserr << "WARNING AlphaOS_TP::update() - no AnalysisModel set\n";
465 return -2;
466 }
467
468 // check domainChanged() has been called, i.e. Ut will not be zero
469 if (Ut == 0) {
470 opserr << "WARNING AlphaOS_TP::update() - domainChange() failed or not called\n";
471 return -3;
472 }
473
474 // check deltaU is of correct size
475 if (deltaU.Size() != U->Size()) {
476 opserr << "WARNING AlphaOS_TP::update() - Vectors of incompatible size ";
477 opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << "\n";
478 return -4;
479 }
480
481 // save the predictor displacements
482 (*Upt) = *U;
483
484 // determine the response at t+deltaT
485 U->addVector(1.0, deltaU, c1);
486
487 Udot->addVector(1.0, deltaU, c2);
488
489 Udotdot->addVector(0.0, deltaU, c3);
490
491 // update the response at the DOFs
492 theModel->setVel(*Udot);
493 theModel->setAccel(*Udotdot);
494 if (theModel->updateDomain() < 0) {
495 opserr << "AlphaOS_TP::update() - failed to update the domain\n";
496 return -5;
497 }
498 // do not update displacements in elements only at nodes
499 theModel->setDisp(*U);
500
501 return 0;
502}
503
504
505int AlphaOS_TP::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