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

Method update

SRC/analysis/integrator/HHTGeneralizedExplicit.cpp:380–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378
379
380int HHTGeneralizedExplicit::update(const Vector &aiPlusOne)
381{
382 updateCount++;
383 if (updateCount > 1) {
384 opserr << "WARNING HHTGeneralizedExplicit::update() - called more than once -";
385 opserr << " HHTGeneralizedExplicit integration scheme requires a LINEAR solution algorithm\n";
386 return -1;
387 }
388
389 AnalysisModel *theModel = this->getAnalysisModel();
390 if (theModel == 0) {
391 opserr << "WARNING HHTGeneralizedExplicit::update() - no AnalysisModel set\n";
392 return -2;
393 }
394
395 // check domainChanged() has been called, i.e. Ut will not be zero
396 if (Ut == 0) {
397 opserr << "WARNING HHTGeneralizedExplicit::update() - domainChange() failed or not called\n";
398 return -3;
399 }
400
401 // check aiPlusOne is of correct size
402 if (aiPlusOne.Size() != U->Size()) {
403 opserr << "WARNING HHTGeneralizedExplicit::update() - Vectors of incompatible size ";
404 opserr << " expecting " << U->Size() << " obtained " << aiPlusOne.Size() << endln;
405 return -4;
406 }
407
408 // determine the response at t+deltaT
409 U->addVector(1.0, aiPlusOne, c1);
410
411 Udot->addVector(1.0, aiPlusOne, c2);
412
413 Udotdot->addVector(0.0, aiPlusOne, c3);
414
415 // update the response at the DOFs
416 theModel->setVel(*Udot);
417 theModel->setAccel(*Udotdot);
418 if (theModel->updateDomain() < 0) {
419 opserr << "HHTGeneralizedExplicit::update() - failed to update the domain\n";
420 return -5;
421 }
422 // do not update displacements in elements only at nodes
423 theModel->setDisp(*U);
424
425 return 0;
426}
427
428
429int HHTGeneralizedExplicit::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