| 209 | |
| 210 | |
| 211 | int HHTGeneralized_TP::formUnbalance() |
| 212 | { |
| 213 | // get a pointer to the LinearSOE and the AnalysisModel |
| 214 | LinearSOE *theLinSOE = this->getLinearSOE(); |
| 215 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 216 | if (theLinSOE == 0 || theModel == 0) { |
| 217 | opserr << "WARNING HHTGeneralized_TP::formUnbalance() - "; |
| 218 | opserr << "no LinearSOE or AnalysisModel has been set\n"; |
| 219 | return -1; |
| 220 | } |
| 221 | |
| 222 | theLinSOE->setB(*Put); |
| 223 | |
| 224 | // do modal damping |
| 225 | const Vector *modalValues = theModel->getModalDampingFactors(); |
| 226 | if (modalValues != 0) { |
| 227 | this->addModalDampingForce(modalValues); |
| 228 | } |
| 229 | |
| 230 | if (this->formElementResidual() < 0) { |
| 231 | opserr << "WARNING HHTGeneralized_TP::formUnbalance() "; |
| 232 | opserr << " - this->formElementResidual failed\n"; |
| 233 | return -2; |
| 234 | } |
| 235 | |
| 236 | if (this->formNodalUnbalance() < 0) { |
| 237 | opserr << "WARNING HHTGeneralized_TP::formUnbalance() "; |
| 238 | opserr << " - this->formNodalUnbalance failed\n"; |
| 239 | return -3; |
| 240 | } |
| 241 | |
| 242 | return 0; |
| 243 | } |
| 244 | |
| 245 | |
| 246 | int HHTGeneralized_TP::formEleTangent(FE_Element *theEle) |
nothing calls this directly
no test coverage detected