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

Method addInertiaLoadToUnbalance

SRC/element/generic/GenericClient.cpp:565–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563
564
565int GenericClient::addInertiaLoadToUnbalance(const Vector &accel)
566{
567 if (massFlag == false)
568 this->getMass();
569
570 int ndim = 0, i;
571 Vector Raccel(numDOF);
572
573 // assemble Raccel vector
574 for (i=0; i<numExternalNodes; i++ ) {
575 Raccel.Assemble(theNodes[i]->getRV(accel), ndim);
576 ndim += theNodes[i]->getNumberDOF();
577 }
578
579 // want to add ( - fact * M R * accel ) to unbalance
580 theLoad.addMatrixVector(1.0, theMass, Raccel, -1.0);
581
582 return 0;
583}
584
585
586const Vector& GenericClient::getResistingForce()

Callers

nothing calls this directly

Calls 3

AssembleMethod · 0.45
getNumberDOFMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected