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

Method update

SRC/analysis/integrator/Collocation.cpp:334–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332
333
334int Collocation::update(const Vector &deltaU)
335{
336 AnalysisModel *theModel = this->getAnalysisModel();
337 if (theModel == 0) {
338 opserr << "WARNING Collocation::update() - no AnalysisModel set\n";
339 return -1;
340 }
341
342 // check domainChanged() has been called, i.e. Ut will not be zero
343 if (Ut == 0) {
344 opserr << "WARNING Collocation::update() - domainChange() failed or not called\n";
345 return -2;
346 }
347
348 // check deltaU is of correct size
349 if (deltaU.Size() != U->Size()) {
350 opserr << "WARNING Collocation::update() - Vectors of incompatible size ";
351 opserr << " expecting " << U->Size() << " obtained " << deltaU.Size() << endln;
352 return -3;
353 }
354
355 // determine the response at t+theta*deltaT
356 U->addVector(1.0, deltaU, c1);
357
358 Udot->addVector(1.0, deltaU, c2);
359
360 Udotdot->addVector(1.0, deltaU, c3);
361
362 // update the response at the DOFs
363 theModel->setResponse(*U, *Udot, *Udotdot);
364 if (theModel->updateDomain() < 0) {
365 opserr << "Collocation::update() - failed to update the domain\n";
366 return -4;
367 }
368
369 return 0;
370}
371
372const Vector &
373Collocation::getVel()

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