| 285 | |
| 286 | |
| 287 | int KRAlphaExplicit::formTangent(int statFlag) |
| 288 | { |
| 289 | statusFlag = statFlag; |
| 290 | |
| 291 | // only update tangent if domain has changed |
| 292 | if (initAlphaMatrices) { |
| 293 | LinearSOE *theLinSOE = this->getLinearSOE(); |
| 294 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 295 | if (theLinSOE == 0 || theModel == 0) { |
| 296 | opserr << "WARNING KRAlphaExplicit::formTangent() - "; |
| 297 | opserr << "no LinearSOE or AnalysisModel has been set\n"; |
| 298 | return -1; |
| 299 | } |
| 300 | |
| 301 | theLinSOE->zeroA(); |
| 302 | |
| 303 | int size = theLinSOE->getNumEqn(); |
| 304 | ID id(size); |
| 305 | for (int i=1; i<size; i++) { |
| 306 | id(i) = id(i-1) + 1; |
| 307 | } |
| 308 | if (theLinSOE->addA(*Mhat, id) < 0) { |
| 309 | opserr << "WARNING KRAlphaExplicit::formTangent() - "; |
| 310 | opserr << "failed to add Mhat to A\n"; |
| 311 | return -2; |
| 312 | } |
| 313 | } |
| 314 | return 0; |
| 315 | } |
| 316 | |
| 317 | |
| 318 | int KRAlphaExplicit::formEleTangent(FE_Element *theEle) |
nothing calls this directly
no test coverage detected