| 282 | } |
| 283 | |
| 284 | int |
| 285 | DirectIntegrationAnalysis::eigen(int numMode, bool generalized, bool findSmallest) |
| 286 | { |
| 287 | if (theAnalysisModel == 0 || theEigenSOE == 0) { |
| 288 | opserr << "WARNING DirectIntegrationAnalysis::eigen() - no EigenSOE has been set\n"; |
| 289 | return -1; |
| 290 | } |
| 291 | |
| 292 | int result = 0; |
| 293 | Domain *the_Domain = this->getDomainPtr(); |
| 294 | |
| 295 | result = theAnalysisModel->eigenAnalysis(numMode, generalized, findSmallest); |
| 296 | |
| 297 | int stamp = the_Domain->hasDomainChanged(); |
| 298 | |
| 299 | if (stamp != domainStamp) { |
| 300 | domainStamp = stamp; |
| 301 | |
| 302 | result = this->domainChanged(); |
| 303 | |
| 304 | if (result < 0) { |
| 305 | opserr << "DirectIntegrationAnalysis::eigen() - domainChanged failed"; |
| 306 | return -1; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | |
| 311 | // |
| 312 | // zero A and M |
| 313 | // |
| 314 | theEigenSOE->zeroA(); |
| 315 | theEigenSOE->zeroM(); |
| 316 | |
| 317 | // |
| 318 | // form K |
| 319 | // |
| 320 | |
| 321 | |
| 322 | FE_EleIter &theEles = theAnalysisModel->getFEs(); |
| 323 | FE_Element *elePtr; |
| 324 | |
| 325 | while((elePtr = theEles()) != 0) { |
| 326 | elePtr->zeroTangent(); |
| 327 | elePtr->addKtToTang(1.0); |
| 328 | if (theEigenSOE->addA(elePtr->getTangent(0), elePtr->getID()) < 0) { |
| 329 | opserr << "WARNING DirectIntegrationAnalysis::eigen() -"; |
| 330 | opserr << " failed in addA for ID " << elePtr->getID(); |
| 331 | result = -2; |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | // |
| 336 | // if generalized is true, form M |
| 337 | // |
| 338 | |
| 339 | if (generalized == true) { |
| 340 | // int result = 0; |
| 341 | FE_EleIter &theEles2 = theAnalysisModel->getFEs(); |
nothing calls this directly
no test coverage detected