| 378 | |
| 379 | |
| 380 | int 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 | |
| 429 | int HHTGeneralizedExplicit::commit(void) |
nothing calls this directly
no test coverage detected