| 458 | |
| 459 | |
| 460 | int CollocationHSFixedNumIter::commit(void) |
| 461 | { |
| 462 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 463 | if (theModel == 0) { |
| 464 | opserr << "WARNING CollocationHSFixedNumIter::commit() - no AnalysisModel set\n"; |
| 465 | return -1; |
| 466 | } |
| 467 | |
| 468 | LinearSOE *theSOE = this->getLinearSOE(); |
| 469 | if (theSOE == 0) { |
| 470 | opserr << "WARNING CollocationHSFixedNumIter::commit() - no LinearSOE set\n"; |
| 471 | return -2; |
| 472 | } |
| 473 | |
| 474 | if (theSOE->solve() < 0) { |
| 475 | opserr << "WARNING CollocationHSFixedNumIter::commit() - " |
| 476 | << "the LinearSysOfEqn failed in solve()\n"; |
| 477 | return -3; |
| 478 | } |
| 479 | const Vector &deltaU = theSOE->getX(); |
| 480 | |
| 481 | // determine the response at t+theta*deltaT |
| 482 | U->addVector(1.0, deltaU, c1); |
| 483 | |
| 484 | Udot->addVector(1.0, deltaU, c2); |
| 485 | |
| 486 | Udotdot->addVector(1.0, deltaU, c3); |
| 487 | |
| 488 | // determine response quantities at t+deltaT |
| 489 | Udotdot->addVector(1.0/theta, *Utdotdot, (theta-1.0)/theta); |
| 490 | |
| 491 | (*Udot) = *Utdot; |
| 492 | double a1 = deltaT*(1.0 - gamma); |
| 493 | double a2 = deltaT*gamma; |
| 494 | Udot->addVector(1.0, *Utdotdot, a1); |
| 495 | Udot->addVector(1.0, *Udotdot, a2); |
| 496 | |
| 497 | (*U) = *Ut; |
| 498 | U->addVector(1.0, *Utdot, deltaT); |
| 499 | double a3 = deltaT*deltaT*(0.5 - beta); |
| 500 | double a4 = deltaT*deltaT*beta; |
| 501 | U->addVector(1.0, *Utdotdot, a3); |
| 502 | U->addVector(1.0, *Udotdot, a4); |
| 503 | |
| 504 | // update the response at the DOFs |
| 505 | theModel->setResponse(*U, *Udot, *Udotdot); |
| 506 | |
| 507 | // set the time to be t+deltaT |
| 508 | double time = theModel->getCurrentDomainTime(); |
| 509 | time += (1.0-theta)*deltaT; |
| 510 | theModel->setCurrentDomainTime(time); |
| 511 | |
| 512 | return theModel->commitDomain(); |
| 513 | } |
| 514 | |
| 515 | |
| 516 | const Vector & |
nothing calls this directly
no test coverage detected