| 338 | } |
| 339 | |
| 340 | int ResponseSpectrumAnalysis::analyze() |
| 341 | { |
| 342 | // get the domain |
| 343 | Domain* domain = m_model->getDomainPtr(); |
| 344 | |
| 345 | // get the modal properties |
| 346 | DomainModalProperties mp; |
| 347 | if (domain->getModalProperties(mp) < 0) { |
| 348 | opserr << "ResponseSpectrumAnalysis::analyze() - failed to get modal properties" << endln; |
| 349 | return -1; |
| 350 | } |
| 351 | |
| 352 | // size info |
| 353 | int num_eigen = domain->getEigenvalues().Size(); |
| 354 | |
| 355 | // check consistency |
| 356 | int error_code; |
| 357 | error_code = check(); |
| 358 | if (error_code < 0) return error_code; |
| 359 | |
| 360 | // loop over all required eigen-modes, compute the modal displacement |
| 361 | // and save the results. |
| 362 | // we just compute modal displacements without doing any (SRSS, CQC, etc..) |
| 363 | // modal combination otherwise derived results cannot be computed. |
| 364 | // for each mode, this analysis produces a new analysis step. |
| 365 | // modal combination of displacements (or any derived results) |
| 366 | // it's up to the user. |
| 367 | for (m_current_mode = 0; m_current_mode < num_eigen; ++m_current_mode) |
| 368 | { |
| 369 | // init the new step |
| 370 | error_code = beginMode(); |
| 371 | if (error_code < 0) return error_code; |
| 372 | |
| 373 | // compute modal acceleration for this mode using the |
| 374 | // provided response spectrum function (time series) |
| 375 | error_code = solveMode(); |
| 376 | if (error_code < 0) return error_code; |
| 377 | |
| 378 | // done with the current step. |
| 379 | // here the modal displacements will be recorded (and all other results |
| 380 | // if requested via recorders...) |
| 381 | error_code = endMode(); |
| 382 | if (error_code < 0) return error_code; |
| 383 | } |
| 384 | |
| 385 | return 0; |
| 386 | } |
| 387 | |
| 388 | int ResponseSpectrumAnalysis::analyze(int mode_id) |
| 389 | { |
no test coverage detected