| 262 | } |
| 263 | |
| 264 | int |
| 265 | OpenSeesCommands::eigen(int typeSolver, double shift, |
| 266 | bool generalizedAlgo, bool findSmallest, |
| 267 | EigenSOE *providedEigenSOE) |
| 268 | { |
| 269 | // |
| 270 | // create a transient analysis if no analysis exists |
| 271 | // |
| 272 | bool newanalysis = false; |
| 273 | if (theStaticAnalysis == 0 && theTransientAnalysis == 0) { |
| 274 | if (theAnalysisModel == 0) |
| 275 | theAnalysisModel = new AnalysisModel(); |
| 276 | if (theTest == 0) |
| 277 | theTest = new CTestNormUnbalance(1.0e-6,25,0); |
| 278 | if (theAlgorithm == 0) { |
| 279 | theAlgorithm = new NewtonRaphson(*theTest); |
| 280 | } |
| 281 | if (theHandler == 0) { |
| 282 | theHandler = new TransformationConstraintHandler(); |
| 283 | } |
| 284 | if (theNumberer == 0) { |
| 285 | RCM *theRCM = new RCM(false); |
| 286 | theNumberer = new DOF_Numberer(*theRCM); |
| 287 | } |
| 288 | if (theTransientIntegrator == 0) { |
| 289 | setIntegrator(new Newmark(0.5,0.25), true); |
| 290 | } |
| 291 | if (theSOE == 0) { |
| 292 | ProfileSPDLinSolver *theSolver; |
| 293 | theSolver = new ProfileSPDLinDirectSolver(); |
| 294 | theSOE = new ProfileSPDLinSOE(*theSolver); |
| 295 | } |
| 296 | |
| 297 | theTransientAnalysis = new DirectIntegrationAnalysis(*theDomain, |
| 298 | *theHandler, |
| 299 | *theNumberer, |
| 300 | *theAnalysisModel, |
| 301 | *theAlgorithm, |
| 302 | *theSOE, |
| 303 | *theTransientIntegrator, |
| 304 | theTest); |
| 305 | newanalysis = true; |
| 306 | } |
| 307 | |
| 308 | // |
| 309 | // create or assign an eigen system and solver |
| 310 | // |
| 311 | bool eigenSOEUpdated = false; |
| 312 | |
| 313 | if (providedEigenSOE != 0) { |
| 314 | theEigenSOE = providedEigenSOE; |
| 315 | eigenSOEUpdated = true; |
| 316 | } else { |
| 317 | if (theEigenSOE != 0) { |
| 318 | if (theEigenSOE->getClassTag() != typeSolver) { |
| 319 | // delete theEigenSOE; |
| 320 | theEigenSOE = 0; |
| 321 | } |
no test coverage detected