| 376 | } |
| 377 | |
| 378 | int Collocation::commit(void) |
| 379 | { |
| 380 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 381 | if (theModel == 0) { |
| 382 | opserr << "WARNING Collocation::commit() - no AnalysisModel set\n"; |
| 383 | return -1; |
| 384 | } |
| 385 | |
| 386 | // determine response quantities at t+deltaT |
| 387 | Udotdot->addVector(1.0/theta, *Utdotdot, (theta-1.0)/theta); |
| 388 | |
| 389 | (*Udot) = *Utdot; |
| 390 | double a1 = deltaT*(1.0 - gamma); |
| 391 | double a2 = deltaT*gamma; |
| 392 | Udot->addVector(1.0, *Utdotdot, a1); |
| 393 | Udot->addVector(1.0, *Udotdot, a2); |
| 394 | |
| 395 | (*U) = *Ut; |
| 396 | U->addVector(1.0, *Utdot, deltaT); |
| 397 | double a3 = deltaT*deltaT*(0.5 - beta); |
| 398 | double a4 = deltaT*deltaT*beta; |
| 399 | U->addVector(1.0, *Utdotdot, a3); |
| 400 | U->addVector(1.0, *Udotdot, a4); |
| 401 | |
| 402 | // update the response at the DOFs |
| 403 | theModel->setResponse(*U, *Udot, *Udotdot); |
| 404 | if (theModel->updateDomain() < 0) { |
| 405 | opserr << "Collocation::commit() - failed to update the domain\n"; |
| 406 | return -2; |
| 407 | } |
| 408 | |
| 409 | // set the time to be t+deltaT |
| 410 | double time = theModel->getCurrentDomainTime(); |
| 411 | time += (1.0-theta)*deltaT; |
| 412 | theModel->setCurrentDomainTime(time); |
| 413 | |
| 414 | return theModel->commitDomain(); |
| 415 | } |
| 416 | |
| 417 | |
| 418 | int Collocation::sendSelf(int cTag, Channel &theChannel) |
nothing calls this directly
no test coverage detected