| 356 | |
| 357 | |
| 358 | int HHT::update(const Vector &deltaU) |
| 359 | { |
| 360 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 361 | if (theModel == 0) { |
| 362 | opserr << "WARNING HHT::update() - no AnalysisModel set\n"; |
| 363 | return -1; |
| 364 | } |
| 365 | |
| 366 | // check domainChanged() has been called, i.e. Ut will not be zero |
| 367 | if (Ut == 0) { |
| 368 | opserr << "WARNING HHT::update() - domainChange() failed or not called\n"; |
| 369 | return -2; |
| 370 | } |
| 371 | |
| 372 | // check deltaU is of correct size |
| 373 | if (deltaU.Size() != U->Size()) { |
| 374 | opserr << "WARNING HHT::update() - Vectors of incompatible size "; |
| 375 | opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << endln; |
| 376 | return -3; |
| 377 | } |
| 378 | |
| 379 | // determine the response at t+deltaT |
| 380 | (*U) += deltaU; |
| 381 | |
| 382 | Udot->addVector(1.0, deltaU, c2); |
| 383 | |
| 384 | Udotdot->addVector(1.0, deltaU, c3); |
| 385 | |
| 386 | // determine displacement and velocity at t+alpha*deltaT |
| 387 | (*Ualpha) = *Ut; |
| 388 | Ualpha->addVector((1.0-alpha), *U, alpha); |
| 389 | |
| 390 | (*Ualphadot) = *Utdot; |
| 391 | Ualphadot->addVector((1.0-alpha), *Udot, alpha); |
| 392 | |
| 393 | // update the response at the DOFs |
| 394 | theModel->setResponse(*Ualpha,*Ualphadot,*Udotdot); |
| 395 | if (theModel->updateDomain() < 0) { |
| 396 | opserr << "HHT::update() - failed to update the domain\n"; |
| 397 | return -4; |
| 398 | } |
| 399 | |
| 400 | return 0; |
| 401 | } |
| 402 | |
| 403 | |
| 404 | int HHT::commit(void) |
no test coverage detected