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

Method update

SRC/analysis/integrator/HHTExplicit.cpp:369–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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