| 298 | |
| 299 | |
| 300 | int Trapezoidal::update(const Vector &deltaU) |
| 301 | { |
| 302 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 303 | if (theModel == 0) { |
| 304 | opserr << "WARNING Trapezoidal::update() - no AnalysisModel set\n"; |
| 305 | return -1; |
| 306 | } |
| 307 | |
| 308 | // check domainChanged() has been called, i.e. Ut will not be zero |
| 309 | if (Ut == 0) { |
| 310 | opserr << "WARNING Trapezoidal::update() - domainChange() failed or not called\n"; |
| 311 | return -2; |
| 312 | } |
| 313 | |
| 314 | // check deltaU is of correct size |
| 315 | if (deltaU.Size() != U->Size()) { |
| 316 | opserr << "WARNING Trapezoidal::update() - Vectors of incompatible size "; |
| 317 | opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << endln; |
| 318 | return -3; |
| 319 | } |
| 320 | |
| 321 | (*U) += deltaU; |
| 322 | Udot->addVector(1.0, deltaU, c2); |
| 323 | Udotdot->addVector(1.0, deltaU, c3); |
| 324 | |
| 325 | // update the response at the DOFs |
| 326 | theModel->setResponse(*U,*Udot,*Udotdot); |
| 327 | if (theModel->updateDomain() < 0) { |
| 328 | opserr << "Trapezoidal::update() - failed to update the domain\n"; |
| 329 | return -4; |
| 330 | } |
| 331 | |
| 332 | return 0; |
| 333 | } |
| 334 | |
| 335 | |
| 336 | int Trapezoidal::sendSelf(int cTag, Channel &theChannel) |
nothing calls this directly
no test coverage detected