MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / update

Method update

SRC/analysis/integrator/TRBDF3.cpp:354–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352
353
354int TRBDF3::update(const Vector &deltaU)
355{
356 AnalysisModel *theModel = this->getAnalysisModel();
357 if (theModel == 0) {
358 opserr << "WARNING TRBDF3::update() - no AnalysisModel set\n";
359 return -1;
360 }
361
362 // check domainChanged() has been called, i.e. Ut will not be zero
363 if (Ut == 0) {
364 opserr << "WARNING TRBDF3::update() - domainChange() failed or not called\n";
365 return -2;
366 }
367
368 // check deltaU is of correct size
369 if (deltaU.Size() != U->Size()) {
370 opserr << "WARNING TRBDF3::update() - Vectors of incompatible size ";
371 opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << endln;
372 return -3;
373 }
374
375 // determine the response at t+deltaT
376 (*U) += deltaU;
377 Udot->addVector(1.0, deltaU, c2);
378 Udotdot->addVector(1.0, deltaU, c3);
379
380 // update the response at the DOFs
381 theModel->setResponse(*U,*Udot,*Udotdot);
382 if (theModel->updateDomain() < 0) {
383 opserr << "TRBDF3::update() - failed to update the domain\n";
384 return -4;
385 }
386
387 return 0;
388}
389
390
391const Vector &

Callers

nothing calls this directly

Calls 5

getAnalysisModelMethod · 0.45
SizeMethod · 0.45
addVectorMethod · 0.45
setResponseMethod · 0.45
updateDomainMethod · 0.45

Tested by

no test coverage detected