MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / analyzeStep

Method analyzeStep

SRC/runtime/runtime/BasicAnalysisBuilder.cpp:477–538  ·  view source on GitHub ↗

analyze a transient step

Source from the content-addressed store, hash-verified

475
476// analyze a transient step
477int
478BasicAnalysisBuilder::analyzeStep(double dT)
479{
480 int result = 0;
481 if (theAnalysisModel->analysisStep(dT) < 0) {
482 opserr << "DirectIntegrationAnalysis::analyze() - the AnalysisModel failed";
483 opserr << " at time " << theDomain->getCurrentTime() << "\n";
484 theDomain->revertToLastCommit();
485 return -2;
486 }
487
488 // check if domain has undergone change
489 int stamp = theDomain->hasDomainChanged();
490 if (stamp != domainStamp) {
491 domainStamp = stamp;
492 if (this->domainChanged() < 0) {
493 opserr << "DirectIntegrationAnalysis::analyze() - domainChanged() failed\n";
494 return -1;
495 }
496 }
497
498 if (theTransientIntegrator->newStep(dT) < 0) {
499 opserr << "DirectIntegrationAnalysis::analyze() - the Integrator failed";
500 opserr << " at time " << theDomain->getCurrentTime() << "\n";
501 theDomain->revertToLastCommit();
502 theTransientIntegrator->revertToLastStep();
503 return -2;
504 }
505
506 result = theAlgorithm->solveCurrentStep();
507 if (result < 0) {
508 if (AnalyzeFailedMessage.find(result) != AnalyzeFailedMessage.end()) {
509 opserr << OpenSees::PromptAnalysisFailure << AnalyzeFailedMessage[result];
510 }
511 theDomain->revertToLastCommit();
512 theTransientIntegrator->revertToLastStep();
513 return -3;
514 }
515
516 if (theTransientIntegrator->shouldComputeAtEachStep()) {
517 result = theTransientIntegrator->computeSensitivities();
518 if (result < 0) {
519 opserr << "TransientAnalysis::analyze() - the SensitivityAlgorithm failed";
520 opserr << " at time " << theDomain->getCurrentTime() << "\n";
521 theDomain->revertToLastCommit();
522 theTransientIntegrator->revertToLastStep();
523 return -5;
524 }
525 }
526
527 result = theTransientIntegrator->commit();
528 if (result < 0) {
529 opserr << "DirectIntegrationAnalysis::analyze() - ";
530 opserr << "the Integrator failed to commit";
531 opserr << " at time " << theDomain->getCurrentTime() << "\n";
532 theDomain->revertToLastCommit();
533 theTransientIntegrator->revertToLastStep();
534 return -4;

Callers 2

analyzeTransientMethod · 0.95
analyzeSubLevelMethod · 0.95

Calls 12

domainChangedMethod · 0.95
analysisStepMethod · 0.45
getCurrentTimeMethod · 0.45
revertToLastCommitMethod · 0.45
hasDomainChangedMethod · 0.45
newStepMethod · 0.45
revertToLastStepMethod · 0.45
solveCurrentStepMethod · 0.45
endMethod · 0.45
computeSensitivitiesMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected