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

Method update

DEVELOPER/integrator/Trapezoidal.cpp:300–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298
299
300int 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
336int Trapezoidal::sendSelf(int cTag, Channel &theChannel)

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