| 332 | |
| 333 | |
| 334 | int Collocation::update(const Vector &deltaU) |
| 335 | { |
| 336 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 337 | if (theModel == 0) { |
| 338 | opserr << "WARNING Collocation::update() - no AnalysisModel set\n"; |
| 339 | return -1; |
| 340 | } |
| 341 | |
| 342 | // check domainChanged() has been called, i.e. Ut will not be zero |
| 343 | if (Ut == 0) { |
| 344 | opserr << "WARNING Collocation::update() - domainChange() failed or not called\n"; |
| 345 | return -2; |
| 346 | } |
| 347 | |
| 348 | // check deltaU is of correct size |
| 349 | if (deltaU.Size() != U->Size()) { |
| 350 | opserr << "WARNING Collocation::update() - Vectors of incompatible size "; |
| 351 | opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << endln; |
| 352 | return -3; |
| 353 | } |
| 354 | |
| 355 | // determine the response at t+theta*deltaT |
| 356 | U->addVector(1.0, deltaU, c1); |
| 357 | |
| 358 | Udot->addVector(1.0, deltaU, c2); |
| 359 | |
| 360 | Udotdot->addVector(1.0, deltaU, c3); |
| 361 | |
| 362 | // update the response at the DOFs |
| 363 | theModel->setResponse(*U, *Udot, *Udotdot); |
| 364 | if (theModel->updateDomain() < 0) { |
| 365 | opserr << "Collocation::update() - failed to update the domain\n"; |
| 366 | return -4; |
| 367 | } |
| 368 | |
| 369 | return 0; |
| 370 | } |
| 371 | |
| 372 | const Vector & |
| 373 | Collocation::getVel() |
nothing calls this directly
no test coverage detected