| 2203 | } |
| 2204 | |
| 2205 | int |
| 2206 | Node::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 | |
| 2235 | const Vector * |
| 2236 | Node::getResponse(NodeResponseType responseType) |
no test coverage detected