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

Method resetReactionForce

DEVELOPER/core/Node.cpp:2205–2233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2203}
2204
2205int
2206Node::resetReactionForce(int flag){
2207
2208 // create rection vector if have not done so already
2209 if (reaction == 0) {
2210 reaction = new Vector(numberDOF);
2211 if (reaction == 0) {
2212 opserr << "WARNING Node::addReactionForce() - out of memory\n";
2213 return -1;
2214 }
2215 }
2216
2217 reaction->Zero();
2218
2219 // add unbalance, the negative of applied forces hence the -=
2220 if (flag == 0) {
2221 *reaction -= this->getUnbalancedLoad();
2222 } if (flag == 1) {
2223 *reaction -= this->getUnbalancedLoadIncInertia();
2224 } else {
2225 if (mass != 0 && alphaM != 0) {
2226 if (alphaM != 0.0) {
2227 const Vector &theVel = this->getTrialVel(); // in case vel not created
2228 reaction->addMatrixVector(1.0, *mass, theVel, alphaM);
2229 }
2230 }
2231 }
2232 return 0;
2233}
2234
2235const Vector *
2236Node::getResponse(NodeResponseType responseType)

Callers 1

Calls 2

ZeroMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected